﻿@font-face {
    font-family: IRANSans;
    src: url('../fonts/IRANSans/IRANSansWeb.eot');
    src: url('../fonts/IRANSans/IRANSansWeb.eot') format('embedded-opentype'), url('../fonts/IRANSans/IRANSansWeb(FaNum).woff') format('woff'), url('../fonts/IRANSans/IRANSansWeb.ttf') format('truetype');
    font-weight: 400;
    font-style: normal
}

@font-face {
    font-family: vazir;
    src: url('../fonts/vazir/Vazir-Light-FD-WOL.eot');
    src: url('../fonts/vazir/Vazir-Light-FD-WOL.eot') format('embedded-opentype'), url('../fonts/vazir/Vazir-Light-FD-WOL.woff') format('woff'), url('../fonts/vazir/Vazir-Light-FD-WOL.ttf') format('truetype');
    font-weight: 400;
    font-style: normal
}

@font-face {
    font-family: vazir-bold;
    src: url('../fonts/vazir/vazir-Bold.eot');
    src: url('../fonts/vazir/vazir-Blod.eot') format('embedded-opentype'), url('../fonts/vazir/Vazir-Bold-FD.woff') format('woff'), url('../fonts/vazir/vazir-Bold.ttf') format('truetype');
    font-weight: 400;
    font-style: normal
}

body {
    font-family: "IRANSans", sans-serif;
}


h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-family: "IRANSans", sans-serif;
    font-weight: 500;
    line-height: 1.25;
    color: var(--bs-heading-color);
}




:root {
    --bg: #f3efe3;
    --ink: #1d261b;
    --muted: #697060;
    --card: #fffaf0;
    --line: #e2d7bd;
    --accent: #407c3b;
    --accent-2: #d99a2b;
    --danger: #b42318;
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: IRANSans, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top right, rgba(64, 124, 59, .18), transparent 32rem), linear-gradient(145deg, #f7f1df, var(--bg));
}

.page {
    width: min(920px, 100%);
    margin: 0 auto;
    padding: 18px 14px 42px;
}

.hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 28px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #1f4f2d, #6c7d22 58%, #c47c24);
    box-shadow: 0 22px 55px rgba(31, 79, 45, .24);
}

    .hero:after {
        content: "";
        position: absolute;
        inset: auto -46px -80px auto;
        width: 210px;
        height: 210px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .13);
    }

    .hero h1 {
        position: relative;
        margin: 0 0 10px;
        font-size: clamp(1.5rem, 6vw, 2.55rem);
        line-height: 1.45;
    }

    .hero p {
        position: relative;
        margin: 0;
        color: rgba(255, 255, 255, .88);
        line-height: 1.9;
    }

.bale-user {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.chip {
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
}

    .chip span {
        display: block;
        margin-bottom: 4px;
        color: rgba(255, 255, 255, .76);
        font-size: .82rem;
    }

.card {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: rgba(255, 250, 240, .92);
    box-shadow: 0 16px 42px rgba(87, 72, 39, .12);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 10px;
    font-weight: 800;
}

    .section-title:before {
        content: "";
        width: 10px;
        height: 26px;
        border-radius: 999px;
        background: var(--accent-2);
    }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

    .field.full {
        grid-column: 1 / -1;
    }

label {
    font-size: 13px;
    font-weight: 700;
    line-height: 25px;
    text-align: justify;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 5px 13px;
    color: var(--ink);
    font: inherit;
    background: #fffdf8;
    outline: none;
    transition: border .2s, box-shadow .2s, transform .2s;
}

    input:focus,
    select:focus,
    textarea:focus {
        border-color: rgba(64, 124, 59, .7);
        box-shadow: 0 0 0 4px rgba(64, 124, 59, .13);
    }

textarea {
    min-height: 92px;
    resize: vertical;
}

.radio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

    .radio-grid label {
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 12px;
        background: #fffdf8;
        font-weight: normal;
        font-size: 13px;
    }

    .radio-grid input {
        width: auto;
        margin-left: 6px;
    }

.hint {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.8;
}

.tree-builder {
    display: grid;
    gap: 10px;
}

.tree-entry-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(72px, .65fr) minmax(72px, .65fr);
    gap: 8px;
    align-items: end;
    border: 1px solid rgba(64, 124, 59, .18);
    border-radius: 16px;
    padding: 10px;
    background: rgba(64, 124, 59, .045);
}

.tree-entry-panel label {
    font-size: 12px;
    line-height: 20px;
}

.tree-entry-panel input,
.tree-entry-panel select {
    min-height: 44px;
    border-radius: 12px;
    padding: 9px 10px;
}

.tree-add-btn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 14px;
    white-space: nowrap;
    box-shadow: 0 8px 16px rgba(64, 124, 59, .16);
}

.tree-table-wrap {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffdf8;
}

.tree-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tree-table th {
    padding: 9px 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
    background: rgba(217, 154, 43, .10);
}

.tree-table th:nth-child(1),
.tree-table td:nth-child(1) {
    width: 42%;
}

.tree-table th:nth-child(2),
.tree-table td:nth-child(2),
.tree-table th:nth-child(3),
.tree-table td:nth-child(3) {
    width: 20%;
}

.tree-table th:nth-child(4),
.tree-table td:nth-child(4) {
    width: 18%;
    text-align: center;
}

.tree-table td {
    padding: 8px 10px;
    border-top: 1px solid rgba(226, 215, 189, .75);
    font-size: .9rem;
    line-height: 1.7;
    vertical-align: middle;
}

.tree-table strong {
    font-weight: 800;
}

.tree-remove-btn {
    width: auto;
    min-width: 46px;
    padding: 7px 8px;
    border-radius: 10px;
    color: var(--danger);
    background: rgba(180, 35, 24, .08);
    box-shadow: none;
    font-size: 12px;
}

.validation-summary-errors,
.field-validation-error {
    color: var(--danger);
}

.validation-summary-errors {
    border: 1px solid rgba(180, 35, 24, .25);
    border-radius: 16px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(180, 35, 24, .06);
}

.actions {
    position: sticky;
    bottom: 0;
    margin: 20px -18px -18px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    background: rgba(255, 250, 240, .86);
    backdrop-filter: blur(12px);
}

button {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    color: #fff;
    font: inherit;
    
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #245a28);
    box-shadow: 0 12px 26px rgba(64, 124, 59, .28);
}

@media (max-width: 640px) {
    .bale-user,
    .grid,
    .radio-grid {
        grid-template-columns: 1fr;
    }

    .tree-entry-panel {
        grid-template-columns: minmax(0, 1.25fr) minmax(62px, .65fr) minmax(62px, .65fr);
        gap: 6px;
    }

    .hero {
        padding: 20px;
    }

    .tree-table th,
    .tree-table td {
        padding: 8px 7px;
        font-size: 12px;
    }

    .tree-remove-btn {
        min-width: 40px;
        padding: 6px 7px;
    }
}
