:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --surface-strong: #111827;
  --ink: #172033;
  --muted: #6f7890;
  --line: #e3e7ef;
  --primary: #6c4cff;
  --primary-dark: #5636e8;
  --primary-soft: #eeeaff;
  --success: #15936d;
  --success-soft: #e5f7f0;
  --warning: #c47b16;
  --warning-soft: #fff4dc;
  --danger: #d34854;
  --danger-soft: #ffeaec;
  --info: #2878c8;
  --info-soft: #e8f3ff;
  --shadow: 0 16px 40px rgba(26, 34, 55, .08);
  --shadow-sm: 0 5px 18px rgba(26, 34, 55, .07);
  --radius: 16px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mobile-only { display: none; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); }
.login-brand-panel { padding: 46px clamp(42px, 6vw, 94px); color: white; background:
  radial-gradient(circle at 15% 20%, rgba(118, 85, 255, .9), transparent 34%),
  radial-gradient(circle at 80% 65%, rgba(45, 176, 205, .32), transparent 36%),
  linear-gradient(135deg, #16132e 0%, #25204c 52%, #171b38 100%);
  display: flex; flex-direction: column; justify-content: space-between; gap: 70px;
}
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-lockup strong { display: block; font-size: 20px; letter-spacing: -.4px; }
.brand-lockup small { display: block; color: #8d96ad; margin-top: 1px; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; }
.brand-lockup--large strong { color: white; font-size: 24px; }
.brand-lockup--large small { color: rgba(255,255,255,.6); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: white; background: linear-gradient(135deg, #846bff, #5c3cf0); box-shadow: 0 8px 20px rgba(87, 56, 230, .34); font-weight: 800; }
.login-copy { max-width: 760px; }
.eyebrow { display: inline-block; color: var(--primary); text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; }
.login-brand-panel .eyebrow { color: #c8bcff; }
.login-copy h1 { margin: 13px 0 18px; font-size: clamp(42px, 5vw, 70px); line-height: 1.03; letter-spacing: -2.8px; max-width: 820px; }
.login-copy p { margin: 0; max-width: 660px; color: rgba(255,255,255,.7); font-size: 18px; line-height: 1.65; }
.login-proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.login-proof-grid article { padding: 22px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.06); border-radius: 14px; backdrop-filter: blur(10px); }
.login-proof-grid strong { display: block; font-size: 25px; }
.login-proof-grid span { color: rgba(255,255,255,.56); font-size: 12px; }
.login-form-panel { display: grid; place-items: center; padding: 50px; background: #fafbfe; }
.login-card { width: min(440px, 100%); display: grid; gap: 20px; }
.login-card h2 { margin: 7px 0 4px; font-size: 32px; letter-spacing: -1px; }
.login-card p { margin: 0; }
.login-card label, .form-grid label, .field { display: grid; gap: 7px; color: #384158; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 10px; padding: 12px 13px; outline: none; transition: .16s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108, 76, 255, .11); }
textarea { min-height: 92px; resize: vertical; }
.login-note { text-align: center; color: var(--muted); font-size: 11px; }

.btn { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 750; transition: .16s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--primary); box-shadow: 0 8px 20px rgba(108, 76, 255, .22); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.btn-ghost { color: var(--primary); background: var(--primary-soft); }
.btn-success { color: white; background: var(--success); }
.btn-danger { color: white; background: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 11px; font-size: 12px; }
.btn[disabled] { opacity: .48; cursor: not-allowed; transform: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 15px 18px; background: #111522; color: white; display: flex; flex-direction: column; z-index: 20; }
.sidebar .brand-lockup { padding: 4px 10px 24px; }
.sidebar-nav { display: grid; gap: 4px; overflow-y: auto; padding-right: 4px; }
.nav-section-label { padding: 19px 11px 7px; color: #697189; font-size: 10px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.nav-button { width: 100%; border: 0; background: transparent; color: #aeb5c7; padding: 10px 11px; border-radius: 9px; display: flex; gap: 11px; align-items: center; font-size: 13px; font-weight: 650; text-align: left; }
.nav-button span:first-child { width: 19px; text-align: center; font-size: 15px; }
.nav-button:hover { color: white; background: rgba(255,255,255,.05); }
.nav-button.active { color: white; background: linear-gradient(90deg, rgba(108,76,255,.34), rgba(108,76,255,.13)); box-shadow: inset 2px 0 0 #8d78ff; }
.nav-button--danger { margin-top: 10px; color: #ff9da5; }
.sidebar-footer { margin-top: auto; }
.partner-tier-card { padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.035); display: flex; gap: 10px; align-items: center; }
.tier-icon { color: #a795ff; font-size: 18px; }
.partner-tier-card strong { display: block; font-size: 12px; }
.partner-tier-card span { color: #7f879c; font-size: 10px; }
.workspace { min-width: 0; }
.topbar { height: 78px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { margin: 3px 0 0; font-size: 21px; letter-spacing: -.5px; }
.breadcrumb { color: var(--muted); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.role-switcher { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.role-switcher select { padding: 8px 30px 8px 10px; font-size: 11px; width: auto; }
.icon-button { position: relative; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: white; color: var(--muted); }
.notification-dot { position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px white; }
.user-chip { border: 0; background: transparent; display: flex; align-items: center; gap: 9px; text-align: left; padding: 4px; }
.user-chip > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: white; background: linear-gradient(135deg, #f59d62, #d45d65); font-size: 11px; font-weight: 800; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 11px; }
.user-chip small { color: var(--muted); font-size: 9px; margin-top: 1px; }
.page-content { padding: 24px 28px 42px; }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.page-header h2 { margin: 0 0 4px; font-size: 23px; letter-spacing: -.7px; }
.page-header p { margin: 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.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)); }
.dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-body { padding: 18px; }
.card-header { padding: 17px 18px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-header h3 { margin: 0; font-size: 14px; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.card-divider { border-top: 1px solid var(--line); }
.metric-card { padding: 17px; position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 88px; height: 88px; border-radius: 50%; right: -30px; top: -32px; background: var(--primary-soft); opacity: .55; }
.metric-top { display: flex; justify-content: space-between; align-items: flex-start; }
.metric-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-size: 14px; }
.metric-label { color: var(--muted); font-size: 10px; font-weight: 700; }
.metric-value { margin-top: 12px; font-size: 25px; letter-spacing: -.8px; font-weight: 800; }
.metric-meta { margin-top: 6px; color: var(--muted); font-size: 10px; }
.metric-meta strong { color: var(--success); }
.wallet-card { background: linear-gradient(140deg, #6b4cff, #4026c6); color: white; border: 0; box-shadow: 0 14px 28px rgba(76, 43, 204, .24); }
.wallet-card .metric-label, .wallet-card .metric-meta { color: rgba(255,255,255,.68); }
.wallet-card .metric-icon { background: rgba(255,255,255,.14); color: white; }
.wallet-card::after { background: rgba(255,255,255,.12); }

.chart { height: 220px; display: flex; align-items: flex-end; gap: 14px; padding: 24px 8px 6px; }
.chart-column { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; }
.chart-bar { width: min(38px, 70%); min-height: 8px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #8b75ff, #6849f6); position: relative; }
.chart-bar:hover::after { content: attr(data-value); position: absolute; top: -28px; left: 50%; transform: translateX(-50%); background: #1c2232; color: white; padding: 4px 6px; border-radius: 5px; font-size: 9px; white-space: nowrap; }
.chart-column span { color: var(--muted); font-size: 9px; }

.list { display: grid; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-primary { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-size: 10px; font-weight: 800; color: #593ce4; background: #efeaff; }
.avatar.green { color: #107658; background: #def5ec; }
.avatar.orange { color: #a65b0b; background: #fff0d6; }
.avatar.blue { color: #1766a9; background: #e4f1ff; }
.list-primary strong, .list-primary small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-primary strong { font-size: 11px; }
.list-primary small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.list-value { text-align: right; }
.list-value strong, .list-value small { display: block; }
.list-value strong { font-size: 11px; }
.list-value small { color: var(--muted); font-size: 9px; margin-top: 3px; }

.progress-wrap { display: grid; gap: 8px; }
.progress-head { display: flex; justify-content: space-between; font-size: 10px; }
.progress-track { height: 7px; border-radius: 999px; background: #eceff5; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6847f5, #9e8aff); }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-action { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 11px; padding: 14px; text-align: left; }
.quick-action:hover { border-color: #cfc6ff; background: var(--primary-soft); }
.quick-action span { display: block; font-size: 18px; margin-bottom: 8px; }
.quick-action strong { display: block; font-size: 11px; }
.quick-action small { color: var(--muted); font-size: 9px; }

.table-card { overflow: hidden; }
.table-toolbar { padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.search-input { position: relative; width: min(290px, 100%); }
.search-input input { padding-left: 35px; }
.search-input span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { padding: 11px 15px; text-align: left; color: var(--muted); background: #fafbfc; font-size: 9px; text-transform: uppercase; letter-spacing: .7px; white-space: nowrap; }
td { padding: 13px 15px; border-top: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
td strong, td small { display: block; }
td small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.table-entity { display: flex; align-items: center; gap: 10px; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.active, .status.approved, .status.paid { color: var(--success); background: var(--success-soft); }
.status.pending, .status.under-review { color: var(--warning); background: var(--warning-soft); }
.status.rejected, .status.suspended, .status.failed { color: var(--danger); background: var(--danger-soft); }
.status.draft, .status.inactive { color: var(--muted); background: #eef0f4; }
.status.invited { color: var(--info); background: var(--info-soft); }
.money { font-variant-numeric: tabular-nums; font-weight: 760; }

.filter-strip { padding: 13px 16px; display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.filter-chip { border: 1px solid var(--line); background: white; color: var(--muted); padding: 7px 10px; border-radius: 999px; font-size: 9px; font-weight: 750; }
.filter-chip.active { color: var(--primary); border-color: #cfc5ff; background: var(--primary-soft); }
.empty-state { padding: 44px 20px; text-align: center; }
.empty-state-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--primary-soft); color: var(--primary); margin: 0 auto 12px; font-size: 24px; }
.empty-state h3 { margin: 0 0 5px; font-size: 15px; }
.empty-state p { margin: 0 auto 14px; max-width: 420px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.balance-hero { padding: 22px; background: linear-gradient(135deg, #17152c, #30265b); color: white; border-radius: var(--radius); position: relative; overflow: hidden; }
.balance-hero::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; right: -100px; top: -100px; background: rgba(124, 97, 255, .22); }
.balance-hero-label { color: rgba(255,255,255,.55); font-size: 10px; }
.balance-hero-value { margin: 7px 0 12px; font-size: 36px; letter-spacing: -1.5px; font-weight: 850; }
.balance-hero-row { display: flex; gap: 26px; color: rgba(255,255,255,.65); font-size: 10px; }
.balance-hero-row strong { color: white; }
.credit-layout { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); }
.step-list { counter-reset: steps; display: grid; gap: 12px; }
.step { position: relative; padding-left: 39px; min-height: 31px; }
.step::before { counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 800; }
.step strong { display: block; font-size: 11px; }
.step span { color: var(--muted); font-size: 9px; line-height: 1.5; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan-card { border: 1px solid var(--line); border-radius: 14px; padding: 17px; background: white; }
.plan-card.featured { border-color: #bdb0ff; box-shadow: 0 12px 28px rgba(108,76,255,.11); }
.plan-card h3 { margin: 4px 0 3px; font-size: 16px; }
.plan-card .plan-price { margin: 13px 0 3px; font-size: 25px; font-weight: 850; }
.plan-card small { color: var(--muted); }
.plan-features { margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 7px; color: #485168; font-size: 10px; }
.plan-features li::before { content: "✓"; color: var(--success); font-weight: 900; margin-right: 7px; }
.cost-breakdown { margin-top: 12px; padding: 11px; background: var(--surface-soft); border-radius: 9px; display: grid; gap: 6px; }
.cost-row { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); }
.cost-row.total { color: var(--ink); font-size: 11px; font-weight: 800; border-top: 1px dashed var(--line); padding-top: 7px; }

.insight-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); color: #285d91; border: 1px solid #cfe4fb; }
.insight-banner.warning { background: var(--warning-soft); color: #8a5a16; border-color: #f3deb6; }
.insight-banner.success { background: var(--success-soft); color: #136d54; border-color: #bde7d8; }
.insight-banner strong { display: block; font-size: 11px; }
.insight-banner p { margin: 3px 0 0; font-size: 9px; line-height: 1.55; }

.settings-list { display: grid; }
.settings-row { padding: 16px 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(180px, .65fr) minmax(260px, 1.35fr); gap: 24px; align-items: start; }
.settings-row:first-child { border-top: 0; }
.settings-row h4 { margin: 0 0 4px; font-size: 11px; }
.settings-row p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.toggle { width: 39px; height: 22px; border-radius: 999px; padding: 3px; border: 0; background: #d8dce5; transition: .2s; }
.toggle::after { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: white; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.toggle.on { background: var(--primary); }
.toggle.on::after { transform: translateX(17px); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 20, 33, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 22px; }
.modal { width: min(650px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; background: white; border-radius: 17px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal.modal-lg { width: min(900px, 100%); }
.modal-header { padding: 19px 20px 14px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0 0 4px; font-size: 18px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 10px; }
.modal-close { width: 31px; height: 31px; border: 1px solid var(--line); background: white; border-radius: 8px; color: var(--muted); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fafbfc; border-radius: 0 0 17px 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section { margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 12px; font-size: 12px; }
.help-text { color: var(--muted); font-size: 9px; line-height: 1.5; }

.payment-layout { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
.qr-panel { text-align: center; padding: 18px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 14px; }
.qr-code { width: 230px; min-height: 230px; margin: 0 auto 12px; display: grid; place-items: center; padding: 12px; background: white; border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.qr-code img, .qr-code svg { max-width: 100%; height: auto; }
.qr-placeholder { width: 190px; height: 190px; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; padding: 15px; }
.upi-uri { margin-top: 9px; padding: 8px; background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; overflow-wrap: anywhere; }
.payment-amount { font-size: 24px; font-weight: 850; margin: 6px 0; }
.file-drop { border: 1.5px dashed #cbd1dc; background: #fafbfc; border-radius: 10px; padding: 18px; text-align: center; }
.file-drop input { border: 0; padding: 0; font-size: 10px; }

.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.detail-item { padding: 12px; background: var(--surface-soft); border-radius: 10px; }
.detail-item span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .6px; }
.detail-item strong { display: block; margin-top: 4px; font-size: 11px; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 20px 1fr; gap: 10px; min-height: 48px; }
.timeline-marker { position: relative; }
.timeline-marker::before { content: ""; position: absolute; top: 6px; left: 5px; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline-marker::after { content: ""; position: absolute; top: 18px; bottom: -4px; left: 8.5px; width: 1px; background: var(--line); }
.timeline-item:last-child .timeline-marker::after { display: none; }
.timeline-content strong { font-size: 10px; }
.timeline-content p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }

#toast-region { position: fixed; z-index: 200; top: 16px; right: 16px; display: grid; gap: 9px; }
.toast { min-width: 280px; max-width: 360px; padding: 12px 14px; color: white; background: #1d2538; border-radius: 10px; box-shadow: var(--shadow); font-size: 10px; animation: toast-in .22s ease; }
.toast strong { display: block; font-size: 11px; margin-bottom: 2px; }
.toast.success { background: #126e55; }
.toast.danger { background: #a8323d; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .credit-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; transition: .25s; }
  .sidebar.open { left: 0; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .mobile-only { display: inline-grid; place-items: center; }
  .topbar { padding: 0 16px; }
  .topbar > div:first-child { display: flex; align-items: center; gap: 11px; }
  .breadcrumb { display: none; }
  .page-content { padding: 18px 16px 34px; }
  .role-switcher, .user-chip span:last-child { display: none; }
  .payment-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .grid-4, .grid-3, .grid-2, .plan-grid, .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .settings-row { grid-template-columns: 1fr; gap: 10px; }
  .login-form-panel { padding: 28px 20px; }
  .quick-actions { grid-template-columns: 1fr; }
  .table-toolbar { flex-direction: column; }
  .search-input { width: 100%; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); }
  .balance-hero-row { flex-direction: column; gap: 7px; }
}
