@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --ink: #17221f;
    --muted: #68736f;
    --surface: #ffffff;
    --canvas: #f4f6f2;
    --line: #dde3de;
    --soft: #eef2ee;
    --brand: #174b3d;
    --brand-2: #236b57;
    --accent: #c9ee70;
    --danger: #b53b42;
    --shadow: 0 22px 55px rgba(28, 49, 42, .14);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif; }
body { direction: rtl; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, .button { font-weight: 400 !important; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1:focus { outline: none; }
code { direction: ltr; display: inline-block; background: #e7ece8; border-radius: 5px; padding: 1px 5px; font-family: Consolas, monospace; font-size: .85em; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 0 0 auto; z-index: 40; width: 264px; display: flex; flex-direction: column; color: #eaf3ef; background: var(--brand); border-left: 1px solid rgba(255,255,255,.08); }
.brand-row { min-height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand { display: flex; align-items: center; gap: 11px; direction: ltr; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px 12px 5px 12px; background: var(--accent); color: var(--brand); font: 800 23px Georgia, serif; box-shadow: inset 0 -4px 0 rgba(23,75,61,.14); }
.brand span:last-child { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.brand strong { font: 700 15px "Segoe UI", sans-serif; letter-spacing: .2px; }
.brand small { margin-top: 4px; color: rgba(234,243,239,.62); direction: rtl; font-size: 11px; }
.main-nav { flex: 1; overflow-y: auto; padding: 14px 11px 28px; scrollbar-width: thin; }
.nav-group { padding: 24px 14px 8px; color: rgba(234,243,239,.48); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.nav-item { min-height: 41px; display: flex; align-items: center; gap: 11px; margin: 2px 0; padding: 0 12px; border-radius: 9px; color: rgba(244,249,247,.78); font-size: 13px; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(-2px); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-primary { margin: 8px 0 3px; background: var(--accent); color: var(--brand); font-weight: 700; }
.nav-primary:hover, .nav-primary.active { color: var(--brand); background: #d6fa81; }
.nav-icon { width: 20px; font-size: 18px; line-height: 1; text-align: center; }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(234,243,239,.38); }
.nav-item.active .nav-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(201,238,112,.12); }
.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 17px 22px; background: rgba(0,0,0,.08); border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot span:last-child { display: flex; flex-direction: column; gap: 3px; }
.sidebar-foot strong { font-size: 11px; }.sidebar-foot small { color: rgba(234,243,239,.52); font: 10px "Segoe UI", sans-serif; direction: ltr; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(201,238,112,.12); }
.sidebar-close { display: none !important; color: white; }

.workspace { min-width: 0; margin-right: 264px; }
.topbar { height: 72px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: rgba(255,255,255,.88); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(220,226,221,.8); }
.topbar-context { display: flex; flex-direction: column; gap: 3px; }.topbar-context strong { font-size: 13px; }.eyebrow { color: var(--brand-2); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.topbar-side { display: flex; align-items: center; gap: 15px; }.today { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-size: 11px; font-weight: 700; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; font-size: 22px; }
.icon-button:hover { background: rgba(23,75,61,.08); }.menu-button { display: none; }
.page-canvas { max-width: 1540px; margin: 0 auto; padding: 38px 38px 70px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading h1 { margin: 7px 0 7px; font-size: clamp(27px, 3vw, 38px); line-height: 1.25; letter-spacing: -.045em; }
.page-heading p { max-width: 690px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }.excel-upload-button { position: relative; overflow: hidden; cursor: pointer; }.excel-upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 13px; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,55,44,.1); }.button:disabled { opacity: .6; cursor: wait; transform: none; }
.button.primary { border-color: var(--brand); background: var(--brand); color: white; }.button.primary:hover { background: var(--brand-2); }
.button.ghost { background: transparent; }.button.danger-button { border-color: var(--danger); background: var(--danger); color: white; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.metric { min-height: 126px; display: flex; flex-direction: column; justify-content: center; padding: 21px 25px; border-left: 1px solid var(--line); }.metric:last-child { border-left: 0; }
.metric > span { color: var(--muted); font-size: 11px; }.metric strong { margin: 9px 0 5px; font: 700 clamp(21px, 2vw, 29px) "Segoe UI", Tahoma, sans-serif; letter-spacing: -.04em; direction: ltr; text-align: right; }.metric small { color: #89928f; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(270px, .85fr); gap: 22px; }
.data-section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.section-heading { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }.section-heading h2 { margin-bottom: 5px; font-size: 15px; }.section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.soft-badge { padding: 6px 10px; border-radius: 7px; background: var(--soft); color: var(--brand); font-size: 10px; font-weight: 700; }
.bar-chart { height: 320px; display: grid; grid-template-columns: repeat(12, minmax(30px, 1fr)); align-items: end; gap: 9px; padding: 35px 24px 22px; direction: rtl; overflow-x: auto; }
.bar-item { height: 100%; min-width: 35px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }.bar-item > span:last-child { color: var(--muted); font-size: 9px; white-space: nowrap; }.bar-value { min-height: 14px; color: #63706b; font: 9px "Segoe UI", sans-serif; writing-mode: vertical-rl; transform: rotate(180deg); max-height: 60px; overflow: hidden; }
.bar-track { width: 60%; max-width: 34px; height: 180px; display: flex; align-items: flex-end; border-radius: 5px 5px 2px 2px; background: #edf1ed; overflow: hidden; }.bar-track i { display: block; width: 100%; min-height: 3px; border-radius: inherit; background: var(--brand-2); transition: height .8s cubic-bezier(.2,.8,.2,1); }
.quick-links { padding: 4px 24px 16px; }.quick-links a { min-height: 55px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; transition: color .18s, padding .18s; }.quick-links a:last-child { border-bottom: 0; }.quick-links a:hover { color: var(--brand-2); padding-right: 5px; }.quick-links b { color: var(--brand-2); font-size: 18px; }

.logic-note { display: flex; align-items: center; gap: 14px; margin: -6px 0 24px; padding: 15px 18px; border: 1px solid #ccded5; border-radius: 12px; background: #edf6f0; }.logic-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--brand); color: var(--accent); font-size: 18px; }.logic-note div:nth-child(2) { flex: 1; }.logic-note strong { font-size: 12px; }.logic-note p { margin: 4px 0 0; color: #5d7169; font-size: 10px; }.logic-flow { display: flex; align-items: center; gap: 8px; direction: ltr; }.logic-flow span { padding: 5px 8px; border-radius: 6px; background: white; color: var(--brand); font: 700 10px "Segoe UI", sans-serif; }.logic-flow i { color: #82a096; font-style: normal; }
.table-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-box { width: min(480px, 100%); height: 40px; display: flex; align-items: center; gap: 8px; padding-right: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; }.search-box:focus-within { border-color: #85a99e; box-shadow: 0 0 0 3px rgba(35,107,87,.08); }.search-box > span { color: #73807b; font-size: 20px; }.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 11px; }.search-box button { align-self: stretch; padding: 0 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--brand-2); cursor: pointer; font-size: 10px; font-weight: 700; }
.record-count { color: var(--muted); font-size: 10px; white-space: nowrap; }
.table-wrap { width: 100%; overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }.data-table th { padding: 13px 16px; color: #69746f; background: #f7f9f6; border-bottom: 1px solid var(--line); text-align: right; font-size: 10px; font-weight: 700; white-space: nowrap; }.data-table td { min-width: 100px; padding: 15px 16px; border-bottom: 1px solid #edf0ed; color: #34403c; vertical-align: middle; white-space: nowrap; }.data-table tbody tr { transition: background .15s; }.data-table tbody tr:hover { background: #fafcf9; }.data-table tbody tr:last-child td { border-bottom: 0; }.data-table td small { display: block; margin-top: 5px; color: #8a9490; font-size: 9px; }.invoice-number { direction: ltr; display: block; text-align: right; font-family: "Segoe UI", sans-serif; color: var(--brand); }
.actions-cell { min-width: 125px !important; text-align: left !important; }.row-action { padding: 4px 7px; border: 0; background: transparent; color: var(--brand-2); font-size: 10px; font-weight: 700; cursor: pointer; }.row-action:hover { text-decoration: underline; }.row-action.danger { color: var(--danger); }
.table-empty { min-height: 310px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 35px; }.table-empty > span { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 50%; background: var(--soft); color: var(--brand); font-size: 24px; }.table-empty h3 { margin-bottom: 8px; font-size: 14px; }.table-empty p { color: var(--muted); font-size: 11px; }.text-action { border: 0; background: transparent; color: var(--brand-2); font-size: 11px; font-weight: 700; cursor: pointer; }
.loading-line { height: 3px; overflow: hidden; background: #e6ebe7; }.loading-line span { display: block; width: 35%; height: 100%; background: var(--brand-2); animation: loading 1.1s ease-in-out infinite; }

.drawer-scrim { position: fixed; inset: 0; z-index: 60; border: 0; background: rgba(18,31,27,.48); backdrop-filter: blur(2px); animation: fadeIn .2s ease; }.form-drawer { position: fixed; inset: 0 0 0 auto; z-index: 61; width: min(720px, 94vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow); animation: drawerIn .28s cubic-bezier(.2,.8,.2,1); }.drawer-head { min-height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 17px 24px; border-bottom: 1px solid var(--line); }.drawer-head h2 { margin: 5px 0 0; font-size: 20px; }.drawer-body { flex: 1; overflow-y: auto; padding: 25px 24px 35px; }.drawer-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }.drawer-form .drawer-body { flex: 1; }.drawer-actions { min-height: 75px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 14px 24px; background: #fafbf9; border-top: 1px solid var(--line); }
.dynamic-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }.field { min-width: 0; display: flex; flex-direction: column; gap: 7px; color: #3b4843; font-size: 10px; font-weight: 700; }.field.wide { grid-column: 1 / -1; }.field > span b { color: var(--danger); }.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid #d6ddd8; border-radius: 8px; outline: none; background: white; color: var(--ink); font-size: 11px; transition: border .15s, box-shadow .15s; }.field textarea { min-height: 90px; resize: vertical; }.field input:focus, .field select:focus, .field textarea:focus { border-color: #79a495; box-shadow: 0 0 0 3px rgba(35,107,87,.08); }.field-help { color: #81908a; font-weight: 400; }.validation-message { color: var(--danger); font-size: 9px; font-weight: 400; }
.form-section-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 17px; padding-top: 20px; border-top: 1px solid var(--line); }.form-section-title:first-of-type { padding-top: 0; border-top: 0; }.form-section-title > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: var(--brand); color: white; font-size: 10px; }.form-section-title div { display: flex; flex-direction: column; gap: 3px; }.form-section-title strong { font-size: 11px; }.form-section-title small { color: var(--muted); font-size: 9px; }
.persian-date-picker { position: relative; width: 100%; font-weight: 400; }.persian-date-picker.is-open { z-index: 35; }.persian-date-control { position: relative; }.persian-date-control input { padding-left: 44px !important; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }.persian-date-control > button { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 34px; border: 0; border-right: 1px solid var(--line); border-radius: 6px; background: #f6f8f5; color: var(--brand); cursor: pointer; font-size: 17px; }.persian-date-control > button:hover { background: #eaf0eb; }.persian-date-control.has-error input { border-color: var(--danger); }.persian-date-error { display: block; margin-top: 5px; color: var(--danger); font-size: 9px; font-weight: 400; }
.persian-calendar { position: absolute; top: calc(100% + 7px); right: 0; z-index: 50; width: 306px; padding: 12px; border: 1px solid #d4ddd7; border-radius: 12px; background: white; box-shadow: 0 18px 45px rgba(26,48,40,.18); animation: popIn .18s ease; }.persian-calendar-head { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }.persian-calendar-head strong { text-align: center; font-size: 11px; }.persian-calendar-head button { width: 32px; height: 32px; border: 0; border-radius: 7px; background: var(--soft); color: var(--brand); cursor: pointer; font-size: 20px; }.persian-calendar-head button:hover { background: #dfe9e2; }.persian-weekdays, .persian-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; direction: rtl; }.persian-weekdays { padding: 10px 0 5px; }.persian-weekdays span { color: var(--muted); text-align: center; font-size: 8px; font-weight: 700; }.persian-days > span, .persian-days > button { height: 34px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #3b4743; font-size: 9px; }.persian-days > button { cursor: pointer; }.persian-days > button:hover { background: var(--soft); color: var(--brand); }.persian-days > button.today { box-shadow: inset 0 0 0 1px #8aa99e; color: var(--brand); }.persian-days > button.selected { background: var(--brand); color: white; box-shadow: none; }.persian-calendar-foot { display: flex; justify-content: space-between; gap: 4px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }.persian-calendar-foot button { padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--brand-2); cursor: pointer; font-size: 8px; font-weight: 700; }.persian-calendar-foot button:hover { background: var(--soft); }
.alert { margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; font-size: 10px; line-height: 1.8; }.alert.success { background: #e9f5ed; color: #22613e; border: 1px solid #c8e4d1; }.alert.error { background: #faecec; color: #8b3136; border: 1px solid #efcccc; }.page-alert { margin: 14px 18px 0; }

.searchable-select { position: relative; width: 100%; font-weight: 400; }.searchable-select.is-open { z-index: 110; }.searchable-select-trigger { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 11px; border: 1px solid #d6ddd8; border-radius: 8px; outline: none; background: white; color: var(--ink); cursor: pointer; font: inherit; font-size: 11px; text-align: right; transition: border .15s, box-shadow .15s; }.searchable-select-trigger:hover { border-color: #aebdb5; }.searchable-select-trigger:focus, .searchable-select.is-open .searchable-select-trigger { border-color: #79a495; box-shadow: 0 0 0 3px rgba(35,107,87,.08); }.searchable-select-trigger:disabled { opacity: .55; cursor: not-allowed; }.searchable-select-trigger > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.searchable-select-trigger .placeholder { color: #7b8883; }.searchable-select-trigger > i { flex: 0 0 auto; color: var(--muted); font-size: 16px; font-style: normal; transition: transform .15s; }.searchable-select.is-open .searchable-select-trigger > i { transform: rotate(180deg); }.searchable-select.invalid .searchable-select-trigger { border-color: var(--danger); }.searchable-select-backdrop { position: fixed; inset: 0; z-index: 108; border: 0; background: transparent; cursor: default; }.searchable-select-panel { position: absolute; top: calc(100% + 7px); right: 0; left: 0; z-index: 109; min-width: 220px; padding: 8px; border: 1px solid #d4ddd7; border-radius: 11px; background: white; box-shadow: 0 18px 45px rgba(26,48,40,.18); animation: popIn .16s ease; }.searchable-select-search { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; padding: 0 9px; border: 1px solid #d9e0dc; border-radius: 7px; background: #f8faf8; }.searchable-select-search:focus-within { border-color: #79a495; box-shadow: 0 0 0 3px rgba(35,107,87,.07); }.searchable-select-search > span { color: var(--muted); font-size: 15px; }.searchable-select-search input { min-height: 36px; padding: 6px 0; border: 0; outline: 0; background: transparent; box-shadow: none !important; font-size: 10px; }.searchable-select-search input::-webkit-search-cancel-button { cursor: pointer; }.searchable-select-options { max-height: 238px; overflow-y: auto; overscroll-behavior: contain; }.searchable-select-option { width: 100%; min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: #3c4944; cursor: pointer; font: inherit; font-size: 10px; text-align: right; }.searchable-select-option:hover, .searchable-select-option:focus { outline: 0; background: var(--soft); color: var(--brand); }.searchable-select-option.selected { background: #e3f0e7; color: var(--brand); font-weight: 700; }.searchable-select-option i { color: var(--brand-2); font-style: normal; }.searchable-select-option.clear-option { margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; color: var(--muted); }.searchable-select-empty { padding: 18px 10px; color: var(--muted); font-size: 9px; text-align: center; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(17,28,25,.55); backdrop-filter: blur(3px); animation: fadeIn .18s ease; }.confirm-dialog { width: min(410px, 100%); padding: 30px; border-radius: 15px; background: white; box-shadow: var(--shadow); text-align: center; animation: popIn .22s ease; }.danger-symbol { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: #fae8e9; color: var(--danger); font-size: 22px; font-weight: 800; }.confirm-dialog h2 { margin-bottom: 9px; font-size: 18px; }.confirm-dialog p { margin-bottom: 24px; color: var(--muted); font-size: 11px; line-height: 1.8; }.confirm-dialog > div { display: flex; justify-content: center; gap: 8px; }
.excel-preview-backdrop { z-index: 120; }.excel-preview-dialog { width: min(1180px, 96vw); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 15px; background: white; box-shadow: var(--shadow); animation: popIn .22s ease; }.excel-preview-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); font-size: 10px; }.excel-preview-summary.valid { color: #22613e; background: #e9f5ed; }.excel-preview-summary.invalid { color: #8b3136; background: #faecec; }.excel-file-error { margin: 12px 24px 0; }.excel-preview-table-wrap { flex: 1; min-height: 180px; overflow: auto; }.excel-preview-table { min-width: 760px; }.excel-preview-table th:first-child, .excel-preview-table td:first-child { position: sticky; right: 0; z-index: 2; width: 72px; text-align: center; background: #f8faf8; }.excel-preview-table .invalid-row { background: #fffafa; }.excel-preview-table .invalid-cell { min-width: 150px; background: #fbe4e6; color: #8b3136; box-shadow: inset 0 0 0 1px #e9aeb3; }.excel-preview-table td small { display: block; margin-top: 4px; color: #a13b41; font-size: 8px; white-space: normal; }
.empty-state { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.empty-state > span { font-size: 38px; color: var(--danger); }.empty-state h1 { margin: 10px 0; }.empty-state p { color: var(--muted); }

.report-filter { margin-bottom: 22px; overflow: visible; }.filter-title { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--line); }.filter-title > div { display: flex; align-items: center; gap: 10px; }.filter-title > div > div { display: flex; flex-direction: column; gap: 3px; }.filter-title strong { font-size: 11px; }.filter-title small { color: var(--muted); font-size: 9px; }.filter-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--soft); color: var(--brand); font-size: 17px; }.active-filter-badge { padding: 5px 9px; border-radius: 6px; color: var(--brand); background: #e4f2e8; font-size: 9px; font-weight: 700; }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)) auto; align-items: end; gap: 12px; padding: 17px 18px 19px; }.filter-actions { display: flex; gap: 7px; padding-bottom: 1px; }.button.compact { min-height: 42px; padding-inline: 14px; white-space: nowrap; }.target-filter-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)) auto; }
.report-summary-line { display: grid; grid-template-columns: 2fr 1fr 1fr; margin-bottom: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.report-summary-line > div { display: flex; flex-direction: column; gap: 7px; padding: 16px 20px; border-left: 1px solid var(--line); }.report-summary-line > div:last-child { border-left: 0; }.report-summary-line span { color: var(--muted); font-size: 9px; }.report-summary-line strong { font: 700 18px "Segoe UI", Tahoma, sans-serif; direction: ltr; text-align: right; }
.report-table-section { margin-top: 0; }.section-inline-title { display: flex; flex-direction: column; gap: 5px; }.section-inline-title strong { font-size: 12px; }.section-inline-title small { color: var(--muted); font-size: 9px; }.page-size { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }.page-size .searchable-select { width: 88px; }.page-size .searchable-select-trigger { min-height: 34px; padding-block: 5px; }.page-size .searchable-select-panel { right: auto; left: 0; min-width: 150px; }
.pagination { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); direction: rtl; }.pagination > div { display: flex; gap: 4px; }.pagination button { min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #4e5c57; cursor: pointer; font-size: 9px; }.pagination button:hover:not(:disabled), .pagination button.current { border-color: var(--brand); background: var(--brand); color: white; }.pagination button:disabled { opacity: .4; cursor: default; }
.aggregate-metrics { display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); margin-bottom: 22px; border-radius: 14px; color: white; background: var(--brand); overflow: hidden; }.aggregate-metrics > div { min-height: 112px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 19px 21px; border-left: 1px solid rgba(255,255,255,.13); }.aggregate-metrics > div:last-child { border-left: 0; }.aggregate-metrics span, .aggregate-metrics small { color: rgba(255,255,255,.65); font-size: 9px; }.aggregate-metrics strong { font: 700 21px "Segoe UI", Tahoma, sans-serif; direction: ltr; text-align: right; }.aggregate-metrics .aggregate-primary { background: rgba(0,0,0,.12); }.aggregate-metrics .aggregate-primary strong { color: var(--accent); font-size: 29px; }
.report-chart-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .85fr); gap: 22px; }.report-chart-panel { min-height: 420px; }.chart-empty { min-height: 310px; display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.report-bar-chart { height: 340px; display: flex; align-items: flex-end; gap: 13px; padding: 35px 25px 22px; overflow-x: auto; direction: rtl; }.report-bar-item { width: 62px; min-width: 62px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }.report-bar-track { width: 34px; height: 210px; display: flex; align-items: flex-end; border-radius: 7px 7px 3px 3px; background: #edf1ed; overflow: hidden; }.report-bar-track i { width: 100%; min-height: 3px; border-radius: inherit; background: var(--brand-2); animation: growBar .65s cubic-bezier(.2,.8,.2,1) both; }.report-bar-amount { max-width: 62px; overflow: hidden; color: var(--brand); font: 700 9px "Segoe UI", sans-serif; }.report-bar-item strong { width: 70px; overflow: hidden; color: #46544f; font-size: 8px; text-align: center; white-space: nowrap; text-overflow: ellipsis; }.report-bar-item small { color: var(--muted); font-size: 8px; }
.donut-content { min-height: 339px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 25px; padding: 25px; }.donut-chart { width: 180px; height: 180px; display: grid; place-items: center; border-radius: 50%; background: #edf1ed; transform: rotate(-90deg); animation: donutIn .65s ease both; }.donut-chart::before { content: ""; position: absolute; width: 114px; height: 114px; border-radius: 50%; background: white; }.donut-chart > div { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; transform: rotate(90deg); }.donut-chart strong { max-width: 96px; overflow: hidden; font: 700 18px "Segoe UI", sans-serif; }.donut-chart span { color: var(--muted); font-size: 9px; }.donut-legend { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }.donut-legend > div { min-width: 0; display: flex; align-items: center; gap: 8px; }.donut-legend i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 3px; }.donut-legend span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }.donut-legend strong { overflow: hidden; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }.donut-legend small { color: var(--muted); font: 8px "Segoe UI", Tahoma, sans-serif; direction: rtl; }
.target-hero { display: grid; grid-template-columns: 170px 1fr 1fr 1.3fr; align-items: center; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 14px; background: white; overflow: hidden; }.target-hero > div { min-height: 145px; display: flex; flex-direction: column; justify-content: center; padding: 23px; border-left: 1px solid var(--line); }.target-hero > div:last-child { border-left: 0; }.target-score { align-items: center; }.score-ring { --score: 0; width: 105px; height: 105px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(var(--brand-2) calc(var(--score) * 1%), #e7ece8 0); }.score-ring::after { content: ""; position: absolute; width: 76px; height: 76px; border-radius: 50%; background: white; }.score-ring > span { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; }.score-ring strong { font: 700 17px "Segoe UI", sans-serif; }.score-ring small { color: var(--muted); font-size: 8px; }.target-total span, .target-gap span { color: var(--muted); font-size: 9px; }.target-total strong, .target-gap strong { margin: 8px 0; font: 700 23px "Segoe UI", sans-serif; direction: ltr; text-align: right; }.target-total small { color: #89928f; font-size: 8px; }
.progress-track { height: 7px; border-radius: 10px; background: #e7ece8; overflow: hidden; }.progress-track i { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--brand-2); transition: width .55s ease; }.target-gap .progress-track { margin-top: 4px; }
.target-analysis-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 22px; margin-bottom: 22px; }.target-month-panel, .quarter-panel { min-height: 390px; }.chart-key { display: flex; gap: 11px; color: var(--muted); font-size: 8px; }.chart-key span { display: flex; align-items: center; gap: 4px; }.chart-key i { width: 7px; height: 7px; border-radius: 2px; }.target-color { background: #dce4df; }.actual-color { background: var(--brand-2); }
.paired-bar-chart { height: 308px; display: grid; grid-template-columns: repeat(12, minmax(48px, 1fr)); align-items: end; gap: 5px; padding: 27px 18px 18px; overflow-x: auto; }.paired-bar-item { min-width: 48px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }.paired-bar-item > span { color: var(--brand); font: 700 8px "Segoe UI", sans-serif; }.paired-bar-item > strong { color: var(--muted); font-size: 8px; white-space: nowrap; }.paired-bars { width: 34px; height: 200px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }.paired-bars i { width: 14px; min-height: 0; border-radius: 4px 4px 1px 1px; animation: growBar .65s ease both; }.target-bar { background: #dce4df; }.actual-bar { background: var(--brand-2); }
.quarter-list { padding: 7px 22px 16px; }.quarter-list > div { padding: 16px 0; border-bottom: 1px solid var(--line); }.quarter-list > div:last-child { border-bottom: 0; }.quarter-list > div > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }.quarter-list strong { font-size: 10px; }.quarter-list span { font: 700 10px "Segoe UI", sans-serif; }.quarter-list small { display: block; margin-top: 7px; color: var(--muted); font-size: 8px; }.performance-badge { display: inline-block; min-width: 54px; padding: 5px 7px; border-radius: 6px; text-align: center; font: 700 9px "Segoe UI", sans-serif; }.is-great { color: #17603f !important; }.performance-badge.is-great { background: #dcf2e5; }.is-good { color: #3f7055 !important; }.performance-badge.is-good { background: #e8f1eb; }.is-mid { color: #9a6b18 !important; }.performance-badge.is-mid { background: #faf0d8; }.is-low { color: #a13b41 !important; }.performance-badge.is-low { background: #f8e5e7; }
.target-detail-drawer { width: min(560px, 94vw); }.detail-score { display: flex; flex-direction: column; align-items: center; padding: 23px; border-radius: 11px; background: var(--soft); }.detail-score > span { color: var(--muted); font-size: 9px; }.detail-score strong { margin: 7px 0; font: 800 28px "Segoe UI", sans-serif; }.detail-score small { color: var(--muted); font-size: 9px; }.detail-heading { margin: 27px 0 10px; font-size: 12px; }.performance-detail-list { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }.performance-detail-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }.performance-detail-list > div:nth-child(even) { border-left: 0; }.performance-detail-list > div:nth-last-child(-n+2) { border-bottom: 0; }.performance-detail-list > div > span { font-size: 9px; }.performance-detail-list > div > div { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }.performance-detail-list small { color: var(--muted); font: 8px "Segoe UI", sans-serif; }.performance-detail-list strong { font: 700 9px "Segoe UI", sans-serif; }.performance-detail-list.quarters > div { border-bottom: 0; }

/* Keep dense admin surfaces readable without changing their layout rhythm. */
.brand small, .sidebar-foot strong, .metric > span, .form-section-title strong,
.persian-calendar-head strong, .filter-title strong, .table-empty p,
.confirm-dialog p { font-size: 12px; }
.nav-group, .sidebar-foot small, .eyebrow, .metric small, .section-heading p,
.soft-badge, .logic-note p, .logic-flow span, .search-box button, .record-count,
.data-table th, .row-action, .alert, .searchable-select-search input,
.searchable-select-option, .excel-preview-summary, .chart-empty { font-size: 11px; }
.nav-item, .topbar-context strong, .page-heading p { font-size: 14px; }
.today, .section-inline-title strong, .logic-note strong { font-size: 13px; }
.search-box input, .data-table, .text-action, .field input, .field select,
.field textarea, .searchable-select-trigger { font-size: 12px; }
.field { font-size: 11px; }
.validation-message, .persian-date-error, .data-table td small,
.form-section-title small, .searchable-select-empty, .filter-title small,
.active-filter-badge, .report-summary-line span, .section-inline-title small,
.page-size, .pagination button, .aggregate-metrics span, .aggregate-metrics small,
.report-bar-amount, .donut-chart span, .donut-legend strong,
.target-total span, .target-gap span,
.performance-badge, .detail-score > span, .detail-score small,
.performance-detail-list > div > span, .performance-detail-list strong { font-size: 10px; }
.persian-weekdays span, .persian-calendar-foot button, .excel-preview-table td small,
.report-bar-item strong, .report-bar-item small, .donut-legend small,
.score-ring small, .target-total small, .chart-key, .paired-bar-item > span,
.paired-bar-item > strong, .quarter-list small, .performance-detail-list small { font-size: 9px; }
.persian-days > span, .persian-days > button { font-size: 10px; }

.entrance { animation: riseIn .4s both; }.delay-1 { animation-delay: .07s; }.delay-2 { animation-delay: .14s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes loading { from { transform: translateX(300%); } to { transform: translateX(-300%); } }
@keyframes growBar { from { height: 0; } }
@keyframes donutIn { from { opacity: .2; transform: rotate(-115deg) scale(.9); } to { opacity: 1; transform: rotate(-90deg) scale(1); } }

#blazor-error-ui { position: fixed; z-index: 1000; bottom: 0; right: 0; left: 0; display: none; padding: 12px 20px; background: #892d34; color: white; font-size: 11px; text-align: center; }.reload { color: white; text-decoration: underline; margin: 0 10px; }.dismiss { cursor: pointer; }
.error-page { max-width: 720px; margin: 64px auto; padding: 34px; }.error-page h1 { margin: 8px 0 12px; font-size: 28px; }.error-page > p { color: var(--muted); line-height: 2; }.error-reference { display: flex; align-items: center; gap: 12px; margin: 22px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf8; }.error-reference code { overflow-wrap: anywhere; color: var(--danger); }.error-page .heading-actions { justify-content: flex-start; margin-top: 18px; }

@media (max-width: 1050px) {
    .workspace { margin-right: 0; }.sidebar { transform: translateX(105%); transition: transform .25s ease; box-shadow: var(--shadow); }.sidebar.is-open { transform: none; }.sidebar-close, .menu-button { display: grid !important; }.menu-scrim { position: fixed; inset: 0; z-index: 39; border: 0; background: rgba(17,28,25,.4); }.topbar { padding: 0 22px; }.topbar-context { margin-left: auto; margin-right: 10px; }.page-canvas { padding: 30px 24px 60px; }.dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1220px) {
    .filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }.filter-actions { justify-content: flex-end; }.aggregate-metrics { grid-template-columns: repeat(3, 1fr); }.aggregate-metrics .aggregate-primary { grid-row: span 2; }.report-chart-grid, .target-analysis-grid { grid-template-columns: 1fr; }.target-hero { grid-template-columns: 150px repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .topbar { height: 62px; padding: 0 14px; }.topbar-context .eyebrow, .today { display: none; }.topbar-context strong { font-size: 12px; }.page-canvas { padding: 24px 14px 45px; }.page-heading { align-items: stretch; flex-direction: column; margin-bottom: 22px; }.page-heading h1 { font-size: 27px; }.page-heading .button { align-self: flex-start; }.metric-strip { grid-template-columns: repeat(2, 1fr); }.metric { min-height: 110px; padding: 17px; border-bottom: 1px solid var(--line); }.metric:nth-child(2) { border-left: 0; }.metric:nth-child(3), .metric:nth-child(4) { border-bottom: 0; }.metric strong { font-size: 20px; }.logic-note { align-items: flex-start; flex-wrap: wrap; }.logic-flow { width: 100%; justify-content: center; padding-top: 7px; }.table-toolbar { align-items: stretch; flex-direction: column; }.record-count { align-self: flex-end; }.dynamic-form { grid-template-columns: 1fr; }.field.wide { grid-column: auto; }.drawer-actions { padding: 12px 14px; }.drawer-actions .button.primary { flex: 1; }.bar-chart { padding-right: 14px; padding-left: 14px; }
    .data-table thead { display: none; }.data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }.data-table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }.data-table td { min-width: 0; display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border: 0; white-space: normal; text-align: left; }.data-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; text-align: right; }.data-table .actions-cell { min-width: 0 !important; justify-content: flex-end; text-align: left !important; }.data-table .actions-cell::before { display: none; }
    .filter-grid, .target-filter-grid { grid-template-columns: 1fr; }.filter-actions .button { flex: 1; }.report-summary-line { grid-template-columns: 1fr 1fr; }.report-summary-line > div:first-child { grid-column: 1 / -1; border-left: 0; border-bottom: 1px solid var(--line); }.aggregate-metrics { grid-template-columns: 1fr 1fr; }.aggregate-metrics .aggregate-primary { grid-column: 1 / -1; grid-row: auto; min-height: 105px; }.aggregate-metrics > div { min-height: 90px; }.report-chart-grid { gap: 15px; }.report-chart-panel { min-height: 390px; }.donut-legend { grid-template-columns: 1fr; }.pagination { flex-wrap: wrap; justify-content: center; }.pagination > div { order: -1; width: 100%; justify-content: center; }.target-hero { grid-template-columns: 1fr 1fr; }.target-hero > div { min-height: 115px; padding: 17px; }.target-score { grid-row: span 2; }.score-ring { width: 94px; height: 94px; }.score-ring::after { width: 67px; height: 67px; }.target-gap { grid-column: 1 / -1; }.paired-bar-chart { padding-inline: 10px; }.performance-detail-list { grid-template-columns: 1fr; }.performance-detail-list > div { border-left: 0; }.performance-detail-list > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }.performance-detail-list > div:last-child { border-bottom: 0; }.persian-calendar { width: min(306px, calc(100vw - 58px)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
