:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #eef4f5;
  --navy: #082f49;
  --blue: #0b4f86;
  --teal: #0f766e;
  --orange: #c45100;
  --line: #d8e2e7;
  --muted: #66758a;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 78% 16%, #17827c, transparent 36%), linear-gradient(135deg, #082f49, #164e63 55%, #0f766e); }
.login-card { width: min(460px, 100%); padding: 38px; border-radius: 26px; background: rgba(255,255,255,.98); box-shadow: 0 28px 80px rgba(3,23,38,.34); }
.brand-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; color: white; background: linear-gradient(145deg, var(--teal), var(--blue)); font-size: 1.8rem; font-weight: 900; }
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px; font-size: 1.2rem; }
.eyebrow, .section-label { margin: 18px 0 5px; color: var(--orange); font-size: .72rem; font-weight: 900; letter-spacing: .14em; }
.login-card h1 { margin: 0; color: var(--blue); font-size: 2.2rem; }
.login-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
form label { display: grid; gap: 7px; margin-top: 14px; color: #34445a; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid #cbd8e0; border-radius: 10px; padding: 11px 12px; background: white; color: #172033; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15,118,110,.15); border-color: var(--teal); }
button, .button { min-height: 42px; border: 1px solid transparent; border-radius: 10px; padding: 9px 15px; font-weight: 800; }
.primary { color: white; background: var(--teal); }
.secondary { color: var(--blue); background: white; border-color: var(--line); }
.full { width: 100%; margin-top: 20px; }
.form-message { min-height: 22px; color: #b42318; font-weight: 700; }
.portal { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px; color: white; background: linear-gradient(180deg, #082f49, #0b3e5d); }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 1.4rem; }
.sidebar-brand span { color: #b7d4df; font-size: .8rem; }
.sidebar nav { display: grid; gap: 6px; }
.nav-button { width: 100%; text-align: left; color: #d9e8ee; background: transparent; }
.nav-button:hover, .nav-button.active { color: white; background: rgba(255,255,255,.13); }
.sidebar-account { margin-top: auto; display: grid; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.15); }
.sidebar-account span { color: #b7d4df; font-size: .78rem; margin: 3px 0 10px; }
.sidebar-account button { color: white; border-color: rgba(255,255,255,.25); background: transparent; }
.main { min-width: 0; padding: 30px clamp(20px, 4vw, 52px) 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.topbar .eyebrow { margin-top: 0; }
.topbar h1 { margin: 0; color: var(--navy); font-size: clamp(1.7rem, 3vw, 2.7rem); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.secure-badge { padding: 8px 12px; border-radius: 999px; color: var(--teal); background: #dff6f1; font-size: .8rem; font-weight: 850; }
.page-message { min-height: 24px; margin: 10px 0; color: var(--teal); font-weight: 750; }
.page-message.error { color: #b42318; }
.view { display: none; }
.view.active { display: block; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.summary-grid article, .card { border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 12px 30px rgba(26,54,76,.07); }
.summary-grid article { padding: 20px; }
.summary-grid article.accent { color: white; border-color: transparent; background: linear-gradient(145deg, var(--blue), var(--teal)); }
.summary-grid article span, .summary-grid article small { display: block; color: var(--muted); }
.summary-grid article.accent span, .summary-grid article.accent small { color: #d9f4f2; }
.summary-grid article strong { display: block; margin: 5px 0; font-size: 2rem; color: var(--teal); }
.summary-grid article.accent strong { color: white; }
.content-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.card { padding: 20px; margin-bottom: 18px; }
.card-heading, .section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.card-heading h2, .section-toolbar h2 { margin: 2px 0; color: var(--navy); }
.section-toolbar { margin-bottom: 16px; }
.section-toolbar p { margin: 4px 0; color: var(--muted); }
.text-button, .close-button { min-height: auto; padding: 5px 8px; color: var(--teal); background: transparent; }
.stack-list, .timeline { display: grid; gap: 10px; }
.list-item, .timeline-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 12px; background: #f5f8f9; }
.list-item strong, .list-item span, .timeline-item strong, .timeline-item span { display: block; }
.list-item span, .timeline-item span { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.status { display: inline-flex; align-items: center; height: 25px; padding: 0 9px; border-radius: 999px; color: #9a4300; background: #fff1db; font-size: .72rem; font-weight: 850; }
.status.ACTIVE { color: #08745f; background: #dff6ee; }
.status.SUSPENDED { color: #b42318; background: #fee4e2; }
.form-card { border-left: 5px solid var(--teal); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.wide { grid-column: 1 / -1; }
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid #e5ecef; text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #f6f9fa; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: .9rem; }
.outlet-grid, .staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.outlet-card, .staff-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 10px 24px rgba(26,54,76,.06); }
.outlet-card h3, .staff-card h3 { margin: 0; color: var(--navy); }
.outlet-card p, .staff-card p { margin: 5px 0; color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
dialog { width: min(1100px, calc(100% - 24px)); max-height: 90vh; border: 0; border-radius: 20px; padding: 24px; box-shadow: 0 28px 90px rgba(8,47,73,.35); }
dialog::backdrop { background: rgba(8,30,45,.65); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
.dialog-heading h2 { margin: 2px 0 10px; color: var(--navy); }
.dialog-tabs { display: flex; gap: 8px; margin: 10px 0 18px; border-bottom: 1px solid var(--line); }
.dialog-tabs button { border-radius: 8px 8px 0 0; background: transparent; }
.dialog-tabs button.active { color: var(--teal); border-bottom-color: var(--teal); }
.dialog-panel { display: none; }
.dialog-panel.active { display: block; }
.menu-table input { min-width: 100px; padding: 8px; }
.credential-box { max-width: 620px; padding: 20px; border-radius: 16px; background: #f4f8f9; }
.credential-result { display: grid; gap: 8px; margin-top: 18px; padding: 16px; border: 1px solid #b7ddd7; border-radius: 12px; background: white; }
.credential-result strong { padding: 12px; border-radius: 8px; color: var(--navy); background: #edf4f5; font-family: ui-monospace, monospace; word-break: break-all; }
@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .nav-button { width: auto; white-space: nowrap; }
  .sidebar-account { display: flex; align-items: center; gap: 10px; }
  .sidebar-account button { margin-left: auto; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .main { padding: 20px 12px 48px; }
  .topbar, .section-toolbar { align-items: flex-start; flex-direction: column; }
  .summary-grid, .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .secure-badge { display: none; }
  .login-card { padding: 26px 20px; }
}
