* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f6fa;
  font-synthesis: none;
}
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f3f6fa; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
.ambient { position: fixed; pointer-events: none; border-radius: 999px; filter: blur(2px); opacity: .8; }
.ambient-one { width: 420px; height: 420px; top: -230px; right: -100px; background: #dce9f8; }
.ambient-two { width: 330px; height: 330px; bottom: -200px; left: -120px; background: #e8e1f5; }
.app-shell { position: relative; z-index: 1; width: min(1420px, 100%); margin: 0 auto; padding: 28px clamp(18px, 4vw, 60px) 34px; }
.auth-layout { min-height: calc(100vh - 62px); display: grid; place-items: center; align-content: center; gap: 20px; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-lockup.compact { gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #183a69, #4775a8); font-weight: 800; letter-spacing: -.06em; box-shadow: 0 9px 22px #1a3c6b2e; }
.compact .brand-mark { width: 38px; height: 38px; border-radius: 12px; font-size: .88rem; }
.eyebrow, .section-kicker { margin: 0; color: #60738b; font-size: .69rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; color: #10233f; font-size: 1.08rem; letter-spacing: -.025em; }
h2 { margin-bottom: 9px; color: #10233f; font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -.045em; }
h3 { margin: 5px 0 0; color: #10233f; font-size: 1.05rem; letter-spacing: -.025em; }
.muted { color: #708096; line-height: 1.65; }
.small { font-size: .82rem; }
.panel { border: 1px solid #dce4ee; border-radius: 21px; background: #ffffffde; box-shadow: 0 18px 50px #233b5c0e; backdrop-filter: blur(12px); }
.auth-card { width: min(450px, 100%); padding: 34px; }
.auth-card h2 { margin-top: 8px; }
.auth-card .muted { margin-bottom: 25px; font-size: .88rem; }
.stack-form { display: grid; gap: 9px; }
.stack-form label, .form-row label { color: #41536b; font-size: .77rem; font-weight: 750; }
input, select { width: 100%; min-height: 44px; border: 1px solid #d7e0eb; border-radius: 11px; outline: none; background: #fbfcfe; color: #172033; padding: 0 13px; transition: border-color .18s, box-shadow .18s, background .18s; }
input:focus, select:focus { border-color: #4775a8; background: #fff; box-shadow: 0 0 0 4px #4775a81a; }
.password-field { position: relative; }
.password-field input { padding-right: 3rem; }
.password-toggle { position: absolute; top: 50%; right: .45rem; display: grid; place-items: center; width: 2rem; height: 2rem; transform: translateY(-50%); border: 0; border-radius: .52rem; color: #7890a6; background: transparent; font-size: .98rem; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: #285987; background: #eaf2fa; }
.primary-button, .secondary-button, .ghost-button { min-height: 43px; border: 0; border-radius: 11px; padding: 0 16px; font-weight: 800; transition: transform .16s, box-shadow .16s, background .16s; }
.primary-button { color: #fff; background: #1b416f; box-shadow: 0 9px 18px #1b416f25; }
.primary-button:hover { transform: translateY(-1px); background: #15365e; box-shadow: 0 12px 24px #1b416f30; }
.secondary-button { color: #254b76; border: 1px solid #c8d7e8; background: #f4f8fc; }
.secondary-button:hover { background: #eaf2fa; }
.ghost-button { min-height: 36px; color: #5d7189; background: transparent; }
.ghost-button:hover { color: #1b416f; background: #eef4fa; }
.security-note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: #6b7c90; font-size: .71rem; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2caf77; box-shadow: 0 0 0 4px #2caf771b; }
.footnote, .app-footer { color: #8a98a9; font-size: .7rem; letter-spacing: .02em; text-align: center; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 4px 0 25px; border-bottom: 1px solid #dfe6ee; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.secure-pill { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 12px; border: 1px solid #d9e7dc; border-radius: 999px; color: #41715a; background: #f4fbf6; font-size: .7rem; font-weight: 750; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 38px 0 23px; }
.page-heading h2 { margin-top: 7px; }
.page-heading .muted { margin-bottom: 0; font-size: .9rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .85fr); gap: 20px; align-items: start; }
.tenant-panel, .side-column > .panel { padding: 24px; }
.side-column { display: grid; gap: 20px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.count-badge { min-width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: #28527f; background: #eaf2fa; font-size: .75rem; font-weight: 850; }
.tenant-list { display: grid; gap: 10px; }
.tenant-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px 16px; border: 1px solid #e0e7ef; border-radius: 15px; background: #fbfcfe; transition: border-color .16s, background .16s, box-shadow .16s; }
.tenant-card:hover, .tenant-card.selected { border-color: #a9c3df; background: #f6faff; box-shadow: 0 8px 22px #2c5a8610; }
.tenant-main { min-width: 0; }
.tenant-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tenant-code { color: #173b67; font-size: .97rem; font-weight: 850; letter-spacing: .01em; }
.state-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 0 8px; border-radius: 999px; font-size: .64rem; font-weight: 850; }
.state-chip.active { color: #2b7757; background: #e7f7ee; }
.state-chip.inactive { color: #9a5e38; background: #fff0e5; }
.tenant-meta { display: flex; flex-wrap: wrap; gap: 6px 15px; margin-top: 7px; color: #77879a; font-size: .71rem; }
.tenant-meta span { min-width: 0; overflow-wrap: anywhere; }
.tenant-actions { display: flex; align-items: center; gap: 6px; }
.mini-button { min-height: 33px; border: 1px solid #d2dfec; border-radius: 9px; padding: 0 10px; color: #315a85; background: #fff; font-size: .7rem; font-weight: 800; }
.mini-button:hover { background: #eef5fb; }
.mini-button.danger { color: #9a5e38; border-color: #edd8c9; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 65px 20px; border: 1px dashed #cedae6; border-radius: 15px; color: #78889a; font-size: .78rem; text-align: center; }
.empty-state strong { color: #40536b; font-size: .88rem; }
.empty-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 14px; color: #55799f; background: #edf4fb; font-size: 1.6rem; }
.form-row { display: grid; gap: 7px; }
.form-row.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.optional { color: #9aa7b6; font-weight: 500; }
.stack-form .primary-button { margin-top: 7px; }
.form-message { margin: 13px 0 0; padding: 10px 12px; border-radius: 10px; color: #3c628b; background: #eef5fc; font-size: .75rem; line-height: 1.5; }
.form-message.error { color: #9e4d43; background: #fff0ee; }
.form-message.success { color: #2e7657; background: #eaf8f0; }
.access-panel { min-height: 280px; }
.feature-editor { display: grid; gap: 8px; margin: 18px 0 17px; }
.feature-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid #e0e7ef; border-radius: 11px; background: #fbfcfe; }
.feature-label { color: #40536b; font-size: .78rem; font-weight: 750; }
.switch { position: relative; display: inline-flex; width: 40px; height: 23px; flex: 0 0 auto; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { width: 40px; height: 23px; border-radius: 999px; background: #c8d2dd; transition: background .18s; }
.switch-track::after { content: ""; display: block; width: 17px; height: 17px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #162a401f; transition: transform .18s; }
.switch input:checked + .switch-track { background: #2b9b6b; }
.switch input:checked + .switch-track::after { transform: translateX(17px); }
.full-width { width: 100%; }
.app-footer { padding: 24px 0 0; }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (max-width: 650px) { .app-shell { padding: 18px 14px 25px; } .topbar, .page-heading { align-items: start; flex-direction: column; } .topbar-actions { width: 100%; justify-content: space-between; } .side-column { grid-template-columns: 1fr; } .tenant-card { grid-template-columns: 1fr; } .tenant-actions { justify-content: flex-start; } .auth-card { padding: 25px 21px; } }
@media (max-width: 430px) { .form-row.two-up { grid-template-columns: 1fr; gap: 9px; } .secure-pill { font-size: .64rem; } }
