:root {
  --ink: #14213d;
  --ink-2: #24324d;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #ccfbf1;
  --blue-soft: #dbeafe;
  --amber-soft: #fef3c7;
  --red-soft: #fee2e2;
  --green-soft: #dcfce7;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 255px;
  background: linear-gradient(180deg, #10213d 0%, #14213d 55%, #0f2d37 100%);
  color: white;
  padding: 26px 18px;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, #2dd4bf, #0f766e); font-weight: 900; letter-spacing: -1px;
  box-shadow: 0 10px 24px rgba(45, 212, 191, .2);
}
.brand-name { font-size: 19px; font-weight: 800; }
.brand-sub { font-size: 11px; color: #bfdbfe; text-transform: uppercase; letter-spacing: .11em; }
.property-card { margin: 2px 7px 22px; padding: 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.06); }
.property-card strong { display: block; font-size: 13px; }
.property-card span { font-size: 11px; color: #cbd5e1; }
.nav-label { padding: 0 10px; margin: 18px 0 8px; font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: .13em; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 11px 12px; margin: 4px 0; border-radius: 12px; color: #dbeafe; text-decoration: none; font-size: 14px; }
.nav-link:hover, .nav-link.active { background: rgba(45, 212, 191, .14); color: white; }
.nav-icon { width: 25px; text-align: center; }
.sidebar-bottom { position: absolute; left: 18px; right: 18px; bottom: 22px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.07); }
.avatar { width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); font-weight: 800; }
.user-meta { min-width: 0; flex: 1; }
.user-meta strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 10px; color: #cbd5e1; }
.icon-button { border: 0; background: transparent; color: inherit; padding: 6px; border-radius: 8px; }
.icon-button:hover { background: rgba(255,255,255,.1); }

.main { margin-left: 255px; width: calc(100% - 255px); min-height: 100vh; }
.topbar { height: 76px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.content { padding: 28px 30px 50px; max-width: 1540px; margin: 0 auto; }

.btn { border: 0; border-radius: 11px; padding: 10px 15px; font-weight: 750; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: white; box-shadow: 0 8px 20px rgba(15,118,110,.18); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: #b91c1c; color: white; }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-sm { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-2-1 { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(15, 23, 42, .045); }
.card-header { padding: 19px 21px; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.card-header h2 { margin: 0; font-size: 15px; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.card-body { padding: 21px; }
.stat-card { padding: 20px; position: relative; overflow: hidden; }
.stat-card:after { content: ""; position: absolute; width: 78px; height: 78px; border-radius: 50%; right: -20px; top: -24px; background: var(--brand-soft); opacity: .55; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.stat-value { margin-top: 9px; font-size: 31px; font-weight: 850; letter-spacing: -.04em; }
.stat-foot { margin-top: 7px; color: var(--muted); font-size: 11px; }

.section-space { margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 800; color: var(--ink-2); }
.field input, .field select, .field textarea, .search-box input {
  width: 100%; border: 1px solid #cbd5e1; background: white; color: var(--ink); border-radius: 11px; padding: 10px 11px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus, .search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.1); }
.field textarea { min-height: 78px; resize: vertical; }
.help { font-size: 10px; color: var(--muted); }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 12px; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .075em; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #edf2f7; font-size: 12px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.primary-cell strong { display: block; font-size: 13px; }
.primary-cell span { color: var(--muted); font-size: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; font-weight: 800; }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-Expected { background: var(--blue-soft); color: #1d4ed8; }
.status-AwaitingResident { background: var(--amber-soft); color: #92400e; }
.status-CheckedIn { background: var(--green-soft); color: #166534; }
.status-CheckedOut { background: #e2e8f0; color: #475569; }
.status-Denied, .status-Cancelled, .status-Expired { background: var(--red-soft); color: #991b1b; }

.search-box { position: relative; }
.search-box input { padding-left: 38px; height: 45px; }
.search-box span { position: absolute; left: 13px; top: 11px; color: var(--muted); }
.search-results { margin-top: 10px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.search-result { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: white; }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: #f8fafc; }

.alert { border-radius: 13px; padding: 12px 14px; font-size: 12px; margin-bottom: 14px; }
.alert-success { background: var(--green-soft); color: #166534; }
.alert-error { background: var(--red-soft); color: #991b1b; }
.alert-info { background: var(--blue-soft); color: #1e40af; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 30px; margin-bottom: 8px; }
.empty strong { display: block; color: var(--ink-2); font-size: 13px; }
.empty span { font-size: 11px; }

.progress { height: 9px; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.kpi-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,.62); display: grid; place-items: center; padding: 20px; }
.modal { width: min(660px, 100%); max-height: 92vh; overflow: auto; background: white; border-radius: 20px; box-shadow: var(--shadow); }
.modal-header { padding: 19px 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 22px; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: white; }
.login-visual { padding: 55px; background: radial-gradient(circle at 15% 20%, rgba(45,212,191,.28), transparent 34%), linear-gradient(145deg, #0f172a, #14213d 55%, #0f4c4c); color: white; display: flex; flex-direction: column; justify-content: space-between; }
.login-visual .logo-large { display: flex; align-items: center; gap: 15px; }
.logo-large .brand-mark { width: 54px; height: 54px; }
.login-copy { max-width: 620px; }
.login-copy h1 { font-size: clamp(38px, 5.2vw, 72px); line-height: 1.02; letter-spacing: -.055em; margin: 0 0 20px; }
.login-copy p { color: #cbd5e1; max-width: 530px; font-size: 16px; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.feature-pills span { padding: 8px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: 11px; background: rgba(255,255,255,.06); }
.login-form-side { display: grid; place-items: center; padding: 42px; }
.login-panel { width: min(440px, 100%); }
.login-panel h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.03em; }
.login-panel > p { margin: 0 0 25px; color: var(--muted); font-size: 13px; }
.demo-accounts { display: grid; gap: 8px; margin-top: 18px; }
.demo-account { border: 1px solid var(--line); background: #f8fafc; border-radius: 11px; padding: 10px 12px; text-align: left; }
.demo-account strong { display: block; font-size: 11px; }
.demo-account span { font-size: 10px; color: var(--muted); }
.login-note { margin-top: 16px; padding: 11px; background: var(--amber-soft); border-radius: 11px; color: #78350f; font-size: 10px; }

.mobile-menu { display: none; }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; width: 100%; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 19px 15px 40px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 360px; padding: 32px 24px; }
  .login-form-side { padding: 34px 20px; }
}
@media (max-width: 620px) {
  .grid-4, .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .field.full, .form-actions { grid-column: auto; }
  .topbar h1 { font-size: 17px; }
  .topbar p { display: none; }
  .hide-mobile { display: none; }
}

/* GateRoster Firebase SaaS portal components */
[ng-cloak] { display: none !important; }
.brand { color: inherit; text-decoration: none; }
.brand > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.brand strong { font-size: 18px; letter-spacing: -.02em; }
.brand small { color: #b8c7dc; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.brand-light small { color: rgba(255,255,255,.72); }

.sidebar { display: flex; flex-direction: column; overflow: hidden; }
.community-card {
  margin: 0 7px 18px; padding: 13px; border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; background: rgba(255,255,255,.06);
}
.community-card small, .community-card span { display: block; color: #b8c7dc; font-size: 10px; }
.community-card strong { display: block; margin: 3px 0; font-size: 13px; }
.nav-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.nav-list a {
  display: flex; align-items: center; gap: 11px; margin: 3px 0; padding: 10px 12px;
  border-radius: 12px; color: #dbeafe; text-decoration: none; font-size: 13px;
}
.nav-list a:hover, .nav-list a.active { background: rgba(45,212,191,.14); color: white; }
.sidebar-footer { margin-top: 14px; padding: 13px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.user-block { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.user-block > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.user-block strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-block small { color: #b8c7dc; font-size: 9px; }
.sidebar-footer .text-button { color: #cbd5e1; }

.topbar-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.icon-link {
  width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 11px; background: white; text-decoration: none;
}
.mobile-menu { border: 0; background: transparent; font-size: 22px; padding: 4px 7px; }

.card-head {
  padding: 18px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; border-bottom: 1px solid var(--line);
}
.card-head h2 { margin: 0; font-size: 15px; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.card > .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
.card-body p { color: var(--muted); font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stats article {
  min-height: 135px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: white; box-shadow: 0 8px 28px rgba(15,23,42,.045); position: relative; overflow: hidden;
}
.stats article::after {
  content: ''; position: absolute; width: 82px; height: 82px; right: -27px; top: -29px;
  border-radius: 50%; background: var(--brand-soft); opacity: .7;
}
.stats small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.stats strong { display: block; margin: 10px 0 5px; font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.stats span { color: var(--muted); font-size: 10px; }

.two-column { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 18px; }
.split-form { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.form-page { grid-template-columns: minmax(360px, .9fr) minmax(0, 1.35fr); }
.form-card { padding-bottom: 20px; }
.form-card > label, .auth-card > label, .plan-editor > label, .settings-grid > label:not(.setting) {
  display: flex; flex-direction: column; gap: 6px; margin: 14px 20px 0; color: var(--ink-2); font-size: 10px; font-weight: 800;
}
.form-card > .form-grid { padding: 6px 20px 17px; }
.form-grid label {
  display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 10px; font-weight: 800;
}
.form-grid .full { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 11px; background: white; color: var(--ink);
  padding: 10px 11px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.1); }
textarea { min-height: 82px; resize: vertical; }
.checkbox { flex-direction: row !important; align-items: center; gap: 8px !important; }
.checkbox input { width: auto; }
.button-row { display: flex; gap: 9px; padding: 18px 20px 0; }
.form-card > .btn { margin: 18px 20px 0; }
.form-card > .alert { margin: 14px 20px 0; }

.table-filter { width: min(230px, 45vw); }
td strong, td small { display: block; }
td small { color: var(--muted); margin-top: 2px; }
td code, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.text-button { border: 0; background: transparent; color: var(--brand); padding: 6px 7px; font-weight: 750; font-size: 11px; }
.text-button:hover { text-decoration: underline; }
.text-button.center { display: block; margin: 10px auto 0; }

.pill {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px;
  background: #e2e8f0; color: #475569; font-size: 9px; font-weight: 850; white-space: nowrap;
}
.pill.success, .status-Active, .status-Provisioned, .status-Completed { background: var(--green-soft); color: #166534; }
.pill.warning, .status-Submitted, .status-UnderReview, .status-Provisioning, .status-Invited, .status-Trial, .status-Pending { background: var(--amber-soft); color: #92400e; }
.pill.muted, .status-Inactive, .status-Revoked, .status-Suspended { background: #e2e8f0; color: #475569; }
.status-Expected { background: var(--blue-soft); color: #1d4ed8; }
.status-AwaitingResident { background: var(--amber-soft); color: #92400e; }
.status-CheckedIn { background: var(--green-soft); color: #166534; }
.status-CheckedOut { background: #e2e8f0; color: #475569; }
.status-Denied, .status-Cancelled, .status-Expired, .status-Declined, .status-PastDue, .status-Failed { background: var(--red-soft); color: #991b1b; }

.compact-list article, .approval, .search-results article {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.compact-list article:last-child, .approval:last-child, .search-results article:last-child { border-bottom: 0; }
.compact-list article > div:first-child, .search-results article > div:first-child { min-width: 0; flex: 1; }
.compact-list strong, .compact-list span, .approval strong, .approval span, .search-results strong, .search-results span { display: block; }
.compact-list span, .approval span, .search-results span { color: var(--muted); font-size: 10px; }
.approval > div { display: flex; gap: 7px; }
.search-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 10px; padding: 18px 20px; }
.search-results { margin: 0 20px 20px; }

.meter-label { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 8px; }
.meter { height: 10px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--brand); max-width: 100%; }
.shortcut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 20px; }
.shortcut-grid a { padding: 15px; border-radius: 12px; background: #f1f5f9; text-decoration: none; font-size: 11px; font-weight: 800; }
.shortcut-grid a:hover { background: var(--brand-soft); color: var(--brand-dark); }

.activation-code { margin: 16px 20px 0; padding: 14px; border: 1px dashed var(--brand); border-radius: 12px; background: var(--brand-soft); }
.activation-code small, .activation-code strong { display: block; }
.activation-code strong { margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; letter-spacing: .08em; }

.settings-card { padding-bottom: 20px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.setting { display: flex; align-items: flex-start; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.setting input { width: auto; margin-top: 3px; }
.setting span, .setting strong, .setting small { display: block; }
.setting small { color: var(--muted); font-weight: 400; margin-top: 3px; }
.settings-card > .alert { margin: 0 20px; }

.page-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 14px; }
.page-actions select { width: auto; min-width: 180px; }
.notification-list article { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.notification-list article:last-child { border-bottom: 0; }
.notification-list article.unread { background: #f0fdfa; }
.notification-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #cbd5e1; }
.notification-list article.unread .notification-dot { background: var(--brand); }
.notification-list strong { font-size: 12px; }
.notification-list p { margin: 4px 0; color: var(--ink-2); font-size: 11px; }
.notification-list small { color: var(--muted); font-size: 9px; }

.workflow { margin: 0; padding: 20px 26px 24px 46px; }
.workflow li { padding: 0 0 16px 8px; }
.workflow strong, .workflow span { display: block; }
.workflow strong { font-size: 12px; }
.workflow span { color: var(--muted); font-size: 10px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 18px; }
.plan-editor { padding-bottom: 20px; }
.plan-editor > .btn { margin: 18px 20px 0; }

.date-filter { display: flex; align-items: center; gap: 8px; }
.date-filter input { min-width: 150px; }
.modal-body { padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; padding: 0 20px 20px; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); background: white; }
.auth-visual {
  min-height: 100vh; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; color: white;
  background: radial-gradient(circle at 15% 20%, rgba(45,212,191,.28), transparent 35%), linear-gradient(145deg, #0f172a, #14213d 55%, #0f4c4c);
}
.auth-visual .brand { padding: 0; }
.auth-visual > div { max-width: 720px; }
.auth-visual h1 { margin: 14px 0 18px; font-size: clamp(42px, 5vw, 72px); line-height: 1.02; letter-spacing: -.055em; }
.auth-visual p { max-width: 610px; color: #d7e1ef; font-size: 15px; }
.eyebrow { color: #99f6e4; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .14em; }
.auth-form-wrap { display: grid; place-items: center; padding: 38px; }
.auth-card { width: min(440px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.auth-card .brand { padding: 0 0 24px; }
.auth-card .brand small { color: var(--muted); }
.auth-card h2 { margin: 0 0 7px; font-size: 26px; letter-spacing: -.035em; }
.auth-card > p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.auth-card > label { margin: 13px 0 0; }
.auth-card > .btn { margin-top: 14px; }
.auth-foot { margin-top: 16px !important; font-size: 9px !important; text-align: center; }
.auth-simple { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 0, #ccfbf1, transparent 35%), var(--canvas); }
.auth-card.wide { width: min(720px, 100%); }
.selection-grid { display: grid; gap: 10px; margin: 20px 0; }
.selection-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: white; }
.selection-card:hover { border-color: var(--brand); background: #f0fdfa; }
.selection-card strong, .selection-card small { display: block; }
.selection-card small { color: var(--muted); }
.route-loader { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}
@media (max-width: 900px) {
  .two-column, .split-form, .form-page { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: 420px; padding: 34px 25px; }
  .auth-form-wrap { padding: 34px 20px; }
}
@media (max-width: 820px) {
  .sidebar { box-shadow: 18px 0 45px rgba(15,23,42,.24); }
  .topbar { height: 68px; }
}
@media (max-width: 640px) {
  .stats, .settings-grid, .plan-grid, .shortcut-grid { grid-template-columns: 1fr; }
  .search-row { grid-template-columns: 1fr; }
  .date-filter { flex-wrap: wrap; }
  .date-filter input { min-width: 0; width: 100%; }
  .page-actions { justify-content: stretch; flex-wrap: wrap; }
  .page-actions > * { flex: 1; }
  .notification-list article { grid-template-columns: 10px minmax(0, 1fr); }
  .notification-list article .text-button { grid-column: 2; justify-self: start; }
  .auth-visual h1 { font-size: 39px; }
  .auth-card { padding: 22px; }
}
