:root {
  --bg: #f4f5f7;
  --card: rgba(255, 255, 255, .88);
  --text: #16181d;
  --muted: #747982;
  --line: rgba(22, 24, 29, .08);
  --blue: #0a70ff;
  --blue-deep: #075dcc;
  --green: #1eaa68;
  --orange: #f07835;
  --violet: #7657d9;
  --shadow: 0 16px 45px rgba(37, 44, 60, .08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-body {
  background:
    radial-gradient(circle at 82% 4%, rgba(65, 143, 255, .10), transparent 24rem),
    var(--bg);
}

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px; padding: 28px 20px 22px;
  background: rgba(250, 250, 252, .78); backdrop-filter: blur(26px) saturate(160%);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 10;
}

.brand-row { display: flex; align-items: center; gap: 12px; padding: 0 8px 32px; }
.brand-row strong { display: block; font-size: 16px; letter-spacing: -.2px; }
.brand-row span { display: block; color: #969ba5; font-size: 10px; letter-spacing: .8px; margin-top: 2px; text-transform: uppercase; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: white; font-weight: 760; background: linear-gradient(145deg, #2691ff, #075eda); border-radius: 13px; box-shadow: 0 8px 20px rgba(10,112,255,.25); }
.brand-mark.large { width: 54px; height: 54px; border-radius: 17px; margin-bottom: 36px; font-size: 22px; }

.side-nav { display: grid; gap: 7px; }
.nav-item { border: 0; background: transparent; color: #6c7079; border-radius: 12px; padding: 11px 13px; text-align: left; display: flex; align-items: center; gap: 12px; font-size: 14px; transition: .18s ease; text-decoration: none; }
.nav-item span { width: 23px; text-align: center; font-size: 15px; font-weight: 650; }
.nav-item:hover { background: rgba(255,255,255,.8); color: var(--text); }
.nav-item.active { color: #0767e8; background: white; box-shadow: 0 7px 22px rgba(34,72,126,.08); font-weight: 650; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 15px 8px 0; border-top: 1px solid var(--line); }
.admin-avatar { width: 34px; height: 34px; border-radius: 50%; background: #e5efff; color: var(--blue); display: grid; place-items: center; font-weight: 700; }
.admin-meta { flex: 1; min-width: 0; }
.admin-meta strong, .admin-meta span { display: block; overflow: hidden; text-overflow: ellipsis; }
.admin-meta strong { font-size: 13px; }.admin-meta span { font-size: 10px; color: #9a9ea6; margin-top: 2px; }
.icon-button { border: 0; background: transparent; color: #8e939c; padding: 7px; border-radius: 8px; }
.icon-button:hover { background: #eceef2; }

.main-content { margin-left: 248px; padding: 34px clamp(24px, 4vw, 58px) 70px; max-width: 1600px; }
.topbar { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.topbar h1 { font-size: 27px; letter-spacing: -.7px; margin: 4px 0 0; }
.eyebrow { margin: 0; color: #8b9099; font-size: 10px; line-height: 1.4; letter-spacing: 1.4px; font-weight: 760; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.68); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.date-pill, .soft-badge { background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 5px 18px rgba(37,44,60,.04); border-radius: 999px; color: #757a83; font-size: 11px; padding: 9px 13px; }
.soft-badge { padding: 7px 11px; background: #f3f6fa; border-color: #edf0f4; box-shadow: none; white-space: nowrap; }

.view { display: none; animation: rise .3s ease both; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.hero-card { min-height: 220px; overflow: hidden; color: white; background: linear-gradient(118deg, #0871f5, #2687f7 52%, #66aaf8); border-radius: 26px; padding: 35px 42px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 24px 50px rgba(17,107,222,.20); position: relative; }
.hero-card::before, .hero-card::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); }
.hero-card::before { width: 360px; height: 360px; right: -90px; top: -170px; }
.hero-card::after { width: 270px; height: 270px; right: 90px; bottom: -210px; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h2 { font-size: clamp(29px, 3vw, 41px); line-height: 1.1; margin: 9px 0 10px; letter-spacing: -1.2px; }
.hero-copy p:not(.eyebrow) { color: rgba(255,255,255,.78); margin: 0 0 23px; font-size: 13px; }
.white-button { border: 0; padding: 10px 16px; border-radius: 11px; color: #0968db; background: white; font-weight: 700; box-shadow: 0 7px 18px rgba(6,77,159,.14); text-decoration: none; display: inline-block; }
.coverage-ring { --value: 0; width: 142px; height: 142px; flex: 0 0 auto; margin-right: 5%; border-radius: 50%; background: conic-gradient(#fff calc(var(--value) * 1%), rgba(255,255,255,.22) 0); padding: 8px; position: relative; z-index: 1; }
.coverage-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #328cf0; }
.coverage-ring div { position: relative; height: 100%; display: grid; place-content: center; text-align: center; }
.coverage-ring strong { display: block; font-size: 29px; letter-spacing: -1px; }.coverage-ring span { display: block; color: rgba(255,255,255,.7); font-size: 11px; margin-top: 2px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 18px 0; }
.stat-card, .panel-card { background: var(--card); border: 1px solid rgba(255,255,255,.85); box-shadow: var(--shadow); border-radius: 20px; }
.stat-card { padding: 19px 20px; position: relative; min-height: 135px; }
.stat-card p { margin: 13px 0 5px; color: #7a7e87; font-size: 12px; }.stat-card strong { display: block; font-size: 29px; letter-spacing: -.8px; }.stat-card small { display: block; color: #a4a8b0; font-size: 10px; margin-top: 4px; }
.stat-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; font-size: 13px; font-weight: 780; }.stat-icon.blue { color: #0871f5; background: #e9f2ff; }.stat-icon.violet { color: #7657d9; background: #f0ecff; }.stat-icon.green { color: #16995d; background: #e7f7ef; }.stat-icon.orange { color: #e26b29; background: #fff0e6; }
.green-text { color: var(--green); }.orange-text { color: var(--orange); }

.two-column-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel-card { padding: 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 13px; flex-wrap: wrap; }
.panel-heading .muted { margin: 6px 0 0; max-width: 28rem; }
.panel-card h3 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.35px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.65; }
.inline-form { display: flex; gap: 10px; align-items: center; margin-top: 19px; }
input, textarea, select { width: 100%; color: var(--text); border: 1px solid #e3e6eb; background: rgba(248,249,251,.92); border-radius: 11px; padding: 11px 13px; outline: none; transition: .18s ease; }
input:focus, textarea:focus, select:focus { border-color: rgba(10,112,255,.6); box-shadow: 0 0 0 4px rgba(10,112,255,.08); background: white; }
textarea { resize: vertical; line-height: 1.65; }
.primary-button, .secondary-button { border: 0; border-radius: 11px; padding: 11px 16px; white-space: nowrap; font-size: 12px; font-weight: 700; transition: .18s ease; }
.primary-button { color: white; background: var(--blue); box-shadow: 0 7px 16px rgba(10,112,255,.18); }.primary-button:hover { background: var(--blue-deep); transform: translateY(-1px); }
.secondary-button { color: #4f555f; background: white; border: 1px solid #e7e9ed; }.secondary-button:hover { background: #f8f9fb; }
.primary-button.full { width: 100%; }.primary-button.small { padding: 8px 12px; }.link-button { display: inline-flex; text-decoration: none; }
.lookup-result { margin-top: 15px; border-radius: 12px; padding: 13px 15px; background: #f4f6f9; font-size: 12px; }.lookup-result.empty { color: #969ba3; }.lookup-result.success { color: #147b4c; background: #eaf8f1; }.lookup-result.danger { color: #c95620; background: #fff0e8; }
.upload-zone { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 13px; margin-top: 16px; padding: 13px; border: 1px dashed #ccd4df; border-radius: 14px; background: #fafbfd; }
.upload-zone label { display: grid; grid-template-columns: 35px 1fr; column-gap: 11px; align-items: center; cursor: pointer; }.upload-zone label strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.upload-zone label small { color: #9a9fa7; font-size: 9px; grid-column: 2; margin-top: 2px; }.upload-icon { grid-row: 1 / 3; width: 35px; height: 35px; display: grid; place-items: center; color: var(--blue); background: #eaf3ff; border-radius: 10px; font-weight: 800; }
.insurance-history-card { margin-top: 18px; }
.table-action.download-link { color: var(--blue); text-decoration: none; font-weight: 700; }

.section-grid { display: grid; grid-template-columns: minmax(310px, .7fr) minmax(560px, 1.3fr); gap: 18px; align-items: start; }
.sticky-card { position: sticky; top: 25px; }
.form-stack { display: grid; gap: 16px; margin-top: 20px; }.form-stack label { display: grid; gap: 7px; font-size: 12px; font-weight: 650; color: #555b64; }.form-stack label small { color: #9a9fa8; font-size: 10px; font-weight: 400; }
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compact-select, .compact-date { width: auto; padding: 7px 10px; font-size: 11px; background-color: #f6f7f9; }
.compact-select { padding-right: 30px; }
.table-wrap { overflow-x: auto; margin: 5px -7px -6px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid #eff0f2; font-size: 11px; }
th { color: #999da5; font-size: 9px; text-transform: uppercase; letter-spacing: .7px; font-weight: 740; }td { color: #4d525b; }tbody tr:last-child td { border-bottom: 0; }.empty-cell { color: #a0a4ac; text-align: center; padding: 38px; }
.person-cell strong, .person-cell span { display: block; }.person-cell strong { color: var(--text); font-size: 12px; }.person-cell span { color: #a2a6ad; font-size: 9px; margin-top: 2px; }
.status-badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; background: #f0f2f5; color: #727781; }.status-badge.active, .status-badge.insured { color: #158152; background: #e9f7f0; }.status-badge.expired, .status-badge.disabled, .status-badge.uninsured { color: #d2632d; background: #fff0e8; }.table-action { border: 0; color: #8e939c; background: transparent; font-size: 10px; padding: 5px; }

.verification-search, .api-intro { display: flex; justify-content: space-between; align-items: center; gap: 25px; }.verification-search .inline-form { min-width: 330px; margin: 0; }.compact-stats .stat-card { min-height: 105px; }.compact-stats .stat-card p { margin-top: 0; }.small-number { font-size: 14px !important; margin-top: 12px; }
.roster-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.danger-button { border: 0; border-radius: 11px; padding: 11px 16px; white-space: nowrap; font-size: 12px; font-weight: 700; color: #c95328; background: #fff0e8; transition: .18s ease; }
.danger-button:hover { background: #ffe4d6; }
.danger-button.small { padding: 7px 12px; font-size: 11px; }
.segmented { background: #f1f3f6; padding: 3px; border-radius: 10px; display: flex; }.segmented button { border: 0; background: transparent; color: #80858e; border-radius: 8px; padding: 7px 11px; font-size: 10px; }.segmented button.active { color: var(--text); background: white; box-shadow: 0 2px 7px rgba(32,38,49,.08); font-weight: 700; }

.api-grid { margin-top: 18px; }.key-list { display: grid; gap: 8px; margin-top: 18px; }.key-item { display: flex; gap: 10px; align-items: center; padding: 11px 12px; background: #f7f8fa; border-radius: 12px; }.key-item .key-meta { flex: 1; }.key-item strong, .key-item small { display: block; }.key-item strong { font-size: 11px; }.key-item small { color: #959aa3; font-size: 9px; margin-top: 3px; }.key-reveal { background: #ebf4ff; border: 1px solid #d9eaff; color: #165da9; padding: 13px; border-radius: 12px; margin-top: 12px; word-break: break-all; font-size: 11px; }.hidden { display: none; }
.code-card pre { overflow-x: auto; margin: 18px 0; color: #d5e5ff; background: #172033; border-radius: 14px; padding: 20px; font: 11px/1.8 "SFMono-Regular", Consolas, monospace; }.code-card code { font-family: inherit; }code { color: #1768c5; background: #eff5fd; border-radius: 5px; padding: 2px 5px; font-size: .9em; }.code-card pre code { color: inherit; background: none; padding: 0; }
.settings-grid { display: grid; grid-template-columns: minmax(340px, .8fr) minmax(420px, 1.2fr); gap: 18px; align-items: start; }.rule-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 20px; }.rule-list li { display: flex; gap: 14px; align-items: start; }.rule-list li > span { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #edf4ff; color: var(--blue); font-size: 11px; font-weight: 760; }.rule-list strong { font-size: 12px; }.rule-list p { margin: 5px 0 0; color: #8e939b; font-size: 11px; line-height: 1.6; }
.user-create-form { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr auto; gap: 10px; align-items: end; margin: 0; min-width: min(100%, 520px); }
#view-users .panel-card + .panel-card { margin-top: 18px; }
.user-create-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 650; color: #555b64; }
#view-logs .panel-card + .panel-card { margin-top: 18px; }
.log-detail { display: block; color: #9aa0a8; font-size: 10px; margin-top: 4px; }

.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; z-index: 50; opacity: 0; pointer-events: none; transform: translateY(12px); color: white; background: #20242b; border-radius: 13px; padding: 13px 17px; box-shadow: 0 15px 35px rgba(0,0,0,.18); font-size: 12px; transition: .25s ease; }.toast.show { opacity: 1; transform: none; }.toast.error { background: #c95328; }

.login-body { background: linear-gradient(125deg, #eaf3ff 0%, #f8f9fc 48%, #eaf0fb 100%); display: grid; place-items: center; padding: 32px; overflow: hidden; }
.login-body::before, .login-body::after { content: ""; position: fixed; border-radius: 50%; filter: blur(2px); }.login-body::before { width: 430px; height: 430px; background: rgba(72,145,255,.14); top: -220px; right: -100px; }.login-body::after { width: 350px; height: 350px; background: rgba(144,112,255,.10); left: -180px; bottom: -190px; }
.login-shell { width: min(100%, 980px); min-height: 570px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 70px; position: relative; z-index: 1; }.login-story { padding: 35px; }.login-story h1 { margin: 10px 0 20px; font-size: clamp(38px, 5vw, 57px); line-height: 1.12; letter-spacing: -2.2px; }.login-subtitle { color: #6e7580; font-size: 15px; line-height: 1.8; max-width: 400px; }.story-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.56); border-radius: 999px; color: #5b6470; font-size: 11px; box-shadow: 0 8px 25px rgba(40,62,92,.05); }.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(30,170,104,.11); }.glass-card { border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.67); backdrop-filter: blur(30px) saturate(150%); box-shadow: 0 25px 70px rgba(45,67,99,.14); }.login-card { border-radius: 28px; padding: 40px 36px; }.login-card-header h2 { margin: 7px 0; font-size: 27px; letter-spacing: -.7px; }.login-card-header > p:last-child { margin: 0; color: #8b9099; font-size: 12px; }.security-note { color: #a1a5ad; text-align: center; font-size: 9px; margin: 21px 0 0; }.mobile-brand { display: none; }.alert { border-radius: 11px; padding: 11px 13px; font-size: 11px; margin: 17px 0 -4px; }.alert.error { color: #bd4d25; background: #fff0e9; }

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .section-grid, .settings-grid { grid-template-columns: 1fr; }.sticky-card { position: static; }
  .user-create-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .sidebar { position: fixed; inset: auto 12px 12px; width: auto; height: 64px; border: 1px solid rgba(255,255,255,.9); border-radius: 18px; padding: 7px; flex-direction: row; box-shadow: 0 12px 35px rgba(37,44,60,.15); }
  .brand-row, .sidebar-footer { display: none; }.side-nav { width: 100%; grid-template-columns: repeat(7, 1fr); gap: 3px; }.app-body.role-user .side-nav { grid-template-columns: repeat(3, 1fr); }.nav-item { justify-content: center; padding: 7px 3px; font-size: 0; border-radius: 12px; }.nav-item span { font-size: 15px; }.main-content { margin-left: 0; padding: 25px 16px 95px; }.topbar { align-items: center; }.topbar-actions .date-pill { display: none; }.topbar h1 { font-size: 23px; }.hero-card { padding: 28px; min-height: 205px; }.coverage-ring { width: 105px; height: 105px; margin: 0; }.coverage-ring strong { font-size: 22px; }.two-column-grid { grid-template-columns: 1fr; }.verification-search, .api-intro { align-items: stretch; flex-direction: column; }.verification-search .inline-form { min-width: 0; }.roster-toolbar { justify-content: flex-start; }.user-create-form { grid-template-columns: 1fr; min-width: 0; width: 100%; }.login-shell { display: block; min-height: 0; }.login-story { display: none; }.mobile-brand { display: grid; margin-bottom: 26px; }.login-card { max-width: 420px; margin: auto; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.stat-card { min-height: 122px; padding: 16px; }.hero-card { display: block; }.coverage-ring { display: none; }.topbar-actions { display: none; }.panel-card { padding: 19px; }.inline-form, .date-grid { display: grid; grid-template-columns: 1fr; }.upload-zone { grid-template-columns: 1fr; }.login-body { padding: 17px; }.login-card { padding: 30px 24px; }
}
