:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #1d342b;
  background: #f4f7f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --green: #17825e;
  --line: #e3eae5;
  --muted: #7e8b84;
}

* { box-sizing: border-box; }
body { min-width: 360px; min-height: 100vh; margin: 0; background: #f4f7f5; }
button, input { font: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 24px; }
.login-card { width: min(430px, 100%); margin: 9vh auto 0; padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 16px 48px #1d342b0b; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #e5f4ed; color: var(--green); font-size: 22px; font-weight: 800; }
.eyebrow { margin: 16px 0 6px; color: #65a184; font-size: 9px; font-weight: 750; letter-spacing: 1.3px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 23px; letter-spacing: -.55px; }
h2 { margin-bottom: 5px; font-size: 17px; letter-spacing: -.25px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.55; }
.login-card form { display: grid; gap: 8px; margin-top: 23px; }
label { margin-top: 7px; color: #4f6358; font-size: 11px; font-weight: 650; }
input { min-width: 0; height: 40px; padding: 0 11px; border: 1px solid #dfe8e2; border-radius: 8px; outline: none; background: #fbfcfb; color: #20372c; font-size: 12px; }
input:focus { border-color: #54a784; box-shadow: 0 0 0 3px #42ad8318; }
.primary-button, .quiet-button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 650; white-space: nowrap; }
.primary-button { margin-top: 9px; background: #176b4e; color: #fff; }
.primary-button:hover { background: #125a41; }
.primary-button:disabled, .quiet-button:disabled { opacity: .55; cursor: wait; }
.quiet-button { border-color: #dfe8e2; background: #fff; color: #52675c; }
.quiet-button:hover { border-color: #bad8c6; background: #f4faf6; color: var(--green); }
.quiet-button.danger { border-color: #efdfdc; color: #a85650; }
.quiet-button.danger:hover { border-color: #dfbcb7; background: #fff6f5; }
.feedback { min-height: 17px; margin: 8px 0 0; color: #a2504c; font-size: 11px; line-height: 1.4; }
.feedback.success { color: #2e8056; }
.dashboard[hidden], .login-card[hidden], .empty-state[hidden] { display: none; }
.topbar, .brand-lockup, .account-actions, .welcome-row, .table-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar { min-height: 64px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand-lockup { justify-content: flex-start; gap: 12px; }
.brand-lockup .eyebrow { margin: 0 0 3px; }
.brand-lockup h1 { margin: 0; font-size: 18px; }
.account-actions { color: var(--muted); font-size: 10px; }
.welcome-row { align-items: flex-end; padding: 23px 0 16px; }
.welcome-row p, .table-heading p { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 17px; }
.stat-card { display: grid; gap: 10px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.stat-card span { color: var(--muted); font-size: 10px; }
.stat-card strong { color: #27473a; font-size: 24px; font-variant-numeric: tabular-nums; }
.device-panel { min-height: 310px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.table-heading { align-items: flex-start; padding-bottom: 14px; }
.table-heading h2 { margin-bottom: 4px; font-size: 14px; }
.table-heading p { color: var(--muted); font-size: 10px; }
.table-heading input { width: 230px; height: 34px; font-size: 11px; }
.table-scroll { overflow-x: auto; border: 1px solid #edf1ee; border-radius: 9px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { height: 36px; padding: 0 11px; background: #f8faf8; color: #84918a; font-size: 9px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px; border-top: 1px solid #eef2ef; color: #465a50; font-size: 10px; vertical-align: middle; }
.device-id { max-width: 230px; overflow-wrap: anywhere; color: #344e41; font-family: Consolas, monospace; font-size: 9px; }
.device-phone { color: #344e41; font-size: 11px; font-weight: 650; white-space: nowrap; }
.subline { margin-top: 4px; color: #98a49d; font-size: 9px; }
.badge { display: inline-flex; padding: 4px 7px; border-radius: 20px; background: #f0f3f1; color: #6f7c74; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge.active { background: #e9f6ee; color: #2f875b; }
.badge.online { background: #e9f6ee; color: #2f875b; }
.badge.offline { background: #f0f3f1; color: #6f7c74; }
.badge.exempt { background: #eef2ff; color: #596ba4; }
.badge.expired { background: #fff3e0; color: #a87524; }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 170px; }
.row-actions button { min-height: 28px; padding: 0 8px; font-size: 9px; }
.empty-state { padding: 36px 12px; color: var(--muted); font-size: 11px; text-align: center; }
footer { padding: 15px 2px 0; color: #9aa59f; font-size: 9px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 600px); padding-top: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-row { align-items: flex-start; flex-direction: column; }
  .table-heading { flex-direction: column; }
  .table-heading input { width: 100%; }
  .account-actions { align-items: flex-end; flex-direction: column; gap: 6px; }
}
