/* One shared component/theme layer used by all HTML routes including future ones using config.php */
#site-global-controls { position: sticky; top: 0; z-index: 1200; width: 100%; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; padding: 8px max(14px,calc((100vw - 1460px)/2)); background: rgba(10, 17, 35, .99); border: 0; border-bottom: 1px solid rgba(34,211,238,.32); border-radius: 0; box-shadow: none; color: #f2f5ff; font-size: 12px; font-family: 'Cairo',system-ui,sans-serif; direction: ltr; backdrop-filter: blur(12px); }
#site-global-controls label { margin:0; white-space:nowrap; color:inherit!important; font-size:12px; }
#site-global-controls select, #site-global-controls button, #site-global-controls a { background: rgba(64,82,122,.26); color: #f2f5ff; border: 1px solid rgba(180,190,210,.26); border-radius: 8px; padding: 5px 9px; text-decoration: none; font-size: 12px; cursor: pointer; width: auto; line-height:1.5; }
#site-global-controls button:hover,#site-global-controls a:hover { border-color:#22d3ee; color:#22d3ee; }
#site-global-controls select option { background: #10182d; color: white; }
html[data-site-theme="light"] { color-scheme: light; --bg: #eff4fc; --bg2: #e5ebf7; --card: rgba(255,255,255,.95); --card-solid: #fff; --bd: rgba(42,73,110,.2); --tx: #17223c; --mut: #506381; --shadow: 0 10px 30px rgba(43,72,112,.12); --esm-bg: #f4f7fd; --esm-bg-2: #e9eef9; --esm-card: rgba(255,255,255,.92); --esm-card-solid: #fff; --esm-border: rgba(28,84,145,.2); --esm-border-strong: rgba(28,84,145,.36); --esm-cyan:#007fab; --esm-blue:#1b64b6; --esm-purple:#783dbc; --esm-glow:rgba(15,120,180,.2); --text-main:#17223c; --text-dim:#405474; --text-muted:#61728d; }
html[data-site-theme="light"] body { color: var(--tx, #17223c); background: var(--esm-bg, #f4f7fd); background-image: none; }
html[data-site-theme="light"] .header { background: rgba(255,255,255,.92); }
html[data-site-theme="light"] .ap-header,html[data-site-theme="light"] .card-custom,html[data-site-theme="light"] .admin-card,html[data-site-theme="light"] .bal-card,html[data-site-theme="light"] .price-card,html[data-site-theme="light"] .report-card { color:#17223c; background-color:rgba(255,255,255,.94); }
html[data-site-theme="light"] .table-dark-custom { --bs-table-color:#17223c; --bs-table-bg:transparent; color:#17223c; }
html[data-site-theme="light"] .table-dark-custom td,html[data-site-theme="light"] .table-dark-custom th { color:#17223c; }
html[data-site-theme="light"] .text-white-50 { color:#52627b!important; }
html[data-site-theme="light"] .input-dark,html[data-site-theme="light"] .input-style,html[data-site-theme="light"] input,html[data-site-theme="light"] textarea,html[data-site-theme="light"] select { color: #17223c; background-color:#f8faff; border-color:#b8cbe1; }
html[data-site-theme="light"] #site-global-controls { background:rgba(255,255,255,.98); border-color:#a6bdd7; color:#17223c; }
html[data-site-theme="light"] #site-global-controls select,html[data-site-theme="light"] #site-global-controls button,html[data-site-theme="light"] #site-global-controls a { color:#17223c; background:#eaf1fb; border-color:#a6bdd7; }
html[data-site-theme="light"] #site-global-controls select option { background:#fff; color:#17223c; }
@media(max-width:650px) { #site-global-controls { top:0; padding:6px 10px; gap:5px; } #site-global-controls label { display:none } #site-global-controls select,#site-global-controls button,#site-global-controls a { padding:5px 7px; } }

/* Keep the language/theme controls anchored in the document header at all sizes. */
#site-global-controls { align-content:center; min-height:42px; justify-content:flex-end; }
[dir="rtl"] #site-global-controls { direction:rtl; }
#site-global-controls label { margin-inline-start:5px; }
#site-global-controls select { min-width:85px; }
@media(max-width:650px){ #site-global-controls{justify-content:center;flex-wrap:wrap;} }

/* Public header stays below the common toolbar while scrolling. */
.header { top: 42px !important; }
@media(max-width:650px){.header{top:54px !important;}}
