:root {
  --ink: #18343b;
  --muted: #6d7f84;
  --teal-900: #083f4b;
  --teal-800: #0d5362;
  --teal-700: #176b78;
  --teal-100: #dcecef;
  --green: #9dcfa8;
  --green-soft: #edf8ef;
  --canvas: #f3f7f6;
  --panel: #ffffff;
  --border: #dfe8e7;
  --danger: #b9474f;
  --danger-soft: #fff0f1;
  --warning: #9b691b;
  --warning-soft: #fff7e8;
  --shadow: 0 12px 36px rgba(19, 63, 72, .08);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 7px; color: var(--teal-700); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: var(--green); }
.muted { color: var(--muted); }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, 44%) 1fr; background: #fff; }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 56px clamp(44px, 6vw, 96px); color: #fff; background: linear-gradient(145deg, #073e4b, #0d5866 65%, #176b74); }
.login-brand::before, .login-brand::after { content: ""; position: absolute; border-radius: 999px; border: 1px solid rgba(157, 207, 168, .2); }
.login-brand::before { width: 520px; height: 520px; right: -330px; top: -160px; }
.login-brand::after { width: 420px; height: 420px; left: -280px; bottom: -240px; }
.login-logo { width: min(330px, 80%); padding: 14px 18px; border-radius: 12px; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.14); }
.brand-rule { width: 58px; height: 3px; margin: 36px 0 26px; background: var(--green); border-radius: 99px; }
.login-brand h1 { max-width: 570px; margin: 0; font-size: clamp(36px, 4vw, 58px); line-height: 1.02; letter-spacing: -.04em; }
.login-brand > p:not(.eyebrow) { max-width: 570px; margin: 22px 0 38px; color: #c9dfe2; font-size: 17px; line-height: 1.6; }
.brand-feature { display: flex; align-items: center; gap: 14px; margin: 9px 0; }
.brand-feature > span { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid rgba(157,207,168,.5); border-radius: 11px; color: var(--green); font-size: 11px; font-weight: 800; }
.brand-feature div { display: grid; gap: 3px; }
.brand-feature strong { font-size: 14px; }
.brand-feature small { color: #bad1d5; }
.login-panel { display: grid; place-items: center; padding: 40px; background: radial-gradient(circle at 92% 8%, #edf7f1, transparent 30%), #fff; }
.login-card { width: min(430px, 100%); }
.login-card h2 { margin: 0; font-size: 36px; letter-spacing: -.03em; }
.login-card > p.muted { margin: 9px 0 32px; }
.mobile-brand { display: none; }

label { display: grid; gap: 8px; margin: 18px 0; color: #345158; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #cad9d8; border-radius: 11px; padding: 10px 13px; color: var(--ink); background: #fff; outline: none; transition: border-color .18s, box-shadow .18s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-700); box-shadow: 0 0 0 3px rgba(23, 107, 120, .12); }
.field-hint { color: var(--muted); font-size: 11px; font-weight: 500; }
.form-error { min-height: 18px; margin: 4px 0; color: var(--danger); font-size: 13px; }
.form-success { min-height: 18px; margin: 4px 0; color: #39794a; font-size: 13px; line-height: 1.45; }
.login-help { display: block; margin: 14px auto 0; }
.security-note { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); }
.lock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }

.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 750; transition: transform .16s, background .16s, border .16s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button.primary { color: #fff; background: var(--teal-800); box-shadow: 0 7px 18px rgba(13,83,98,.16); }
.button.primary:hover { background: var(--teal-900); }
.button.secondary { color: var(--teal-800); border-color: #bfd2d3; background: #fff; }
.button.ghost { color: var(--muted); border-color: transparent; background: transparent; }
.button.white { color: var(--teal-900); background: #fff; }
.button.full { width: 100%; }
.button.compact { min-height: 36px; padding: 7px 12px; }
.text-button { border: 0; padding: 4px; color: var(--teal-700); background: none; font-size: 12px; font-weight: 800; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 9px; color: var(--ink); background: transparent; font-size: 23px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: sticky; top: 0; z-index: 20; display: flex; height: 100vh; flex-direction: column; padding: 24px 18px; color: #fff; background: var(--teal-900); }
.sidebar-brand { display: flex; align-items: center; gap: 12px; margin: 0 6px 32px; font-size: 16px; font-weight: 750; }
.sidebar-brand img { width: 52px; height: 38px; object-fit: contain; padding: 4px; border-radius: 7px; background: #fff; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 45px; border: 0; border-radius: 10px; padding: 8px 12px; color: #bed0d3; background: transparent; font-size: 13px; font-weight: 650; text-align: left; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: rgba(157,207,168,.17); box-shadow: inset 3px 0 var(--green); }
.nav-icon { display: grid; width: 22px; place-items: center; color: var(--green); font-size: 18px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; }
.admin-chip { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; }
.avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: var(--teal-900); background: var(--green); font-weight: 800; }
.admin-chip div { display: grid; gap: 2px; }
.admin-chip strong { font-size: 12px; }
.admin-chip small { color: #a9c1c5; font-size: 10px; }
.light-button { color: #bdd0d4 !important; }

.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; min-height: 84px; align-items: center; justify-content: space-between; padding: 16px clamp(22px, 4vw, 52px); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.93); backdrop-filter: blur(16px); }
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.025em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.live-pill { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #55b86a; box-shadow: 0 0 0 4px #e4f5e8; }
.mobile-menu { display: none; }
.content { max-width: 1540px; margin: auto; padding: 34px clamp(22px, 4vw, 52px) 60px; }
.view { display: none; }
.view.active-view { display: block; animation: reveal .22s ease-out; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 22px; align-items: start; }
.account-password-step { margin-top: 30px; }
.recovery-panel h3 { margin: 0 0 16px; font-size: 22px; }
.recovery-panel ul { display: grid; gap: 13px; margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
@keyframes reveal { from { opacity: .35; transform: translateY(4px); } }

.welcome-banner { position: relative; overflow: hidden; display: flex; min-height: 205px; align-items: center; justify-content: space-between; gap: 32px; padding: 36px 40px; border-radius: 22px; color: #fff; background: linear-gradient(115deg, var(--teal-900), var(--teal-700)); box-shadow: var(--shadow); }
.welcome-banner::after { content: "CBC"; position: absolute; right: -18px; bottom: -53px; color: rgba(255,255,255,.045); font-size: 190px; font-weight: 900; letter-spacing: -.1em; }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner h2 { margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; }
.welcome-banner p:not(.eyebrow) { max-width: 630px; margin: 11px 0 0; color: #c6dadd; line-height: 1.55; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin: 20px 0; }
.stat-card { display: grid; grid-template-columns: 46px 1fr; gap: 13px; align-items: center; padding: 20px; border: 1px solid var(--border); border-radius: 15px; background: var(--panel); box-shadow: 0 6px 18px rgba(17,60,68,.035); }
.stat-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; color: var(--teal-800); background: var(--teal-100); font-size: 20px; }
.stat-card:nth-child(2) .stat-icon { color: #567f5d; background: var(--green-soft); }
.stat-card:nth-child(3) .stat-icon { color: var(--warning); background: var(--warning-soft); }
.stat-card:nth-child(4) .stat-icon { color: #556b8c; background: #edf1f7; }
.stat-card small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-card strong { display: block; margin-top: 3px; font-size: 26px; letter-spacing: -.03em; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 20px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: 0 8px 28px rgba(18,61,70,.045); }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 15px; }
.panel h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.capacity-chart { padding: 8px 24px 25px; }
.capacity-number { margin: 4px 0 14px; font-size: 42px; font-weight: 800; letter-spacing: -.05em; }
.progress-meter { width: 100%; height: 9px; border: 0; border-radius: 99px; background: #e9f0ef; }
.progress-meter::-webkit-progress-bar { border-radius: 99px; background: #e9f0ef; }
.progress-meter::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, var(--teal-700), var(--green)); }
.progress-meter::-moz-progress-bar { border-radius: 99px; background: var(--teal-700); }
.capacity-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 19px; }
.capacity-legend div { padding: 11px; border-radius: 10px; background: var(--canvas); }
.capacity-legend small { display: block; color: var(--muted); }
.capacity-legend strong { font-size: 18px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.section-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.generate-grid { display: grid; grid-template-columns: minmax(320px, .75fr) minmax(420px, 1.25fr); gap: 22px; align-items: start; }
.form-panel { padding: 25px; }
.license-term-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.license-term-grid label { min-width: 0; }
input[readonly] { color: #60777c; background: #f4f7f7; }
.feature-picker { overflow: hidden; margin: 18px 0; border: 1px solid #cad9d8; border-radius: 13px; background: #fbfdfd; }
.feature-picker-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 15px; border-bottom: 1px solid var(--border); background: #f3f8f7; }
.feature-picker-header > div { display: grid; gap: 3px; }
.feature-picker-header strong { color: #345158; font-size: 13px; }
.feature-picker-header small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.select-all-control { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; margin: 0; font-size: 11px; white-space: nowrap; }
.select-all-control input, .feature-option input { width: 17px; min-height: 17px; flex: 0 0 auto; margin: 0; accent-color: var(--teal-700); }
.feature-options { display: grid; max-height: 245px; overflow-y: auto; padding: 7px; }
.feature-option { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px; border-radius: 9px; cursor: pointer; }
.feature-option:hover { background: var(--teal-100); }
.feature-option > span { display: grid; min-width: 0; gap: 2px; }
.feature-option strong { color: var(--ink); font-size: 12px; }
.feature-option small { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; text-overflow: ellipsis; }
.feature-empty { margin: 0; padding: 16px 10px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.feature-summary { display: grid; gap: 8px; margin-top: 15px; padding: 12px 13px; border: 1px solid #d8e7da; border-radius: 10px; background: var(--green-soft); }
.feature-summary > small { color: #58765f; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 5px; min-width: 170px; }
.feature-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 230px; border: 1px solid #c9dfce; border-radius: 99px; padding: 4px 8px; color: #326842; background: var(--green-soft); font-size: 10px; font-weight: 750; white-space: nowrap; }
.feature-tag small { overflow: hidden; max-width: 95px; color: #64806b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; text-overflow: ellipsis; }
.feature-tag.inactive { border-color: #dfd8c7; color: #786329; background: #fff8e6; }
.feature-tag.more { color: var(--teal-700); border-color: #c9dcdf; background: #edf5f6; }
.feature-none { color: var(--muted); font-size: 10px; font-style: italic; }
.step-label { display: flex; align-items: center; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid var(--border); }
.step-label > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; color: #fff; background: var(--teal-800); font-weight: 800; }
.step-label div { display: grid; gap: 3px; }
.step-label small { color: var(--muted); }
.result-panel { min-height: 450px; padding: 25px; }
.result-panel.empty-result { display: grid; place-items: center; }
.result-empty { max-width: 380px; text-align: center; }
.key-illustration { display: grid; width: 76px; height: 76px; place-items: center; margin: 0 auto 20px; border-radius: 22px; color: var(--teal-700); background: var(--teal-100); font-size: 35px; transform: rotate(-9deg); }
.result-empty h3 { font-size: 20px; }
.result-empty p { color: var(--muted); line-height: 1.55; }
.result-success { display: flex; align-items: center; gap: 13px; padding-bottom: 17px; border-bottom: 1px solid var(--border); }
.success-check { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: #347143; background: var(--green-soft); font-weight: 900; }
.result-success div { display: grid; gap: 3px; }
.result-success small { color: var(--muted); }
.key-list { display: grid; gap: 8px; max-height: 285px; margin: 18px 0; overflow: auto; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; background: #fafcfc; }
.key-details { display: grid; min-width: 0; gap: 4px; }
.key-details small { color: var(--muted); font-size: 10px; }
.key-row code { color: var(--teal-900); font-size: 13px; font-weight: 700; }
.copy-key { border: 0; color: var(--teal-700); background: none; font-size: 11px; font-weight: 800; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.toolbar { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.filter-toolbar { justify-content: flex-start; }
.filter-toolbar .count-label { margin-left: auto; }
.search-box { display: flex; width: min(380px, 100%); align-items: center; gap: 9px; border: 1px solid #d3dfde; border-radius: 10px; padding: 0 12px; background: #fff; }
.search-box:focus-within { border-color: var(--teal-700); box-shadow: 0 0 0 3px rgba(23,107,120,.1); }
.search-box input { min-height: 41px; border: 0; padding: 7px 0; box-shadow: none; }
.search-box span { color: var(--muted); font-size: 20px; }
.filter-toolbar select { width: 175px; min-height: 42px; }
.count-label { color: var(--muted); font-size: 11px; font-weight: 750; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 18px; color: #75888d; background: #f9fbfb; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 18px; border-top: 1px solid #edf2f1; color: #334f56; font-size: 12px; vertical-align: middle; }
tbody tr:hover { background: #fbfdfd; }
.cell-primary { display: grid; gap: 3px; }
.cell-primary strong { color: var(--ink); font-size: 12px; }
.cell-primary small { color: var(--muted); }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--teal-800); font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 800; text-transform: capitalize; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.active, .status.enabled { color: #39794a; background: var(--green-soft); }
.status.generated { color: #426c77; background: #eaf3f5; }
.status.expired { color: #9a4e16; background: #fff0df; }
.status.scheduled { color: #715b18; background: #fff7d8; }
.status.revoked, .status.disabled { color: var(--danger); background: var(--danger-soft); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.row-action { border: 1px solid #d7e2e1; border-radius: 7px; padding: 6px 9px; color: var(--teal-800); background: #fff; font-size: 10px; font-weight: 800; }
.row-action.danger { color: var(--danger); }
.empty-table { padding: 48px 20px; color: var(--muted); text-align: center; }

.modal { width: min(560px, calc(100% - 30px)); max-height: calc(100vh - 32px); overflow: auto; border: 0; border-radius: 20px; padding: 0; background: transparent; box-shadow: 0 24px 80px rgba(5,42,50,.25); }
.modal::backdrop { background: rgba(4, 39, 47, .62); backdrop-filter: blur(4px); }
.modal-card { padding: 26px; border-radius: 20px; background: #fff; }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.modal-header h2 { margin: 0; font-size: 24px; }
.modal-description { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.bulk-feature-modal { width: min(1080px, calc(100% - 30px)); }
.feature-entry-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; }
.feature-entry-table { min-width: 850px; table-layout: fixed; }
.feature-entry-table th { padding: 10px 11px; }
.feature-entry-table th:nth-child(1) { width: 22%; }
.feature-entry-table th:nth-child(2) { width: 20%; }
.feature-entry-table th:nth-child(3) { width: 35%; }
.feature-entry-table th:nth-child(4) { width: 13%; }
.feature-entry-table th:nth-child(5) { width: 10%; }
.feature-entry-table td { padding: 11px; vertical-align: top; }
.feature-entry-table input, .feature-entry-table textarea { min-height: 41px; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.feature-entry-table textarea { min-height: 62px; resize: vertical; }
.feature-code-input { font-size: 11px !important; }
.feature-entry-table .field-hint { display: block; margin-top: 5px; font-size: 9px; }
.feature-active-control { display: flex; align-items: center; gap: 7px; margin: 9px 0 0; font-size: 11px; white-space: nowrap; }
.feature-active-control input { width: 17px; min-height: 17px; flex: 0 0 auto; margin: 0; accent-color: var(--teal-700); }
.feature-row-action { text-align: right; }
.feature-entry-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.toggle-row { display: flex; align-items: center; gap: 9px; }
.toggle-row input { width: 17px; min-height: 17px; }
.password-callout { display: grid; grid-template-columns: 40px 1fr auto; gap: 13px; align-items: center; padding: 16px; border: 1px solid #cce1d0; border-radius: 13px; background: var(--green-soft); }
.shield { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #39794a; background: #d8eddd; }
.password-callout div { display: grid; gap: 2px; }
.password-callout small { color: #58765f; }
.password-callout strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; }
.password-callout p { margin: 2px 0 0; color: #64806b; font-size: 10px; }
.email-preview { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: #fafcfc; }
.email-preview small { display: block; color: var(--muted); }
.email-preview strong { display: block; margin: 3px 0 12px; }
.email-preview p { max-height: 185px; overflow: auto; margin: 0; color: #52686d; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.integration-note { padding: 10px 12px; border-left: 3px solid var(--teal-700); color: var(--muted); background: #f1f7f7; font-size: 11px; line-height: 1.5; }
.delivery-options { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.toast-region { position: fixed; z-index: 100; top: 18px; right: 18px; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 380px; padding: 13px 16px; border-radius: 11px; color: #fff; background: var(--teal-900); box-shadow: 0 15px 40px rgba(5,43,50,.23); font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { background: #8f3640; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } }

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
  .generate-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .license-term-grid { grid-template-columns: 1fr; gap: 0; }
  .result-panel { min-height: 360px; }
}

@media (max-width: 820px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 28px; }
  .mobile-brand { display: block; margin-bottom: 36px; }
  .mobile-brand img { width: 170px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -255px; transition: left .22s; box-shadow: 12px 0 30px rgba(0,0,0,.15); }
  .sidebar.open { left: 0; }
  .mobile-menu { display: grid; }
  .topbar { justify-content: flex-start; gap: 13px; }
  .topbar-actions { margin-left: auto; }
  .live-pill { display: none; }
  .content { padding-top: 24px; }
}

@media (max-width: 580px) {
  .topbar-actions .button { display: none; }
  .content { padding-inline: 15px; }
  .welcome-banner { min-height: 230px; align-items: flex-start; flex-direction: column; padding: 27px 24px; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 15px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .toolbar, .filter-toolbar { align-items: stretch; flex-direction: column; }
  .filter-toolbar select { width: 100%; }
  .filter-toolbar .count-label { margin-left: 0; }
  .password-callout { grid-template-columns: 38px 1fr; }
  .feature-picker-header { align-items: flex-start; flex-direction: column; }
  .bulk-feature-modal { width: calc(100% - 20px); }
  .bulk-feature-modal .modal-card { padding: 20px 16px; }
  .feature-entry-table-wrap { overflow: visible; border: 0; }
  .feature-entry-table { min-width: 0; }
  .feature-entry-table thead { display: none; }
  .feature-entry-table tbody, .feature-entry-table tr, .feature-entry-table td { display: block; width: 100%; }
  .feature-entry-table tr { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fbfdfd; }
  .feature-entry-table td { border: 0; padding: 6px 0; }
  .feature-entry-table td::before { display: block; margin-bottom: 5px; color: #75888d; content: attr(data-label); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .feature-entry-table .feature-row-action::before { display: none; }
  .feature-row-action .row-action { width: 100%; margin-top: 4px; }
  .feature-entry-actions, .modal-actions { align-items: stretch; flex-direction: column; }
  .feature-entry-actions .button, .modal-actions .button { width: 100%; }
  .feature-entry-actions .count-label { order: -1; }
  .password-callout .button { grid-column: 1 / -1; }
  .delivery-options { align-items: stretch; flex-direction: column; }
  .delivery-options > * { width: 100%; }
}
