:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf4ff;
  background: #06101c;
  font-synthesis: none;
  --bg: #06101c;
  --panel: rgba(10, 22, 38, .86);
  --panel-2: rgba(13, 28, 47, .92);
  --line: rgba(255,255,255,.085);
  --muted: #7890ab;
  --text: #edf4ff;
  --green: #77ecaa;
  --amber: #f1c873;
  --red: #ff8d8d;
  --blue: #88b9ff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 20% -10%, #162b46 0, #07121f 32%, #040a12 100%); color: var(--text); }
button,input,select { font: inherit; }
button,a,select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.eyebrow { display: inline-block; color: #7f9abd; font-size: 10px; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* auth */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-card { width: min(460px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, rgba(13,29,49,.96), rgba(6,15,27,.95)); box-shadow: 0 36px 100px rgba(0,0,0,.45); }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 26px; border-radius: 15px; background: #eaf3ff; color: #07111e; font-weight: 950; letter-spacing: -.04em; }
.auth-card h1 { margin: 8px 0 10px; font-size: clamp(32px, 8vw, 50px); line-height: .98; letter-spacing: -.045em; }
.auth-card p { margin: 0 0 24px; color: #91a5bd; line-height: 1.7; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 7px; color: #9eb0c6; font-size: 12px; font-weight: 700; }
.auth-form input { width: 100%; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; padding: 12px 13px; background: #06101c; color: #fff; outline: none; }
.auth-form input:focus { border-color: rgba(136,185,255,.65); box-shadow: 0 0 0 3px rgba(136,185,255,.1); }
.auth-form button, .topbar button { appearance: none; border: 0; border-radius: 12px; padding: 12px 15px; background: #eaf3ff; color: #07111e; font-weight: 850; cursor: pointer; }
.back-link { display: inline-block; margin-top: 20px; color: #7791ae; font-size: 13px; text-decoration: none; }
.message { margin: 0 0 18px; padding: 11px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.message--error { border: 1px solid rgba(255,141,141,.25); background: rgba(255,141,141,.08); color: #ffc1c1; }
.message--success { border: 1px solid rgba(119,236,170,.24); background: rgba(119,236,170,.08); color: #aef5ca; }

/* layout */
.dashboard-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; border-right: 1px solid var(--line); background: rgba(4,10,18,.86); backdrop-filter: blur(18px); }
.sidebar__brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 32px; text-decoration: none; }
.sidebar__brand span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #eaf3ff; color: #07111e; font-size: 12px; font-weight: 950; }
.sidebar__brand strong { font-size: 15px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { padding: 10px 12px; border-radius: 10px; color: #7990aa; font-size: 13px; font-weight: 750; text-decoration: none; }
.sidebar nav a:hover, .sidebar nav a.is-active { background: rgba(136,185,255,.09); color: #e7f1ff; }
.sidebar__footer { margin-top: auto; display: grid; gap: 8px; }
.sidebar__footer > a, .sidebar__footer button { width: 100%; display: block; appearance: none; border: 0; border-radius: 10px; padding: 10px 12px; background: transparent; color: #7088a3; font-size: 12px; text-align: left; text-decoration: none; cursor: pointer; }
.sidebar__footer > a:hover, .sidebar__footer button:hover { background: rgba(255,255,255,.05); color: #d9e7f8; }
.dashboard-main { width: min(1440px, 100%); padding: 36px 40px 70px; overflow: hidden; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.topbar h1 { margin: 6px 0 0; font-size: clamp(30px, 4vw, 52px); letter-spacing: -.045em; line-height: 1; }
.topbar__actions { display: flex; gap: 8px; }
.topbar select { min-width: 155px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 35px 10px 12px; background: #0a1727; color: #dce8f6; outline: none; }
.topbar button { padding: 10px 14px; }

/* metrics */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(13,29,49,.86), rgba(7,17,30,.82)); }
.metric span { display: block; color: #718aa6; font-size: 10px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.metric strong { display: block; margin: 8px 0 5px; font-size: clamp(24px, 3vw, 35px); letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric small { display: block; color: #607892; font-size: 11px; }
.metric--positive strong { color: var(--green); }
.metric--danger strong { color: #ffadad; }

.dashboard-grid { display: grid; gap: 16px; margin: 16px 0; }
.dashboard-grid--two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: rgba(7,16,28,.82); overflow: hidden; }
.panel + .panel { }
.panel--table { margin-top: 16px; }
.panel__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.055); }
.panel__header h2 { margin: 5px 0 0; font-size: 19px; letter-spacing: -.025em; }
.panel__header .muted { font-size: 11px; }
.rank-list { padding: 8px 12px 14px; }
.rank-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px 8px; border-bottom: 1px solid rgba(255,255,255,.045); }
.rank-row:last-child { border-bottom: 0; }
.rank-row__main { min-width: 0; }
.rank-row__title { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rank-row__title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.rank-row__title span { color: #738ba6; font-size: 11px; }
.rank-row__track { height: 4px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.rank-row__track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #78b0ff, #77ecaa); }
.rank-row__meta { color: #7d94ad; font-size: 10px; text-align: right; }
.skeleton-row { height: 48px; margin: 8px; border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.065), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* tables */
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.045); text-align: left; vertical-align: middle; }
th { color: #617b98; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
td { color: #c8d7e8; font-size: 12px; }
tbody tr:hover { background: rgba(136,185,255,.035); }
.session-id { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "SFMono-Regular", Consolas, monospace; color: #9cb5d2; }
.status-pill { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.055); color: #a9bdd3; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.status-pill[data-status="fill"] { background: rgba(119,236,170,.1); color: #8ff1b7; }
.status-pill[data-status="no-fill"] { background: rgba(241,200,115,.1); color: #f1c873; }
.status-pill[data-status="error"] { background: rgba(255,141,141,.1); color: #ffabab; }
.view-session { appearance: none; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; padding: 6px 9px; background: rgba(255,255,255,.045); color: #b6c9df; cursor: pointer; }
.empty { padding: 28px 16px !important; color: #6f879f; text-align: center; }
.error-message { max-width: 480px; white-space: normal; color: #b8c8d9; line-height: 1.4; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.drawer.is-open { pointer-events: auto; opacity: 1; }
.drawer__backdrop { position: absolute; inset: 0; appearance: none; border: 0; background: rgba(0,0,0,.56); backdrop-filter: blur(4px); cursor: default; }
.drawer__panel { position: absolute; top: 0; right: 0; width: min(620px, 94vw); height: 100%; overflow: auto; border-left: 1px solid var(--line); background: #07111e; box-shadow: -30px 0 90px rgba(0,0,0,.38); transform: translateX(30px); transition: transform .2s ease; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px; border-bottom: 1px solid var(--line); background: rgba(7,17,30,.94); backdrop-filter: blur(16px); }
.drawer__header h2 { margin: 5px 0 0; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.drawer__header button { appearance: none; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: rgba(255,255,255,.04); color: #c5d5e7; cursor: pointer; }
.drawer__summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-stat { min-width: 0; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.035); }
.drawer-stat span { display: block; margin-bottom: 5px; color: #657f9b; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.drawer-stat strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.timeline { padding: 12px 20px 30px; }
.timeline-row { display: grid; grid-template-columns: 56px 12px minmax(0,1fr); gap: 10px; align-items: start; padding: 8px 0; }
.timeline-row__time { padding-top: 2px; color: #637b95; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.timeline-row__dot { width: 8px; height: 8px; margin-top: 4px; border: 2px solid #78b0ff; border-radius: 50%; background: #07111e; box-shadow: 0 0 0 3px rgba(120,176,255,.08); }
.timeline-row__content { min-width: 0; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.04); }
.timeline-row__content strong { display: block; color: #d6e4f4; font-size: 12px; }
.timeline-row__content code { display: block; margin-top: 5px; color: #7891ac; font-size: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid--two { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: block; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar__brand { margin: 0 0 12px; }
  .sidebar nav { display: flex; gap: 6px; overflow: auto; }
  .sidebar nav a { white-space: nowrap; }
  .sidebar__footer { display: none; }
  .dashboard-main { padding: 24px 14px 50px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar__actions { width: 100%; }
  .topbar select { flex: 1; min-width: 0; }
  .metric-grid { gap: 8px; }
  .metric { padding: 14px; }
  .drawer__summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .auth-shell { padding: 14px; }
  .auth-card { padding: 24px 18px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric strong { font-size: 24px; }
  .metric small { font-size: 10px; }
}

/* v0.8 dashboard security + adops */
.dashboard-message { position: relative; margin: 0 0 18px; transition: opacity .35s ease, transform .35s ease; }
.dashboard-message.is-fading { opacity: .35; transform: translateY(-2px); }
.user-mini { display: grid; gap: 2px; margin-bottom: 6px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.055); border-radius: 10px; background: rgba(255,255,255,.025); }
.user-mini span { color: #607892; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.user-mini strong { overflow: hidden; text-overflow: ellipsis; color: #cbd9e9; font-size: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 11px; background: #0a1727; color: #cbd9e9; }
.user-chip > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(136,185,255,.12); color: #a9ccff; font-size: 11px; font-weight: 950; }
.user-chip strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.dashboard-grid--health { grid-template-columns: 1.35fr .9fr; }
.dashboard-grid--three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.funnel { display: grid; gap: 12px; padding: 17px 18px 20px; }
.funnel-row { display: grid; gap: 7px; }
.funnel-row__label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.funnel-row__label strong { color: #d5e3f2; font-size: 12px; }
.funnel-row__label span { color: #6d86a2; font-size: 10px; }
.funnel-row__track { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.055); }
.funnel-row__track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6ca9ff, #76e5a7); box-shadow: 0 0 18px rgba(108,169,255,.12); }
.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: rgba(255,255,255,.055); }
.health-grid > div { min-width: 0; padding: 18px; background: #07111e; }
.health-grid span { display: block; color: #718aa6; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.health-grid strong { display: block; margin: 7px 0 5px; font-size: 23px; letter-spacing: -.035em; }
.health-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #607892; font-size: 10px; }
.account-panel { margin-top: 16px; }
.security-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid rgba(119,236,170,.16); border-radius: 999px; background: rgba(119,236,170,.06); color: #8be9b2; font-size: 10px; font-weight: 800; }
.account-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(320px,1.1fr); gap: 34px; padding: 24px; }
.account-copy h3 { margin: 7px 0 10px; font-size: 27px; letter-spacing: -.035em; }
.account-copy p { max-width: 600px; margin: 0; color: #8399b2; font-size: 13px; line-height: 1.7; }
.account-copy code { color: #a9c8ed; }
.security-note { display: grid; gap: 4px; margin-top: 20px; padding: 13px 14px; border: 1px solid rgba(136,185,255,.09); border-radius: 12px; background: rgba(136,185,255,.035); }
.security-note strong { font-size: 11px; }
.security-note span { color: #7189a4; font-size: 11px; line-height: 1.55; }
.account-form { display: grid; gap: 12px; align-self: start; padding: 18px; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; background: rgba(255,255,255,.025); }
.account-form label { display: grid; gap: 6px; color: #8ea3bc; font-size: 11px; font-weight: 750; }
.account-form input { width: 100%; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 11px 12px; background: #06101c; color: #fff; outline: none; }
.account-form input:focus { border-color: rgba(136,185,255,.55); box-shadow: 0 0 0 3px rgba(136,185,255,.08); }
.account-form button { appearance: none; border: 0; border-radius: 10px; padding: 11px 13px; background: #eaf3ff; color: #07111e; font-weight: 850; cursor: pointer; }

@media (max-width: 1180px) {
  .dashboard-grid--three { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid--three .panel:last-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .dashboard-grid--health { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dashboard-grid--three { grid-template-columns: 1fr; }
  .dashboard-grid--three .panel:last-child { grid-column: auto; }
  .user-chip { display: none; }
  .health-grid { grid-template-columns: 1fr 1fr; }
  .security-badge { display: none; }
}
@media (max-width: 480px) {
  .health-grid { grid-template-columns: 1fr; }
  .account-grid { padding: 17px; }
}

/* v0.9 Publisher / AdOps upgrade */
.topbar__subtitle { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.topbar__actions--wrap { flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; }
.custom-range { display: flex; gap: 7px; align-items: flex-end; }
.custom-range[hidden] { display: none; }
.custom-range label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.custom-range input { min-width: 132px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: #0a1727; color: var(--text); outline: none; color-scheme: dark; }
.custom-range button { padding: 10px 13px; }
.metric { position: relative; }
.metric__compare { display: inline-flex; align-items: center; width: max-content; margin-top: 10px; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.045); color: var(--muted); font-size: 10px; font-style: normal; font-weight: 850; }
.metric__compare[data-tone="positive"] { background: rgba(119,236,170,.08); color: var(--green); }
.metric__compare[data-tone="negative"] { background: rgba(255,141,141,.08); color: var(--red); }
.metric__compare[data-tone="neutral"] { color: var(--muted); }
.trend-panel { margin-bottom: 16px; overflow: hidden; }
.panel__header--split { align-items: center; gap: 14px; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; }
.trend-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.legend-dot--requests { background: rgba(136,185,255,.65); }
.legend-dot--fill { background: var(--green); }
.trend-chart { width: 100%; min-height: 260px; overflow-x: auto; padding-top: 4px; }
.trend-chart svg { display: block; width: 100%; min-width: 680px; height: auto; overflow: visible; }
.trend-grid { stroke: rgba(255,255,255,.065); stroke-width: 1; }
.trend-bar { fill: rgba(136,185,255,.2); rx: 3; transition: fill .16s ease; }
.trend-bar:hover { fill: rgba(136,185,255,.42); }
.trend-line { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.trend-dot { fill: #0b1726; stroke: var(--green); stroke-width: 2; }
.trend-label, .trend-axis-label { fill: #7189a4; font-size: 9px; font-family: inherit; }
.dashboard-grid--two { grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom: 16px; }
.dashboard-grid--errors { grid-template-columns: minmax(290px,.75fr) minmax(0,1.65fr); margin-bottom: 16px; }
.panel-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: #6f859f; font-size: 11px; line-height: 1.6; }
.panel-note code { color: #9ab7da; }
.rank-row--error .rank-row__track i { background: linear-gradient(90deg, rgba(255,141,141,.48), rgba(255,141,141,.9)); }
.table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.table-tools input, .table-tools select { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #081522; color: #d9e7f7; outline: none; font-size: 11px; }
.table-tools input { width: 230px; }
.table-tools select { min-width: 115px; }
.table-main { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dce8f6; font-size: 11px; }
.table-sub { display: block; max-width: 220px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #667e99; font-size: 9px; }
.drawer__panel { width: min(720px, 92vw); }
.drawer__meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 0 22px 18px; }
.drawer__meta > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.drawer__meta span { display: block; margin-bottom: 5px; color: #637b96; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.drawer__meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d8e5f5; font-size: 11px; font-weight: 700; }
.timeline-toolbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 22px 14px; border-bottom: 1px solid var(--line); }
.timeline-toolbar button { appearance: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: transparent; color: #7189a4; font-size: 10px; font-weight: 800; cursor: pointer; }
.timeline-toolbar button:hover, .timeline-toolbar button.is-active { border-color: rgba(136,185,255,.28); background: rgba(136,185,255,.09); color: #deebf9; }
.health-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }

@media (max-width: 1100px) {
  .dashboard-grid--errors, .dashboard-grid--two { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar__actions--wrap { justify-content: flex-start; width: 100%; }
}
@media (max-width: 760px) {
  .custom-range { width: 100%; display: grid; grid-template-columns: 1fr 1fr auto; }
  .custom-range[hidden] { display: none; }
  .custom-range input { min-width: 0; width: 100%; }
  .health-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .table-tools { width: 100%; justify-content: flex-start; }
  .table-tools input { width: min(100%, 260px); }
  .drawer__meta { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .custom-range { grid-template-columns: 1fr 1fr; }
  .custom-range button { grid-column: 1 / -1; }
  .health-grid { grid-template-columns: 1fr; }
}

/* v1.0 inventory */
.inventory-main { max-width: 1500px; }
.inventory-back { border:1px solid var(--line); border-radius:10px; padding:10px 13px; color:#a8bdd5; text-decoration:none; font-size:11px; font-weight:800; }
.inventory-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.inventory-forms { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:16px; }
.inventory-form form { display:grid; gap:10px; }
.inventory-form label { display:grid; gap:6px; color:#7189a4; font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.inventory-form input,.inventory-form select { width:100%; border:1px solid var(--line); border-radius:9px; padding:10px 11px; background:#081522; color:#d9e7f7; outline:none; }
.inventory-form button,.inline-form button { cursor:pointer; }
.inventory-table { margin-bottom:16px; }
.inventory-table code { color:#9ab7da; font-size:10px; }
.inline-form { margin:0; }
.inventory-code pre { overflow:auto; margin:0; padding:16px; border:1px solid var(--line); border-radius:12px; background:#07131f; color:#b8cae0; line-height:1.55; }
@media(max-width:1100px){.inventory-forms{grid-template-columns:1fr}.inventory-stats{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:640px){.inventory-stats{grid-template-columns:1fr}}
