@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --forest-950: #071018;
  --forest-900: #09090c;
  --forest-800: #12202c;
  --forest-700: #3b9edd;
  --forest-600: #66b8f0;
  --sage-500: #3b9edd;
  --sage-300: #66b8f0;
  --sage-100: #182a38;
  --sage-50: #0d1821;
  --cream: #071018;
  --white: #12202c;
  --ink: #f2f7fa;
  --ink-2: #c9dae6;
  --muted: #8fa5b5;
  --line: #23394a;
  --line-strong: #31546b;
  --amber: #bd7a24;
  --amber-bg: #352716;
  --red: #b74a44;
  --red-bg: #351d20;
  --blue: #66b8f0;
  --blue-bg: #142838;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22), 0 5px 18px rgba(0, 0, 0, 0.14);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.44);
  --sidebar: 244px;
  font-size: 15px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 25px 16px 18px;
  color: var(--color-text-secondary-bright, #c9dae6);
  background:
    radial-gradient(circle at 12% 96%, rgba(59, 158, 221, 0.13), transparent 34%),
    linear-gradient(180deg, #071018 0%, #09090c 100%);
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 560 19px/1 "Inter", sans-serif; letter-spacing: -.02em; }
.logo-mark { display: block; width: 20px; height: 20px; }
.logo-dark { color: var(--ink); justify-content: center; }
.primary-nav { margin-top: 34px; flex: 1; }
.nav-label { margin: 0 12px 8px; color: #7f96a6; font: 600 10px/1 "Inter", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 28px; }
.primary-nav a { display: grid; grid-template-columns: 23px 1fr auto; align-items: center; min-height: 43px; padding: 0 12px; margin: 3px 0; border-radius: 8px; color: #8fa5b5; text-decoration: none; font-weight: 500; font-size: 14px; transition: .16s ease; }
.primary-nav a:hover { color: #fff; background: rgba(255,255,255,.055); }
.primary-nav a.active { color: #fff; background: rgba(59, 158, 221, .15); box-shadow: inset 2px 0 #3b9edd; }
.nav-icon { width: 20px; color: #7f96a6; font-size: 17px; text-align: center; }
.nav-count { min-width: 21px; padding: 1px 6px; border-radius: 99px; color: #c9dae6; background: rgba(255,255,255,.08); font-size: 10px; text-align: center; }
.nav-count:empty { display: none; }
.nav-count-warn:not(:empty) { color: #ffd79d; background: rgba(196,126,38,.18); }
.sidebar-foot { display: grid; gap: 12px; }
.environment-card { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.035); }
.environment-card strong, .environment-card small { display: block; }
.environment-card strong { color: #c9dae6; font-size: 12px; font-weight: 600; }
.environment-card small { color: #7f96a6; font-size: 10px; margin-top: 1px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #d39747; box-shadow: 0 0 0 4px rgba(211,151,71,.1); }
.environment-card.healthy .status-dot { background: #76ba91; box-shadow: 0 0 0 4px rgba(118,186,145,.1); }
.sidebar-user { display: grid; grid-template-columns: 31px 1fr; gap: 9px; align-items: center; padding: 10px 7px 0; border-top: 1px solid rgba(255,255,255,.07); color: #c9dae6; font-size: 11px; min-width: 0; }
.user-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #23394a; color: #fff; font-weight: 700; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #7f96a6; }
.sidebar-close, .menu-button { display: none !important; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; height: 82px; display: flex; justify-content: space-between; align-items: center; padding: 0 clamp(22px, 4vw, 52px); border-bottom: 1px solid var(--line); background: rgba(7,16,24,.9); backdrop-filter: blur(18px); }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.page-kicker { margin: 0 0 2px; color: var(--sage-500); font: 600 10px/1 "Inter", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.topbar h1 { margin: 0; font: 600 20px/1.15 "Inter", sans-serif; letter-spacing: -.025em; }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 10px; }
.live-status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.live-status span { width: 6px; height: 6px; border-radius: 50%; background: #6cad87; box-shadow: 0 0 0 3px rgba(108,173,135,.12); }
.button { min-height: 37px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 12px; transition: .16s ease; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: #06121b; background: var(--forest-700); border-color: var(--forest-700); box-shadow: 0 5px 16px rgba(59,158,221,.18); }
.button-primary:hover { background: #66b8f0; }
.button-secondary { color: var(--ink-2); background: var(--white); border-color: var(--line); box-shadow: var(--shadow-sm); }
.button-quiet { color: var(--forest-700); background: transparent; border-color: var(--line); }
.button-danger { color: #ffd9d9; background: var(--red-bg); border-color: rgba(231, 111, 111, .45); }
.button-danger:hover { color: white; background: rgba(231, 111, 111, .24); border-color: var(--red); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-wide { width: 100%; min-height: 45px; }
.icon-button, .avatar-button { display: inline-grid; place-items: center; border: 0; cursor: pointer; }
.icon-button { width: 36px; height: 36px; color: var(--muted); background: transparent; border-radius: 8px; font-size: 22px; }
.icon-button:hover { color: var(--ink); background: var(--sage-100); }
.avatar-button { width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--forest-700); font-weight: 700; font-size: 12px; }
.refresh-symbol { font-size: 15px; }
.profile-menu { position: absolute; top: 46px; right: 0; z-index: 40; width: 235px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #12202c; box-shadow: var(--shadow-lg); }
.profile-menu p { margin: 0; padding: 9px 10px; }
.profile-menu strong, .profile-menu small { display: block; overflow-wrap: anywhere; }
.profile-menu small { color: var(--muted); margin-top: 2px; }
.profile-menu a { display: block; padding: 9px 10px; border-radius: 6px; color: var(--red); text-decoration: none; font-size: 12px; }
.profile-menu a:hover { background: var(--red-bg); }

.view, .loading-state { width: min(1400px, 100%); margin: 0 auto; padding: 34px clamp(22px, 4vw, 52px) 70px; }
.view { display: none; }
.view.active { display: block; animation: view-in .22s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.content-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 25px; }
.content-head h2 { margin: 0 0 5px; font: 600 clamp(24px, 3vw, 31px)/1.15 "Inter", sans-serif; letter-spacing: -.04em; }
.content-head p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 7px; color: var(--sage-500); font: 700 10px/1 "Inter", sans-serif; letter-spacing: .13em; text-transform: uppercase; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.metric-card { position: relative; min-height: 134px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(18,32,44,.92); box-shadow: var(--shadow-sm); }
.metric-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -35px; bottom: -42px; border-radius: 50%; background: var(--sage-50); }
.metric-label { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; color: var(--forest-700); background: var(--sage-100); }
.metric-value { margin: 14px 0 3px; font: 600 26px/1 "Inter", sans-serif; letter-spacing: -.045em; }
.metric-note { position: relative; z-index: 1; color: var(--muted); font-size: 10.5px; }
.metric-note strong { color: var(--forest-600); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .8fr); gap: 17px; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: rgba(18,32,44,.92); box-shadow: var(--shadow-sm); }
.panel-pad { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font: 600 14px/1.2 "Inter", sans-serif; letter-spacing: -.02em; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.panel-link { color: var(--forest-600); text-decoration: none; font-size: 11px; font-weight: 700; }
.panel-link:hover { text-decoration: underline; }
.split-panels { display: grid; gap: 17px; }

.chart-wrap { min-height: 250px; padding: 20px; }
.chart-summary { display: flex; align-items: baseline; gap: 9px; margin-bottom: 18px; }
.chart-summary strong { font: 600 23px/1 "Inter", sans-serif; }
.chart-summary span { color: var(--muted); font-size: 10px; }
.bar-chart { height: 160px; display: flex; align-items: end; gap: clamp(5px, 1.2vw, 13px); border-bottom: 1px solid var(--line); }
.bar-column { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 5px; min-width: 0; }
.bar { width: min(32px, 75%); min-height: 3px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--sage-500), var(--forest-700)); opacity: .92; }
.bar-column small { height: 17px; color: #7f96a6; font-size: 8.5px; white-space: nowrap; }

.attention-list, .activity-list { margin: 0; padding: 0; list-style: none; }
.attention-item, .activity-item { display: grid; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.attention-item:last-child, .activity-item:last-child { border-bottom: 0; }
.attention-item { grid-template-columns: 30px 1fr; }
.attention-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--amber); background: var(--amber-bg); font-size: 12px; }
.attention-item strong, .activity-item strong { display: block; font-size: 11.5px; }
.attention-item p, .activity-item p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.empty-compact { padding: 24px 18px; color: var(--muted); font-size: 11px; text-align: center; }

.table-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 0 0 13px; }
.search-box { position: relative; flex: 1; max-width: 360px; }
.search-box::before { content: "⌕"; position: absolute; left: 11px; top: 8px; color: var(--muted); font-size: 16px; }
.search-box input, .filter-select { width: 100%; height: 37px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--ink); background: #12202c; font-size: 11.5px; }
.search-box input { padding: 0 12px 0 34px; }
.search-box input:focus, .filter-select:focus { border-color: var(--sage-500); box-shadow: 0 0 0 3px rgba(59,158,221,.14); }
.toolbar-filters { display: flex; gap: 8px; }
.filter-select { width: auto; min-width: 130px; padding: 0 30px 0 11px; }
.data-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.data-table th { height: 39px; padding: 0 15px; color: #8fa5b5; background: #182a38; border-bottom: 1px solid var(--line); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 58px; padding: 9px 15px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; transition: background .12s ease; }
.data-table tbody tr:hover { background: var(--sage-50); }
.data-table strong { font-size: 11.5px; }
.cell-title { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: -.02em; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 2px 8px; border-radius: 99px; color: var(--ink-2); background: #182a38; border: 1px solid #23394a; font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #8d9994; }
.badge-green { color: #8ed8b3; background: #123125; border-color: #28533f; }
.badge-green::before { background: #5da17e; }
.badge-amber { color: #f0ba71; background: #352716; border-color: #5a4224; }
.badge-amber::before { background: #c68a3e; }
.badge-red { color: #f09a95; background: #351d20; border-color: #613237; }
.badge-red::before { background: #c56159; }
.badge-blue { color: #9dd5f8; background: var(--blue-bg); border-color: #27506a; }
.badge-blue::before { background: #5f8aa7; }
.badge-plain::before { display: none; }
.source-badge { text-transform: uppercase; letter-spacing: .04em; }

.creative-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.creative-card { position: relative; min-height: 215px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #12202c; box-shadow: var(--shadow-sm); cursor: pointer; transition: .15s ease; }
.creative-card:hover { transform: translateY(-2px); border-color: var(--sage-300); box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.creative-preview { height: 85px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 8px; overflow: hidden; color: var(--sage-500); background: linear-gradient(145deg, #182a38, #0d1821); font: 700 26px/1 "Inter", sans-serif; }
.creative-preview.video { background: linear-gradient(145deg, #183247, #12202c); }
.creative-preview.audio { background: repeating-linear-gradient(90deg, #182a38 0 5px, #12202c 5px 11px); }
.creative-preview.native { background: linear-gradient(145deg, #1c2f3e, #0d1821); }
.creative-card h3 { margin: 0 0 4px; font: 600 12px/1.25 "Inter", sans-serif; }
.creative-card p { margin: 0; color: var(--muted); font-size: 9.5px; }
.creative-card .badge { position: absolute; right: 14px; top: 14px; }
.creative-meta { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }

.inventory-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.source-list { display: grid; gap: 10px; }
.source-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; background: #12202c; }
.source-row strong, .source-row span { display: block; }
.source-row span { color: var(--muted); font-size: 9.5px; }

.activity-feed { position: relative; padding: 4px 20px 4px 42px; }
.activity-feed::before { content: ""; position: absolute; top: 19px; bottom: 19px; left: 26px; width: 1px; background: var(--line); }
.activity-feed .activity-item { position: relative; grid-template-columns: 1fr auto; padding: 15px 0 15px 10px; }
.activity-feed .activity-item::before { content: ""; position: absolute; left: -21px; top: 19px; width: 7px; height: 7px; border: 2px solid #12202c; border-radius: 50%; background: var(--sage-500); box-shadow: 0 0 0 1px var(--sage-300); }
.activity-time { color: var(--muted); font-size: 9px; white-space: nowrap; }

.billing-banner { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px; margin-bottom: 18px; border: 1px solid #31546b; border-radius: 12px; color: #c9dae6; background: linear-gradient(125deg, #071018, #183247); box-shadow: var(--shadow-sm); }
.billing-banner h3 { margin: 0 0 5px; color: #f2f7fa; font: 600 17px/1.2 "Inter", sans-serif; }
.billing-banner p { margin: 0; max-width: 640px; color: #8fa5b5; font-size: 11px; }
.billing-banner .button { background: #3b9edd; color: #06121b; }
.billing-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 17px; }
.prepaid-billing-grid { grid-template-columns: minmax(270px, .8fr) minmax(0, 1.2fr); }
.prepaid-billing-grid .setup-card { display: block; text-align: left; }
.prepaid-billing-grid .setup-card p { max-width: none; margin: 8px 0 18px; }
.prepaid-billing-grid .data-table td:first-child { white-space: nowrap; }
#topup-form label { display: block; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
#topup-form input { display: block; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #12202c; }
#topup-form input:focus { outline: 2px solid var(--sage-500); outline-offset: 2px; }
#topup-form button { width: 100%; }
.setup-card { display: grid; place-items: center; min-height: 205px; padding: 24px; text-align: center; }
.setup-card .setup-icon { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 12px; border-radius: 12px; color: var(--forest-600); background: var(--sage-100); font-size: 19px; }
.setup-card h3 { margin: 0 0 5px; font: 600 14px/1.2 "Inter", sans-serif; }
.setup-card p { margin: 0; max-width: 320px; color: var(--muted); font-size: 10.5px; }

.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.connection-card { padding: 20px; }
.connection-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.connection-logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--forest-700); background: var(--sage-100); font: 700 15px/1 "Inter", sans-serif; }
.connection-card h3 { margin: 14px 0 4px; font: 600 14px/1.2 "Inter", sans-serif; }
.connection-card p { margin: 0; color: var(--muted); font-size: 10.5px; }
.code-box { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2); background: #071018; font: 10px/1.4 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; }
.code-box span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { flex: 0 0 auto; border: 0; color: var(--forest-600); background: transparent; cursor: pointer; font-weight: 700; font-size: 9px; }
.tool-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }

.detail-drawer { position: fixed; inset: 0 0 0 auto; z-index: 61; width: min(570px, 100vw); overflow-y: auto; background: #071018; border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateX(102%); transition: transform .24s ease; }
.detail-drawer.open { transform: none; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(3,9,14,.62); backdrop-filter: blur(2px); }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 25px 19px; border-bottom: 1px solid var(--line); background: rgba(7,16,24,.94); backdrop-filter: blur(12px); }
.drawer-head h2 { margin: 0; font: 600 19px/1.2 "Inter", sans-serif; letter-spacing: -.03em; }
.drawer-body { padding: 22px 25px 50px; }
.detail-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 20px; }
.detail-stat { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #12202c; }
.detail-stat strong, .detail-stat small { display: block; }
.detail-stat strong { font: 600 15px/1.2 "Inter", sans-serif; }
.detail-stat small { margin-top: 3px; color: var(--muted); font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; }
.order-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.order-action-note { margin: 10px 0 0; }
.detail-section { margin-top: 23px; }
.detail-section h3 { margin: 0 0 10px; color: var(--forest-700); font: 700 11px/1.2 "Inter", sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.detail-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: #12202c; overflow: hidden; }
.detail-list li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 10.5px; overflow-wrap: anywhere; }
.detail-list li:last-child { border-bottom: 0; }
.detail-list span:first-child { color: var(--muted); }
.requirement-row { padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; background: #12202c; }
.requirement-row strong { display: block; font-size: 11px; }
.requirement-row p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.progress-track { height: 5px; margin-top: 8px; border-radius: 99px; background: #182a38; overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--forest-600); }

.auth-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, #182a38, #071018 58%); }
.auth-card { width: min(440px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 18px; background: rgba(18,32,44,.92); box-shadow: 0 30px 100px rgba(0,0,0,.38); text-align: center; }
.auth-card h1 { margin: 8px 0 12px; font: 600 29px/1.08 "Inter", sans-serif; letter-spacing: -.045em; }
.auth-card > p:not(.eyebrow) { color: var(--muted); font-size: 12px; }
.auth-orbit { position: relative; width: 94px; height: 94px; margin: 28px auto; border: 1px solid var(--sage-300); border-radius: 50%; }
.auth-orbit::before, .auth-orbit::after { content: ""; position: absolute; border: 1px solid var(--sage-100); border-radius: 50%; }
.auth-orbit::before { inset: 14px; }
.auth-orbit::after { inset: 29px; background: var(--forest-700); border-color: var(--forest-700); }
.auth-orbit span { position: absolute; z-index: 2; left: 40px; top: -4px; width: 12px; height: 12px; border: 3px solid white; border-radius: 50%; background: var(--sage-500); }
.auth-foot { margin: 15px 0 0 !important; font-size: 9.5px !important; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; padding: 10px 15px; border-radius: 8px; color: white; background: var(--forest-900); box-shadow: var(--shadow-lg); font-size: 11px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--red); }

.loading-state { padding-top: 55px; }
.loading-line, .loading-grid i, .loading-panel { background: linear-gradient(90deg, #12202c 25%, #182a38 50%, #12202c 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.loading-line { width: 220px; height: 25px; border-radius: 6px; margin-bottom: 25px; }
.loading-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; }
.loading-grid i { height: 130px; border-radius: 11px; }
.loading-panel { height: 340px; margin-top: 22px; border-radius: 11px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .overview-grid, .billing-grid { grid-template-columns: 1fr; }
  .creative-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 780px) {
  :root { --sidebar: 270px; }
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 29; background: rgba(3,9,14,.65); display: none; }
  .sidebar-backdrop.open { display: block; }
  .workspace { margin-left: 0; }
  .sidebar-close, .menu-button { display: inline-grid !important; }
  .sidebar-close { color: #8fa5b5; }
  .topbar { height: 70px; padding: 0 17px; }
  .topbar .button-secondary { width: 37px; padding: 0; font-size: 0; }
  .topbar .button-secondary .refresh-symbol { font-size: 16px; }
  .view, .loading-state { padding: 25px 17px 55px; }
  .connection-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .metric-grid, .inventory-summary { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 116px; padding: 15px; }
  .metric-value { font-size: 22px; }
  .creative-grid { grid-template-columns: 1fr; }
  .content-head { display: block; }
  .content-head .button { margin-top: 14px; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .toolbar-filters { overflow-x: auto; }
  .billing-banner { grid-template-columns: 1fr; }
  .detail-metrics { grid-template-columns: 1fr 1fr; }
  .detail-list li { grid-template-columns: 100px 1fr; }
  .live-status { display: none; }
  .auth-card { padding: 32px 23px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
