:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --text: #152238;
  --muted: #66758f;
  --muted-2: #8996aa;
  --line: #dfe6ef;
  --line-strong: #cbd5e1;
  --primary: #5869e8;
  --primary-strong: #4054dc;
  --primary-soft: #eef0ff;
  --cyan: #16b6c7;
  --emerald: #17a673;
  --violet: #8b5cf6;
  --danger: #dc4c64;
  --warning: #e69b16;
  --info: #2f83e6;
  --nav: #101b33;
  --nav-2: #0a1428;
  --nav-text: #d9e2f4;
  --shadow-sm: 0 4px 16px rgba(21,34,56,.06);
  --shadow-md: 0 16px 50px rgba(21,34,56,.11);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar-w: 260px;
  --topbar-h: 76px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e1626;
  --surface: #151f31;
  --surface-2: #111a2a;
  --surface-3: #202c40;
  --text: #edf3ff;
  --muted: #9eacc2;
  --muted-2: #75849b;
  --line: #29364a;
  --line-strong: #35445b;
  --primary: #7a87ff;
  --primary-strong: #919cff;
  --primary-soft: #222b54;
  --shadow-sm: 0 4px 16px rgba(0,0,0,.2);
  --shadow-md: 0 18px 55px rgba(0,0,0,.32);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg.icon { flex: 0 0 auto; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9em; color: var(--text); }
[hidden] { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { border-radius: 13px; }
.brand span { display: grid; line-height: 1.05; letter-spacing: .04em; }
.brand strong { font-size: 15px; letter-spacing: .18em; }
.brand small { margin-top: 4px; font-size: 9px; letter-spacing: .12em; opacity: .68; }
.brand-light { color: #fff; }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--primary); }

.button { border: 0; border-radius: 11px; min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--primary); color: #fff; box-shadow: 0 7px 18px rgba(88,105,232,.22); }
.button-primary:hover { background: var(--primary-strong); }
.button-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.button-secondary:hover { background: var(--surface-2); border-color: var(--line-strong); }
.button-light { background: #fff; color: #1c2d53; box-shadow: 0 8px 24px rgba(5,18,50,.13); }
.button-success { background: #e5f8f1; color: #087b55; border: 1px solid #bdebdc; }
.button-danger { background: #fff0f3; color: #bb2f49; border: 1px solid #f3c6cf; }
.button-sm { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.button-lg { min-height: 50px; padding-inline: 22px; }
.button-block { width: 100%; }
.inline-form { display: inline-flex; }
.icon-button { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; transition: .16s ease; }
.icon-button:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.icon-button.danger { color: var(--danger); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60; display: flex; flex-direction: column; color: var(--nav-text); background:
  radial-gradient(circle at 0 0, rgba(112,128,255,.18), transparent 32%),
  linear-gradient(180deg, var(--nav), var(--nav-2));
  border-right: 1px solid rgba(255,255,255,.06); }
.sidebar-head { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-close { display: none; background: transparent; border: 0; color: #fff; padding: 8px; }
.sidebar-nav { padding: 18px 12px; flex: 1; overflow-y: auto; }
.nav-label { display: block; margin: 16px 12px 8px; color: #71809d; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.nav-item { min-height: 43px; padding: 0 12px; margin: 4px 0; border-radius: 11px; display: flex; align-items: center; gap: 12px; color: #aab7ce; font-size: 13px; font-weight: 650; transition: .16s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(111,127,255,.34), rgba(84,99,227,.18)); box-shadow: inset 3px 0 0 #7f8cff; }
.sidebar-foot { padding: 14px 13px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.system-status { display: flex; gap: 10px; align-items: center; padding: 10px 11px; margin-bottom: 10px; border-radius: 11px; background: rgba(255,255,255,.04); }
.system-status > span { width: 9px; height: 9px; border-radius: 50%; background: #31d28f; box-shadow: 0 0 0 5px rgba(49,210,143,.11); }
.system-status div, .sidebar-user > span:nth-child(2) { display: grid; min-width: 0; }
.system-status strong { font-size: 11px; color: #dce8f8; }
.system-status small { font-size: 10px; color: #7f8da7; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; }
.sidebar-user:hover { background: rgba(255,255,255,.05); }
.sidebar-user strong { font-size: 12px; color: #eef4ff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user small { font-size: 10px; color: #8592a8; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user svg { margin-left: auto; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(135deg, #6878f0, #18b8c9); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: 10px; }
.avatar-xl { width: 82px; height: 82px; border-radius: 24px; font-size: 24px; }
.sidebar-overlay { display: none; }

.main-column { grid-column: 2; min-width: 0; min-height: 100vh; }
.topbar { min-height: var(--topbar-h); position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 26px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 11px; }
.mobile-menu { display: none; }
.page-heading h1 { margin: 0; font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.balance-pill { min-height: 42px; padding: 5px 12px; border-radius: 12px; display: flex; align-items: center; gap: 9px; color: var(--primary); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line)); }
.balance-pill > span { display: grid; line-height: 1.1; }
.balance-pill small { color: var(--muted); font-size: 9px; }
.balance-pill strong { font-size: 12px; }
.notification-button { position: relative; }
.notification-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--danger); color: #fff; font-size: 9px; font-weight: 800; border: 2px solid var(--surface); }
.user-dropdown { position: relative; }
.user-dropdown-trigger { min-height: 42px; padding: 4px 9px 4px 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.user-dropdown-name { max-width: 120px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 700; }
.dropdown-menu { position: absolute; top: calc(100% + 9px); right: 0; width: 210px; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .16s ease; }
.user-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a, .dropdown-menu button { width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 9px; display: flex; align-items: center; gap: 9px; background: transparent; color: var(--text); font-size: 12px; cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu form { margin: 0; }
.content-area { width: min(1540px, 100%); margin: 0 auto; padding: 24px 26px 44px; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { min-height: 48px; padding: 10px 12px; border: 1px solid; border-radius: 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; box-shadow: var(--shadow-sm); }
.flash button { margin-left: auto; border: 0; background: transparent; color: inherit; cursor: pointer; }
.flash-success { background: #ecfbf5; border-color: #bdebdc; color: #087b55; }
.flash-error { background: #fff0f3; border-color: #f2c7d0; color: #b8324b; }
.flash-warning { background: #fff8e9; border-color: #f3deb0; color: #9c6500; }
.flash-info { background: #edf6ff; border-color: #bedcf6; color: #1f65a8; }
html[data-theme="dark"] .flash-success { background: #143c32; border-color: #23614f; color: #91e2c4; }
html[data-theme="dark"] .flash-error { background: #44202a; border-color: #67303e; color: #ffb3c2; }
html[data-theme="dark"] .flash-warning { background: #443516; border-color: #6b5422; color: #ffd37b; }
html[data-theme="dark"] .flash-info { background: #193653; border-color: #28557f; color: #add7ff; }

.welcome-banner { position: relative; min-height: 190px; padding: 32px 34px; overflow: hidden; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #fff; background:
  radial-gradient(circle at 84% 28%, rgba(255,255,255,.23), transparent 22%),
  linear-gradient(125deg, #263a78, #5869e8 58%, #20afbf); box-shadow: 0 22px 55px rgba(56,73,165,.21); }
.welcome-banner > div:first-child { max-width: 680px; position: relative; z-index: 2; }
.welcome-banner .eyebrow { color: #b9c2ff; }
.welcome-banner h2 { margin: 9px 0 8px; font-size: clamp(26px, 3vw, 39px); line-height: 1.1; letter-spacing: -.035em; }
.welcome-banner p { margin: 0; max-width: 600px; color: rgba(255,255,255,.77); font-size: 14px; }
.welcome-banner .button { position: relative; z-index: 2; }
.welcome-orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); }
.orbit-one { width: 250px; height: 250px; right: -60px; top: -70px; }
.orbit-two { width: 150px; height: 150px; right: 80px; bottom: -90px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.metric-grid-three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.metric-card { min-height: 116px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); }
.metric-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.metric-icon.indigo { color: #5869e8; background: #eef0ff; }
.metric-icon.cyan { color: #0d9eb0; background: #e6f9fb; }
.metric-icon.violet { color: #7c4ee4; background: #f2ebff; }
.metric-icon.emerald { color: #0c9364; background: #e8f9f2; }
html[data-theme="dark"] .metric-icon.indigo { background: #28315c; color: #9ba4ff; }
html[data-theme="dark"] .metric-icon.cyan { background: #123b43; color: #6cd9e4; }
html[data-theme="dark"] .metric-icon.violet { background: #352653; color: #c5a8ff; }
html[data-theme="dark"] .metric-icon.emerald { background: #173c31; color: #6be0b3; }
.metric-card > div:last-child { display: grid; min-width: 0; }
.metric-card span { color: var(--muted); font-size: 11px; }
.metric-card strong { margin: 3px 0 1px; font-size: 21px; line-height: 1.15; letter-spacing: -.025em; }
.metric-card small { color: var(--muted-2); font-size: 10px; }
.metric-card small a { color: var(--primary); font-weight: 700; }
.metric-card .metric-text { font-size: 15px; }

.section-block { margin-top: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.025em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.launch-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.launch-card { position: relative; min-height: 152px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.launch-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 38%, var(--line)); box-shadow: var(--shadow-md); }
.launch-icon { width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: var(--primary); background: var(--primary-soft); }
.launch-card h3 { margin: 0 0 5px; font-size: 15px; }
.launch-card p { margin: 0; color: var(--muted); font-size: 11px; }
.launch-arrow { position: absolute; right: 17px; top: 18px; color: var(--muted-2); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-head { min-height: 68px; padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-head h2 { margin: 0; font-size: 15px; letter-spacing: -.012em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 11px; font-weight: 750; }
.dashboard-split { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(320px,.8fr); gap: 16px; margin-top: 16px; }
.resource-list { display: grid; }
.resource-row { min-height: 67px; padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; transition: background .15s ease; }
.resource-row:last-child { border-bottom: 0; }
.resource-row:hover { background: var(--surface-2); }
.os-badge { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 900; letter-spacing: -.02em; }
.os-badge-lg { width: 58px; height: 58px; border-radius: 16px; font-size: 16px; }
.resource-main { display: grid; min-width: 0; flex: 1; }
.resource-main strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-main small { color: var(--muted); font-size: 10px; }
.resource-ip { color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.badge { min-height: 24px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { color: #087b55; background: #e8f9f2; }
.badge-warning { color: #966200; background: #fff4d8; }
.badge-info { color: #2469ae; background: #eaf4ff; }
.badge-danger { color: #b4324a; background: #ffedf1; }
.badge-muted { color: #69768a; background: #edf0f4; }
html[data-theme="dark"] .badge-success { color: #79dcb7; background: #173a31; }
html[data-theme="dark"] .badge-warning { color: #ffd178; background: #433417; }
html[data-theme="dark"] .badge-info { color: #9bcaff; background: #19324e; }
html[data-theme="dark"] .badge-danger { color: #ffb4c2; background: #47212b; }
html[data-theme="dark"] .badge-muted { color: #abb7c9; background: #293548; }
.timeline-list { padding: 9px 16px 14px; }
.timeline-list.padded { padding: 18px; }
.timeline-item { position: relative; min-height: 53px; display: flex; gap: 12px; padding: 9px 0; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 28px; bottom: -8px; width: 1px; background: var(--line); }
.timeline-dot { width: 9px; height: 9px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline-item div { display: grid; }
.timeline-item strong { font-size: 11px; font-weight: 700; }
.timeline-item small { color: var(--muted); font-size: 9px; }

.page-actions { min-height: 48px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-lead { margin: 0; color: var(--muted); font-size: 12px; }
.filter-tabs, .image-tabs, .tab-list { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.filter-tabs a, .image-tabs button, .tab-list button { min-height: 32px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.filter-tabs a.active, .image-tabs button.active, .tab-list button.active { background: var(--primary-soft); color: var(--primary); }
.tab-list button span { margin-left: 5px; padding: 1px 5px; border-radius: 999px; background: var(--surface-3); font-size: 9px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--surface-2); text-align: left; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.table-resource { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.table-resource > span:last-child { display: grid; }
.table-resource strong { font-size: 11px; }
.table-resource small, .table-subtext { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.copy-value { max-width: 100%; border: 0; background: transparent; padding: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.copy-value:hover { color: var(--primary); }
.amount-positive { color: var(--emerald); font-weight: 750; }
.amount-negative { color: var(--danger); font-weight: 750; }
.priority { padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.priority-low { background: var(--surface-3); color: var(--muted); }
.priority-normal { background: #eaf4ff; color: #286cae; }
.priority-high { background: #fff4d8; color: #9a6600; }
.priority-urgent { background: #ffedf1; color: #b3324a; }

.empty-state { min-height: 245px; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: var(--primary); background: var(--primary-soft); }
.empty-state h3 { margin: 13px 0 5px; font-size: 15px; }
.empty-state p { max-width: 390px; margin: 0 0 16px; color: var(--muted); font-size: 11px; }

.field { display: grid; gap: 7px; min-width: 0; }
.field > span:first-child { font-size: 11px; font-weight: 750; }
.field em { color: var(--muted); font-weight: 500; font-style: normal; }
.field input, .field select, .field textarea, .command-search input { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); outline: none; transition: .15s ease; }
.field input, .field select { height: 43px; padding: 0 12px; }
.field textarea { min-height: 96px; padding: 11px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: color-mix(in srgb, var(--primary) 70%, white); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 13%, transparent); }
.field input:disabled { background: var(--surface-2); color: var(--muted); }
.field small { color: var(--muted); font-size: 9px; }
.field-full { grid-column: 1 / -1; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stack-form { display: grid; gap: 16px; }
.padded-form { padding: 18px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 2px; }
.form-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-field { display: inline-flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 10px; }
.check-field input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 46px; }
.password-field button { position: absolute; top: 0; right: 0; width: 43px; height: 43px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.currency-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); }
.currency-input > span { min-width: 44px; padding-left: 13px; color: var(--muted); font-size: 11px; }
.currency-input input { border: 0 !important; box-shadow: none !important; }
.quick-amounts { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-top: 10px; }
.quick-amounts button { min-height: 35px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 10px; font-weight: 700; cursor: pointer; }
.quick-amounts button:hover { border-color: var(--primary); color: var(--primary); }

.create-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 18px; align-items: start; }
.create-main { min-width: 0; }
.wizard-progress { margin-bottom: 14px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; box-shadow: var(--shadow-sm); }
.wizard-step { position: relative; min-height: 56px; padding: 8px 10px; border: 0; border-radius: 11px; background: transparent; display: flex; align-items: center; gap: 9px; text-align: left; color: var(--muted); cursor: pointer; }
.wizard-step > span { width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); font-size: 10px; font-weight: 800; }
.wizard-step > div { display: grid; }
.wizard-step strong { font-size: 10px; }
.wizard-step small { font-size: 8px; color: var(--muted-2); }
.wizard-step.active { background: var(--primary-soft); color: var(--primary); }
.wizard-step.active > span { color: #fff; background: var(--primary); }
.wizard-panel { display: none; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.wizard-panel.active { display: block; }
.image-tabs { margin-bottom: 14px; }
.image-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.image-card, .plan-card, .location-card { position: relative; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: .15s ease; }
.image-card:hover, .plan-card:hover, .location-card:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); transform: translateY(-1px); }
.image-card.selected, .plan-card.selected, .location-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
.image-card { min-height: 102px; padding: 13px; border-radius: 13px; display: flex; align-items: center; gap: 11px; text-align: left; }
.image-logo { width: 43px; height: 43px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 11px; font-weight: 900; }
.logo-os { color: #5264df; background: #eef0ff; }
.logo-app { color: #078c79; background: #e7f9f5; }
.image-card > span:nth-child(2) { display: grid; }
.image-card strong { font-size: 11px; }
.image-card small { color: var(--muted); font-size: 9px; }
.selected-check { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 7px; display: none; align-items: center; justify-content: center; color: #fff; background: var(--primary); }
.selected .selected-check { display: flex; }
.plan-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.plan-card { min-height: 260px; padding: 16px; border-radius: 14px; display: flex; flex-direction: column; text-align: left; }
.plan-head { display: flex; align-items: center; justify-content: space-between; }
.plan-head strong { font-size: 12px; }
.plan-price { margin-top: 14px; display: flex; align-items: baseline; gap: 4px; }
.plan-price b { font-size: 18px; letter-spacing: -.025em; }
.plan-price small { color: var(--muted); font-size: 9px; }
.plan-hourly { margin: 2px 0 13px; color: var(--muted); font-size: 9px; }
.plan-spec { padding: 7px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.plan-spec b { color: var(--text); }
.location-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.location-card { min-height: 88px; padding: 15px; border-radius: 13px; display: flex; align-items: center; gap: 12px; text-align: left; }
.location-flag { font-size: 28px; }
.location-card > span:nth-child(2) { display: grid; flex: 1; }
.location-card strong { font-size: 11px; }
.location-card small { color: var(--muted); font-size: 9px; }
.location-latency { padding: 4px 8px; border-radius: 999px; color: #087b55; background: #e8f9f2; font-size: 8px; font-weight: 800; }
.option-list { display: grid; gap: 9px; margin-top: 17px; }
.option-row { min-height: 66px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 11px; }
.option-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: var(--primary); background: var(--primary-soft); }
.option-row > span:nth-child(2) { display: grid; flex: 1; }
.option-row strong { font-size: 10px; }
.option-row small { color: var(--muted); font-size: 9px; }
.option-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.wizard-actions { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.order-summary { min-width: 0; }
.sticky-card { position: sticky; top: calc(var(--topbar-h) + 16px); }
.summary-card { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.summary-head h3 { margin: 4px 0 0; font-size: 15px; }
.summary-product { display: flex; align-items: center; gap: 11px; padding: 15px 0; margin-top: 13px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-product > div { display: grid; }
.summary-product strong { font-size: 11px; }
.summary-product small { color: var(--muted); font-size: 9px; }
.summary-list { margin: 0; padding: 9px 0; }
.summary-list > div { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px dashed var(--line); }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); font-size: 9px; }
.summary-list dd { margin: 0; text-align: right; font-size: 10px; font-weight: 700; }
.summary-price { padding-top: 10px; border-top: 1px solid var(--line); }
.summary-price > div { min-height: 35px; display: flex; align-items: center; justify-content: space-between; }
.summary-price span { color: var(--muted); font-size: 9px; }
.summary-price strong { font-size: 12px; }
.summary-price .summary-total strong { color: var(--primary); font-size: 19px; }
.summary-note { margin: 12px 0 0; padding: 10px; border-radius: 10px; display: flex; align-items: flex-start; gap: 8px; color: var(--muted); background: var(--surface-2); font-size: 9px; }

.resource-hero { margin-bottom: 14px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 18px; box-shadow: var(--shadow-sm); }
.resource-identity { display: flex; align-items: center; gap: 13px; }
.resource-title-line { display: flex; align-items: center; gap: 10px; }
.resource-title-line h2 { margin: 0; font-size: 20px; }
.resource-identity p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.resource-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.resource-overview-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(310px,.7fr); gap: 14px; }
.fact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; padding: 8px 18px 17px; }
.fact-grid > div { min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fact-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.fact-grid dt { color: var(--muted); font-size: 9px; }
.fact-grid dd { margin: 5px 0 0; font-size: 11px; font-weight: 700; }
.resource-cost-card { padding-bottom: 14px; }
.spec-ring-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 18px; }
.spec-ring { aspect-ratio: 1; max-width: 92px; margin: auto; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at center, var(--surface) 55%, transparent 57%), conic-gradient(var(--primary) calc(var(--value) * 1%), var(--surface-3) 0); }
.spec-ring strong { font-size: 17px; }
.spec-ring small { color: var(--muted); font-size: 8px; }
.cost-line { margin: 0 18px; min-height: 35px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.cost-line span { color: var(--muted); font-size: 9px; }
.cost-line strong { font-size: 11px; }
.cost-line.total strong { color: var(--primary); font-size: 17px; }
.metric-panel { margin-top: 14px; }
.live-chip { min-height: 25px; padding: 0 9px; border-radius: 999px; display: flex; align-items: center; gap: 6px; color: #087b55; background: #e8f9f2; font-size: 9px; font-weight: 800; }
.live-chip span { width: 6px; height: 6px; border-radius: 50%; background: #14b67b; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(20,182,123,.3); } 50% { box-shadow: 0 0 0 5px rgba(20,182,123,0); } }
.chart-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 14px; }
.mini-chart { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.mini-chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.mini-chart-head span { color: var(--muted); font-size: 9px; }
.mini-chart-head strong { font-size: 11px; }
.mini-chart canvas { width: 100%; height: 90px; display: block; }
.tabbed-panel { margin-top: 14px; }
.tabbed-panel > .tab-list { margin: 13px 14px 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel-inline-actions { min-height: 56px; padding: 10px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-inline-actions p { margin: 0; color: var(--muted); font-size: 10px; }

.billing-hero { min-height: 150px; margin-bottom: 14px; padding: 27px 30px; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(125deg, #1d2d5a, #4a5ee3 65%, #19aebf); display: flex; align-items: center; justify-content: space-between; box-shadow: 0 20px 50px rgba(54,69,158,.2); }
.billing-hero .eyebrow { color: #bdc5ff; }
.billing-hero h2 { margin: 6px 0 2px; font-size: 34px; letter-spacing: -.035em; }
.billing-hero p { margin: 0; color: rgba(255,255,255,.7); font-size: 11px; }
.notice { min-height: 48px; margin: 14px 0; padding: 11px 13px; border: 1px solid; border-radius: 12px; display: flex; align-items: flex-start; gap: 9px; font-size: 11px; }
.notice-warning { color: #8a5c00; background: #fff8e8; border-color: #f0dca9; }
.notice-info { color: #25659f; background: #edf6ff; border-color: #bddbf4; }
html[data-theme="dark"] .notice-warning { color: #ffd37a; background: #3d3017; border-color: #634f25; }
html[data-theme="dark"] .notice-info { color: #acd7ff; background: #19334e; border-color: #2a5479; }
.secret-reveal { margin-bottom: 14px; padding: 16px; border: 1px solid #bdebdc; border-radius: var(--radius); background: #ecfbf5; color: #0d6f50; box-shadow: var(--shadow-sm); }
.secret-reveal > div:first-child { display: flex; align-items: center; gap: 11px; }
.secret-reveal > div:first-child span { display: grid; }
.secret-reveal strong { font-size: 12px; }
.secret-reveal small { font-size: 9px; }
.secret-reveal dl { display: grid; gap: 7px; margin: 12px 0 0; }
.secret-reveal dl > div { padding: 9px 11px; border-radius: 9px; background: rgba(255,255,255,.7); }
.secret-reveal dt { font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.secret-reveal dd { margin: 3px 0 0; display: flex; align-items: center; gap: 7px; word-break: break-all; }
html[data-theme="dark"] .secret-reveal { color: #8ce0bf; background: #16392f; border-color: #275b4b; }
html[data-theme="dark"] .secret-reveal dl > div { background: rgba(255,255,255,.04); }

.ticket-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 15px; align-items: start; }
.conversation-head { padding: 18px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.conversation-head h2 { margin: 4px 0; font-size: 18px; }
.conversation-head p { margin: 0; color: var(--muted); font-size: 10px; }
.message-thread { padding: 18px; display: grid; gap: 13px; }
.message-bubble { max-width: 82%; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.message-bubble.staff { margin-left: auto; border-color: color-mix(in srgb, var(--primary) 25%, var(--line)); background: var(--primary-soft); }
.message-meta { display: flex; align-items: center; gap: 9px; }
.message-meta > div { display: grid; }
.message-meta strong { font-size: 10px; }
.message-meta small { color: var(--muted); font-size: 8px; }
.message-content { margin-top: 10px; font-size: 11px; }
.reply-form { padding: 16px 18px 18px; border-top: 1px solid var(--line); }
.inline-field { grid-template-columns: auto 150px; align-items: center; }
.ticket-sidebar { padding: 18px; position: sticky; top: calc(var(--topbar-h) + 15px); }
.ticket-sidebar h3 { margin: 0 0 10px; font-size: 14px; }
.ticket-mini-list { display: grid; }
.ticket-mini-list a { min-height: 64px; padding: 10px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-mini-list a:last-child { border-bottom: 0; }
.ticket-mini-list a:hover { background: var(--surface-2); }
.ticket-mini-list span:first-child { display: grid; min-width: 0; }
.ticket-mini-list strong { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-mini-list small { color: var(--muted); font-size: 8px; }

.profile-layout { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 15px; align-items: start; }
.profile-summary { padding: 24px; text-align: center; position: sticky; top: calc(var(--topbar-h) + 15px); }
.profile-summary .avatar { margin: 0 auto; }
.profile-summary h2 { margin: 13px 0 2px; font-size: 17px; }
.profile-summary p { margin: 0; color: var(--muted); font-size: 10px; }
.role-chip { display: inline-flex; margin: 11px 0; padding: 4px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 9px; font-weight: 800; }
.profile-content { display: grid; gap: 15px; }
.notification-list-page { display: grid; }
.notification-item { min-height: 82px; padding: 16px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: var(--primary-soft); }
.notification-icon { width: 39px; height: 39px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--primary); background: var(--surface); border: 1px solid var(--line); }
.notification-item > div { display: grid; }
.notification-item strong { font-size: 11px; }
.notification-item p { margin: 3px 0; color: var(--muted); font-size: 10px; }
.notification-item small { color: var(--muted-2); font-size: 8px; }

.search-form { min-height: 42px; width: min(500px,100%); padding-left: 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 8px; background: var(--surface); }
.search-form input { flex: 1; height: 40px; border: 0; outline: 0; background: transparent; min-width: 0; }
.admin-overview { display: grid; grid-template-columns: repeat(4,1fr); }
.admin-overview > div { min-height: 110px; padding: 18px; border-right: 1px solid var(--line); display: grid; align-content: center; }
.admin-overview > div:last-child { border-right: 0; }
.admin-overview span { color: var(--muted); font-size: 9px; }
.admin-overview strong { margin-top: 5px; font-size: 16px; }
.danger-zone { margin-top: 15px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.danger-zone h2 { margin: 0; font-size: 15px; }
.danger-zone p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 18px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,12,28,.65); backdrop-filter: blur(4px); }
.modal-dialog { position: relative; width: min(610px,100%); max-height: min(780px, calc(100vh - 36px)); overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.28); animation: modalIn .16s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 18px; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
body.modal-open { overflow: hidden; }

.command-palette { position: fixed; inset: 0; z-index: 110; display: none; align-items: flex-start; justify-content: center; padding: 13vh 18px 18px; }
.command-palette.open { display: flex; }
.command-backdrop { position: absolute; inset: 0; background: rgba(5,12,28,.68); backdrop-filter: blur(5px); }
.command-dialog { position: relative; width: min(620px,100%); overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 35px 100px rgba(0,0,0,.32); }
.command-search { height: 58px; padding: 0 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.command-search input { border: 0; box-shadow: none; background: transparent; }
.command-list { padding: 8px; }
.command-list a { min-height: 44px; padding: 0 11px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.command-list a:hover { background: var(--surface-2); }
kbd { min-width: 24px; height: 22px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface-2); font-size: 9px; }

.auth-body { background: #0b1427; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, .95fr) minmax(500px, 1.05fr); }
.auth-brand-panel { position: relative; overflow: hidden; padding: 34px 44px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background:
  radial-gradient(circle at 20% 10%, rgba(102,119,246,.35), transparent 30%),
  radial-gradient(circle at 90% 80%, rgba(20,190,187,.25), transparent 28%),
  linear-gradient(145deg, #101d3b, #0b1427 65%); }
.auth-brand-panel::before, .auth-brand-panel::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.auth-brand-panel::before { width: 480px; height: 480px; right: -230px; top: -180px; }
.auth-brand-panel::after { width: 300px; height: 300px; left: -160px; bottom: -150px; }
.auth-brand-copy { position: relative; z-index: 2; max-width: 610px; }
.auth-brand-copy .eyebrow { color: #8f9cff; }
.auth-brand-copy h1 { max-width: 560px; margin: 12px 0 14px; font-size: clamp(36px, 5vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.auth-brand-copy > p { max-width: 560px; margin: 0; color: rgba(255,255,255,.67); font-size: 14px; }
.auth-feature-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 28px; }
.auth-feature-grid > div { min-height: 72px; padding: 13px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; display: flex; align-items: center; gap: 11px; background: rgba(255,255,255,.035); }
.auth-feature-grid svg { color: #8d9aff; }
.auth-feature-grid span { display: grid; }
.auth-feature-grid b { font-size: 10px; }
.auth-feature-grid small { color: rgba(255,255,255,.5); font-size: 9px; }
.auth-brand-footer { color: rgba(255,255,255,.38); font-size: 9px; }
.auth-form-panel { position: relative; padding: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); }
.theme-toggle-auth { position: absolute; top: 22px; right: 22px; }
.auth-form-card { width: min(430px,100%); }
.auth-form-wide { width: min(660px,100%); }
.auth-form-head { margin-bottom: 22px; }
.auth-form-head h2 { margin: 7px 0 6px; font-size: 27px; letter-spacing: -.035em; }
.auth-form-head p { margin: 0; color: var(--muted); font-size: 11px; }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 10px; }
.auth-switch a { color: var(--primary); font-weight: 800; }
.muted-link { color: var(--muted); font-size: 9px; }

.installer-body { background: #0b1427; }
.installer-shell { min-height: 100vh; display: grid; grid-template-columns: 390px minmax(0,1fr); }
.installer-side { position: sticky; top: 0; height: 100vh; padding: 34px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background:
  radial-gradient(circle at 10% 10%, rgba(105,121,246,.32), transparent 32%),
  linear-gradient(145deg, #142447, #0b1427); }
.installer-side h1 { margin: 10px 0; font-size: 37px; line-height: 1.05; letter-spacing: -.04em; }
.installer-side p { margin: 0; color: rgba(255,255,255,.62); font-size: 12px; }
.installer-requirements { display: grid; gap: 8px; }
.requirement { min-height: 42px; padding: 0 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.035); font-size: 10px; }
.requirement span { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.requirement.ok span { background: rgba(38,204,137,.15); color: #5de0ae; }
.requirement.fail span { background: rgba(226,74,101,.15); color: #ff91a5; }
.installer-main { min-width: 0; padding: 42px clamp(28px, 7vw, 90px); background: var(--bg); }
.installer-form-head { max-width: 760px; margin: 0 auto 20px; }
.installer-form-head h2 { margin: 6px 0; font-size: 26px; }
.installer-form-head p { margin: 0; color: var(--muted); font-size: 11px; }
.installer-form { max-width: 760px; margin: 0 auto; display: grid; gap: 15px; }
.installer-form fieldset { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.installer-form legend { padding: 0 7px; font-size: 11px; font-weight: 800; }
.installer-errors { max-width: 760px; margin: 0 auto 14px; padding: 12px; border: 1px solid #f2c7d0; border-radius: 12px; color: #b8324b; background: #fff0f3; font-size: 10px; }
.install-result { max-width: 620px; margin: 17vh auto 0; text-align: center; }
.install-result-icon { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 24px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #5869e8, #19b6b8); font-size: 30px; font-weight: 900; box-shadow: 0 16px 36px rgba(88,105,232,.25); }
.install-result h2 { margin: 7px 0; font-size: 29px; }
.install-result p { margin: 0 auto 20px; max-width: 540px; color: var(--muted); font-size: 11px; }

.error-card { width: min(520px,100%); margin: 12vh auto 0; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-align: center; box-shadow: var(--shadow-md); }
.error-icon { width: 68px; height: 68px; margin: 0 auto 15px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--danger); background: #fff0f3; }
.error-card h1 { margin: 0 0 7px; font-size: 23px; }
.error-card p { margin: 0 auto 13px; color: var(--muted); font-size: 11px; }
.error-card code { display: block; margin-bottom: 17px; color: var(--muted); }

@media (max-width: 1240px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .launch-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chart-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .image-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .create-layout { grid-template-columns: minmax(0,1fr) 300px; }
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 248px; }
  .app-shell { grid-template-columns: 1fr; }
  .main-column { grid-column: 1; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close, .mobile-menu { display: inline-flex; }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(5,12,28,.55); backdrop-filter: blur(3px); }
  .app-shell.sidebar-open .sidebar-overlay { display: block; }
  .create-layout { grid-template-columns: 1fr; }
  .order-summary { order: -1; }
  .sticky-card { position: static; }
  .summary-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 12px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 420px; }
  .installer-shell { grid-template-columns: 1fr; }
  .installer-side { position: relative; height: auto; min-height: 360px; }
}

@media (max-width: 780px) {
  :root { --topbar-h: 68px; }
  .topbar { padding: 10px 14px; }
  .content-area { padding: 17px 14px 32px; }
  .page-heading p, .user-dropdown-name, .balance-pill small { display: none; }
  .balance-pill { width: 42px; padding: 0; justify-content: center; }
  .balance-pill > span { display: none; }
  .welcome-banner { min-height: 230px; padding: 25px; flex-direction: column; align-items: flex-start; justify-content: center; }
  .metric-grid, .metric-grid-three, .launch-grid, .dashboard-split, .resource-overview-grid, .ticket-layout, .profile-layout { grid-template-columns: 1fr; }
  .metric-card { min-height: 102px; }
  .wizard-progress { grid-template-columns: repeat(2,1fr); }
  .image-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .location-grid, .form-grid.two { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .resource-hero { align-items: flex-start; flex-direction: column; }
  .resource-actions { justify-content: flex-start; width: 100%; }
  .resource-actions .button { min-height: 38px; padding-inline: 12px; font-size: 11px; }
  .fact-grid { grid-template-columns: 1fr; }
  .fact-grid > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .fact-grid > div:last-child { border-bottom: 0; }
  .ticket-sidebar, .profile-summary { position: static; }
  .admin-overview { grid-template-columns: repeat(2,1fr); }
  .admin-overview > div:nth-child(2) { border-right: 0; }
  .admin-overview > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: 100vh; padding: 54px 20px 28px; }
  .installer-main { padding: 28px 16px; }
  .installer-side { min-height: 300px; padding: 25px; }
}

@media (max-width: 520px) {
  .topbar-actions > .icon-button:first-child { display: none; }
  .user-dropdown-trigger { border: 0; padding: 0; background: transparent; }
  .user-dropdown-trigger > svg { display: none; }
  .page-heading h1 { font-size: 16px; }
  .metric-grid { grid-template-columns: 1fr; }
  .welcome-banner h2 { font-size: 28px; }
  .image-grid, .plan-grid, .chart-grid { grid-template-columns: 1fr; }
  .wizard-progress { grid-template-columns: 1fr 1fr; }
  .wizard-step small { display: none; }
  .wizard-panel { padding: 16px; }
  .summary-list { grid-template-columns: 1fr; }
  .resource-title-line { align-items: flex-start; flex-direction: column; gap: 5px; }
  .resource-ip { display: none; }
  .quick-amounts { grid-template-columns: repeat(2,1fr); }
  .message-bubble { max-width: 94%; }
  .form-row-between { align-items: stretch; flex-direction: column; }
  .inline-field { grid-template-columns: 1fr; }
  .admin-overview { grid-template-columns: 1fr; }
  .admin-overview > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-feature-grid { grid-template-columns: 1fr; }
}
