/* APMET interface refresh. Brand colors remain editable in system settings. */
:root {
  --bg: #f3f6f9;
  --ink: #203345;
  --muted: #617284;
  --line: #e2e9ef;
  --soft: color-mix(in srgb, var(--brand) 7%, white);
  --primary: var(--brand);
  --text: var(--ink);
  --shadow: 0 3px 16px rgba(25, 47, 66, .045);
  --ui-radius: 16px;
}
body { background: var(--bg); font-size: 14px; line-height: 1.65; }
body:not(.logged-in) { overflow:hidden; padding-top:0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
button svg { stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.ui-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.ui-skip-link { position:fixed; top:10px; inset-inline-start:12px; z-index:200; transform:translateY(-160%); padding:10px 18px; border-radius:10px; background:var(--brand); color:white; }
.ui-skip-link:focus { transform:none; }
body:not(.logged-in) .ui-skip-link, body:not(.logged-in) .mobile-header { display:none; }
.shell { grid-template-columns: 272px minmax(0, 1fr); }
.shell > aside {
  background: #142a38;
  padding: 22px 16px 16px;
  overflow: hidden;
  border-inline-end: 1px solid rgba(255,255,255,.06);
}
.shell > aside .brand { grid-template-columns: 60px minmax(0,1fr); gap:12px; margin-bottom:16px; padding-bottom:20px; }
.shell > aside .mark { width:60px; height:60px; }
.brand h1 { font-size:22px; letter-spacing:.3px; }
.brand span { font-size:11px; line-height:1.8; display:block; }
.ui-nav-search { position:relative; flex:none; }
.ui-nav-search svg { position:absolute; inset-inline-start:12px; top:12px; width:18px; height:18px; color:#a5bcc9; pointer-events:none; }
.ui-nav-search input { padding:10px 36px 10px 12px; padding-inline-start:38px; padding-inline-end:12px; background:#203b4b; color:#fff; border:1px solid #37505f; font-size:12px; min-height:42px; }
.ui-nav-search input::placeholder { color:#b8cad4; }
.ui-nav-search input:focus { border-color:#80c8c0; box-shadow:0 0 0 3px rgba(128,200,192,.12); }
#nav { flex:1; min-height:0; overflow:auto; align-content:start; gap:4px; margin:14px -4px 0; padding:0 4px 10px; scrollbar-width:thin; scrollbar-color:#466373 transparent; }
.ui-nav-group { color:#9bb6c5; font-size:10px; padding:14px 12px 5px; letter-spacing:.4px; }
.ui-nav-group:first-child { padding-top:0; }
.nav-btn { padding:10px 12px; min-height:43px; border-radius:9px; color:#d6e4ec; text-align:start; font-size:13px; gap:12px; transition:background .16s,color .16s; }
.nav-btn svg { width:18px; height:18px; opacity:.8; }
.nav-btn.active { background:color-mix(in srgb,var(--brand) 85%,#142a38); box-shadow:none; color:#fff; position:relative; }
.nav-btn.active::after { content:""; position:absolute; inset-inline-end:10px; width:5px; height:5px; background:#a4ead4; border-radius:50%; }
.nav-btn.active svg { opacity:1; }
.nav-btn:hover:not(.active) { background:rgba(255,255,255,.075); }
.ui-nav-empty { color:#cfdee6; font-size:12px; padding:14px 10px; margin:0; }
.profile-footer { flex:none; display:grid; grid-template-columns:minmax(0,1fr) 68px; gap:8px; margin-top:4px; padding-top:12px; }
.account-box { grid-column:1/-1; border:0; background:transparent; padding:2px 3px 7px; margin:0; }
.account-box strong { font-size:12px; font-weight:400; }
.account-box small { font-size:11px; color:#a8c3d1; }
.language-box { margin:0; min-width:0; }
.language-box label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.language-box select { padding:7px 9px; min-height:38px; border-radius:9px; font-size:12px; background:#203b4b; }
#logoutBtn { background:transparent; color:#d6e4ec; border-color:#37505f; min-height:38px; padding:7px 8px; font-size:12px; }
main { padding:24px 28px 36px; }
.topbar { padding:0 0 20px; margin:0 0 20px; background:transparent; border:0; border-bottom:1px solid var(--line); border-radius:0; box-shadow:none; align-items:center; gap:20px; }
.ui-page-context { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; color:var(--muted); font-size:11px; }
.ui-page-context time { display:inline-flex; align-items:center; gap:6px; }
.ui-page-context svg { width:14px; height:14px; color:var(--brand); }
.ui-context-separator { width:3px; height:3px; border-radius:50%; background:#a7b7c5; }
.topbar h2 { font-size:25px; font-weight:600; line-height:1.5; margin:0 0 4px; letter-spacing:-.4px; }
.topbar p { font-size:12px; max-width:680px; line-height:1.9; }
.actions { flex:none; gap:8px; }
.btn { border-radius:10px; min-height:42px; padding:9px 14px; font-size:13px; line-height:1.6; text-decoration:none; transition:background .15s,border-color .15s,box-shadow .15s; box-shadow:0 1px 2px rgba(25,47,66,.025); }
.btn:hover:not(:disabled) { filter:none; background:#f5f8fa; border-color:#b9cbd7; box-shadow:0 2px 6px rgba(25,47,66,.06); }
.btn.primary { background:var(--brand); border-color:var(--brand); color:white; }
.btn.primary:hover:not(:disabled) { background:color-mix(in srgb,var(--brand) 87%,black); border-color:var(--brand); }
.btn.blue { background:var(--brand-2); border-color:var(--brand-2); color:white; }
.btn.blue:hover:not(:disabled) { background:color-mix(in srgb,var(--brand-2) 87%,black); border-color:var(--brand-2); }
.btn.danger { background:#fff4f5; border-color:#f0ccd1; color:#a82b3e; }
.btn.danger:hover:not(:disabled) { background:#ffe7ea; border-color:#db98a2; }
.icon-btn { border-radius:9px; width:38px; height:38px; }
.ui-welcome { position:relative; isolation:isolate; padding:26px 28px; margin-bottom:20px; background:#183e4c; border:0; color:#fff; overflow:hidden; box-shadow:none; display:flex; gap:24px; justify-content:space-between; align-items:center; }
.ui-welcome::after { content:""; position:absolute; z-index:-1; width:220px; height:220px; inset-inline-end:-80px; top:-95px; border:30px solid rgba(255,255,255,.035); border-radius:50%; box-shadow:0 0 0 35px rgba(255,255,255,.025); pointer-events:none; }
.ui-welcome-copy { max-width:600px; }
.ui-eyebrow { display:block; font-size:11px; letter-spacing:.5px; color:#a9d9d4; margin-bottom:7px; }
.ui-welcome h3 { margin:0 0 8px; font-size:22px; line-height:1.7; font-weight:400; }
.ui-welcome p { font-size:12px; margin:0; color:#c7dfe6; line-height:1.9; }
.ui-shortcuts { display:flex; flex-wrap:wrap; gap:8px; max-width:340px; flex:none; }
.ui-shortcuts .btn { color:#fff; background:rgba(255,255,255,.075); border:1px solid rgba(255,255,255,.2); font-size:12px; }
.ui-shortcuts .btn:hover { background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.4); }
.ui-shortcuts svg { width:16px; height:16px; }
.stats { grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr)); gap:12px; margin-bottom:20px; }
.stat { position:relative; padding:18px; min-height:140px; box-shadow:var(--shadow); border-radius:var(--ui-radius); }
.ui-stat-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:30px; }
.stat small { font-size:11px; line-height:1.8; }
.ui-stat-icon { display:grid; place-items:center; flex:none; width:30px; height:30px; border-radius:9px; background:var(--soft); color:var(--brand); }
.ui-stat-icon svg { width:16px; height:16px; }
.stat strong { font-size:30px; font-weight:400; line-height:1.4; margin:10px 0 2px; font-variant-numeric:tabular-nums; }
.stat .trend { font-size:10px; line-height:1.8; color:var(--muted); margin-top:4px; }
.stat[data-stat-page]:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--brand) 30%,white); box-shadow:0 8px 20px rgba(25,47,66,.075); }
.layout { gap:20px; }
section, .panel { border-radius:var(--ui-radius); box-shadow:var(--shadow); }
.panel-head { background:transparent; padding:18px 20px; gap:12px; flex-wrap:wrap; border-bottom:1px solid #edf1f5; }
.panel-head > div { min-width:0; }
.panel-head h3 { font-size:15px; line-height:1.8; color:var(--ink); }
.panel-head .help { margin:4px 0 0; font-size:11px; }
.panel-body { padding:20px; }
.form-grid { gap:18px 16px; }
.field { min-width:0; }
.field label, .filter label { font-size:12px; color:#415568; line-height:1.8; margin-bottom:8px; }
input, select, textarea { border-color:#d8e2eb; border-radius:10px; padding:11px 12px; min-height:44px; font-size:13px; transition:border-color .15s,box-shadow .15s; }
input::placeholder, textarea::placeholder { color:#8b99a7; opacity:1; }
input:focus, select:focus, textarea:focus { border-color:var(--brand); box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 12%,transparent); }
input[type="checkbox"], input[type="radio"] { min-height:0; accent-color:var(--brand); width:16px; height:16px; vertical-align:middle; margin-inline-end:5px; }
input[type="file"] { background:#f8fafc; border-style:dashed; padding:8px; }
input[type="file"]::file-selector-button { border:0; border-radius:7px; padding:7px 10px; font:inherit; background:var(--soft); color:var(--brand); margin-inline-end:12px; cursor:pointer; }
.help { font-size:11px; line-height:1.95; }
.table-wrap { border:1px solid var(--line); border-radius:12px; scrollbar-width:thin; scrollbar-color:#b8c8d3 #f5f8fa; }
.table-wrap:has(table) { max-height:640px; }
.panel-body.table-wrap { margin:16px; padding:0; }
th, td { padding:13px 14px; font-size:12px; line-height:1.9; text-align:start; border-color:#edf1f5; }
th { background:#f6f9fb; color:#506678; font-size:11px; position:sticky; top:0; z-index:1; white-space:nowrap; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:nth-child(even) { background:#fcfdfe; }
tbody tr:hover { background:#f2f8f7; }
td.ui-empty { padding:34px 20px; text-align:center; color:var(--muted); background:#fbfcfd; white-space:normal; }
td.ui-empty::before { content:""; display:block; width:32px; height:22px; border:2px solid #c9d7e1; border-radius:5px; margin:0 auto 12px; box-shadow:inset 0 -6px 0 #edf2f6; }
.badge { padding:4px 9px; font-size:10px; line-height:1.8; font-weight:400; border:1px solid transparent; }
.badge.ok { background:#edf8f3; color:#216747; border-color:#d6eddf; }
.badge.warn { background:#fff7e7; color:#8c5f13; border-color:#f4e4c1; }
.badge.info { background:#eef5fb; color:#345f87; border-color:#dce9f5; }
.badge.danger { background:#fff0f2; color:#a32e42; border-color:#f2d6dc; }
.badge.neutral { background:#f2f5f8; color:#586d7f; border-color:#e5ebf0; }
.tabs { padding:5px; background:#eaf0f5; border-radius:12px; gap:5px; width:fit-content; max-width:100%; }
.tab { border:0; background:transparent; color:#536a7c; border-radius:8px; min-height:38px; padding:8px 14px; }
.tab.active { background:#fff; color:var(--brand-2); box-shadow:0 2px 5px rgba(25,47,66,.08); }
.feed-item, .management-item, .approval-item, .reservation-editor { border-radius:12px; border-color:var(--line); background:#fcfdfe; }
.feed-item { padding:14px 15px; border-inline-start:3px solid color-mix(in srgb,var(--brand) 22%,white); }
.feed-item strong { font-size:12px; font-weight:400; }
.feed-item span, .management-item span { font-size:11px; line-height:1.9; }
.management-item { padding:15px; }
.management-item strong { font-size:13px; }
.request-group, .guide-item, .report-details { border-radius:12px; overflow:hidden; }
.report-details summary, .guide-item summary { padding:16px 18px; }
.calendar { gap:10px; }
.calendar-day { padding:12px 10px; border-radius:12px; min-height:155px; box-shadow:none; }
.calendar-day header strong { display:flex; align-items:center; gap:5px; justify-content:space-between; font-size:12px; }
.calendar-date { background:#f2f6f9; border-radius:6px; padding:5px 3px; font-size:10px; }
.calendar-day.today { border:1px solid color-mix(in srgb,var(--brand) 55%,white); background:var(--soft); }
.calendar-day.selected { outline:2px solid var(--brand); outline-offset:-2px; }
.calendar-slots { font-size:10px; line-height:1.95; }
.calendar-bar { height:5px; margin:11px 0; }
.today-badge { padding:1px 6px; font-size:9px; }
.slot-picker { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr)); gap:8px; }
.slot { border-radius:9px; min-height:44px; font-size:11px; padding:10px; text-align:start; }
.slot.free { color:#26654d; background:#f0f9f4; border-color:#d3e8dc; }
.slot.busy { background:#fff2f4; border-color:#eed4d9; color:#9c3c4c; }
.slot.selected { background:var(--brand-2); border-color:var(--brand-2); color:white; box-shadow:0 2px 6px rgba(25,47,66,.1); }
.picker-popover { border-radius:14px; border-color:#d4e0e8; }
.picker-days button { border-radius:7px; min-height:32px; }
.export-dialog { background:rgba(13,30,42,.55); backdrop-filter:blur(3px); }
.export-dialog-card { border-radius:18px; border:0; }
.export-option { border-radius:10px; padding:14px; background:#fbfcfe; }
.export-option:has(input:checked) { background:var(--soft); border-color:color-mix(in srgb,var(--brand) 40%,white); }
.toast { z-index:180; background:#153a46; border:1px solid rgba(255,255,255,.12); border-radius:12px; max-width:min(440px,calc(100vw - 32px)); font-size:13px; box-shadow:0 10px 35px rgba(15,36,50,.22); }
.login-screen { background:#eff4f7; background-image:radial-gradient(ellipse at 20% 20%,#dceeea,transparent 55%); padding:32px; }
.ui-login-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); width:min(950px,100%); border-radius:24px; overflow:hidden; background:#fff; box-shadow:0 24px 80px rgba(20,48,66,.12); }
.ui-login-intro { position:relative; isolation:isolate; padding:52px 42px; background:#183e4c; color:#fff; display:flex; flex-direction:column; justify-content:center; overflow:hidden; }
.ui-login-intro::before { content:""; position:absolute; z-index:-1; width:300px; height:300px; border:1px solid rgba(255,255,255,.1); border-radius:50%; inset-inline-end:-120px; bottom:-100px; box-shadow:0 0 0 45px rgba(255,255,255,.025),0 0 0 90px rgba(255,255,255,.025); }
.ui-login-intro .login-logo { margin:0 0 24px; width:90px; height:90px; padding:9px; background:#f5fafc; border-radius:18px; filter:none; box-shadow:0 8px 20px rgba(0,0,0,.12); }
.ui-login-intro h1 { font-size:32px; font-weight:400; line-height:1.8; margin:0 0 8px; }
.ui-login-intro p { color:#c8dee5; font-size:13px; line-height:2; margin:0; }
.ui-login-divider { width:42px; height:3px; background:#75bdb5; border-radius:3px; margin:26px 0; }
.ui-login-features { display:grid; gap:12px; font-size:12px; color:#d4e8ec; }
.ui-login-features span { display:flex; gap:9px; align-items:center; }
.ui-login-features svg { width:18px; height:18px; color:#9cd0c9; flex:none; }
.login-card { width:100%; border:0; border-radius:0; box-shadow:none; padding:50px 40px; background:#fff; align-self:stretch; display:flex; flex-direction:column; justify-content:center; }
.login-card h2 { font-size:23px; font-weight:400; margin-bottom:8px; }
.login-card p { font-size:12px; margin-bottom:28px; }
.login-card > .field + .field { margin-top:18px; }
.login-card input { min-height:48px; background:#fcfdfe; }
.login-card #loginSubmit { min-height:48px; margin-top:26px !important; }
.password-toggle { bottom:7px; width:34px; height:34px; }
:focus-visible { outline:3px solid color-mix(in srgb,var(--brand-2) 65%,white); outline-offset:3px; }
@media (max-width:1150px) {
  main { padding:22px; }
  .ui-welcome { align-items:flex-start; }
  .ui-shortcuts { max-width:180px; }
  .ui-shortcuts .btn { width:100%; justify-content:center; }
}
@media (max-width:980px) {
  .shell { grid-template-columns:1fr; }
  .shell > aside { padding:16px; }
  main { padding:20px; }
  .mobile-header { background:#142a38; box-shadow:0 3px 12px rgba(20,42,56,.1); }
  .mobile-menu-btn, .mobile-close-btn { border-radius:10px; }
  .mobile-nav-overlay { backdrop-filter:blur(2px); }
  .ui-shortcuts { max-width:300px; }
  .ui-shortcuts .btn { width:auto; }
  .topbar { align-items:flex-start; flex-wrap:wrap; }
  .stats { grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr)); }
  .ui-login-layout { max-width:800px; }
  .ui-login-intro { padding:36px 28px; }
  .login-card { padding:36px 28px; }
}
@media (max-width:620px) {
  main { padding:16px 12px 28px; }
  .topbar { padding-bottom:16px; margin-bottom:16px; gap:12px; }
  .topbar h2 { font-size:22px; }
  .topbar p { font-size:11px; }
  .ui-page-context { font-size:10px; margin-bottom:6px; gap:7px; }
  .actions { width:100%; justify-content:flex-start; }
  .actions .btn { flex:1; justify-content:center; font-size:12px; min-height:42px; }
  .ui-welcome { padding:22px 18px; flex-direction:column; gap:16px; border-radius:14px; }
  .ui-welcome h3 { font-size:20px; }
  .ui-shortcuts { width:100%; max-width:none; }
  .ui-shortcuts .btn { flex:1 1 125px; justify-content:center; }
  .stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .stat { padding:13px; min-height:135px; border-radius:14px; }
  .ui-stat-heading { align-items:flex-start; gap:6px; }
  .stat strong { font-size:28px; }
  .ui-stat-icon { width:25px; height:25px; border-radius:7px; }
  .ui-stat-icon svg { width:14px; height:14px; }
  .stat small { font-size:11px; }
  .stats .stat:last-child:nth-child(odd) { grid-column:1/-1; }
  .stat .trend { font-size:10px; }
  .layout { gap:16px; }
  .panel-head { padding:15px 14px; }
  .panel-head h3 { font-size:14px; }
  .panel-body { padding:15px 14px; }
  .panel-head > .btn { width:100%; justify-content:center; }
  .panel-body.table-wrap { margin:12px; padding:0; }
  section, .panel { border-radius:14px; }
  .form-grid { gap:16px; }
  input,select,textarea { font-size:16px; min-height:46px; }
  .shell > aside input,.shell > aside select { font-size:13px; }
  .slot-picker { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calendar { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .calendar-day { min-height:145px; }
  #uiReservationSlots { scroll-margin-top:76px; }
  form[data-form="reservation"] { scroll-margin-top:76px; }
  .table-wrap:has(table) { max-height:520px; }
  .material-status-wrap { max-height:none; border:0; }
  .export-dialog { padding:12px; }
  .export-dialog-card { max-height:calc(100dvh - 24px); }
  .login-screen { padding:16px; overflow:auto; }
  .ui-login-layout { display:block; width:min(440px,100%); border-radius:20px; }
  .ui-login-intro { padding:24px 26px; }
  .ui-login-intro .login-logo { width:52px; height:52px; padding:5px; border-radius:10px; margin:0 0 10px; }
  .ui-login-intro h1 { font-size:23px; margin-bottom:2px; }
  .ui-login-intro p { font-size:11px; }
  .ui-login-divider,.ui-login-features { display:none; }
  .login-card { padding:28px 24px 32px; }
  .login-card p { margin-bottom:22px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  .stat[data-stat-page]:hover { transform:none; }
}
@media print {
  .ui-skip-link,.ui-welcome,.ui-page-context,.ui-nav-search { display:none !important; }
  main { padding:0; }
  .topbar { border:0; }
  section,.panel,.stat { box-shadow:none; }
  .table-wrap,.table-wrap:has(table) { max-height:none; overflow:visible; border:0; }
  th { position:static; }
  body { background:white; }
}
