:root {
  color-scheme: dark;
  --bg: #05070b;
  --sidebar: rgba(7, 10, 15, 0.96);
  --panel: rgba(12, 17, 25, 0.9);
  --panel-strong: #111824;
  --panel-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f4f7fb;
  --muted: #8993a5;
  --muted-strong: #aeb7c7;
  --lime: #c8ff45;
  --cyan: #47d8ff;
  --violet: #8b6cff;
  --pink: #ff4778;
  --green: #52d99b;
  --yellow: #f4c84c;
  --red: #ff657d;
  --sidebar-width: 286px;
  --font-copy: "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", var(--font-copy);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-copy);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -4;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
  pointer-events: none;
}

body::after {
  position: fixed;
  z-index: -3;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 0.65px, transparent 0.65px);
  background-size: 4px 4px;
  content: "";
  opacity: 0.2;
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  border-radius: 9px;
  padding: 10px 14px;
  background: var(--lime);
  color: #071006;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.admin-aurora {
  position: fixed;
  z-index: -5;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(125px);
}

.aurora-violet {
  width: 610px;
  height: 610px;
  top: -310px;
  left: -120px;
  background: var(--violet);
  opacity: 0.18;
}

.aurora-cyan {
  width: 720px;
  height: 720px;
  top: 18%;
  right: -430px;
  background: var(--cyan);
  opacity: 0.1;
}

.aurora-lime {
  width: 420px;
  height: 420px;
  bottom: -260px;
  left: 36%;
  background: var(--lime);
  opacity: 0.06;
}

.boot-screen,
.access-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 32px;
}

.boot-screen {
  justify-items: center;
  text-align: center;
}

.boot-mark {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 26px;
  place-items: center;
  border: 1px solid rgba(71, 216, 255, 0.26);
  border-radius: 22px;
  background: rgba(9, 14, 21, 0.88);
  box-shadow: 0 24px 80px rgba(71, 216, 255, 0.12);
}

.boot-mark img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--lime);
  font: 700 10px/1.2 var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-kicker > span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(200, 255, 69, 0.72);
}

.boot-screen h1 {
  margin: 14px 0 28px;
  font: 600 clamp(28px, 5vw, 42px)/1.05 var(--font-display);
  letter-spacing: -0.045em;
}

.boot-progress {
  width: min(280px, 72vw);
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.boot-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--lime));
  animation: boot-slide 1.1s ease-in-out infinite alternate;
}

@keyframes boot-slide {
  to { transform: translateX(138%); }
}

.access-card {
  position: relative;
  width: min(620px, calc(100vw - 40px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(30px, 6vw, 56px);
  background:
    linear-gradient(145deg, rgba(139, 108, 255, 0.12), transparent 54%),
    rgba(9, 13, 20, 0.94);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}

.access-code {
  position: absolute;
  top: -26px;
  right: 18px;
  color: rgba(255, 255, 255, 0.035);
  font: 700 140px/1 var(--font-display);
}

.access-card h1 {
  position: relative;
  max-width: 470px;
  margin: 17px 0 15px;
  font: 600 clamp(33px, 6vw, 48px)/1.02 var(--font-display);
  letter-spacing: -0.05em;
}

.access-card > p:not(.section-kicker) {
  max-width: 460px;
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.admin-app {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 23px 15px 15px;
  background:
    linear-gradient(180deg, rgba(139, 108, 255, 0.055), transparent 30%),
    var(--sidebar);
  backdrop-filter: blur(18px);
}

.sidebar-heading {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
}

.admin-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.admin-brand img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(71, 216, 255, 0.18);
  border-radius: 11px;
  object-fit: contain;
  box-shadow: 0 0 26px rgba(71, 216, 255, 0.1);
}

.admin-brand > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-brand strong {
  overflow: hidden;
  font: 600 14px/1.1 var(--font-display);
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-brand small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.environment-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 18px 8px 15px;
  border: 1px solid rgba(200, 255, 69, 0.14);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(200, 255, 69, 0.035);
  color: rgba(227, 255, 164, 0.82);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.environment-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(200, 255, 69, 0.75);
}

.admin-nav {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 1px 20px;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  scrollbar-width: thin;
}

.nav-group-label {
  margin: 20px 12px 8px;
  color: #687184;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-item {
  display: grid;
  width: 100%;
  min-height: 43px;
  grid-template-columns: 19px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 10px;
  background: transparent;
  color: #8791a3;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  color: #e4eaf3;
}

.nav-item.is-active {
  border-color: rgba(200, 255, 69, 0.2);
  background:
    linear-gradient(90deg, rgba(200, 255, 69, 0.1), rgba(200, 255, 69, 0.025));
  color: #f3f8fb;
  box-shadow: inset 2px 0 0 var(--lime);
}

.nav-item svg,
.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.nav-item.is-active svg {
  color: var(--lime);
}

.nav-item > span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item > small {
  color: #5d6677;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nav-item.is-active > small {
  color: rgba(200, 255, 69, 0.67);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.admin-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.user-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(71, 216, 255, 0.31);
  border-radius: 10px;
  background: rgba(71, 216, 255, 0.07);
  color: var(--cyan);
  font: 700 11px/1 var(--font-display);
}

.user-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-copy strong,
.user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  font-size: 11px;
  font-weight: 700;
}

.user-copy small {
  color: var(--muted);
  font-size: 9px;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.sidebar-actions a,
.sidebar-actions button {
  display: grid;
  min-height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.sidebar-actions a:hover,
.sidebar-actions button:hover {
  border-color: rgba(71, 216, 255, 0.35);
  color: var(--text);
}

.admin-main {
  width: min(100%, 1680px);
  min-width: 0;
  padding: 0 clamp(24px, 3.7vw, 64px) 70px;
}

.admin-topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 11, 0.82);
  backdrop-filter: blur(18px);
}

.topbar-leading,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-leading {
  min-width: 0;
  gap: 13px;
}

.topbar-leading > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.topbar-context {
  margin: 0;
  color: #687184;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-leading strong {
  overflow: hidden;
  font: 600 16px/1.1 var(--font-display);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  gap: 8px;
}

.period-select select,
.compact-select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 34px 0 13px;
  background: #0a0f17;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-strong);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.icon-button:hover {
  border-color: rgba(200, 255, 69, 0.34);
  background: rgba(200, 255, 69, 0.05);
  color: var(--lime);
}

.refresh-button.is-loading svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.menu-button,
.sidebar-close {
  display: none;
}

.flash-message {
  position: sticky;
  z-index: 20;
  top: 92px;
  margin: 12px 0 -4px;
  border: 1px solid rgba(71, 216, 255, 0.26);
  border-radius: 10px;
  padding: 11px 14px;
  background: rgba(14, 34, 45, 0.96);
  color: #d8f8ff;
  font-size: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.flash-message.is-error {
  border-color: rgba(255, 101, 125, 0.35);
  background: rgba(50, 16, 25, 0.96);
  color: #ffdfe5;
}

.view-host {
  padding-top: clamp(30px, 4vw, 54px);
}

.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.view-copy {
  max-width: 720px;
}

.view-copy h1 {
  margin: 11px 0 9px;
  font: 600 clamp(31px, 4vw, 44px)/1.02 var(--font-display);
  letter-spacing: -0.045em;
}

.view-copy > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.view-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 15px;
  font-size: 11px;
  font-weight: 800;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button svg,
.mini-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-primary {
  background: var(--lime);
  color: #081004;
  box-shadow: 0 12px 28px rgba(200, 255, 69, 0.1);
}

.button-primary:hover:not(:disabled) {
  background: #d8ff79;
  box-shadow: 0 14px 34px rgba(200, 255, 69, 0.18);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  border-color: rgba(71, 216, 255, 0.38);
  background: rgba(71, 216, 255, 0.05);
}

.button-danger {
  border-color: rgba(255, 101, 125, 0.34);
  background: rgba(255, 101, 125, 0.1);
  color: #ffdce3;
}

.button-danger:hover:not(:disabled) {
  background: rgba(255, 101, 125, 0.17);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  position: relative;
  min-height: 138px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 19px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 55%),
    var(--panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.metric-card::after {
  position: absolute;
  right: -50px;
  bottom: -64px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--metric-color, var(--cyan));
  content: "";
  filter: blur(48px);
  opacity: 0.11;
}

.metric-card.is-lime { --metric-color: var(--lime); }
.metric-card.is-cyan { --metric-color: var(--cyan); }
.metric-card.is-violet { --metric-color: var(--violet); }
.metric-card.is-pink { --metric-color: var(--pink); }

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.metric-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--metric-color, var(--cyan)) 27%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--metric-color, var(--cyan)) 6%, transparent);
  color: var(--metric-color, var(--cyan));
  font: 700 11px/1 var(--font-display);
}

.metric-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 18px;
  font: 600 clamp(25px, 3vw, 33px)/1 var(--font-display);
  letter-spacing: -0.045em;
}

.metric-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: #737d8e;
  font-size: 10px;
}

.trend {
  color: var(--green);
  font-weight: 800;
}

.trend.is-negative {
  color: var(--red);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.panel-grid.is-balanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.12);
}

.panel-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 17px 20px;
}

.panel-title {
  min-width: 0;
}

.panel-title p {
  margin: 0 0 5px;
  color: var(--lime);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.panel-title h2 {
  margin: 0;
  font: 600 17px/1.18 var(--font-display);
  letter-spacing: -0.025em;
}

.panel-title small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.panel-action {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
}

.panel-action:hover {
  color: #a8efff;
}

.panel-body {
  padding: 20px;
}

.panel-body.no-padding {
  padding: 0;
}

.chart {
  position: relative;
  display: flex;
  min-height: 252px;
  align-items: flex-end;
  gap: clamp(7px, 1.2vw, 15px);
  padding: 34px 8px 28px;
}

.chart::before {
  position: absolute;
  inset: 34px 8px 28px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 52px);
  content: "";
  pointer-events: none;
}

.chart-column {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 5px;
  height: 188px;
  flex: 1 1 0;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: min(28px, 72%);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--lime), rgba(71, 216, 255, 0.68));
  box-shadow: 0 0 22px rgba(200, 255, 69, 0.12);
  transition: filter 0.18s ease;
}

.chart-column:hover .chart-bar {
  filter: brightness(1.22);
}

.chart-column > span {
  position: absolute;
  right: 50%;
  bottom: -21px;
  color: #6f7889;
  font-size: 8px;
  transform: translateX(50%);
  white-space: nowrap;
}

.chart-column > strong {
  position: absolute;
  z-index: 4;
  bottom: calc(var(--height, 0%) + 8px);
  left: 50%;
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 5px 7px;
  background: #080c12;
  color: var(--text);
  font-size: 9px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.chart-column:hover > strong {
  display: block;
}

.insight-list,
.rank-list,
.timeline-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.insight-item:last-child {
  border-bottom: 0;
}

.insight-mark {
  width: 8px;
  height: 36px;
  border-radius: 99px;
  background: var(--item-color, var(--cyan));
  box-shadow: 0 0 14px color-mix(in srgb, var(--item-color, var(--cyan)) 25%, transparent);
}

.insight-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.insight-copy strong,
.insight-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-copy strong {
  font-size: 11px;
}

.insight-copy small {
  color: var(--muted);
  font-size: 9px;
}

.insight-value {
  color: var(--muted-strong);
  font: 600 14px/1 var(--font-display);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.search-control {
  position: relative;
  min-width: min(300px, 100%);
  flex: 1 1 320px;
}

.search-control svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #697385;
  stroke-linecap: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-control input {
  padding-left: 40px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field > span {
  color: #cdd4df;
  font-size: 10px;
  font-weight: 800;
}

.field small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.toolbar .field {
  flex: 0 1 170px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #080d14;
  color: var(--text);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 98px;
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: #596273;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(71, 216, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(71, 216, 255, 0.08);
  outline: none;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  scrollbar-width: thin;
}

.data-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.data-table th {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  color: #697385;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  padding: 14px 16px;
  color: #ccd4df;
  font-size: 11px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.16s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.cell-primary,
.cell-stack {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cell-primary strong,
.cell-stack strong {
  overflow: hidden;
  color: #f0f4f9;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-primary small,
.cell-stack small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-cell {
  display: flex;
  min-width: 200px;
  align-items: center;
  gap: 10px;
}

.customer-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(139, 108, 255, 0.28);
  border-radius: 10px;
  background: rgba(139, 108, 255, 0.07);
  color: #c7b9ff;
  font: 700 10px/1 var(--font-display);
}

.product-cell {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 9px;
}

.product-cell img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: contain;
  background: #080d13;
}

.status-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--chip-line, var(--line));
  border-radius: 999px;
  padding: 0 8px;
  background: var(--chip-bg, rgba(255, 255, 255, 0.03));
  color: var(--chip-color, var(--muted-strong));
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-chip.is-active,
.status-chip.is-paid,
.status-chip.is-approved,
.status-chip.is-available,
.status-chip.is-consumed,
.status-chip.is-completed {
  --chip-line: rgba(82, 217, 155, 0.24);
  --chip-bg: rgba(82, 217, 155, 0.06);
  --chip-color: var(--green);
}

.status-chip.is-pending,
.status-chip.is-processing,
.status-chip.is-reserved,
.status-chip.is-paused,
.status-chip.is-created {
  --chip-line: rgba(244, 200, 76, 0.24);
  --chip-bg: rgba(244, 200, 76, 0.06);
  --chip-color: var(--yellow);
}

.status-chip.is-inactive,
.status-chip.is-disabled,
.status-chip.is-revoked,
.status-chip.is-failed,
.status-chip.is-void,
.status-chip.is-voided,
.status-chip.is-canceled,
.status-chip.is-cancelled,
.status-chip.is-expired {
  --chip-line: rgba(255, 101, 125, 0.24);
  --chip-bg: rgba(255, 101, 125, 0.06);
  --chip-color: var(--red);
}

.status-chip.is-affiliate {
  --chip-line: rgba(139, 108, 255, 0.28);
  --chip-bg: rgba(139, 108, 255, 0.07);
  --chip-color: #baaaff;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.mini-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 9px;
  background: transparent;
  color: #b8c2cf;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-button:hover {
  border-color: rgba(71, 216, 255, 0.4);
  background: rgba(71, 216, 255, 0.05);
  color: #e7faff;
}

.mini-button.is-positive:hover {
  border-color: rgba(82, 217, 155, 0.38);
  background: rgba(82, 217, 155, 0.06);
  color: #cffff0;
}

.mini-button.is-danger:hover {
  border-color: rgba(255, 101, 125, 0.38);
  background: rgba(255, 101, 125, 0.06);
  color: #ffd9df;
}

.pagination {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  color: var(--muted);
  font-size: 10px;
}

.pagination-actions {
  display: flex;
  gap: 6px;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stock-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
  background:
    radial-gradient(circle at 95% 5%, rgba(71, 216, 255, 0.08), transparent 35%),
    rgba(255, 255, 255, 0.018);
}

.stock-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stock-product {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.stock-product img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  background: #070b11;
  object-fit: contain;
}

.stock-product div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.stock-product strong {
  font: 600 15px/1.15 var(--font-display);
}

.stock-product small {
  color: var(--muted);
  font-size: 9px;
}

.stock-count {
  font: 600 30px/1 var(--font-display);
  letter-spacing: -0.045em;
}

.stock-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.stock-meta span {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #0b1018;
}

.stock-meta small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.stock-meta strong {
  font-size: 13px;
}

.stock-level {
  height: 5px;
  overflow: hidden;
  margin-top: 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.stock-level span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.stock-level.is-low span {
  background: var(--red);
}

.affiliate-link {
  display: flex;
  max-width: 290px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.025);
}

.affiliate-link code {
  min-width: 0;
  overflow: hidden;
  color: #b8eaff;
  font: 600 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-icon-button {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: rgba(71, 216, 255, 0.08);
  color: var(--cyan);
}

.copy-icon-button svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.split-tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.tab-button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.tab-button.is-active {
  background: rgba(200, 255, 69, 0.1);
  color: var(--lime);
}

.rank-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 2fr) auto;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-name {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.rank-name strong,
.rank-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-name strong {
  font-size: 11px;
}

.rank-name small {
  color: var(--muted);
  font-size: 9px;
}

.rank-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

.rank-value {
  color: var(--muted-strong);
  font: 600 12px/1 var(--font-display);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.catalog-product {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.catalog-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.catalog-heading img {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  background: #070b11;
  object-fit: contain;
}

.catalog-heading div {
  display: grid;
  gap: 4px;
}

.catalog-heading strong {
  font: 600 17px/1.1 var(--font-display);
}

.catalog-heading small {
  color: var(--muted);
  font-size: 9px;
}

.plan-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.plan-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 76px 104px 94px auto;
  align-items: end;
  gap: 10px;
  padding: 14px 16px;
  background: #0b1018;
}

.plan-row .field > span {
  font-size: 8px;
}

.plan-row input {
  min-height: 36px;
  font-size: 10px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-form {
  display: grid;
  gap: 17px;
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.switch-field {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
}

.switch-field > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-field > input + span {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease;
}

.switch-field > input + span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8d96a5;
  content: "";
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.switch-field > input:checked + span {
  background: rgba(200, 255, 69, 0.18);
}

.switch-field > input:checked + span::after {
  background: var(--lime);
  transform: translateX(18px);
}

.switch-field > span:last-child {
  display: grid;
  gap: 3px;
}

.switch-field strong {
  font-size: 11px;
}

.switch-field small {
  color: var(--muted);
  font-size: 9px;
}

.audit-entry {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 15px 0;
}

.audit-entry:not(:last-child)::after {
  position: absolute;
  top: 30px;
  bottom: -8px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.audit-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 2px solid #0c1119;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(71, 216, 255, 0.22);
}

.audit-copy {
  display: grid;
  gap: 4px;
}

.audit-copy strong {
  color: #e7ecf3;
  font-size: 11px;
}

.audit-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.audit-meta {
  color: #727c8e;
  font-size: 8px;
  text-align: right;
  white-space: nowrap;
}

.view-loading {
  display: grid;
  gap: 18px;
}

.skeleton,
.skeleton-grid span {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.skeleton::after,
.skeleton-grid span::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.45s ease-in-out infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.skeleton-title {
  width: min(390px, 70%);
  height: 72px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.skeleton-grid span {
  height: 138px;
}

.skeleton-panel {
  height: 340px;
}

.state-panel {
  display: grid;
  min-height: 330px;
  place-content: center;
  justify-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  padding: 40px 24px;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
}

.state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(71, 216, 255, 0.2);
  border-radius: 16px;
  background: rgba(71, 216, 255, 0.05);
  color: var(--cyan);
  font: 600 17px/1 var(--font-display);
}

.state-panel h2 {
  margin: 19px 0 8px;
  font: 600 20px/1.15 var(--font-display);
}

.state-panel p {
  max-width: 430px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.empty-inline {
  padding: 30px 20px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.mobile-backdrop {
  position: fixed;
  z-index: 38;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(3px);
}

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgba(1, 3, 6, 0.75);
  backdrop-filter: blur(5px);
}

.drawer,
.modal {
  overflow: visible;
  border: 0;
  padding: 0;
  background: transparent;
}

.drawer {
  width: min(530px, 100%);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0 0 0 auto;
}

.drawer-shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 90% 10%, rgba(139, 108, 255, 0.09), transparent 32%),
    #090e15;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.42);
}

.modal {
  width: min(620px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
}

.modal-compact {
  width: min(520px, calc(100% - 32px));
}

.modal-shell {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(139, 108, 255, 0.07), transparent 45%),
    #0a0f17;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.dialog-header {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.dialog-header h2 {
  margin: 8px 0 0;
  font: 600 20px/1.1 var(--font-display);
  letter-spacing: -0.035em;
}

.drawer-body,
.modal-body {
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
}

.drawer-body {
  min-height: 0;
}

.modal-body {
  display: grid;
  max-height: calc(100vh - 220px);
  gap: 16px;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 15px 20px;
}

.selected-customer {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(139, 108, 255, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(139, 108, 255, 0.05);
}

.form-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.form-status.is-error {
  color: #ff9bac;
}

.form-status.is-success {
  color: #82eeb8;
}

.confirm-copy {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

[data-confirm-reason-field][hidden],
[data-confirm-reference-field][hidden] {
  display: none;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.detail-hero .customer-avatar {
  width: 48px;
  height: 48px;
  font-size: 13px;
}

.detail-hero div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.detail-hero strong {
  font: 600 17px/1.1 var(--font-display);
}

.detail-hero small {
  color: var(--muted);
  font-size: 10px;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h3 {
  margin: 0 0 10px;
  color: #737d8e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.detail-grid > div {
  display: grid;
  gap: 5px;
  padding: 13px;
  background: #0b1119;
}

.detail-grid span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-grid strong {
  overflow-wrap: anywhere;
  font-size: 10px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.toast-region {
  position: fixed;
  z-index: 110;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(360px, calc(100% - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(82, 217, 155, 0.28);
  border-radius: 11px;
  padding: 12px 13px;
  background: rgba(10, 28, 22, 0.97);
  color: #e7fff4;
  font-size: 11px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  animation: toast-in 0.24s ease both;
}

.toast::before {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #05120c;
  content: "✓";
  font-size: 11px;
  font-weight: 900;
}

.toast.is-error {
  border-color: rgba(255, 101, 125, 0.3);
  background: rgba(43, 13, 20, 0.97);
  color: #ffe7eb;
}

.toast.is-error::before {
  background: var(--red);
  color: #20040a;
  content: "!";
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
}

.noscript-message {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 16px;
  margin: 0;
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 12px;
  background: #2a0d14;
}

@media (max-width: 1280px) {
  :root { --sidebar-width: 260px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1040px) {
  .panel-grid,
  .panel-grid.is-balanced,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .stock-grid {
    grid-template-columns: 1fr;
  }

  .plan-row {
    grid-template-columns: minmax(130px, 1fr) 72px 98px 88px auto;
  }
}

@media (max-width: 860px) {
  .admin-app {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(310px, calc(100% - 42px));
    height: 100%;
    border-right-color: var(--line-strong);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .menu-button,
  .sidebar-close {
    display: grid;
  }

  .admin-main {
    width: 100%;
    padding: 0 22px 54px;
  }

  .admin-topbar {
    min-height: 74px;
  }

  .view-host {
    padding-top: 30px;
  }

  .view-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawer {
    width: min(530px, calc(100% - 24px));
  }

  .drawer-shell {
    border-radius: 18px 0 0 18px;
  }
}

@media (max-width: 620px) {
  .admin-main {
    padding: 0 15px 44px;
  }

  .admin-topbar {
    min-height: 68px;
  }

  .topbar-context {
    display: none;
  }

  .period-select select {
    width: 42px;
    padding: 0;
    color: transparent;
  }

  .period-select {
    position: relative;
  }

  .period-select::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted-strong);
    content: "30d";
    font-size: 9px;
    font-weight: 800;
    pointer-events: none;
  }

  .period-select:has(select option[value="7"]:checked)::after { content: "7d"; }
  .period-select:has(select option[value="90"]:checked)::after { content: "90d"; }

  .view-copy h1 {
    font-size: 32px;
  }

  .view-header {
    gap: 19px;
    margin-bottom: 22px;
  }

  .view-actions .button {
    flex: 1 1 auto;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 126px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .chart {
    gap: 5px;
  }

  .chart-column:nth-child(even) > span {
    display: none;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .field,
  .search-control {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .stock-meta {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: minmax(100px, 1fr) auto;
  }

  .rank-bar {
    display: none;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .plan-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-row > .field:first-child {
    grid-column: 1 / -1;
  }

  .plan-row .mini-button {
    min-height: 36px;
    align-self: end;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination-actions {
    width: 100%;
  }

  .pagination-actions .mini-button {
    flex: 1;
  }

  .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .skeleton-grid span:nth-child(n + 3) {
    display: none;
  }

  .modal {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .dialog-header,
  .drawer-body,
  .modal-body,
  .dialog-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .dialog-footer .button {
    flex: 1;
  }
}

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