:root {
  --stok-background: #f5f7ff;
  --stok-background-deep: #edf1ff;
  --stok-surface: #ffffff;
  --stok-glass: rgba(255, 255, 255, 0.76);
  --stok-glass-strong: rgba(255, 255, 255, 0.92);
  --stok-glass-muted: rgba(246, 248, 255, 0.76);
  --stok-text: #17213b;
  --stok-muted: #707b98;
  --stok-subtle: #9aa4bd;
  --stok-border: rgba(104, 119, 174, 0.18);
  --stok-border-strong: rgba(92, 105, 165, 0.3);
  --stok-blue: #4d6df3;
  --stok-purple: #7657e9;
  --stok-teal: #22b9ad;
  --stok-success: #189c72;
  --stok-success-soft: #e4f8f1;
  --stok-warning: #c67b1f;
  --stok-warning-soft: #fff4df;
  --stok-danger: #d24c67;
  --stok-danger-soft: #ffebf0;
  --stok-info-soft: #eaf0ff;
  --stok-gradient-primary: linear-gradient(135deg, #4d75f4 0%, #7657e9 56%, #28b9b1 125%);
  --stok-gradient-hero: linear-gradient(142deg, rgba(98, 116, 245, 0.98) 0%, rgba(117, 84, 231, 0.96) 54%, rgba(39, 183, 177, 0.92) 118%);
  --stok-gradient-soft: linear-gradient(135deg, rgba(227, 234, 255, 0.9), rgba(240, 229, 255, 0.86) 56%, rgba(220, 249, 246, 0.88));
  --stok-gradient-canvas:
    radial-gradient(circle at 12% 8%, rgba(149, 174, 255, 0.27), transparent 30%),
    radial-gradient(circle at 94% 26%, rgba(196, 157, 255, 0.2), transparent 28%),
    radial-gradient(circle at 30% 90%, rgba(94, 223, 210, 0.15), transparent 35%),
    #f5f7ff;
  --stok-radius-sm: 10px;
  --stok-radius-md: 14px;
  --stok-radius-lg: 18px;
  --stok-radius-xl: 24px;
  --stok-radius-2xl: 28px;
  --stok-radius-pill: 999px;
  --stok-shadow-soft: 0 10px 28px rgba(48, 61, 115, 0.08);
  --stok-shadow-card: 0 18px 46px rgba(45, 57, 112, 0.11);
  --stok-shadow-lifted: 0 24px 58px rgba(63, 64, 144, 0.19);
  --stok-font-ui: Inter, "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
  font-family: var(--stok-font-ui);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--stok-background);
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--stok-gradient-canvas);
  background-attachment: fixed;
  color: var(--stok-text);
  line-height: 1.45;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

body::before {
  width: 340px;
  height: 340px;
  top: -160px;
  right: 8%;
  background: rgba(117, 87, 233, 0.09);
}

body::after {
  width: 280px;
  height: 280px;
  left: -120px;
  bottom: -90px;
  background: rgba(34, 185, 173, 0.09);
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(77, 109, 243, 0.25);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--stok-text);
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 5px;
  font-size: 1.25rem;
  line-height: 1.15;
}

h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.neo-glass,
.neo-card {
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: var(--stok-glass);
  box-shadow: var(--stok-shadow-card);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.neo-card {
  border-radius: var(--stok-radius-xl);
}

.eyebrow,
.panel-kicker,
.summary-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--stok-blue);
}

.eyebrow.light {
  color: rgba(255, 255, 255, 0.72);
}

.panel-kicker {
  color: var(--stok-purple);
  margin-bottom: 3px;
}

.muted {
  color: var(--stok-muted);
}

.error {
  min-height: 21px;
  margin: 12px 0 0;
  color: var(--stok-danger);
  font-size: 13px;
  font-weight: 700;
}

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

.brand-lockup > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-lockup strong {
  color: var(--stok-text);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-lockup span:last-child {
  color: var(--stok-muted);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 15px;
  background: var(--stok-gradient-primary);
  box-shadow: 0 10px 22px rgba(77, 109, 243, 0.24);
  color: #fff;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-size: 20px;
}

.login-view {
  display: grid;
  min-height: calc(100vh - 48px);
  place-items: center;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  width: min(1040px, 100%);
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--stok-shadow-lifted);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 610px;
  overflow: hidden;
  padding: 38px;
  background: var(--stok-gradient-hero);
  color: #fff;
}

.login-hero .brand-lockup strong,
.login-hero .brand-lockup span:last-child {
  color: #fff;
}

.login-hero .brand-lockup span:last-child {
  color: rgba(255, 255, 255, 0.7);
}

.login-copy {
  position: relative;
  z-index: 2;
  max-width: 470px;
}

.login-copy h1 {
  margin: 10px 0 15px;
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  letter-spacing: -0.07em;
  line-height: 0.96;
}

.login-copy p:last-child {
  max-width: 430px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
  line-height: 1.65;
}

.login-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  pointer-events: none;
}

.orbit-one {
  width: 430px;
  height: 430px;
  top: -210px;
  right: -170px;
}

.orbit-two {
  width: 270px;
  height: 270px;
  top: -90px;
  right: -40px;
}

.hero-status-row {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-status-row span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--stok-radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.login-panel {
  align-self: center;
  margin: 36px;
  padding: 34px;
  border-radius: var(--stok-radius-2xl);
  background: rgba(255, 255, 255, 0.84);
}

.login-panel-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.login-panel-heading h2 {
  margin: 4px 0 0;
  font-size: 1.65rem;
}

.login-panel > .muted {
  margin-bottom: 24px;
}

label {
  display: grid;
  gap: 8px;
  margin: 17px 0;
  color: var(--stok-muted);
  font-size: 13px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--stok-border);
  border-radius: var(--stok-radius-md);
  background: rgba(255, 255, 255, 0.85);
  color: var(--stok-text);
  padding: 12px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover {
  border-color: var(--stok-border-strong);
  background: #fff;
}

input:focus {
  border-color: rgba(77, 109, 243, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(77, 109, 243, 0.09);
  outline: none;
}

input::placeholder {
  color: var(--stok-subtle);
}

.primary-button,
.logout-button {
  min-height: 46px;
  border-radius: var(--stok-radius-md);
  background: var(--stok-gradient-primary);
  color: #fff;
  font-weight: 850;
  padding: 12px 18px;
  box-shadow: 0 13px 28px rgba(77, 109, 243, 0.2);
}

.login-panel .primary-button {
  width: 100%;
  margin-top: 8px;
}

.dashboard-view {
  padding-top: 4px;
}

.home-header {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 26px;
  padding: 14px 0 18px;
}

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

.header-title h1 {
  margin: 4px 0 5px;
}

.header-title .muted {
  margin: 0;
  font-size: 13px;
}

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

button.secondary,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--stok-radius-md);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--stok-shadow-soft);
  color: var(--stok-text);
  font-weight: 800;
  backdrop-filter: blur(16px);
}

button.secondary:hover,
.icon-button:hover {
  background: #fff;
  transform: translateY(-1px);
}

.logout-button {
  min-height: 42px;
  padding: 10px 15px;
  box-shadow: 0 10px 22px rgba(77, 109, 243, 0.16);
}

.status-row {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  overflow-x: auto;
  padding: 2px 1px;
  scrollbar-width: none;
}

.status-row::-webkit-scrollbar {
  display: none;
}

.neo-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--stok-radius-pill);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px rgba(48, 61, 115, 0.06);
  color: var(--stok-muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.neo-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--stok-blue);
  box-shadow: 0 0 0 4px rgba(77, 109, 243, 0.1);
}

.neo-status.success i {
  background: var(--stok-success);
  box-shadow: 0 0 0 4px rgba(24, 156, 114, 0.1);
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-color: rgba(255, 255, 255, 0.38);
  border-radius: var(--stok-radius-2xl);
  background: var(--stok-gradient-hero);
  color: #fff;
}

.summary-card::before,
.summary-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.summary-card::before {
  width: 300px;
  height: 300px;
  top: -170px;
  right: -100px;
}

.summary-card::after {
  width: 180px;
  height: 180px;
  top: -90px;
  right: 45px;
}

.summary-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.summary-kicker {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.72);
}

.summary-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 1.55rem;
}

.summary-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
}

.metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.metric-card {
  position: relative;
  min-width: 0;
  min-height: 116px;
  padding: 48px 14px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.91);
  color: var(--stok-text);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 13px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--stok-info-soft);
  box-shadow: inset 0 0 0 1px rgba(77, 109, 243, 0.05);
}

.metric-card:nth-child(2)::before,
.metric-card:nth-child(6)::before {
  background: #f0eaff;
}

.metric-card:nth-child(3)::before,
.metric-card:nth-child(8)::before {
  background: #e2f8f5;
}

.metric-card:nth-child(4)::before,
.metric-card:nth-child(9)::before {
  background: var(--stok-warning-soft);
}

.metric-card:nth-child(5)::before,
.metric-card:nth-child(7)::before {
  background: var(--stok-success-soft);
}

.metric-card::after {
  content: "●";
  position: absolute;
  top: 15px;
  left: 22px;
  color: var(--stok-blue);
  font-size: 12px;
}

.metric-card:nth-child(2)::after,
.metric-card:nth-child(6)::after {
  color: var(--stok-purple);
}

.metric-card:nth-child(3)::after,
.metric-card:nth-child(8)::after {
  color: var(--stok-teal);
}

.metric-card:nth-child(4)::after,
.metric-card:nth-child(9)::after {
  color: var(--stok-warning);
}

.metric-card:nth-child(5)::after,
.metric-card:nth-child(7)::after {
  color: var(--stok-success);
}

.metric-card > span {
  display: block;
  overflow: hidden;
  color: var(--stok-muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card strong {
  display: block;
  margin: 4px 0 2px;
  overflow: hidden;
  color: var(--stok-text);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card small {
  display: block;
  overflow: hidden;
  color: var(--stok-subtle);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.72fr);
  gap: 16px;
  margin-top: 22px;
}

.section-heading,
.panel-heading,
.table-toolbar,
.dialog-header,
.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin: 0 2px 11px;
}

.section-heading h2 {
  margin: 4px 0 0;
}

.section-heading > .muted,
.panel-heading > .muted {
  max-width: 210px;
  margin: 2px 0 0;
  font-size: 11px;
  text-align: right;
}

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

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-heading {
  min-height: 48px;
}

.panel-heading h3 {
  margin-top: 2px;
}

.stock-panel {
  overflow: hidden;
  padding: 0;
}

.bars {
  display: grid;
  gap: 13px;
  margin-top: 17px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 115px) 1fr 34px;
  align-items: center;
  gap: 9px;
  color: var(--stok-muted);
  font-size: 11px;
  font-weight: 750;
}

.bar-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row > strong {
  color: var(--stok-text);
  font-size: 12px;
  text-align: right;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: var(--stok-radius-pill);
  background: rgba(104, 119, 174, 0.11);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--stok-gradient-primary);
  box-shadow: 0 3px 9px rgba(77, 109, 243, 0.18);
}

.stock-list {
  display: grid;
}

.stock-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--stok-border);
  background: transparent;
}

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

.stock-item > div {
  min-width: 0;
}

.stock-item strong {
  color: var(--stok-text);
  font-size: 13px;
}

.stock-item > strong:last-child {
  color: var(--stok-warning);
  font-size: 12px;
  white-space: nowrap;
}

.stock-item small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--stok-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: var(--stok-radius-pill);
  background: var(--stok-info-soft);
  color: var(--stok-blue);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.pill.danger {
  background: var(--stok-danger-soft);
  color: var(--stok-danger);
}

.pill.warn {
  background: var(--stok-warning-soft);
  color: var(--stok-warning);
}

.pill.ok {
  background: var(--stok-success-soft);
  color: var(--stok-success);
}

.empty {
  padding: 28px;
  color: var(--stok-muted);
  text-align: center;
  font-size: 13px;
}

.table-panel {
  margin-top: 16px;
  padding: 20px;
}

.table-toolbar {
  align-items: center;
  margin-bottom: 16px;
}

.table-toolbar h2 {
  margin: 4px 0 3px;
}

.table-toolbar p:last-child {
  margin-bottom: 0;
  font-size: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(390px, 100%);
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--stok-border);
  border-radius: var(--stok-radius-md);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.search-box > span {
  color: var(--stok-blue);
  font-size: 21px;
  line-height: 1;
}

.search-box input {
  min-height: 44px;
  padding: 9px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(104, 119, 174, 0.12);
  border-radius: var(--stok-radius-lg);
  background: rgba(255, 255, 255, 0.58);
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--stok-border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: rgba(237, 241, 255, 0.58);
  color: var(--stok-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--stok-text);
  font-size: 12px;
}

tbody tr {
  transition: background 150ms ease;
}

tbody tr:hover {
  background: rgba(234, 240, 255, 0.45);
}

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

td strong {
  color: var(--stok-text);
  font-weight: 850;
}

td small {
  display: block;
  margin-top: 3px;
  color: var(--stok-muted);
  font-size: 10px;
}

td button.secondary {
  min-height: 34px;
  padding: 7px 11px;
  box-shadow: none;
  color: var(--stok-blue);
}

dialog {
  width: min(1220px, calc(100% - 30px));
  max-height: 92vh;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--stok-radius-2xl);
  background: rgba(247, 249, 255, 0.95);
  box-shadow: 0 34px 90px rgba(35, 42, 88, 0.3);
  color: var(--stok-text);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

dialog::backdrop {
  background: rgba(26, 31, 54, 0.52);
  backdrop-filter: blur(8px);
}

.dialog-header {
  align-items: center;
  margin-bottom: 14px;
}

.dialog-header h2 {
  margin: 3px 0 0;
}

.detail-body {
  display: grid;
  gap: 14px;
  max-height: 74vh;
  overflow: auto;
  padding: 2px 4px 8px 0;
}

.detail-section,
.raw-json {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--stok-radius-xl);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--stok-shadow-soft);
}

.detail-heading {
  margin-bottom: 13px;
}

.detail-heading h3 {
  margin: 4px 0 0;
  font-size: 1.1rem;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.mini-metric,
.kv-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--stok-border);
  border-radius: var(--stok-radius-md);
  background: rgba(245, 247, 255, 0.82);
}

.mini-metric span,
.kv-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--stok-muted);
  font-size: 10px;
  font-weight: 750;
}

.mini-metric strong,
.kv-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--stok-text);
  font-size: 12px;
}

.mini-metric small {
  display: block;
  margin-top: 3px;
  color: var(--stok-muted);
  font-size: 9px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.user-agent {
  margin: 13px 0 0;
  color: var(--stok-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.detail-table-wrap {
  margin-top: 11px;
  overflow-x: auto;
  border: 1px solid var(--stok-border);
  border-radius: var(--stok-radius-lg);
}

.compact-table {
  min-width: 980px;
  background: rgba(255, 255, 255, 0.65);
}

.compact-table th,
.compact-table td {
  padding: 10px;
}

.product-table {
  min-width: 1120px;
}

.raw-json summary {
  cursor: pointer;
  color: var(--stok-text);
  font-weight: 850;
}

pre {
  max-height: 58vh;
  margin: 12px 0 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(104, 119, 174, 0.16);
  border-radius: var(--stok-radius-md);
  background: #18213a;
  color: #eaf0ff;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 1250px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .attention-column {
    min-width: 0;
  }

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

  .stock-item:nth-child(odd) {
    border-right: 1px solid var(--stok-border);
  }
}

@media (max-width: 980px) {
  .shell {
    width: min(100% - 24px, 1440px);
    padding-top: 12px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-hero {
    min-height: 330px;
  }

  .login-copy h1 {
    font-size: clamp(2.35rem, 8vw, 4rem);
  }

  .login-panel {
    margin: 22px;
  }

  .home-header {
    grid-template-columns: minmax(135px, auto) 1fr;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

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

@media (max-width: 700px) {
  .shell {
    width: min(100% - 16px, 1440px);
    padding-bottom: 24px;
  }

  .login-view {
    min-height: calc(100vh - 24px);
  }

  .login-shell {
    border-radius: 26px;
  }

  .login-hero {
    min-height: 290px;
    padding: 25px;
  }

  .login-copy p:last-child {
    font-size: 14px;
  }

  .login-panel {
    margin: 12px;
    padding: 24px;
  }

  .home-header {
    grid-template-columns: 1fr auto;
    gap: 13px;
  }

  .header-title {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .topbar-actions button {
    width: 100%;
    padding-inline: 9px;
  }

  .summary-card {
    padding: 18px;
  }

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

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

  .section-heading,
  .panel-heading,
  .table-toolbar,
  .detail-heading {
    flex-direction: column;
  }

  .section-heading > .muted,
  .panel-heading > .muted {
    max-width: none;
    text-align: left;
  }

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

  .stock-item:nth-child(odd) {
    border-right: 0;
  }

  .table-panel {
    padding: 14px;
  }

  .search-box {
    width: 100%;
  }

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

  dialog {
    width: calc(100% - 14px);
    padding: 14px;
  }
}

@media (max-width: 430px) {
  .hero-status-row {
    display: none;
  }

  .login-hero {
    min-height: 250px;
  }

  .login-copy h1 {
    font-size: 2.45rem;
  }

  .topbar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .logout-button {
    grid-column: 1 / -1;
  }

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

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

  .summary-heading h2 {
    font-size: 1.35rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .neo-card,
  .metric-card,
  .stock-item,
  tbody tr,
  button {
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  }

  .neo-card:hover {
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 20px 50px rgba(45, 57, 112, 0.14);
  }

  .metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(41, 52, 106, 0.12);
  }
}
