:root {
  --bg: #07111f;
  --bg-deep: #040a13;
  --surface: #0d1a2b;
  --surface-2: #112238;
  --surface-3: #172b43;
  --line: rgba(148, 163, 184, .16);
  --line-strong: rgba(148, 163, 184, .28);
  --text: #f5f8fc;
  --muted: #9caec3;
  --subtle: #6f849d;
  --cyan: #00e5f5;
  --cyan-soft: rgba(0, 229, 245, .12);
  --violet: #a875ff;
  --violet-soft: rgba(168, 117, 255, .13);
  --green: #32df9a;
  --green-soft: rgba(50, 223, 154, .12);
  --gold: #f8c858;
  --gold-soft: rgba(248, 200, 88, .13);
  --rose: #ff6389;
  --rose-soft: rgba(255, 99, 137, .13);
  --radius: 16px;
  --shadow: 0 18px 42px rgba(0, 0, 0, .23);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong, .brand-mark, .eyebrow, .nav-label { font-family: "Space Grotesk", "DM Sans", sans-serif; }
h1 { font-size: clamp(1.65rem, 2vw, 2.1rem); letter-spacing: -.04em; line-height: 1.1; }
h2 { font-size: 1.05rem; letter-spacing: -.02em; }
h3 { font-size: .98rem; }

.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; }
[hidden] { display: none !important; }
.eyebrow { color: var(--cyan); font-size: .65rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; flex: 0 0 auto; }
.status-dot-green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-dot-gold { background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.status-dot-rose { background: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }

/* Authentication */
.auth-view { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; position: relative; overflow: hidden; background: radial-gradient(circle at 16% 12%, rgba(0, 229, 245, .1), transparent 34%), radial-gradient(circle at 92% 90%, rgba(168, 117, 255, .12), transparent 36%), var(--bg-deep); }
.auth-view::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(148,163,184,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.1) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 82%); }
.auth-decoration { position: absolute; border: 1px solid rgba(0,229,245,.22); width: 380px; height: 380px; transform: rotate(45deg); border-radius: 70px; }
.auth-decoration-left { left: -270px; top: 18%; box-shadow: 0 0 70px rgba(0,229,245,.08); }
.auth-decoration-right { right: -300px; bottom: -18%; border-color: rgba(168,117,255,.25); box-shadow: 0 0 70px rgba(168,117,255,.08); }
.auth-card { width: min(100%, 430px); padding: 42px 42px 32px; border: 1px solid var(--line-strong); border-radius: 24px; background: rgba(13,26,43,.88); box-shadow: var(--shadow), 0 0 90px rgba(0, 229, 245, .06); backdrop-filter: blur(20px); position: relative; z-index: 1; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #04121a; font-weight: 700; font-size: 1.2rem; background: linear-gradient(135deg, var(--cyan), #7dffde); box-shadow: 0 0 26px rgba(0,229,245,.3); }
.brand-mark-large { width: 58px; height: 58px; margin-bottom: 24px; border-radius: 16px; font-size: 1.65rem; }
.auth-card h1 { margin-top: 8px; font-size: 2rem; }
.auth-copy { color: var(--muted); margin-top: 11px; margin-bottom: 28px; }
.stack-form { display: flex; flex-direction: column; gap: 8px; }
.stack-form label { color: var(--muted); font-size: .78rem; font-weight: 600; margin-top: 7px; }
.stack-form input, .stack-form select, .stack-form textarea { color: var(--text); width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; background: rgba(4,10,19,.45); padding: 11px 13px; transition: border-color .18s, box-shadow .18s; }
.stack-form input::placeholder, .stack-form textarea::placeholder { color: var(--subtle); }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .global-search input:focus, .table-search input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.stack-form textarea { resize: vertical; min-height: 72px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 0 16px; color: var(--text); font-weight: 700; transition: transform .18s, background .18s, border-color .18s, box-shadow .18s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { color: #031319; background: var(--cyan); box-shadow: 0 8px 22px rgba(0,229,245,.16); }
.button-primary:hover:not(:disabled) { background: #5af2fb; box-shadow: 0 10px 27px rgba(0,229,245,.25); }
.button-secondary { border-color: var(--line-strong); background: rgba(148,163,184,.06); }
.button-secondary:hover:not(:disabled) { background: rgba(148,163,184,.13); border-color: rgba(148,163,184,.4); }
.button-danger { color: #fff; background: var(--rose); box-shadow: 0 8px 22px rgba(255,99,137,.15); }
.button-danger:hover:not(:disabled) { background: #ff7da0; }
.button-wide { width: 100%; margin-top: 12px; }
.button-small { min-height: 34px; padding: 0 12px; font-size: .78rem; }
.button-spinner { width: 14px; height: 14px; display: none; border: 2px solid rgba(3,19,25,.35); border-top-color: currentColor; border-radius: 50%; animation: spin .75s linear infinite; }
.is-loading .button-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--subtle); margin: 22px 0 3px; font-size: .75rem; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-note { color: var(--subtle); display: flex; align-items: center; gap: 9px; justify-content: center; margin-top: 22px; font-size: .72rem; }
.auth-switch { margin: 18px auto 0; }
.form-error { color: #ff9db4; background: var(--rose-soft); border: 1px solid rgba(255,99,137,.28); border-radius: 8px; padding: 9px 10px; margin-top: 8px; font-size: .78rem; }

/* Application shell */
.dashboard-view { min-height: 100vh; display: flex; background: var(--bg); }
.sidebar { width: 244px; min-height: 100vh; display: flex; flex-direction: column; flex: 0 0 244px; padding: 23px 15px 18px; border-right: 1px solid var(--line); background: linear-gradient(180deg, #091626, #07111f 72%); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 30px; }
.sidebar-brand strong { display: block; font-size: 1rem; letter-spacing: -.02em; }
.sidebar-brand small { display: block; color: var(--subtle); font-size: .69rem; margin-top: 1px; }
.main-nav { flex: 1; }
.nav-label { color: var(--subtle); font-size: .63rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; padding: 0 12px 10px; }
.nav-label-spaced { margin-top: 27px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; text-align: left; font-size: .83rem; }
.nav-item + .nav-item { margin-top: 4px; }
.nav-item:hover { color: var(--text); background: rgba(148,163,184,.08); }
.nav-item.active { color: var(--cyan); background: var(--cyan-soft); }
.nav-icon { width: 17px; color: currentColor; font-size: 1.08rem; line-height: 1; text-align: center; }
.nav-count { margin-left: auto; min-width: 21px; padding: 2px 5px; border-radius: 20px; color: var(--cyan); background: rgba(0,229,245,.13); font-size: .68rem; text-align: center; }
.sidebar-footer { padding: 17px 7px 0; border-top: 1px solid var(--line); }
.secure-badge { display: flex; gap: 9px; align-items: center; padding: 10px 8px; border: 1px solid rgba(50,223,154,.18); border-radius: 10px; background: var(--green-soft); }
.secure-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: #062019; background: var(--green); font-weight: 700; font-size: .73rem; }
.secure-badge strong, .secure-badge small { display: block; }
.secure-badge strong { color: #b3f6da; font-size: .69rem; }
.secure-badge small { color: var(--muted); font-size: .62rem; margin-top: 2px; }
.sign-out-button { width: 100%; padding: 12px 8px 2px; border: 0; color: var(--muted); background: none; text-align: left; font-size: .75rem; }
.sign-out-button:hover { color: var(--text); }
.dashboard-main { min-width: 0; flex: 1; }
.topbar { height: 74px; display: flex; align-items: center; gap: 18px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(7,17,31,.78); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 5; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--subtle); font-size: .79rem; }
.breadcrumb strong { color: var(--text); font-size: .82rem; }
.breadcrumb-separator { color: var(--subtle); }
.topbar-actions { display: flex; align-items: center; gap: 17px; margin-left: auto; }
.global-search, .table-search { display: flex; align-items: center; gap: 8px; min-width: 218px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(148,163,184,.06); }
.search-icon { color: var(--subtle); font-size: 1.1rem; line-height: 1; }
.global-search input, .table-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: .77rem; }
.global-search input::placeholder, .table-search input::placeholder { color: var(--subtle); }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; position: relative; font-size: 1.2rem; }
.icon-button:hover { color: var(--text); border-color: var(--line); background: rgba(148,163,184,.08); }
.notification-dot { width: 5px; height: 5px; position: absolute; top: 6px; right: 6px; border-radius: 50%; background: var(--rose); }
.staff-menu { display: flex; align-items: center; gap: 9px; padding-left: 4px; }
.avatar { display: grid; place-items: center; border-radius: 50%; color: #05141b; background: linear-gradient(145deg, var(--cyan), #80ffd8); font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.avatar-small { width: 31px; height: 31px; font-size: .75rem; }
.staff-name strong, .staff-name small { display: block; }
.staff-name strong { font-size: .73rem; }
.staff-name small { color: var(--subtle); font-size: .65rem; margin-top: 1px; }
.mobile-menu-button { display: none; }
.content { max-width: 1510px; margin: 0 auto; padding: 36px 38px 54px; outline: 0; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-heading h1 { margin-top: 7px; }
.page-heading h1 span { color: var(--cyan); }
.page-heading p:not(.eyebrow) { color: var(--muted); margin-top: 8px; }
.refresh-icon { font-size: 1.05rem; line-height: 1; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.metric-card { min-height: 153px; padding: 17px 18px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 100px; height: 100px; right: -42px; bottom: -58px; border-radius: 50%; background: currentColor; opacity: .07; }
.metric-card-cyan { color: var(--cyan); }.metric-card-purple { color: var(--violet); }.metric-card-rose { color: var(--rose); }.metric-card-gold { color: var(--gold); }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .74rem; }
.metric-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: currentColor; background: currentColor; background: color-mix(in srgb, currentColor 13%, transparent); font-size: 1rem; }
.metric-card > strong { display: block; color: var(--text); font-size: 1.85rem; letter-spacing: -.05em; margin-top: 19px; }
.metric-foot { display: flex; gap: 6px; align-items: center; color: var(--subtle); font-size: .65rem; margin-top: 7px; }
.metric-trend { font-weight: 700; }.trend-up { color: var(--green); }.trend-down { color: var(--rose); }
.section-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); gap: 17px; margin-bottom: 17px; }
.surface-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 9px 25px rgba(0,0,0,.08); }
.attention-card, .activity-card { min-height: 280px; padding: 20px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-heading h2 { margin-top: 4px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; border: 0; color: var(--cyan); background: transparent; font-size: .72rem; font-weight: 700; }
.text-button:hover { color: #8df9ff; }
.attention-list, .activity-list { display: flex; flex-direction: column; gap: 4px; }
.attention-item { display: flex; align-items: center; gap: 11px; padding: 10px 9px; border-radius: 10px; cursor: pointer; }
.attention-item:hover { background: rgba(148,163,184,.07); }
.attention-item .item-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; font-size: .95rem; }
.item-icon-cyan { color: var(--cyan); background: var(--cyan-soft); }.item-icon-gold { color: var(--gold); background: var(--gold-soft); }.item-icon-rose { color: var(--rose); background: var(--rose-soft); }
.attention-item h3 { font-family: "DM Sans", sans-serif; font-size: .78rem; font-weight: 700; }.attention-item p { color: var(--subtle); font-size: .68rem; margin-top: 2px; }.attention-item .item-arrow { color: var(--subtle); margin-left: auto; font-size: 1rem; }
.activity-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; }.activity-item + .activity-item { border-top: 1px solid var(--line); }.activity-marker { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--cyan); background: var(--cyan-soft); font-size: .72rem; }.activity-item h3 { font-family: "DM Sans", sans-serif; font-size: .74rem; font-weight: 600; }.activity-item p { color: var(--subtle); font-size: .65rem; margin-top: 2px; }.activity-item time { color: var(--subtle); font-size: .63rem; margin-left: auto; white-space: nowrap; }
.table-card { padding: 20px; }.table-card > .card-heading { margin-bottom: 18px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { padding: 0 11px 11px; border-bottom: 1px solid var(--line); color: var(--subtle); font-family: "Space Grotesk", sans-serif; font-size: .62rem; font-weight: 600; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 11px; border-bottom: 1px solid rgba(148,163,184,.09); color: var(--muted); font-size: .73rem; vertical-align: middle; white-space: nowrap; }
tbody tr { transition: background .15s; }.table-card tbody tr:hover { background: rgba(148,163,184,.05); }
tbody tr:last-child td { border-bottom: 0; }
.customer-cell { display: flex; align-items: center; gap: 9px; }.customer-avatar { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--cyan); background: var(--cyan-soft); font-size: .7rem; font-family: "Space Grotesk", sans-serif; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }.customer-avatar-green { color: #dffef3; background: linear-gradient(135deg, #0cbf7a, #1a9d67); }.customer-avatar-yellow { color: #fff6d2; background: linear-gradient(135deg, #f4b740, #d79416); }.customer-avatar-red { color: #ffe6ee; background: linear-gradient(135deg, #ff5d7b, #d93d62); }.customer-avatar-neutral { color: #edf2fb; background: linear-gradient(135deg, #8391a7, #5c697d); }.customer-cell strong { display: block; color: var(--text); font-size: .75rem; font-weight: 600; }.customer-cell small { display: block; color: var(--subtle); font-size: .64rem; margin-top: 1px; }.primary-cell { color: var(--text); font-weight: 600; }.secondary-cell { color: var(--subtle); font-size: .66rem; }.table-action { border: 0; color: var(--cyan); background: transparent; font-size: .7rem; font-weight: 700; }.table-action:hover { text-decoration: underline; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 20px; font-size: .63rem; font-weight: 700; }.status-pill-new { color: var(--gold); background: var(--gold-soft); }.status-pill-active { color: var(--green); background: var(--green-soft); }.status-pill-green { color: var(--green); background: var(--green-soft); }.status-pill-yellow { color: var(--gold); background: var(--gold-soft); }.status-pill-red { color: var(--rose); background: var(--rose-soft); }.status-pill-locked { color: var(--rose); background: var(--rose-soft); }.status-pill-pending { color: var(--violet); background: var(--violet-soft); }.status-pill-neutral { color: var(--text); background: rgba(148,163,184,.14); }.status-pill-muted { color: var(--muted); background: rgba(148,163,184,.1); }
.stock-age { color: var(--text); font-weight: 700; white-space: nowrap; }.stock-age-alert, .stock-device-name-alert { color: var(--rose); }.stock-device-name-ok { color: #31d18a; }.stock-device-name-alert, .stock-device-name-ok { font-weight: 800; }.stock-alert { display: block; color: var(--rose); font-size: .62rem; font-weight: 700; margin-top: 3px; white-space: nowrap; }.stock-age-row-alert { background: rgba(255, 99, 137, .06); }.stock-age-row-alert:hover { background: rgba(255, 99, 137, .11) !important; }
.status-dot-muted { background: #dfe7f1; box-shadow: 0 0 0 4px rgba(223,231,241,.16); }
.capture-preview { display: block; margin-top: 10px; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; background: rgba(4,10,19,.25); }
.capture-preview img { display: block; width: 100%; max-height: 220px; object-fit: contain; background: white; }
.table-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 21px; }.table-toolbar-copy h2 { display: flex; align-items: center; gap: 8px; }.table-toolbar-copy p { color: var(--subtle); font-size: .7rem; margin-top: 5px; }.count-pill { min-width: 22px; padding: 2px 6px; border-radius: 20px; color: var(--cyan); background: var(--cyan-soft); font-family: "DM Sans", sans-serif; font-size: .65rem; text-align: center; }.table-filters { display: flex; gap: 8px; }.table-search { min-width: 250px; }.table-filters select, .audit-toolbar select { min-width: 130px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--muted); background: rgba(148,163,184,.06); font-size: .73rem; }
.empty-state { padding: 48px 20px 30px; text-align: center; }.empty-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 13px; color: var(--cyan); background: var(--cyan-soft); font-size: 1.4rem; }.empty-state h3 { font-size: .9rem; }.empty-state p { color: var(--subtle); font-size: .72rem; margin-top: 5px; }
.live-label { display: inline-flex; align-items: center; gap: 9px; color: var(--green); font-size: .69rem; font-weight: 600; }
.audit-card { padding: 20px; }.audit-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }.audit-list { display: flex; flex-direction: column; }.audit-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 11px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }.audit-row:last-child { border-bottom: 0; }.audit-marker { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--cyan); background: var(--cyan-soft); font-size: .72rem; }.audit-marker.warning { color: var(--gold); background: var(--gold-soft); }.audit-marker.critical { color: var(--rose); background: var(--rose-soft); }.audit-row strong { display: block; font-family: "DM Sans", sans-serif; font-size: .75rem; font-weight: 600; }.audit-row p { color: var(--subtle); font-size: .68rem; margin-top: 3px; }.audit-row time { color: var(--subtle); font-size: .65rem; white-space: nowrap; }
.admin-card { width: min(100%, 680px); padding: 24px; }.admin-card .card-heading p { color: var(--subtle); font-size: .72rem; margin-top: 5px; }.admin-form { max-width: 520px; }.admin-form .button { align-self: flex-start; margin-top: 10px; }
.terms-form h3 { color: var(--text); font-family: "Space Grotesk", sans-serif; font-size: .82rem; margin: 7px 0 0; }.camera-capture { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(4,10,19,.2); }.camera-capture strong, .camera-capture small { display: block; }.camera-capture strong { color: var(--text); font-size: .75rem; }.camera-capture small { color: var(--subtle); font-size: .67rem; margin-top: 4px; }.camera-capture small.captured { color: var(--green); }.signature-pad { display: block; width: 100%; height: 150px; margin: 7px 0 9px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; touch-action: none; }.confirm-dialog video { display: block; width: 100%; max-height: 390px; margin: 18px 0; border-radius: 10px; background: #000; object-fit: contain; }.confirm-dialog .form-error { text-align: left; }
.onboarding-confirmation { margin-top: 14px; padding: 14px; border: 1px solid rgba(50,223,154,.4); border-radius: 10px; color: var(--text); background: rgba(50,223,154,.08); }.onboarding-confirmation h3 { color: var(--green); font-size: .9rem; }.onboarding-confirmation p { color: var(--muted); font-size: .73rem; margin-top: 5px; }.onboarding-confirmation strong { display: block; margin-top: 8px; font-size: .76rem; }

/* Customer detail dialog */
dialog { color: var(--text); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow); }.customer-dialog { width: min(760px, calc(100% - 26px)); max-height: min(850px, calc(100% - 28px)); padding: 0; border-radius: 18px; }.customer-dialog::backdrop, .confirm-dialog::backdrop { background: rgba(1,6,13,.76); backdrop-filter: blur(3px); }.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }.dialog-header h2 { margin-top: 5px; font-size: 1.25rem; }.dialog-close { font-size: 1.5rem; }.dialog-body { max-height: calc(100vh - 125px); overflow-y: auto; padding: 21px 24px 27px; }.profile-banner { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 12px; background: linear-gradient(110deg, rgba(0,229,245,.1), rgba(168,117,255,.09)); }.profile-banner .customer-avatar { width: 44px; height: 44px; border-radius: 12px; font-size: .9rem; }.profile-banner h3 { font-family: "DM Sans", sans-serif; font-size: 1rem; }.profile-banner p { color: var(--muted); font-size: .7rem; margin-top: 3px; }.profile-banner .status-pill { margin-left: auto; }.detail-section { margin-top: 24px; }.detail-section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }.detail-section-heading h3 { font-size: .86rem; }.detail-section-heading p { color: var(--subtle); font-size: .68rem; margin-top: 3px; }.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }.detail-field { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(4,10,19,.2); }.detail-field label { display: block; color: var(--subtle); font-size: .63rem; text-transform: uppercase; letter-spacing: .06em; }.detail-field p { color: var(--text); font-size: .76rem; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }.terms-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.terms-form .full-field { grid-column: 1 / -1; }.terms-form label { display: block; color: var(--muted); font-size: .69rem; font-weight: 600; margin-bottom: 5px; }.terms-form input, .terms-form select { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; padding: 0 10px; color: var(--text); background: rgba(4,10,19,.4); }.terms-form .terms-submit { grid-column: 1 / -1; justify-content: flex-end; display: flex; margin-top: 3px; }.terms-hint { grid-column: 1 / -1; color: var(--subtle); font-size: .65rem; margin-top: -3px; }.device-control-card { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(4,10,19,.2); }.device-control-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }.device-control-top h4 { font-family: "DM Sans", sans-serif; font-size: .82rem; }.device-control-top p { color: var(--subtle); font-size: .68rem; margin-top: 3px; }.device-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 13px; }.device-meta span { color: var(--muted); font-size: .67rem; }.device-meta strong { color: var(--text); font-weight: 600; }.device-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }.device-actions .button { min-height: 35px; font-size: .71rem; }.device-actions .button-lock { color: var(--rose); border-color: rgba(255,99,137,.35); background: var(--rose-soft); }.device-actions .button-unlock { color: var(--green); border-color: rgba(50,223,154,.35); background: var(--green-soft); }.timeline { display: flex; flex-direction: column; }.timeline-row { display: grid; grid-template-columns: 11px minmax(0,1fr) auto; gap: 9px; padding: 8px 0; }.timeline-line { position: relative; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--cyan); }.timeline-row:not(:last-child) .timeline-line::after { content: ""; position: absolute; left: 3px; top: 9px; width: 1px; height: 35px; background: var(--line-strong); }.timeline-row p { font-size: .69rem; }.timeline-row small { color: var(--subtle); font-size: .62rem; }.timeline-row time { color: var(--subtle); font-size: .63rem; white-space: nowrap; }
.confirm-dialog { width: min(430px, calc(100% - 26px)); padding: 29px; border-radius: 18px; text-align: center; }.confirm-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 14px; color: var(--rose); background: var(--rose-soft); font-size: 1.4rem; }.confirm-dialog h2 { font-size: 1.2rem; }.confirm-dialog > p { color: var(--muted); font-size: .75rem; margin: 8px 0 15px; }.confirm-dialog .stack-form { text-align: left; }.confirm-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 13px; }.required-mark { color: var(--rose); }.optional-label { color: var(--subtle); font-weight: 400; }

/* Toasts and responsive behavior */
.toast-region { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; position: fixed; right: 23px; top: 21px; z-index: 30; pointer-events: none; }.toast { max-width: 350px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: var(--surface-2); box-shadow: var(--shadow); font-size: .74rem; animation: toast-in .24s ease-out; pointer-events: auto; }.toast-success { border-color: rgba(50,223,154,.36); }.toast-error { border-color: rgba(255,99,137,.4); color: #ffd7e1; }.toast-info { border-color: rgba(0,229,245,.35); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1100px) { .sidebar { width: 218px; flex-basis: 218px; }.content { padding-inline: 24px; }.topbar { padding-inline: 24px; }.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .sidebar { width: 230px; flex-basis: 230px; position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-101%); transition: transform .2s ease; box-shadow: var(--shadow); }.dashboard-view.sidebar-open .sidebar { transform: translateX(0); }.dashboard-view.sidebar-open::after { content: ""; position: fixed; inset: 0; z-index: 19; background: rgba(1,6,13,.62); }.mobile-menu-button { display: inline-grid; }.topbar { padding-inline: 16px; gap: 9px; }.topbar-actions { gap: 8px; }.global-search { min-width: 0; width: 34px; padding: 0 9px; border-color: transparent; background: transparent; }.global-search input { display: none; }.staff-name { display: none; }.content { padding: 27px 16px 42px; }.section-grid { grid-template-columns: 1fr; }.table-toolbar { align-items: flex-start; flex-direction: column; }.table-filters { width: 100%; }.table-search { min-width: 0; flex: 1; } }
@media (max-width: 530px) { .auth-card { padding: 31px 23px 25px; }.metric-grid { gap: 9px; }.metric-card { padding: 14px; min-height: 137px; }.metric-card > strong { font-size: 1.55rem; margin-top: 15px; }.metric-top { font-size: .68rem; }.page-heading { flex-direction: column; gap: 15px; }.page-heading > .button { width: 100%; }.table-filters { flex-direction: column; }.table-filters select { width: 100%; }.detail-grid, .terms-form { grid-template-columns: 1fr; }.terms-form .full-field { grid-column: auto; }.terms-form .terms-submit { grid-column: auto; justify-content: stretch; }.terms-submit .button { width: 100%; }.profile-banner { align-items: flex-start; flex-wrap: wrap; }.profile-banner .status-pill { margin-left: 0; }.dialog-header, .dialog-body { padding-inline: 17px; }.confirm-dialog { padding: 23px 18px; } }
/* Responsive workspace and document capture */
.dashboard-main, .content, .view-panel, .terms-form > div { min-width: 0; }
.content { width: 100%; max-width: 1800px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.view-panel > .surface-card { margin-bottom: 20px; }
.signature-pad { display: block; width: 100%; max-width: 700px; height: 180px; background: white; touch-action: none; border: 1px solid var(--line-strong); border-radius: 10px; margin: 8px 0; }
.camera-capture { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.camera-capture small { display: block; color: var(--muted); }
#camera-preview { width: 100%; max-height: 60vh; object-fit: contain; }
.document-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin: 16px 0; }
.document-grid figure { margin: 0; min-width: 0; }
.document-grid img { width: 100%; max-height: 320px; object-fit: contain; background: white; border-radius: 8px; }
.document-grid figcaption { margin-bottom: 8px; }
.detail-field p, .metric-card > strong { overflow-wrap: anywhere; }
.onboarding-confirmation { position: fixed; z-index: 40; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100% - 32px)); max-height: 85dvh; overflow: auto; padding: 28px; background: var(--surface); border: 2px solid var(--cyan); border-radius: 16px; box-shadow: 0 0 0 100vmax #0009; }
.onboarding-confirmation p, .onboarding-confirmation button { margin-top: 16px; }
#staff-list { padding: 16px; }
#staff-list button { width: 100%; background: transparent; border: 0; color: var(--text); text-align: left; justify-content: space-between; }
.dashboard-view { font-size: 16px; }
.dashboard-view .nav-item { font-size: .95rem; }
.dashboard-view .nav-label { font-size: .72rem; }
.dashboard-view .eyebrow { font-size: .72rem; }
.dashboard-view th { font-size: .7rem; }
.dashboard-view td { font-size: .82rem; }
.dashboard-view .terms-form label, .dashboard-view .stack-form label { font-size: .78rem; }
.dashboard-view .terms-hint, .dashboard-view .card-heading p { font-size: .75rem; }
.dashboard-view .button-small { font-size: .84rem; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-button { position: relative; cursor: pointer; }
.camera-capture .file-button { margin: 0; }
.document-image-frame { min-height: 180px; max-height: 340px; overflow: auto; display: grid; place-items: center; background: rgba(4,10,19,.35); border-radius: 8px; }
.document-grid img { transition: transform .15s ease; transform-origin: center center; }
.document-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.document-actions .button { text-decoration: none; }
@media (max-width: 800px) { .topbar { flex-wrap: wrap; height: auto; min-height: 64px; padding-block: 10px; } .sidebar { height: 100dvh; overflow-y: auto; } }
@media (max-width: 380px) { .metric-grid { grid-template-columns: 1fr; } .content { padding-inline: 10px; } .breadcrumb { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Keep action feedback above modal dialogs as well as the workspace. */
#toast-region[popover] { position: fixed; inset: 18px 16px auto auto; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; width: min(420px, calc(100vw - 32px)); overflow: visible; }
#toast-region[popover]:popover-open { display: grid; gap: 10px; }
button[aria-busy="true"], [aria-busy="true"] button[type="submit"] { cursor: wait; }

/* Feature workspaces occupy the page; only confirmations remain compact. */
.content { max-width: none; min-height: calc(100dvh - 64px); }
.view-panel { min-height: calc(100dvh - 150px); }
.view-panel:not([data-panel="overview"]) > .surface-card { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding-inline: 0; }
#customer-dialog, #support-dialog, #camera-dialog, .scanner-page { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; box-sizing: border-box; overflow-y: auto; }
#camera-dialog .dialog-actions { flex-wrap: wrap; }
#camera-preview { max-height: 65dvh; }

#agent-account { padding: 20px; margin-bottom: 20px; }
dialog.confirm-dialog form { display: grid; gap: 12px; }
dialog.confirm-dialog form label { display: grid; gap: 5px; }
dialog.confirm-dialog input, dialog.confirm-dialog select { max-width: 100%; min-width: 0; }
