:root {
  color-scheme: dark;
  --bg: #061017;
  --bg-soft: #09151e;
  --surface: #0d1a24;
  --surface-2: #11222e;
  --surface-3: #152a37;
  --line: #203541;
  --line-strong: #2c4a58;
  --text: #eef8f8;
  --text-soft: #c1d1d5;
  --muted: #78919a;
  --primary: #4de0c1;
  --primary-strong: #22b99c;
  --primary-ink: #041311;
  --violet: #8e87ff;
  --blue: #58a9ff;
  --warning: #f4bc62;
  --danger: #ff7185;
  --success: #52daa0;
  --shadow: 0 28px 80px rgba(0, 0, 0, .32);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 78% -15%, rgba(44, 123, 133, .24), transparent 35%), var(--bg); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(77, 224, 193, .28); outline-offset: 2px; }
.hidden { display: none !important; }
.eyebrow { display: block; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.muted { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { letter-spacing: -.02em; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(470px, 1.08fr) minmax(420px, .92fr); }
.auth-showcase { position: relative; min-height: 100vh; padding: clamp(32px, 5vw, 72px); overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(145deg, rgba(9, 30, 39, .96), rgba(5, 16, 23, .98)); border-right: 1px solid var(--line); }
.auth-showcase::before { content: ""; position: absolute; width: 620px; height: 620px; right: -280px; top: -290px; border: 1px solid rgba(77, 224, 193, .16); border-radius: 50%; box-shadow: 0 0 0 80px rgba(77, 224, 193, .025), 0 0 0 160px rgba(77, 224, 193, .018); }
.auth-showcase::after { content: ""; position: absolute; width: 260px; height: 260px; right: 8%; bottom: 4%; opacity: .2; background-image: linear-gradient(rgba(77,224,193,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(77,224,193,.35) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(135deg, transparent, #000); }
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.brand > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--primary-ink); background: linear-gradient(135deg, #70f3d6, #4bb8e9); font-size: 22px; font-weight: 900; box-shadow: 0 10px 30px rgba(40, 209, 184, .2); }
.brand > div { display: grid; gap: 2px; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.brand-large > span { width: 50px; height: 50px; border-radius: 15px; font-size: 25px; }
.auth-story { position: relative; z-index: 1; width: min(650px, 100%); margin: auto 0; padding: 70px 0; }
.auth-story h1 { margin: 18px 0 22px; font-size: clamp(42px, 5.4vw, 78px); line-height: .98; }
.auth-story h1 em { color: var(--primary); font-style: normal; }
.auth-story > p { max-width: 610px; color: var(--text-soft); font-size: clamp(16px, 1.4vw, 20px); line-height: 1.6; }
.benefit-list { display: grid; gap: 10px; margin-top: 38px; max-width: 620px; }
.benefit-list > div { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid transparent; border-radius: 14px; }
.benefit-list > div:hover { border-color: var(--line); background: rgba(255, 255, 255, .02); }
.benefit-list > div > span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(77,224,193,.3); border-radius: 11px; color: var(--primary); font-size: 10px; font-weight: 800; }
.benefit-list p { display: grid; gap: 3px; margin: 0; }
.benefit-list small { color: var(--muted); line-height: 1.4; }
.auth-trust { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 0; color: var(--muted); font-size: 11px; }
.auth-trust span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 16px var(--success); }
.auth-panel-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: rgba(4, 12, 18, .72); }
.login-card { width: min(440px, 100%); padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(150deg, rgba(17, 34, 45, .98), rgba(9, 22, 30, .98)); box-shadow: var(--shadow); }
.login-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid rgba(77,224,193,.25); border-radius: 999px; color: var(--primary); background: rgba(77,224,193,.06); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.login-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.login-card h2 { margin: 25px 0 8px; font-size: 30px; }
.login-card > p { margin-bottom: 30px; color: var(--muted); line-height: 1.5; }
label { display: grid; gap: 8px; margin: 15px 0; color: var(--text-soft); font-size: 12px; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--text); background: #07141c; transition: border-color .18s, box-shadow .18s, background .18s; }
textarea { min-height: 92px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--primary-strong); box-shadow: 0 0 0 3px rgba(77, 224, 193, .09); background: #091923; }
input:disabled { opacity: .66; cursor: not-allowed; }
.primary, .secondary, .ghost, .text-button { min-height: 40px; padding: 9px 14px; border-radius: 10px; font-weight: 750; transition: transform .16s, filter .16s, border-color .16s, background .16s; }
.primary { color: var(--primary-ink); background: linear-gradient(135deg, #62ebce, #42cdb3); box-shadow: 0 8px 24px rgba(38, 199, 169, .16); }
.primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.secondary, .ghost { border: 1px solid var(--line); color: var(--text-soft); background: var(--surface); }
.secondary:hover, .ghost:hover { border-color: var(--line-strong); color: var(--text); background: var(--surface-2); }
.wide { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-inline: 18px; }
.wide b { font-size: 18px; }
.form-message { min-height: 22px; margin-top: 12px; font-size: 12px; }
.error { color: var(--danger); }
.login-help { display: flex; justify-content: space-between; gap: 18px; padding-top: 20px; margin-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.login-help a { color: var(--text-soft); text-decoration: none; }

.app { min-height: 100vh; display: grid; grid-template-columns: 278px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 14px; border-right: 1px solid var(--line); background: rgba(5, 15, 21, .96); backdrop-filter: blur(24px); }
.sidebar > .brand { padding: 0 10px 20px; }
.workspace-chip { display: flex; align-items: center; gap: 10px; margin: 2px 6px 18px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.workspace-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 14px var(--primary); }
.workspace-chip div { display: grid; gap: 2px; }
.workspace-chip small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.workspace-chip strong { font-size: 12px; }
nav { min-height: 0; display: grid; gap: 3px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nav-label { margin: 15px 11px 6px; color: #516b75; font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
nav button { width: 100%; min-height: 47px; display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid transparent; border-radius: 10px; color: #8da3aa; text-align: left; background: transparent; }
nav button > span:last-child { min-width: 0; display: grid; gap: 2px; }
nav button strong { font-size: 12px; font-weight: 700; }
nav button small { overflow: hidden; color: #506872; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.nav-icon { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid transparent; border-radius: 9px; font-size: 15px; }
nav button:hover { color: var(--text); background: rgba(255,255,255,.025); }
nav button.active { border-color: rgba(77,224,193,.16); color: var(--text); background: linear-gradient(90deg, rgba(77,224,193,.12), rgba(77,224,193,.025)); }
nav button.active .nav-icon { color: var(--primary); background: rgba(77,224,193,.1); }
nav button.active small { color: #78969d; }
.database-collections { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.database-collections > div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); }
.database-collections span { color: var(--muted); font-size: 12px; }
.database-collections strong { color: var(--primary); }
.command-list { display: grid; gap: 9px; margin-top: 16px; }
.command-list code { overflow-x: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; color: #a9e9dd; background: #071116; white-space: nowrap; }
.sidebar-footer { display: grid; grid-template-columns: 36px minmax(0, 1fr) 34px; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 8px 2px; border-top: 1px solid var(--line); }
.sidebar-footer > div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.sidebar-footer strong, .sidebar-footer small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer strong { font-size: 11px; }
.sidebar-footer small { color: var(--muted); font-size: 9px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--primary); background: rgba(77,224,193,.1); font-size: 12px; font-weight: 800; }
.icon-button { display: grid; place-items: center; width: 34px; min-width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); }
.icon-button:hover { color: var(--text); border-color: var(--line-strong); }
.app-main { min-width: 0; padding: 0 clamp(20px, 3.3vw, 52px) 70px; }
.topbar { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 4px 0 3px; font-size: clamp(24px, 2vw, 31px); }
.topbar p { margin: 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.status { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(82,218,160,.2); border-radius: 999px; color: #8ce6ba; background: rgba(82,218,160,.06); font-size: 11px; font-weight: 700; white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px var(--success); }
.sidebar-toggle { display: none; }
.page { display: none; animation: pageIn .22s ease-out; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat, article, .table-card { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(15, 31, 41, .96), rgba(10, 24, 33, .96)); box-shadow: 0 16px 40px rgba(0,0,0,.09); }
.stat { position: relative; min-height: 132px; overflow: hidden; padding: 19px; }
.stat::after { content: ""; position: absolute; right: -28px; bottom: -38px; width: 90px; height: 90px; border: 1px solid rgba(77,224,193,.12); border-radius: 50%; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat small { color: var(--muted); font-size: 11px; }
.stat-icon { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; color: var(--primary); background: rgba(77,224,193,.06); }
.stat strong { display: block; margin-top: 14px; font-size: clamp(25px, 2.2vw, 34px); }
.stat footer { margin-top: 4px; color: #68838c; font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dashboard-grid > article { min-height: 230px; padding: 20px; }
.dashboard-grid .span-2 { grid-column: span 2; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.section-heading h2 { margin: 4px 0 0; font-size: 16px; }
.health { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(32,53,65,.75); color: var(--text-soft); font-size: 11px; }
.health:last-child { border-bottom: 0; }
.health strong { text-align: right; }
.text-button { min-height: auto; padding: 5px; color: var(--primary); background: transparent; font-size: 10px; }
.toolbar { min-height: 72px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.toolbar h2 { margin: 0 0 5px; font-size: 20px; }
.toolbar p { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }
.search-field { min-width: min(310px, 34vw); min-height: 40px; display: flex; align-items: center; gap: 7px; margin: 0; padding-left: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); }
.search-field input { min-height: 38px; padding-left: 0; border: 0; background: transparent; box-shadow: none; }
.toolbar-metric { display: grid; text-align: right; }
.toolbar-metric strong { color: var(--primary); font-size: 24px; }
.toolbar-metric small { color: var(--muted); }
.table-card { padding: 0; overflow: hidden; }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; vertical-align: middle; }
th { color: #63808a; background: rgba(4,15,21,.5); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
tbody tr { transition: background .14s; }
tbody tr:hover { background: rgba(255,255,255,.018); }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--text); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-soft); background: rgba(255,255,255,.025); font-size: 9px; font-weight: 750; white-space: nowrap; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.active, .pill.paid, .pill.trialing { color: #75dfae; border-color: rgba(82,218,160,.18); background: rgba(82,218,160,.06); }
.pill.suspended, .pill.expired, .pill.canceled, .pill.failed { color: #ff91a0; border-color: rgba(255,113,133,.18); background: rgba(255,113,133,.06); }
.pill.past_due, .pill.incomplete, .pill.paused { color: #f5c87e; border-color: rgba(244,188,98,.18); background: rgba(244,188,98,.06); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions button { min-height: 30px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-soft); background: var(--surface-2); font-size: 9px; font-weight: 700; }
.row-actions button:hover { border-color: var(--line-strong); color: var(--text); }
.row-actions .danger { color: var(--danger); }
.empty-cell { padding: 34px; color: var(--muted); text-align: center; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); gap: 15px; }
.plan-card { position: relative; min-height: 320px; display: flex; flex-direction: column; padding: 22px; overflow: hidden; }
.plan-card.highlighted { border-color: rgba(77,224,193,.4); box-shadow: 0 18px 55px rgba(40,190,167,.1); }
.plan-card.highlighted::before { content: "NAJPOPULARNIEJSZY"; position: absolute; top: 14px; right: -38px; width: 150px; padding: 5px; transform: rotate(38deg); color: var(--primary-ink); background: var(--primary); font-size: 7px; font-weight: 900; text-align: center; letter-spacing: .08em; }
.plan-card h3 { margin: 11px 0 7px; font-size: 20px; }
.plan-card > p { min-height: 48px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.plan-price { display: flex; align-items: baseline; gap: 5px; margin: 12px 0 17px; }
.plan-price strong { font-size: 29px; }
.plan-price span { color: var(--muted); font-size: 10px; }
.feature-list { display: grid; gap: 9px; margin: 0 0 22px; padding: 16px 0; border-top: 1px solid var(--line); list-style: none; }
.feature-list li { color: var(--text-soft); font-size: 10px; }
.feature-list li::before { content: "✓"; margin-right: 8px; color: var(--primary); font-weight: 900; }
.plan-card .row-actions, .plan-card > button { margin-top: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.credential, .device-card { padding: 20px; }
.credential h3, .device-card h3 { margin: 15px 0 6px; }
.credential p, .device-card p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.security-notice, .setup-banner { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; padding: 15px 17px; border: 1px solid rgba(142,135,255,.25); border-radius: 14px; color: #d4d2ff; background: rgba(142,135,255,.06); }
.security-notice > span { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 10px; color: var(--violet); background: rgba(142,135,255,.1); }
.security-notice p, .setup-banner p { margin: 4px 0 0; color: #8987ae; font-size: 10px; line-height: 1.5; }
.setup-banner { border-color: rgba(244,188,98,.25); color: #f7d69e; background: rgba(244,188,98,.06); }
.form-grid, .account-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid > article, .account-form > article, #config-form > article, #user-page-usage > article { padding: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.provider-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.provider-box { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5,16,23,.48); }
.provider-box h3 { margin-bottom: 14px; text-transform: capitalize; }
.account-form > button { grid-column: 1 / -1; justify-self: end; }
.account-hero { position: relative; min-height: 230px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: clamp(24px, 4vw, 42px); overflow: hidden; border: 1px solid rgba(77,224,193,.22); border-radius: 20px; background: linear-gradient(115deg, rgba(19,65,70,.65), rgba(13,28,40,.95) 58%, rgba(68,60,110,.35)); }
.account-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: -70px; top: -110px; border: 1px solid rgba(77,224,193,.2); border-radius: 50%; box-shadow: 0 0 0 45px rgba(77,224,193,.025), 0 0 0 90px rgba(77,224,193,.018); }
.account-hero-copy { position: relative; z-index: 1; max-width: 620px; }
.account-hero h2 { margin: 8px 0 10px; font-size: clamp(27px, 3vw, 42px); }
.account-hero p { margin: 0; color: #a8c0c5; line-height: 1.55; }
.account-plan-badge { position: relative; z-index: 1; min-width: 180px; padding: 17px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(5,17,23,.6); backdrop-filter: blur(12px); }
.account-plan-badge small { color: var(--muted); }
.account-plan-badge strong { display: block; margin: 6px 0; color: var(--primary); font-size: 21px; }
.progress-row { margin: 16px 0; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--text-soft); font-size: 10px; }
.progress-row progress { width: 100%; height: 7px; display: block; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #061018; }
.progress-row progress::-webkit-progress-bar { border-radius: 999px; background: #061018; }
.progress-row progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, var(--primary-strong), var(--primary)); }
.progress-row progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--primary-strong), var(--primary)); }
.section-spacer { margin-top: 34px; }
.flash { position: fixed; z-index: 50; top: 22px; right: 22px; max-width: min(420px, calc(100vw - 44px)); padding: 13px 16px; border: 1px solid rgba(82,218,160,.26); border-radius: 11px; color: #93ebbe; background: #0d2a21; box-shadow: var(--shadow); font-size: 11px; }
.flash.bad { border-color: rgba(255,113,133,.25); color: #ffacb8; background: #35131c; }
dialog { width: min(900px, calc(100vw - 34px)); max-height: calc(100vh - 36px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(1, 6, 9, .82); backdrop-filter: blur(5px); }
dialog form { padding: 24px; }
dialog header, dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
dialog header { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
dialog header h2 { margin: 4px 0 0; }
dialog footer { justify-content: flex-end; padding-top: 20px; border-top: 1px solid var(--line); }
.modal-fields { padding: 8px 0 18px; }
.modal-fields > h3 { margin-top: 24px; }

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .provider-grid { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr 440px; }
  .auth-story h1 { font-size: 48px; }
}
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .auth-panel-wrap { background: radial-gradient(circle at 50% 0%, rgba(47,130,139,.25), transparent 38%), var(--bg); }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); width: 278px; transition: transform .2s ease; box-shadow: var(--shadow); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-toggle { display: grid; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .dashboard-grid, .form-grid, .account-form { grid-template-columns: 1fr; }
  .account-form > button { grid-column: auto; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { flex-wrap: wrap; }
  .search-field { min-width: 240px; flex: 1; }
}
@media (max-width: 620px) {
  .auth-panel-wrap { padding: 16px; }
  .login-card { padding: 26px 20px; border-radius: 18px; }
  .login-help { flex-direction: column; }
  .app-main { padding-inline: 15px; }
  .topbar { min-height: 88px; }
  .topbar p, .topbar .secondary, .topbar .status { display: none; }
  .stats, .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid .span-2 { grid-column: auto; }
  .account-hero { align-items: flex-start; flex-direction: column; }
  .account-plan-badge { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  th, td { padding: 12px; }
  .plan-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
