/* Application layout. Print rules below keep operational documents unchanged. */
@media screen {
 :root {--app-bg:#f5f6f3;--surface:#fff;--ink:#182b27;--muted:#63736e;--line:#dfe6e0;--accent:#17664f;--soft:#eaf3ed;--sidebar:#122a23;--shadow:0 5px 24px #193b2810;}
 html[data-theme="dark"] {--app-bg:#101a17;--surface:#192720;--ink:#e6eee8;--muted:#a7b9af;--line:#33493c;--accent:#9fdbb7;--soft:#263f31;--sidebar:#0c1913;--shadow:0 5px 24px #0002;}
 body,html[data-theme="dark"] body {background:var(--app-bg);color:var(--ink);font-family:"Segoe UI",Tahoma,Arial,sans-serif;line-height:1.65;}
 html {overflow-x:clip;}
 .skip-link {position:fixed;top:-80px;right:20px;z-index:1000000;background:var(--surface);padding:12px 20px;}
 .skip-link:focus {top:8px;}
 header,html[data-theme="dark"] header {margin-inline-start:252px;min-height:88px;padding:16px 36px;background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line);}
 header>div:first-of-type {display:flex;align-items:center;gap:14px;}
 header strong {color:var(--accent);font-size:29px;}
 header small {font-size:10px;letter-spacing:1px;color:var(--muted);}
 .header-divider {width:1px;height:30px;background:var(--line);}
 #currentViewLabel {font-size:14px;font-weight:600;}
 header label {color:var(--muted)!important;font-size:11px;display:flex;align-items:center;gap:12px;}
 #who,html[data-theme="dark"] #who {margin:0;background:var(--soft);color:var(--ink);border:1px solid var(--line);padding:8px 12px;width:110px;font-weight:600;opacity:1;}
 #nav,html[data-theme="dark"] #nav {position:fixed;inset-block:0;inset-inline-start:0;width:252px;display:flex;flex-direction:column;gap:19px;padding:28px 18px 86px;background:var(--sidebar);border:0;overflow-y:auto;z-index:200;scrollbar-width:thin;scrollbar-color:#52715f transparent;}
 .nav-brand {color:#fff;padding:0 12px 20px;border-bottom:1px solid #ffffff20;}
 .nav-brand b {font-size:44px;line-height:1;letter-spacing:-3px;display:block;}
 .nav-brand span {display:block;color:#93b6a4;font-size:10px;letter-spacing:2px;margin-top:12px;direction:ltr;text-align:right;}
 .nav-group-title {color:#91b3a0;font-size:10px;font-weight:600;letter-spacing:.5px;margin:0 12px 8px;}
 .nav-group {display:flex;flex-direction:column;gap:3px;}
 #nav button,html[data-theme="dark"] #nav button {background:transparent;color:#c9dbcf;border-radius:8px;text-align:right;display:flex;align-items:center;gap:11px;padding:10px 12px;font-size:12px;white-space:normal;line-height:1.4;width:100%;}
 #nav button:hover {background:#ffffff0c;color:#fff;}
 #nav button.active,html[data-theme="dark"] #nav button.active {background:#e8f1e9;color:#143d2b;font-weight:700;}
 #nav button[hidden] {display:none!important;}
 .nav-symbol {font-size:16px;width:19px;text-align:center;opacity:.8;flex-shrink:0;}
 main {margin:0;margin-inline-start:252px;max-width:none;padding:32px 36px 72px;min-width:0;}
 main>.notice {background:var(--soft);border:1px solid var(--line);border-inline-start:3px solid var(--accent);border-radius:9px;color:var(--muted);font-size:11px;line-height:1.7;padding:10px 14px;margin-bottom:25px;}
 html[data-theme="dark"] main>.notice {background:var(--soft);border-color:var(--line);border-inline-start-color:var(--accent);color:var(--muted);}
 h1 {font-size:26px;letter-spacing:-.6px;line-height:1.5;margin-bottom:23px;color:var(--ink);}
 h2 {font-size:16px;color:var(--ink);}
 .page>h1 {padding-bottom:16px;border-bottom:1px solid var(--line);}
 .panel,html[data-theme="dark"] .panel {border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:23px;box-shadow:var(--shadow);margin-bottom:20px;min-width:0;}
 .panel>h2 {margin-bottom:19px;}
 label,html[data-theme="dark"] label {color:var(--muted);font-size:12px;}
 input,select,textarea,html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea {border-color:var(--line);background:var(--app-bg);color:var(--ink);border-radius:8px;padding:11px 12px;min-height:44px;}
 input[type=checkbox] {min-height:0;width:17px;height:17px;accent-color:var(--accent);vertical-align:middle;margin-inline-end:8px;}
 button,.btn,html[data-theme="dark"] button,html[data-theme="dark"] .btn {background:var(--accent);color:var(--surface);border-radius:8px;font-size:13px;font-weight:600;min-height:42px;padding:11px 17px;}
 button:hover {filter:brightness(.96);}
 button:disabled {filter:none;}
 button.secondary,.btn.secondary,html[data-theme="dark"] button.secondary,html[data-theme="dark"] .btn.secondary {background:var(--soft);color:var(--ink);border:1px solid var(--line);}
 [data-reject],html[data-theme="dark"] [data-reject] {color:#b02d36!important;border-color:#bc7379!important;}
 .form {gap:17px;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));}
 p.note,html[data-theme="dark"] p.note {color:var(--muted);font-size:12px;}
 .scroll {border:1px solid var(--line);border-radius:10px;max-width:100%;overscroll-behavior-x:contain;}
 table {font-variant-numeric:tabular-nums;}
 th,html[data-theme="dark"] th {background:var(--soft);color:var(--muted);font-size:11px;font-weight:600;padding:13px 14px;}
 td,html[data-theme="dark"] td {border-color:var(--line);font-size:12px;padding:14px;}
 tr:last-child td {border-bottom:0;}
 .empty-row td {text-align:center;color:var(--muted);padding:35px 16px;}
 .dashboard-heading {display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:26px;}
 .eyebrow {font-size:10px;font-weight:700;letter-spacing:1.5px;color:var(--accent);margin-bottom:6px;}
 .dashboard-heading h1 {font-size:30px;font-weight:650;margin:0 0 7px;}
 .dashboard-heading p {font-size:13px;color:var(--muted);margin:0;}
 .season-pill {background:var(--surface);border:1px solid var(--line);border-radius:30px;padding:9px 16px;font-size:11px;white-space:nowrap;direction:ltr;color:var(--muted);}
 .quick-actions {display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:27px;}
 .quick-actions button,html[data-theme="dark"] .quick-actions button {background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow);min-height:73px;display:flex;align-items:center;gap:13px;text-align:right;padding:15px 19px;font-size:13px;}
 .quick-actions button:first-child,html[data-theme="dark"] .quick-actions button:first-child {background:var(--accent);color:var(--surface);border-color:var(--accent);}
 .action-symbol {font-size:23px;font-weight:400;width:32px;}
 .quick-actions small {display:block;font-size:10px;font-weight:400;opacity:.75;margin-top:2px;}
 #metrics {grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:24px;}
 .metric,html[data-theme="dark"] .metric {background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:var(--shadow);min-width:0;position:relative;}
 .metric::before {content:'';position:absolute;inset-inline-end:18px;top:21px;width:7px;height:7px;border-radius:50%;background:#8ca695;}
 .metric:nth-child(n+4)::before {background:#c1a669;}
 .metric small,html[data-theme="dark"] .metric small {color:var(--muted);font-size:11px;margin-bottom:12px;}
 .metric b {color:var(--ink);font-size:27px;line-height:1.5;letter-spacing:-.5px;font-weight:650;overflow-wrap:anywhere;}
 .dashboard-bottom {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px;align-items:start;}
 #dashboard table {min-width:0;}
 .attention-card {display:flex;align-items:center;gap:18px;background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:20px 23px;margin-bottom:24px;}
 .attention-card .attention-mark {width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:var(--surface);color:var(--accent);font-size:20px;flex-shrink:0;}
 .attention-card h2 {font-size:13px;margin:0 0 3px;}
 .attention-card p {font-size:12px;color:var(--muted);margin:0;}
 .attention-card button {margin-inline-start:auto;white-space:nowrap;font-size:11px;}
 #cloudStatus {inset-inline-start:18px;inset-inline-end:auto;bottom:15px;width:216px;left:auto;background:#1b382b;color:#bfe1cc;box-shadow:none;border:1px solid #ffffff15;font-size:10px;padding:10px 12px;z-index:210;display:flex;align-items:center;gap:8px;}
 #cloudStatus::before {content:'';width:6px;height:6px;flex-shrink:0;border-radius:50%;background:#c7a86d;}
 #cloudStatus[data-state=online]::before {background:#83c79a;}
 #cloudStatus[data-state=error]::before {background:#ef9d98;}
 #menuToggle,#sidebarShade {display:none;}
 #cloudGate {overflow:auto;}
 #cloudGate .cloudCard {margin:auto;background:#142b23;border:1px solid #466052;border-radius:20px;max-width:440px;padding:32px;box-shadow:0 28px 80px #0005;}
 #cloudGate input {background:#203b2e;border-color:#4c6556;}
 #cloudGate button {color:#173c29;background:#eff6ed;}
 #cloudGate h1 {color:#b2d8ba;font-size:15px;letter-spacing:1px;}
 #cloudGate h2 {color:white;font-size:23px;}
 @media(min-width:1600px) {main {padding-inline:65px;} .dashboard-heading h1 {font-size:34px;}}
 @media(max-width:1100px) and (min-width:901px) {#nav {width:225px;} main,header {margin-inline-start:225px;}main {padding:25px;}header {padding-inline:25px;}.quick-actions button {padding:12px;} .dashboard-bottom {grid-template-columns:1fr;}#cloudStatus {width:189px;}}
 @media(max-width:900px) {
  header,html[data-theme="dark"] header {margin:0;padding:13px 18px;min-height:75px;position:sticky;top:0;z-index:180;flex-wrap:nowrap;gap:12px;}
  header small,.header-divider,#currentViewLabel {display:none;} header>div:first-of-type {margin-inline-end:auto;}header strong {font-size:25px;}header label {font-size:0!important;}#who {width:88px;font-size:12px;}
  #menuToggle {display:block;min-width:42px;padding:7px;font-size:20px;background:var(--soft);color:var(--ink);border:1px solid var(--line);}
  #nav,html[data-theme="dark"] #nav {width:268px;transform:translateX(100%);transition:transform .2s ease;z-index:400;padding-bottom:30px;}
  body.menu-open #nav {transform:translateX(0);}
  #sidebarShade {position:fixed;inset:0;background:#081b13a8;border:0;border-radius:0;z-index:390;}
  body.menu-open #sidebarShade {display:block;}
  body.menu-open {overflow:hidden;}
  main {margin:0;padding:23px 18px 78px;}
  #cloudStatus {inset-inline-start:auto;inset-inline-end:14px;bottom:12px;width:auto;max-width:calc(100% - 28px);font-size:10px;z-index:220;}
  .dashboard-heading h1 {font-size:25px;} .season-pill {font-size:10px;padding:6px 10px;}
  .dashboard-bottom {grid-template-columns:1fr;gap:0;}
 }
 @media(max-width:560px) {
  .dashboard-heading {align-items:flex-start;gap:10px;margin-bottom:21px;}.dashboard-heading h1 {font-size:23px;}.dashboard-heading p {font-size:12px;} .season-pill {display:none;}
  .quick-actions {gap:8px;}.quick-actions button,html[data-theme="dark"] .quick-actions button {min-height:86px;flex-direction:column;justify-content:center;text-align:center;gap:5px;padding:10px 5px;font-size:11px;}.quick-actions small {display:none;}.action-symbol {font-size:22px;line-height:1.1;}
  #metrics {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}.metric,html[data-theme="dark"] .metric {padding:15px;}.metric b {font-size:22px;}.metric small {font-size:10px;}.metric::before {top:18px;inset-inline-end:12px;width:5px;height:5px;}
  .attention-card {padding:16px;gap:10px;flex-wrap:wrap;}.attention-card button {margin-inline-start:48px;}.attention-card p {font-size:11px;}
  .panel,html[data-theme="dark"] .panel {padding:17px;}.form {grid-template-columns:1fr;gap:15px;}.panel h2 {font-size:15px;}
  main>.notice {font-size:10px;} th,td {padding:11px!important;} #dashboard td,#dashboard th {font-size:11px;}
  .scroll {scrollbar-width:thin;} .page:not(#dashboard) .scroll::before {content:'اسحب الجدول لعرض باقي التفاصيل ↔';display:block;font-size:10px;color:var(--muted);padding:8px 11px;background:var(--soft);}
  #cloudGate .cloudCard {padding:24px;}
 }
 @media(prefers-reduced-motion:reduce) {#nav {transition:none;}}
}
@media print {#menuToggle,#sidebarShade,.skip-link,#cloudStatus {display:none!important;}main {margin:0!important;} }
