/* ERP modern workspace, presentation only. Existing status and chart colors retained. */
:root {
 --bg:#f4f7fb; --line:#dce5ef; --text:#182e49; --muted:#536780;
 --blue:#2563eb; --navy:#132b45; --navy2:#0e2035;
 --ui-radius:16px; --ui-shadow:0 4px 20px #122f5010;
}
body { font-family:"Leelawadee UI",Tahoma,system-ui,sans-serif; line-height:1.5; }
#sidebar { background:linear-gradient(175deg,#142e4a,#0d1d30); border-right:1px solid #ffffff12; }
#sidebar .brand { border-bottom-color:#ffffff18; padding-bottom:22px; }
.brand-mark { text-shadow:none; }
#nav { scrollbar-width:thin; scrollbar-color:#45617f transparent; padding-top:18px; }
#nav button { border:1px solid transparent; border-radius:12px; margin-block:4px; color:#d9e6f5; font-weight:500; }
#nav button.active { background:#24476b; border-color:#4b7097; box-shadow:inset 3px 0 #6dd8e2; color:#fff; }
#nav .ico { opacity:.95; }
.side-note { background:#ffffff08; border:1px solid #ffffff12; margin-top:18px; }
.main > header { background:#ffffff; box-shadow:0 2px 12px #16324f06; gap:20px; }
.search { background:#f4f7fb; border:1px solid #dce5ef; border-radius:12px; font-size:22px; }
.search:focus-within { border-color:#2563eb; box-shadow:0 0 0 3px #2563eb18; }
.search input { font-size:14px; }
.hospital b { letter-spacing:-.2px; }
.user { font-size:13px; }
.user .link { background:#f2f6fb; border:1px solid #dde6f0; border-radius:10px; }
#content { padding-top:28px; }
.page-head { margin-bottom:22px; gap:12px; }
.page-head h1 { letter-spacing:-.6px; line-height:1.4; font-weight:700; }
.page-head p { margin-top:6px; }
:is(.card,.panel,.finance-summary-card,.finance-kpi-card,.executive-metric,.movement-kpi,.workload-page-kpi) { border-radius:var(--ui-radius); }
.panel { box-shadow:var(--ui-shadow); }
.panel h2 { line-height:1.5; }
.toolbar { border-radius:14px; padding:14px; box-shadow:0 2px 10px #122f5007; gap:10px; align-items:center; }
:is(.toolbar,.form-grid,.login-card) :is(input,select,textarea) { border-radius:10px; border-color:#cad6e4; color:#182e49; background:#fff; min-height:44px; }
:is(.toolbar,.form-grid,.login-card) :is(input,select,textarea):focus-visible { outline:3px solid #2563eb33; outline-offset:1px; border-color:#2563eb; }
.primary,.secondary { min-height:44px; border-radius:10px; padding:10px 17px; line-height:1.4; }
.primary { background:#2563eb; border-color:#2563eb; box-shadow:0 2px 4px #1d4ed81a; }
.secondary { background:#fff; border-color:#c7d6e7; color:#244d78; }
button:disabled { cursor:not-allowed; opacity:.55; }
.table-wrap { border-radius:12px; border:1px solid #e1e8f0; }
th { background:#f3f6fa; color:#445a75; font-size:12px; line-height:1.5; }
td { color:#243d59; }
th,td { border-bottom-color:#e6edf4; }
tbody tr:last-child td { border-bottom:0; }
:is(.finance-tabs,.maintenance-tabs) button { border-radius:10px; min-height:44px; }
.pagination { gap:8px; flex-wrap:wrap; }
dialog { border:1px solid #d8e3ef; border-radius:20px; max-height:calc(100dvh - 32px); overflow:auto; box-shadow:0 24px 90px #0f27454d; color:#182e49; }
dialog::backdrop { background:#0c203b88; backdrop-filter:blur(3px); }
.dialog-head { padding:18px 22px; align-items:center; background:#f8fafc; }
.dialog-head button { width:44px; min-height:44px; border-radius:10px; color:#405875; flex-shrink:0; }
.form-grid { gap:16px; padding:22px; }
.form-grid label { color:#415873; }
.login-shell { padding:24px 0; background:radial-gradient(ellipse at 15% 15%,#234c75 0,transparent 55%),radial-gradient(ellipse at 90% 90%,#164e63 0,transparent 50%),#0d1d30; }
.login-card { border:1px solid #dce6f2; border-top:4px solid #60a5fa; border-radius:24px; padding:32px; box-shadow:0 24px 80px #0005; background:#fff; }
.login-card .brand-mark { display:grid; place-items:center; width:64px; height:64px; border-radius:18px; background:#ecf5ff; color:#2563eb; margin:0 auto 20px; }
.login-card h1 { font-size:24px; line-height:1.5; letter-spacing:-.5px; }
.login-card p { margin-top:8px; font-size:14px; }
.login-card label { font-size:14px; margin-block:16px; }
.login-card button { min-height:48px; }
@media(hover:hover) {
 #nav button:not(.active):hover { background:#ffffff0e; border-color:#ffffff12; }
 .primary:hover:not(:disabled) { background:#1d4ed8; border-color:#1d4ed8; }
 .secondary:hover:not(:disabled),.dialog-head button:hover { background:#edf4fc; }
 tbody tr:hover { background:#f5f8fd; }
}
@media(max-width:1200px) { .main > header { gap:12px; } #content { padding-top:22px; } }
@media(max-width:600px) {
 .main > header { gap:6px 10px; }
 #content { padding-top:18px; }
 .page-head { margin-bottom:16px; }
 .toolbar { padding:12px; gap:8px; }
 .toolbar > :is(input,select) { min-width:0; flex:1 1 140px; max-width:100%; }
 .toolbar > :is(.primary,.secondary) { flex:1 1 auto; }
 .form-grid { grid-template-columns:minmax(0,1fr); padding:18px; }
 .dialog-head { padding:14px 18px; }
 .login-card { padding:26px 22px; }
 .login-card h1 { font-size:22px; }
}
@media(prefers-reduced-motion:reduce) { #sidebar,#sidebar.open { transition:none; } }
@media(forced-colors:active) {
 #nav button.active { border:2px solid Highlight; box-shadow:none; }
 .primary,.secondary,.search,.login-card,dialog { border:1px solid CanvasText; box-shadow:none; }
}
@media print {
 #sidebar,.main > header,.sidebar-backdrop { display:none!important; }
 .app { display:block; } .main { width:100%; } #content { max-width:none; padding:0; }
}

/* Financial Analytics cards contain three text blocks, unlike icon dashboard KPIs.
   Allow complete labels/notes and larger text to determine the card height. */
.executive-finance .executive-metric {
 height:auto; min-height:124px; display:flex; flex-direction:column;
 align-items:stretch; gap:8px;
}
.executive-finance .executive-metric > small,
.executive-finance .executive-metric > span {
 display:block; overflow:visible; overflow-wrap:anywhere;
 -webkit-line-clamp:unset; white-space:normal;
}
.executive-finance .executive-metric > strong { margin:0; align-self:stretch; }
.executive-finance .executive-metric > span { margin-top:auto; }
