@font-face { font-family: Cairo; src: url("assets/cairo-arabic-wght-normal.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF; }
@font-face { font-family: Inter; src: url("assets/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root { font-family: Inter, system-ui, sans-serif; --topbar-height: 59px; }
:root[lang="ar"] { font-family: Cairo, Inter, system-ui, sans-serif; }
.official .finance-topbar { min-height: var(--topbar-height); padding: 6px max(14px, calc((100vw - 1480px) / 2)); }
.top-start, .account-button, .button-with-icon { display: flex; align-items: center; gap: 8px; }
.ui-icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { display: inline-grid; place-items: center; padding: 0; min-width: 40px; min-height: 40px; }
.account-button { min-width: 0; }
.account-button span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.official #nav-menu { display: inline-grid; }
.official .workspace { padding-block-start: 14px; }
.finance-shell { grid-template-columns: 208px minmax(0,1fr); gap: 20px; }
.finance-shell #tabs { top: calc(var(--topbar-height) + 14px); max-height: calc(100dvh - var(--topbar-height) - 26px); padding: 7px; }
#tabs button { min-height: 35px; gap: 8px; }
#tabs button .ui-icon { color: var(--accent); }
#tabs button .nav-label { display: inline; width: auto; height: auto; font-size: inherit; color: inherit; }
.sidebar-collapsed .finance-shell { grid-template-columns: 52px minmax(0,1fr); }
.sidebar-collapsed #tabs .nav-label, .sidebar-collapsed .nav-group p { display: none; }
.sidebar-collapsed #tabs button { justify-content: center; padding-inline: 2px; }
.page-header { align-items: center; padding: 9px 0 13px; margin-block-end: 14px; }
.page-header h1 { font-size: clamp(1.45rem, 2.3vw, 2rem); }
.page-header .account { margin-block-end: 4px; }
.panel { padding: clamp(13px, 1.75vw, 21px); }
table tbody tr:hover { background: var(--soft); }
.table-scroll { scrollbar-width: thin; }
.login-screen { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); max-width: 790px; margin: clamp(28px, 11vh, 118px) auto 30px; border: 1px solid var(--line); border-radius: 22px; overflow: clip; background: var(--surface); box-shadow: var(--shadow); }
.login-brand { padding: clamp(26px, 5vw, 54px); display: grid; align-content: center; justify-items: start; gap: 13px; background: var(--soft); }
.login-brand strong { color: var(--accent); font-size: clamp(1.7rem, 4vw, 2.5rem); direction: ltr; letter-spacing: -.035em; }
.login-brand p, .login-body > p { color: var(--muted); }
.brand-stripe { height: 5px; width: 86px; border-radius: 4px; background: linear-gradient(90deg,#4285f4 25%,#ea4335 25% 50%,#fbbc04 50% 75%,#34a853 75%); }
.login-body { padding: clamp(22px, 4vw, 42px); }
.login-body h1 { font-size: 1.55rem; }
.login-body form { margin-top: 18px; }
.login-body button[type=submit] { width: 100%; }
.password-field { position: relative; }
.password-field input { padding-inline-end: 48px; }
.password-field button { position: absolute; inset-inline-end: 3px; inset-block-start: 2px; border: 0; background: transparent; }
.login-status { margin: 12px 0 0; }
.login-status:empty { display: none; }
.balance-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.balance-card { border-block-start: 3px solid #4285f4; }
.balance-card:nth-child(2) { border-block-start-color: #34a853; }
.balance-card:nth-child(3) { border-block-start-color: #fbbc04; }
.balance-card h2, .balance-card p { margin-block-end: 5px; }
.balance-card dl { margin: 9px 0 0; display: grid; gap: 4px; }
.balance-card dl div { display: flex; justify-content: space-between; gap: 5px; }
.balance-card dd { margin: 0; text-align: end; }
.balance-card dt { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 12px; align-items: start; }
.dashboard-toolbar, .section-heading, .filter-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; margin-block-end: 12px; }
.section-heading h2 { margin: 0; }
.dashboard-toolbar { justify-content: flex-start; }
.section-heading select, .filter-row select { width: auto; }
.chart-svg { display: block; width: 100%; height: clamp(145px,16vw,195px); }
.chart-svg text { fill: var(--muted); font-size: 11px; }
.chart-in { fill: var(--green); }.chart-out { fill: var(--red); }.chart-line { stroke: var(--line); }
.metric-list { list-style: none; margin: 0; padding: 0; }
.metric-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; padding-block: 6px; border-block-end: 1px solid var(--line); }
.metric-list li:last-child { border: 0; }
.status-chip { display: inline-flex; padding: 2px 8px; border-radius: 16px; background: var(--soft); color: var(--accent); font-size: .8rem; }
.staff-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-block-end: 14px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.staff-actions button { min-height: 34px; padding: 5px 8px; }
.staff-dialog { width: min(800px, 95vw); }
.staff-dialog .dialog-head { margin-block-start: 0; }
.staff-dialog .status-note { min-height: 1.5em; }
.group-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.official #status:not(:empty) {
  position: fixed; z-index: 4; inset-inline-end: 14px; inset-block-end: 14px;
  max-width: min(420px, calc(100% - 28px)); margin: 0; padding: 10px 14px;
  border: 1px solid var(--line); border-inline-start: 3px solid #4285f4; border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow); pointer-events: none;
}
@media print {
  .official #status { display: none; }
  body:has(#receipt[open]) .workspace { display: none; }
  #receipt[open] { position: static; width: 100%; max-width: none; max-height: none; border: 0; padding: 0; margin: 0; overflow: visible; color: #17233b; background: white; }
  #receipt[open]::backdrop { display: none; }
  #receipt[open] .dialog-head, #receipt[open] .dialog-actions, #receipt[open] #delivery { display: none; }
}
@media (max-width: 900px) {
  .finance-shell { grid-template-columns: 174px minmax(0,1fr); gap: 12px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .balance-cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,150px),1fr)); }
}
@media (max-width: 680px) {
  .finance-shell, .sidebar-collapsed .finance-shell { grid-template-columns: minmax(0,1fr); }
  .finance-shell #tabs { position: static; }
  .sidebar-collapsed #tabs .nav-label, .sidebar-collapsed .nav-group p { display: inline; }
  .sidebar-collapsed #tabs button { justify-content: flex-start; }
  .official .finance-topbar { gap: 6px; padding-inline: 8px; }
  .finance-actions { gap: 4px; }
  .account-button span, #logout span { display: none; }
  .top-start { gap: 4px; }
  .finance-topbar button { min-width: 34px; min-height: 36px; padding-inline: 6px; justify-content: center; }
  .finance-topbar .brand { gap: 5px; }
  .finance-topbar .brand b { font-size: .9rem; }
  .login-screen { grid-template-columns: minmax(0,1fr); margin-block-start: 23px; }
  .login-brand { padding: 18px 23px; gap: 6px; }
  .login-brand img { width: 44px; height: 34px; }
  .login-brand p { margin-block-end: 6px; }
}
@media (min-width: 641px) and (max-width: 680px) {
  #tabs:not(.is-open) { display: none; }
}
