/* ==========================================================================
   Health One Stop · Portals (patient, provider, hospital) and Admin
   ========================================================================== */
.dash { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.dash-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; scrollbar-width: thin; background: var(--surface); border-right: 1px solid var(--border); z-index: 60; }
body[data-sidebar=deep] .dash-side.is-admin, body[data-sidebar=deep] .dash-side.is-deep { background: linear-gradient(180deg, #072631, #061A21); color: #CFE1E4; border-right-color: rgba(255,255,255,.04); }
.dash-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.dash-brand .chip-logo { background: #fff; border-radius: 12px; padding: 5px 9px; display: inline-flex; }
.dash-brand img { height: 32px; width: auto; }
.dash-side .area { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 14px 12px 6px; }
.is-deep .area, body[data-sidebar=deep] .is-admin .area { color: rgba(207,225,228,.45); }
.dash-nav { display: grid; gap: 2px; }
.dash-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; font-size: .9rem; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.dash-nav a .i { width: 18px; height: 18px; }
.dash-nav a:hover { background: var(--surface-alt); color: var(--text); }
.dash-nav a.is-active { background: rgba(var(--secondary-rgb), .12); color: var(--text); }
.dash-nav a.is-active .i { color: var(--secondary); }
.dash-nav a .pill { margin-left: auto; font-size: .7rem; font-weight: 750; padding: 2px 8px; border-radius: 999px; background: rgba(var(--danger-rgb), .12); color: var(--danger); }
body[data-sidebar=deep] .is-admin .dash-nav a, .is-deep .dash-nav a { color: rgba(207,225,228,.72); }
body[data-sidebar=deep] .is-admin .dash-nav a:hover, .is-deep .dash-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
body[data-sidebar=deep] .is-admin .dash-nav a.is-active, .is-deep .dash-nav a.is-active { background: rgba(var(--accent-rgb), .12); color: #fff; }
body[data-sidebar=deep] .is-admin .dash-nav a.is-active .i, .is-deep .dash-nav a.is-active .i { color: var(--accent); }
.dash-side .side-foot { margin-top: auto; padding-top: 16px; }
.side-card { padding: 16px; border-radius: 16px; background: linear-gradient(140deg, rgba(var(--secondary-rgb), .12), rgba(var(--accent-rgb), .12)); font-size: .85rem; }
.is-deep .side-card, body[data-sidebar=deep] .is-admin .side-card { background: rgba(255,255,255,.05); }
.dash-main { min-width: 0; display: flex; flex-direction: column; }
.dash-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px clamp(16px, 3vw, 32px); background: rgba(var(--bg-rgb), .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(var(--border-rgb), .6); min-height: 68px; }
.dash-top .search-mini { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .9rem; cursor: text; }
.dash-top .spacer { flex: 1; }
.dash-content { padding: clamp(18px, 3vw, 32px); flex: 1; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 4px; }
.dash-head p { color: var(--muted); margin: 0; }
.dash-toggle { display: none; }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 999px; }
.user-pill:hover { background: var(--surface-alt); }
.user-pill .n { font-weight: 650; font-size: .88rem; line-height: 1.2; }
.user-pill .r { font-size: .74rem; color: var(--muted); }
@media (max-width: 1080px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-3); }
  .dash-side.is-open { transform: none; }
  .dash-toggle { display: inline-grid; }
  .user-pill .meta { display: none; }
}
@media (max-width: 640px) { .dash-top .search-mini span { display: none; } .dash-top .search-mini { max-width: 44px; padding: 0; justify-content: center; } }

/* Bottom tab bar for patients on mobile */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: rgba(var(--surface-rgb), .92); backdrop-filter: blur(16px); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .68rem; font-weight: 650; color: var(--muted); padding: 6px 0; border-radius: 10px; }
  .tabbar a .i { width: 21px; height: 21px; }
  .tabbar a.is-active { color: var(--secondary); }
  .has-tabbar .dash-content { padding-bottom: 96px; }
  .has-tabbar .assistant-fab { bottom: 84px; }
}

/* KPIs & panels */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .kpis.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi .lbl { font-size: .82rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .lbl .i { width: 16px; height: 16px; color: var(--secondary); }
.kpi .val { font-size: clamp(1.45rem, 2.2vw, 1.85rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.kpi .delta.up { color: var(--success); } .kpi .delta.down { color: var(--danger); } .kpi .delta.flat { color: var(--muted); }
.kpi .delta .i { width: 14px; height: 14px; }
.kpi .spark { position: absolute; right: 12px; bottom: 10px; width: 96px; height: 34px; opacity: .9; }
.kpi.accent { background: linear-gradient(140deg, var(--primary), var(--secondary)); color: #fff; border: 0; }
.kpi.accent .lbl, .kpi.accent .lbl .i { color: rgba(255,255,255,.8); }
@media (max-width: 1200px) { .kpis.k5, .kpis.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.k3 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 520px) { .kpis, .kpis.k3, .kpis.k5, .kpis.k6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 14px; } .kpi .spark { display: none; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); display: flex; flex-direction: column; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 1rem; margin: 0; letter-spacing: -.01em; }
.panel-head .sub { font-size: .8rem; color: var(--muted); }
.panel-body { padding: 18px 20px; flex: 1; min-width: 0; }
.panel-body.flush { padding: 0; }
.panel .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.dgrid { display: grid; gap: 20px; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-bottom: 20px; }
.c-12 { grid-column: span 12 } .c-8 { grid-column: span 8 } .c-7 { grid-column: span 7 } .c-6 { grid-column: span 6 } .c-5 { grid-column: span 5 } .c-4 { grid-column: span 4 } .c-3 { grid-column: span 3 }
@media (max-width: 1100px) { .c-8, .c-7, .c-6, .c-5, .c-4 { grid-column: span 12; } .c-3 { grid-column: span 6; } }
@media (max-width: 560px) { .c-3 { grid-column: span 12; } .dgrid { gap: 14px; } }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 200px; } .chart-box.lg { height: 340px; }
.list { list-style: none; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 650; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; }
.list .s { font-size: .8rem; color: var(--muted); }
.appt-date { width: 54px; flex: none; text-align: center; border-radius: 12px; background: var(--surface-alt); padding: 6px 0; border: 1px solid var(--border); }
.appt-date .m { font-size: .66rem; font-weight: 750; text-transform: uppercase; color: var(--secondary); letter-spacing: .06em; }
.appt-date .d { font-size: 1.2rem; font-weight: 800; line-height: 1.1; }
.hello { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: clamp(22px, 3vw, 32px); border-radius: 24px; margin-bottom: 20px; background: radial-gradient(500px 220px at 100% 0%, rgba(var(--accent-rgb), .25), transparent 70%), linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; position: relative; overflow: hidden; }
.hello h1 { color: #fff; margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.hello p { margin: 0; color: rgba(255,255,255,.82); max-width: 560px; }
.hello::after { content: ''; position: absolute; right: -60px; bottom: -160px; width: 300px; height: 300px; border-radius: 50%; border: 2px solid rgba(var(--accent-rgb), .5); clip-path: inset(0 0 50% 0); }
@media (max-width: 700px) { .hello { grid-template-columns: 1fr; } }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-weight: 650; font-size: .9rem; transition: all .2s; }
.quick a:hover { border-color: rgba(var(--secondary-rgb), .4); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.quick .tint { width: 40px; height: 40px; border-radius: 12px; }
@media (max-width: 900px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.member-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .86rem; font-weight: 600; }
.member-chip.is-active { border-color: var(--secondary); background: rgba(var(--secondary-rgb), .08); }
.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters-bar .input, .filters-bar .select { width: auto; min-height: 40px; padding-block: 8px; font-size: .88rem; }
.filters-bar .input { min-width: 220px; }
.inline-form { display: inline; }
.doc-tile { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.doc-tile .ft { width: 42px; height: 48px; border-radius: 8px; display: grid; place-items: center; font-size: .66rem; font-weight: 800; color: #fff; background: var(--danger); flex: none; }
.doc-tile .ft.img { background: var(--info); }
.sla { font-size: .78rem; font-weight: 700; }
.sla.breach { color: var(--danger); } .sla.ok { color: var(--success); }
.thread { display: grid; gap: 12px; }
.thread .m { padding: 12px 14px; border-radius: 14px; background: var(--surface-alt); font-size: .92rem; }
.thread .m.agent { background: rgba(var(--secondary-rgb), .08); }
.thread .m.internal { background: rgba(var(--accent-rgb), .14); border: 1px dashed rgba(var(--accent-rgb), .6); }
.thread .m.ai { background: rgba(var(--info-rgb), .07); }
.thread .meta { font-size: .74rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }

/* Calendar (provider) */
.week-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-cal .day { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); min-height: 160px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.week-cal .day.today { border-color: var(--secondary); box-shadow: inset 0 0 0 1px var(--secondary); }
.week-cal .day h5 { margin: 0 0 4px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.week-cal .ev { font-size: .74rem; padding: 6px 8px; border-radius: 8px; background: rgba(var(--secondary-rgb), .1); border-left: 3px solid var(--secondary); line-height: 1.3; }
.week-cal .ev.pending { background: rgba(var(--warning-rgb), .12); border-color: var(--warning); }
.week-cal .ev.completed { background: rgba(var(--success-rgb), .1); border-color: var(--success); }
@media (max-width: 900px) { .week-cal { grid-template-columns: 1fr; } .week-cal .day { min-height: 0; } }

/* Analytics */
.range-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 180px 1fr 90px; gap: 12px; align-items: center; font-size: .86rem; }
.funnel-row .bar { height: 30px; border-radius: 8px; background: var(--surface-alt); overflow: hidden; position: relative; }
.funnel-row .bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--secondary), rgba(var(--secondary-rgb), .55)); border-radius: 8px; transition: width 1s var(--ease); display: flex; align-items: center; padding-left: 10px; color: #fff; font-weight: 700; font-size: .78rem; }
.funnel-row .pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.funnel-row .drop { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .funnel-row { grid-template-columns: 1fr 70px; } .funnel-row .lbl { grid-column: 1 / -1; } }
.cohort { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: .8rem; }
.cohort th { font-size: .72rem; color: var(--muted); font-weight: 700; padding: 6px; text-align: center; }
.cohort th:first-child { text-align: left; }
.cohort td { text-align: center; padding: 9px 4px; border-radius: 6px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cohort td.c0 { text-align: left; font-weight: 700; background: transparent; white-space: nowrap; }
.heat { display: grid; grid-template-columns: 40px repeat(24, minmax(0, 1fr)); gap: 3px; font-size: .66rem; color: var(--muted); }
.heat .h { aspect-ratio: 1; border-radius: 4px; background: rgba(var(--secondary-rgb), calc(var(--v) * .95 + .04)); }
.heat .lbl { display: flex; align-items: center; font-weight: 650; }
.heat .hr { text-align: center; }
.geo-map { position: relative; width: 100%; aspect-ratio: 4 / 4.2; max-height: 520px; background: radial-gradient(circle at 50% 45%, rgba(var(--mint-rgb), .6), transparent 70%); border-radius: 18px; }
:root[data-theme=dark] .geo-map { background: radial-gradient(circle at 50% 45%, rgba(var(--secondary-rgb), .14), transparent 70%); }
.geo-map svg { width: 100%; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bar-list { display: grid; gap: 10px; }
.bar-list .r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: .86rem; }
.bar-list .r .b { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--surface-alt); overflow: hidden; }
.bar-list .r .b span { display: block; height: 100%; border-radius: 4px; background: var(--secondary); }
.bar-list .r .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.feed { list-style: none; display: grid; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: .86rem; align-items: flex-start; }
.feed li:last-child { border: 0; }
.feed .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-alt); flex: none; }
.feed .ic .i { width: 15px; height: 15px; color: var(--secondary); }
.live-badge { display: inline-flex; gap: 6px; align-items: center; font-size: .76rem; font-weight: 700; color: var(--success); }

/* Widget grid (custom dashboards) */
.wgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 120px; gap: 16px; }
.widget { grid-column: span var(--w, 4); grid-row: span var(--h, 2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); display: flex; flex-direction: column; min-width: 0; overflow: hidden; position: relative; }
.widget.dragging { opacity: .5; }
.widget.drop-target { outline: 2px dashed var(--secondary); outline-offset: 2px; }
.widget-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .88rem; }
.widget-head .handle { cursor: grab; color: var(--muted); }
.widget-head .tools { margin-left: auto; display: none; gap: 2px; }
.editing .widget-head .tools { display: flex; }
.editing .widget { cursor: move; }
.widget-body { flex: 1; padding: 12px 14px; min-height: 0; position: relative; overflow: auto; }
.widget-body .chart-box { height: 100%; }
.widget .metric-val { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
@media (max-width: 900px) { .wgrid { grid-template-columns: 1fr; grid-auto-rows: auto; } .widget { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 220px; } }

/* Builders */
.builder { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.builder-list { display: grid; gap: 8px; }
.b-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; font-weight: 600; }
.b-item.is-hidden { opacity: .55; }
.b-item.is-selected { border-color: var(--secondary); box-shadow: inset 0 0 0 1px var(--secondary); }
.b-item .handle { cursor: grab; color: var(--muted); }
.b-item.dragging { opacity: .4; }
.b-item.drag-over { border-style: dashed; border-color: var(--secondary); }
.b-item .grow { flex: 1; min-width: 0; }
.b-item .s { font-size: .74rem; color: var(--muted); font-weight: 500; }
.preview-frame { width: 100%; height: 76vh; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.preview-shell { position: sticky; top: 88px; }
.preview-toolbar { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.repeater-row { position: relative; padding: 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; background: var(--surface-alt); }
.repeater-row .rm { position: absolute; right: 8px; top: 8px; }
.swatch-field { display: flex; align-items: center; gap: 10px; }
.swatch-field input[type=color] { width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: none; cursor: pointer; }
.swatch-field input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; } .swatch-field input[type=color]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.swatch-field .input { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .86rem; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.preset { padding: 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); text-align: left; }
.preset.is-active { border-color: var(--secondary); box-shadow: inset 0 0 0 1px var(--secondary); }
.preset .sw { display: flex; gap: 4px; margin-bottom: 10px; }
.preset .sw span { width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(0,0,0,.06); }
.flow { display: grid; gap: 0; }
.flow-step { position: relative; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.flow-arrow { height: 22px; width: 2px; background: var(--border); margin: 0 auto; }
.flow-trigger { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; border: 0; }
.perm-matrix th, .perm-matrix td { text-align: center; }
.perm-matrix th:first-child, .perm-matrix td:first-child { text-align: left; }
.perm-matrix th { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; padding: 10px 6px; height: 160px; vertical-align: bottom; }
.perm-matrix th:first-child { writing-mode: horizontal-tb; transform: none; height: auto; }
@media (max-width: 1100px) { .builder { grid-template-columns: 1fr; } .preview-shell { position: static; } .preview-frame { height: 60vh; } }
.settings-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; background: var(--surface-alt); padding: 2px 6px; border-radius: 6px; }
pre.code { padding: 14px; overflow-x: auto; white-space: pre-wrap; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(700px 400px at 80% 0%, rgba(var(--secondary-rgb), .6), transparent 70%), radial-gradient(500px 360px at 0% 100%, rgba(var(--accent-rgb), .25), transparent 70%), #072631; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.auth-art .serif { color: var(--accent); }
.auth-art .quote { padding: 20px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-size: .95rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter); }
.auth-form .inner { width: 100%; max-width: 440px; }
.auth-form .inner.wide { max-width: 620px; }
.demo-box { margin-top: 20px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--border); font-size: .82rem; color: var(--muted); }
.demo-box button { color: var(--secondary); font-weight: 650; }
@media (max-width: 920px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* Sparklines sit in flow under the KPI so they never collide with the delta text */
.kpi .spark { position: static; display: block; width: 100%; height: 30px; margin-top: auto; }
.kpi .delta { flex-wrap: wrap; }
@media (max-width: 640px) { .dash-top .search-mini kbd { display: none; } }
.builder-list { grid-template-columns: minmax(0, 1fr); }
.builder > * { min-width: 0; }
.b-item > .grow { display: block; }
