﻿:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f766e;
  --accent-strong: #0f5f59;
  --accent-soft: #e6f6f3;
  --blue: #2563eb;
  --amber: #b45309;
  --warn: #a16207;
  --danger: #b91c1c;
  --surface-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.06);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 38%, #eef3f5 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body:has(.login-view:not([hidden])),
body:has(.boot-view:not([hidden])) {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.shell[hidden] {
  display: none;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  height: 100vh;
  padding: 22px 20px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.88)),
    linear-gradient(180deg, #ffffff 0%, #f3f7f7 100%);
  box-shadow: 14px 0 34px rgba(15, 23, 42, 0.045);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: white;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.24);
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
}

.brand p,
.eyebrow,
.object-groups h2 {
  color: var(--muted);
  font-size: 12px;
}

.toolbar,
.top-actions,
.maintenance-upload-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-wrap,
select {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  box-shadow: var(--surface-shadow);
}

input,
select {
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  box-shadow: var(--surface-shadow);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--panel-soft);
  transform: translateY(-1px);
}

.icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.ghost-button {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--surface-shadow);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.ghost-button:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
  transform: translateY(-1px);
}

.object-groups {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 98, 84, 0.35) transparent;
}

.nav-section {
  display: grid;
  gap: 9px;
}

.section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.section-state {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav-section.collapsed .object-list {
  display: none;
}

.object-list {
  display: grid;
  gap: 10px;
}

.object-item {
  position: relative;
  display: grid;
  gap: 0;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.object-item::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.object-item:hover,
.object-item.active {
  border-color: var(--line);
  background: white;
}

.object-item:hover {
  transform: translateY(-1px);
}

.object-item.active {
  border-color: rgba(15, 118, 110, 0.28);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(37, 99, 235, 0.035)),
    #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.object-item.active::before {
  background: var(--accent);
}

.object-item.active .object-name {
  color: #0f2f2c;
}

.object-item.is-switching::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid rgba(15, 118, 110, 0.18);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: tabSwitchSpin 0.72s linear infinite;
}

.object-item.draggable {
  cursor: grab;
  padding-right: 34px;
}

.object-item.draggable::after {
  content: "⋮⋮";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 900;
  letter-spacing: -2px;
  opacity: 0.36;
}

.object-item.draggable:active {
  cursor: grabbing;
}

.object-list.drag-active .object-item {
  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease,
    opacity 0.12s ease;
}

.object-item.dragging {
  opacity: 0.52;
}

.object-item.drop-before {
  box-shadow: inset 0 3px 0 var(--accent);
}

.object-item.drop-after {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.object-name {
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  font-size: 14px;
}

.object-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  padding: 18px 36px 16px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.topbar h2 {
  margin-top: 5px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.current-user {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.boot-view,
.login-view {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  padding: clamp(32px, 6vw, 88px);
  background:
    linear-gradient(115deg, rgba(15, 23, 42, 0.035) 0 1px, transparent 1px 96px),
    linear-gradient(180deg, #fbfcfd 0%, #edf5f4 52%, #f8faf8 100%);
  overflow: hidden;
}

.boot-view::before,
.login-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.09), transparent 28%),
    linear-gradient(315deg, rgba(37, 99, 235, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0));
}

.boot-view::after,
.login-view::after {
  content: "";
  position: absolute;
  inset: 28px;
  z-index: -1;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.09), transparent 18%, transparent 82%, rgba(15, 118, 110, 0.07)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  pointer-events: none;
}

.auth-geometry {
  position: absolute;
  inset: 28px;
  z-index: -1;
  overflow: hidden;
  border-radius: 28px;
  pointer-events: none;
}

.auth-geometry::before,
.auth-geometry::after {
  content: "";
  position: absolute;
  inset: -18%;
}

.auth-geometry::before {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 118, 110, 0.032) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, rgba(37, 99, 235, 0.1), transparent 34%),
    radial-gradient(circle at 50% 48%, rgba(14, 165, 233, 0.08), transparent 48%);
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%;
  mask-image: radial-gradient(circle at 50% 50%, #000 0 64%, transparent 86%);
  opacity: 0.48;
  animation: authGridDrift 28s linear infinite;
}

.auth-geometry::after {
  background:
    linear-gradient(45deg, transparent 0 46%, rgba(37, 99, 235, 0.12) 46.3%, transparent 47.2% 100%),
    linear-gradient(-45deg, transparent 0 52%, rgba(14, 165, 233, 0.1) 52.3%, transparent 53.1% 100%),
    linear-gradient(90deg, transparent 0 34%, rgba(255, 255, 255, 0.5) 50%, transparent 66% 100%);
  opacity: 0.36;
  animation: authScan 10s ease-in-out infinite alternate;
}

.geo-panel {
  position: absolute;
  display: block;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.36) inset,
    0 0 42px rgba(37, 99, 235, 0.08);
  transform-origin: center;
}

.geo-panel-left {
  width: min(72vw, 1080px);
  height: min(72vw, 1080px);
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.22;
  animation: authDiamondOuter 16s ease-in-out infinite alternate;
}

.geo-panel-right {
  width: min(46vw, 700px);
  height: min(46vw, 700px);
  border-color: rgba(14, 165, 233, 0.28);
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.28;
  animation: authDiamondMiddle 13s ease-in-out infinite alternate;
}

.geo-panel-center {
  width: min(16vw, 250px);
  height: min(16vw, 250px);
  border: 0;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.58), rgba(37, 99, 235, 0.62) 54%, rgba(29, 78, 216, 0.48)),
    #2563eb;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.28;
  box-shadow:
    0 0 0 min(3vw, 44px) rgba(37, 99, 235, 0.08),
    0 0 0 min(6vw, 88px) rgba(14, 165, 233, 0.04),
    0 30px 90px rgba(37, 99, 235, 0.14);
  animation: authDiamondCore 11s ease-in-out infinite alternate;
}

.geo-panel-center::before,
.geo-panel-center::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(255, 255, 255, 0.68);
}

.geo-panel-center::after {
  inset: 34%;
  background: rgba(255, 255, 255, 0.38);
}

@keyframes authGridDrift {
  from {
    transform: translate3d(-18px, -14px, 0);
  }
  to {
    transform: translate3d(18px, 14px, 0);
  }
}

@keyframes authScan {
  from {
    transform: translateX(-6%) skewX(-8deg);
  }
  to {
    transform: translateX(6%) skewX(-8deg);
  }
}

@keyframes authDiamondOuter {
  from {
    transform: translate(-50%, -50%) rotate(45deg) scale(0.985);
    opacity: 0.38;
  }
  to {
    transform: translate(-50%, -50%) rotate(45deg) scale(1.035);
    opacity: 0.58;
  }
}

@keyframes authDiamondMiddle {
  from {
    transform: translate(-50%, -50%) rotate(45deg) scale(1.04);
    opacity: 0.46;
  }
  to {
    transform: translate(-50%, -50%) rotate(45deg) scale(0.98);
    opacity: 0.72;
  }
}

@keyframes authDiamondCore {
  from {
    transform: translate(-50%, -50%) rotate(45deg) scale(0.96);
    filter: hue-rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(45deg) scale(1.04);
    filter: hue-rotate(10deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-geometry::before,
  .auth-geometry::after,
  .geo-panel,
  .auth-gallery-halo {
    animation: none;
  }
}

.boot-view[hidden],
.login-view[hidden] {
  display: none;
}

.boot-card {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 12px 14px 12px 12px;
  border: 1px solid rgba(203, 213, 225, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(248, 250, 252, 0.38)),
    rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px) saturate(1.02);
  box-shadow:
    0 16px 42px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
  text-align: left;
  overflow: hidden;
}

.login-view {
  align-items: end;
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
  padding: clamp(18px, 2.8vh, 34px) clamp(24px, 5vw, 72px) clamp(22px, 3.8vh, 46px);
}

.login-view .auth-gallery {
  inset: 0;
  height: 100%;
}

.boot-card[hidden] {
  display: none !important;
}

.boot-card::before {
  content: none;
}

.boot-card::after {
  content: none;
}

.boot-card-head {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0;
}

.boot-logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0f172a, #0f766e);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.14);
}

.boot-kicker {
  display: none;
}

.boot-card h1 {
  display: none;
}

.boot-card p {
  margin: 4px 0 0;
  color: #475569;
}

.boot-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 8px 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #0f5f59;
  font-size: 12px;
  font-weight: 900;
}

.boot-status span {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 0 5px rgba(20, 184, 166, 0.12);
}

.boot-status b {
  font: inherit;
}

.boot-meta {
  display: none;
}

.boot-meta span {
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.login-card {
  position: relative;
  z-index: 3;
  display: grid;
  gap: clamp(10px, 1.35vh, 18px);
  width: min(430px, calc(100vw - 48px));
  margin: 0;
  padding: clamp(20px, 2.9vh, 28px) clamp(22px, 3vw, 32px) clamp(22px, 3vh, 30px);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.76)),
    rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(22px) saturate(1.12);
  box-shadow:
    0 30px 90px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0 0 1px rgba(148, 163, 184, 0.08);
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 0;
  width: 132px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #2563eb);
}

.login-brand {
  margin-bottom: 8px;
}

.login-brand .mark {
  border-radius: 8px;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.login-brand h1 {
  color: #071324;
  font-size: 22px;
  font-weight: 900;
}

.login-card label,
.user-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-card input,
.user-form input,
.user-form select {
  width: 100%;
}

.login-card button,
.user-form button,
.ops-head button {
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.18);
}

.file-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--surface-shadow);
}

.file-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.maintenance-upload-form button {
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.16);
}

.maintenance-upload-form .ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.maintenance-upload-form button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 16px 28px 24px;
  overflow: hidden;
}

.ops-center {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 38%),
    #fff;
  box-shadow: var(--shadow);
}

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

.ops-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

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

.ops-tile {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  min-height: 112px;
  padding: 13px;
  border: 1px solid #e0e7de;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.ops-tile > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.ops-tile strong {
  font-size: 14px;
}

.ops-tile p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.toolbar.dashboard-toolbar {
  justify-content: flex-end;
  margin-bottom: 0;
  padding: 0 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace.dashboard-mode {
  padding-top: 12px;
  background:
    radial-gradient(circle at 72% 0%, rgba(15, 118, 110, 0.08), transparent 25%),
    linear-gradient(180deg, #f8fafc 0%, #f3f6f8 100%);
}

.workspace.dashboard-mode .toolbar.dashboard-toolbar {
  padding-bottom: 4px;
}

.dashboard-plan {
  gap: 18px;
  padding: 4px 0 18px;
  background: transparent;
}

.plan-summary {
  display: block;
}

.plan-summary-main,
.plan-summary-card {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: #fff;
}

.plan-summary-main {
  display: grid;
  grid-template-columns: minmax(340px, 0.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 186px;
  padding: 26px 30px;
  background:
    radial-gradient(circle at 86% 8%, rgba(15, 118, 110, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f8fbfb 54%, #eef7f5 100%);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.plan-summary-title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.plan-summary-main::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.08), transparent 64%);
  pointer-events: none;
}

.plan-summary-main > * {
  position: relative;
  z-index: 1;
}

.plan-summary-main.is-risk {
  border-color: rgba(226, 232, 240, 0.95);
  background:
    radial-gradient(circle at 86% 8%, rgba(180, 83, 9, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #fffaf2 58%, #f8fafc 100%);
}

.plan-summary-main > span,
.plan-summary-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plan-summary-main > span,
.plan-summary-main p,
.plan-summary-main small {
  color: #64748b;
}

.plan-summary-main strong {
  max-width: 680px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.12;
}

.plan-summary-main p {
  max-width: 560px;
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.plan-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.plan-summary-metrics div {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 14px 15px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--surface-shadow);
}

.plan-summary-metrics b {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.plan-daily-metric-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) repeat(7, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.plan-daily-metric-date,
.plan-daily-metric-card {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--surface-shadow);
}

.plan-daily-metric-date small,
.plan-daily-metric-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.plan-daily-metric-date b,
.plan-daily-metric-card b {
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.plan-daily-metric-date em,
.plan-daily-metric-card em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.plan-summary-side {
  display: grid;
  min-width: 0;
}

.plan-summary-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 156px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #f8fbf8);
}

.plan-summary-card.is-risk {
  border-color: #dfe8dd;
  background: linear-gradient(180deg, #fff, #f8fbf8);
}

.plan-summary-card.is-good {
  border-color: #b8d7ce;
}

.plan-summary-card strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.22;
}

.plan-summary-card dl {
  display: grid;
  gap: 7px;
  margin: auto 0 0;
  padding-top: 10px;
  border-top: 1px solid #e7ede4;
}

.plan-summary-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.plan-summary-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-summary-card dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, max-content));
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.mini-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #ebefe8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8faf7);
}

.mini-stats b {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.mini-stats .muted {
  display: none;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 160px;
  height: 40px;
  padding-left: 12px;
}

.search-wrap input {
  width: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pager {
  display: flex;
  gap: 8px;
}

.status-line {
  min-height: 28px;
  color: var(--muted);
  font-size: 13px;
  padding: 0 2px;
}

.status-line.error {
  color: var(--danger);
}

.status-line.warn {
  color: var(--warn);
}

.table-wrap {
  flex: 1;
  min-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.sheet-view {
  flex: 1;
  min-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
  box-shadow: var(--shadow-soft);
  contain: layout paint;
}

.dashboard-shell {
  content-visibility: auto;
  contain-intrinsic-size: 1200px;
}

.dashboard-loading-shell {
  display: grid;
  gap: 18px;
  min-height: 460px;
  padding: 28px;
}

.dashboard-loading-hero,
.dashboard-loading-grid span,
.dashboard-loading-lines span {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 12px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 48%, rgba(255, 255, 255, 0) 100%),
    #eef4f3;
  background-size: 220% 100%;
  animation: dashboardSkeletonSweep 1.1s ease-in-out infinite;
}

.dashboard-loading-hero {
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 150px;
  padding: 22px;
}

.dashboard-loading-hero span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-loading-hero strong {
  color: var(--text);
  font-size: 26px;
}

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

.dashboard-loading-grid span {
  min-height: 92px;
}

.dashboard-loading-lines {
  display: grid;
  gap: 10px;
}

.dashboard-loading-lines span {
  min-height: 46px;
}

.hidden {
  display: none !important;
}

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

@keyframes dashboardSkeletonSweep {
  0% {
    background-position: 180% 0;
  }
  100% {
    background-position: -80% 0;
  }
}

.floating-table-head-wrap {
  position: fixed;
  z-index: 80;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
  pointer-events: none;
}

.auth-gallery {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.auth-gallery.ready {
  opacity: 1;
  transform: scale(1);
}

.auth-geometry:has(+ .auth-gallery.ready) .geo-panel {
  opacity: 0.04;
}

.auth-geometry:has(+ .auth-gallery.ready)::before,
.auth-geometry:has(+ .auth-gallery.ready)::after {
  opacity: 0.1;
}

.auth-gallery.ready + .boot-card,
.auth-gallery.ready + .login-card {
  box-shadow:
    0 24px 78px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0 0 1px rgba(148, 163, 184, 0.06);
}

.auth-gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.36) 20%, transparent 36%),
    linear-gradient(90deg, rgba(248, 250, 252, 0.9), transparent 24%, transparent 76%, rgba(248, 250, 252, 0.9)),
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), transparent 28%, transparent 72%, rgba(248, 250, 252, 0.88));
  pointer-events: none;
}

.auth-gallery::after {
  content: "";
  position: absolute;
  inset: 28px;
  z-index: 3;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 0 90px rgba(15, 118, 110, 0.08);
  pointer-events: none;
}

.auth-gallery-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.auth-gallery-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-gallery-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(56vw, 880px);
  height: min(56vw, 880px);
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.42), transparent 58%),
    conic-gradient(from 140deg, rgba(15, 118, 110, 0.12), rgba(37, 99, 235, 0.08), rgba(245, 158, 11, 0.08), rgba(15, 118, 110, 0.12));
  filter: blur(26px);
  mix-blend-mode: multiply;
  opacity: 0.72;
}

.auth-gallery.is-fallback {
  perspective: 1600px;
}

.auth-gallery.is-fallback .auth-gallery-field {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: 1px;
  height: 1px;
  animation: authGallerySpin 34s linear infinite;
}

.auth-gallery-field {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.auth-gallery-card {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(132px, 10vw, 188px);
  height: clamp(188px, 14vw, 272px);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 22px 54px rgba(15, 23, 42, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
  opacity: 0.76;
  backface-visibility: hidden;
}

.auth-gallery-card-1 { transform: rotateY(0deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(-8deg); }
.auth-gallery-card-2 { transform: rotateY(22.5deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(7deg); }
.auth-gallery-card-3 { transform: rotateY(45deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(5deg); }
.auth-gallery-card-4 { transform: rotateY(67.5deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(-6deg); }
.auth-gallery-card-5 { transform: rotateY(90deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(6deg); }
.auth-gallery-card-6 { transform: rotateY(112.5deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(-7deg); }
.auth-gallery-card-7 { transform: rotateY(135deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(-4deg); }
.auth-gallery-card-8 { transform: rotateY(157.5deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(5deg); }
.auth-gallery-card-9 { transform: rotateY(180deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(8deg); }
.auth-gallery-card-10 { transform: rotateY(202.5deg) translateZ(640px) translate(-50%, -50%) rotateY(180deg) rotate(-8deg); }
.auth-gallery-card-11 { transform: rotateY(225deg) translateZ(840px) translate(-50%, -50%) rotateY(180deg) rotate(4deg); }
.auth-gallery-card-12 { transform: rotateY(247.5deg) translateZ(840px) translate(-50%, -50%) rotateY(180deg) rotate(-4deg); }
.auth-gallery-card-13 { transform: rotateY(270deg) translateZ(840px) translate(-50%, -50%) rotateY(180deg) rotate(-10deg); }
.auth-gallery-card-14 { transform: rotateY(292.5deg) translateZ(840px) translate(-50%, -50%) rotateY(180deg) rotate(10deg); }
.auth-gallery-card-15 { transform: rotateY(315deg) translateZ(840px) translate(-50%, -50%) rotateY(180deg) rotate(-5deg); }
.auth-gallery-card-16 { transform: rotateY(337.5deg) translateZ(840px) translate(-50%, -50%) rotateY(180deg) rotate(5deg); }

.auth-gallery-card.far {
  width: clamp(112px, 8.2vw, 152px);
  height: clamp(160px, 11.8vw, 220px);
  opacity: 0.62;
}

.auth-gallery-card.left {
  transform-origin: 58% 50%;
}

.auth-gallery-card.right {
  transform-origin: 42% 50%;
}

.auth-gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(15, 23, 42, 0.18));
}

.auth-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(1.08) contrast(1.02);
}

@media (max-width: 980px) {
  .auth-gallery-card {
    width: 104px;
    height: 150px;
    opacity: 0.68;
  }

  .auth-gallery-card:nth-child(n + 11) {
    display: none;
  }

  .auth-gallery-card-1 { transform: rotateY(0deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(-8deg); }
  .auth-gallery-card-2 { transform: rotateY(36deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(7deg); }
  .auth-gallery-card-3 { transform: rotateY(72deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(5deg); }
  .auth-gallery-card-4 { transform: rotateY(108deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(-6deg); }
  .auth-gallery-card-5 { transform: rotateY(144deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(6deg); }
  .auth-gallery-card-6 { transform: rotateY(180deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(-7deg); }
  .auth-gallery-card-7 { transform: rotateY(216deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(-4deg); }
  .auth-gallery-card-8 { transform: rotateY(252deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(5deg); }
  .auth-gallery-card-9 { transform: rotateY(288deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(8deg); }
  .auth-gallery-card-10 { transform: rotateY(324deg) translateZ(360px) translate(-50%, -50%) rotateY(180deg) rotate(-8deg); }
}

@keyframes authGallerySpin {
  from {
    transform: rotateX(4deg) rotateY(0deg);
  }
  to {
    transform: rotateX(4deg) rotateY(360deg);
  }
}

.floating-table-head-wrap .floating-table-head {
  margin: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.floating-table-head-wrap table {
  table-layout: fixed;
}

.floating-table-head-wrap thead th {
  position: static;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 800;
  text-align: left;
}

th,
td {
  max-width: 360px;
  padding: 9px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

td {
  color: #263241;
  word-break: break-word;
}

tbody tr:hover td {
  background: #f8fafc;
}

.sheet-wrap-cell {
  padding: 0;
  border: 0;
}

.business-table-shell {
  overflow: auto;
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.07), transparent 34%),
    linear-gradient(180deg, #fbfcfd, #f4f7f8);
}

.business-sheet {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 13px;
}

.business-sheet th,
.business-sheet td {
  border: 0;
}

.business-sheet thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 12px 14px;
  background: #0f172a;
  color: #fff;
  text-align: left;
  font-weight: 800;
  height: auto;
}

.col-head {
  min-width: 96px;
}

.sheet-cell {
  max-width: 260px;
  padding: 14px;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
  background: #fff;
}

.blank-cell {
  color: transparent;
}

.sheet-merge {
  width: auto;
  max-width: none;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  padding: 16px 14px 10px;
  background: transparent;
}

.sheet-note {
  width: auto;
  max-width: none;
  background: #f8fafc;
  color: #4b5563;
  padding: 10px 12px;
}

.business-sheet tbody tr:not(.sheet-row-title):not(.sheet-row-note) {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.business-sheet tbody tr:not(.sheet-row-title):not(.sheet-row-note) .sheet-cell:first-child {
  border-radius: 12px 0 0 12px;
}

.business-sheet tbody tr:not(.sheet-row-title):not(.sheet-row-note) .sheet-cell:last-child {
  border-radius: 0 12px 12px 0;
}

.sheet-row-title .sheet-cell {
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.sheet-highlight-cell {
  background: #fff2c5;
}

.sheet-row-title .sheet-cell,
.sheet-note,
.sheet-highlight-cell {
  white-space: normal;
  overflow-wrap: anywhere;
}

.dashboard-shell {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 10px;
  min-height: 100%;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fbfcfa 0%, #f4f7f3 100%);
}

.dashboard-shell > section {
  min-height: 0;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.dashboard-hero > div:first-child {
  display: none;
}

.dashboard-hero:not(:has(.dashboard-hero-meta)) {
  display: none;
}

.dashboard-hero:has(.dashboard-hero-meta) {
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-kicker {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.dashboard-hero h3 {
  margin: 3px 0 4px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.dashboard-desc {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.dashboard-hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.dashboard-hero-meta div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.dashboard-hero-meta span,
.dashboard-panel-head p,
.monthly-row span,
.monthly-meta span,
.channel-item span,
.zone-metrics em {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-hero-meta strong {
  font-size: 15px;
  line-height: 1.15;
}

.dashboard-grid {
  display: grid;
  gap: 8px;
}

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

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

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

.dashboard-source-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-source-note span {
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

.dashboard-source-note span:last-child {
  padding-right: 0;
  border-right: 0;
}

.stat-tile {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #dfe6dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.stat-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-tile strong {
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0;
}

.stat-tile p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-panel {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-panel-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.2;
}

.monthly-bars,
.traffic-bars,
.zone-cards {
  display: grid;
  gap: 12px;
}

.monthly-bars {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.monthly-card,
.traffic-card,
.zone-card,
.budget-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.monthly-card-head,
.traffic-card-head,
.zone-card-head,
.budget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.monthly-card-head strong,
.traffic-card-head strong,
.zone-card-head strong,
.budget-head strong {
  font-size: 14px;
  line-height: 1.25;
}

.monthly-card-head span,
.traffic-card-head span,
.zone-card-head span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.monthly-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.monthly-row b,
.traffic-value,
.zone-metrics b {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.monthly-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-track {
  position: relative;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #edf2ec;
}

.progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
}

.progress-track.progress-width-5 span {
  width: 5%;
}

.progress-track.progress-width-10 span {
  width: 10%;
}

.progress-track.progress-width-15 span {
  width: 15%;
}

.progress-track.progress-width-20 span {
  width: 20%;
}

.progress-track.progress-width-25 span {
  width: 25%;
}

.progress-track.progress-width-30 span {
  width: 30%;
}

.progress-track.progress-width-35 span {
  width: 35%;
}

.progress-track.progress-width-40 span {
  width: 40%;
}

.progress-track.progress-width-45 span {
  width: 45%;
}

.progress-track.progress-width-50 span {
  width: 50%;
}

.progress-track.progress-width-55 span {
  width: 55%;
}

.progress-track.progress-width-60 span {
  width: 60%;
}

.progress-track.progress-width-65 span {
  width: 65%;
}

.progress-track.progress-width-70 span {
  width: 70%;
}

.progress-track.progress-width-75 span {
  width: 75%;
}

.progress-track.progress-width-80 span {
  width: 80%;
}

.progress-track.progress-width-85 span {
  width: 85%;
}

.progress-track.progress-width-90 span {
  width: 90%;
}

.progress-track.progress-width-95 span {
  width: 95%;
}

.progress-track.progress-width-100 span {
  width: 100%;
}

.progress-track.pay span {
  background: linear-gradient(90deg, var(--accent), #31a99b);
}

.progress-track.cost span {
  background: linear-gradient(90deg, var(--blue), #7891e9);
}

.progress-track.traffic span {
  background: linear-gradient(90deg, var(--amber), #e7a63d);
}

.progress-track.rise span {
  background: linear-gradient(90deg, #15803d, #5cb86f);
}

.progress-track.fall span {
  background: linear-gradient(90deg, #dc2626, #f97316);
}

.channel-rings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.channel-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e3e9e0;
  border-radius: 16px;
  background: #fff;
}

.channel-item strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.channel-ring {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 999px;
}

.channel-ring.c1 {
  background: var(--accent);
}

.channel-ring.c2 {
  background: var(--blue);
}

.channel-ring.c3 {
  background: var(--amber);
}

.budget-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.budget-list {
  display: grid;
  gap: 8px;
}

.budget-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.budget-list span {
  color: var(--muted);
  font-size: 12px;
}

.budget-list b {
  text-align: right;
  font-size: 13px;
}

.business-section {
  gap: 16px;
}

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

.business-insight-grid article {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #e3e9e0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fbf7);
}

.business-insight-grid span,
.business-kpi-row span,
.business-channel-strip span,
.business-week-head span,
.business-channel-rings p {
  color: var(--muted);
  font-size: 12px;
}

.business-insight-grid strong {
  font-size: 18px;
  line-height: 1.25;
}

.business-insight-grid p,
.business-channel-rings p {
  line-height: 1.45;
}

.business-month-list {
  display: grid;
  gap: 12px;
}

.business-month-table {
  overflow-x: auto;
  border: 1px solid #dfe8dd;
  border-radius: 8px;
  background: #fff;
}

.business-month-table-head,
.business-month-table-row {
  display: grid;
  grid-template-columns: 82px repeat(10, minmax(118px, 1fr));
  min-width: 1320px;
  align-items: center;
}

.business-month-table-head {
  min-height: 42px;
  background: #f4f8f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.business-month-table-head span,
.business-month-table-row span {
  padding: 10px 12px;
  border-right: 1px solid #edf1eb;
}

.business-month-table-head span:last-child,
.business-month-table-row span:last-child {
  border-right: 0;
}

.business-month-table-row {
  min-height: 48px;
  border-top: 1px solid #edf1eb;
  font-size: 13px;
}

.business-month-table-row:hover {
  background: #fbfdfb;
}

.business-month-table-row b {
  font-size: 15px;
}

.business-month-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.65fr) minmax(360px, 1.35fr);
  gap: 14px;
  align-items: stretch;
  padding: 15px;
  border: 1px solid #e3e9e0;
  border-radius: 16px;
  background: #fff;
}

.business-month-main {
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 4px 0;
}

.business-month-main > div,
.business-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.business-month-main strong,
.business-week-head strong {
  font-size: 18px;
}

.business-month-main span,
.business-week-head span {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-weight: 800;
}

.business-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.business-kpi-row div,
.business-channel-strip div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8faf8;
}

.business-kpi-row b,
.business-channel-strip b {
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.business-channel-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.business-channel-strip em {
  color: #5f7068;
  font-size: 12px;
  font-style: normal;
}

.business-channel-rings {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.business-month-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.business-month-filter select,
.business-month-filter input[type="month"] {
  min-width: 116px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #dbe7e1;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.business-month-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.business-month-summary div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #e3e9e0;
  border-radius: 14px;
  background: #fff;
}

.business-month-summary span {
  color: var(--muted);
  font-size: 12px;
}

.business-month-summary strong {
  font-size: 16px;
  line-height: 1.2;
}

.channel-ring.c4 {
  background: #22c55e;
}

.channel-ring.c5 {
  background: #64748b;
}

.business-week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.business-week-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e3e9e0;
  border-radius: 16px;
  background: #fff;
}

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

.business-daily-table {
  overflow: auto;
  border: 1px solid #e0e7de;
  border-radius: 14px;
  background: #fff;
}

.business-daily-head,
.business-daily-row {
  display: grid;
  grid-template-columns: 120px repeat(9, minmax(118px, 1fr));
  min-width: 1260px;
}

.business-daily-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.business-daily-head span,
.business-daily-row span {
  padding: 10px 12px;
  border-right: 1px solid #e5e9e2;
  border-bottom: 1px solid #e5e9e2;
  overflow-wrap: anywhere;
}

.business-daily-head span {
  border-color: rgba(255, 255, 255, 0.16);
}

.business-daily-row {
  font-size: 12px;
}

.business-daily-row:nth-child(odd) {
  background: #fbfdfb;
}

.compact-table {
  display: grid;
  gap: 8px;
}

.compact-table-head,
.compact-table-row {
  display: grid;
  gap: 10px;
  align-items: center;
}

.compact-table-head {
  grid-template-columns: 140px minmax(0, 1.5fr) 130px 110px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #edf7f4;
  color: #21413b;
  font-size: 12px;
  font-weight: 800;
}

.compact-table-row {
  grid-template-columns: 140px minmax(0, 1.5fr) 130px 110px;
  padding: 12px 14px;
  border: 1px solid #e4eae2;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}

.compact-table-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-table-11 .compact-table-head,
.compact-table-11 .compact-table-row {
  grid-template-columns: 140px minmax(0, 1.7fr) 110px 100px 100px 100px 1fr;
}

.sku-rank-table {
  overflow: auto;
  display: grid;
  gap: 8px;
}

.dashboard-taobao-sku {
  gap: 16px;
}

.sku-client-hero {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 22px 24px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.sku-client-hero-compact {
  justify-content: flex-end;
  min-height: 0;
  padding: 14px 18px;
}

.sku-client-hero .dashboard-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.sku-client-hero h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
}

.sku-client-hero .dashboard-desc {
  display: block;
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sku-data-freshness {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px;
  min-width: 360px;
  padding: 8px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: #f8fbf9;
}

.sku-data-freshness > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  text-align: left;
}

.sku-data-freshness span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sku-data-freshness strong {
  color: var(--accent-strong);
  font-size: 16px;
  line-height: 1.1;
}

.sku-data-freshness em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.sku-client-toolbar {
  display: grid;
  gap: 10px;
  justify-items: end;
  flex: 0 0 auto;
}

.sku-client-toolbar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sku-client-toolbar > div {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid #dbe7e1;
  border-radius: 8px;
  background: #f8fbf9;
}

.sku-client-toolbar .sku-date-filter {
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
}

.sku-date-filter label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sku-date-filter select,
.sku-date-filter input[type="month"],
.sku-date-filter input[type="date"] {
  height: 36px;
  min-width: 128px;
  padding: 0 10px;
  border: 1px solid #dbe7e1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.sku-client-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.sku-summary-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.sku-summary-card span,
.sku-summary-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.sku-summary-card span {
  font-size: 12px;
  font-weight: 900;
}

.sku-summary-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.05;
}

.sku-summary-card em {
  margin-top: 8px;
  font-size: 12px;
}

.sku-summary-card.urgent {
  border-color: #fecaca;
  background: #fff7f7;
}

.sku-summary-card.high {
  border-color: #fed7aa;
  background: #fffaf4;
}

.sku-client-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.sku-client-panel-head {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.sku-client-panel-head-with-filters {
  align-items: center;
}

.sku-client-panel-head h4 {
  margin: 0;
  font-size: 18px;
}

.sku-client-panel-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.sku-client-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sku-client-mini span {
  padding: 7px 10px;
  border: 1px solid #dbe7e1;
  border-radius: 999px;
  background: #f8fbf9;
  color: #31524a;
  font-size: 12px;
  font-weight: 800;
}

.sku-status-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sku-status-filter {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #dbe7e1;
  border-radius: 999px;
  background: #fff;
  color: #31524a;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.sku-status-filter strong {
  color: var(--accent-strong);
  font-size: 12px;
}

.sku-status-filter.urgent {
  border-color: #fecaca;
  color: #991b1b;
}

.sku-status-filter.urgent strong {
  color: #991b1b;
}

.sku-status-filter.high {
  border-color: #fed7aa;
  color: #9a3412;
}

.sku-status-filter.high strong {
  color: #9a3412;
}

.sku-status-filter.medium {
  border-color: #fde68a;
  color: #92400e;
}

.sku-status-filter.medium strong {
  color: #92400e;
}

.sku-status-filter.missing {
  border-color: #c7d2fe;
  color: #3730a3;
}

.sku-status-filter.missing strong {
  color: #3730a3;
}

.sku-status-filter:hover {
  border-color: rgba(15, 118, 110, 0.3);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.sku-status-filter.active {
  border-color: rgba(15, 118, 110, 0.4);
  background: #edf7f4;
  color: #0f4f49;
}

.sku-status-filter.urgent:hover,
.sku-status-filter.urgent.active {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.sku-status-filter.high:hover,
.sku-status-filter.high.active {
  border-color: #fed7aa;
  background: #ffedd5;
  color: #9a3412;
}

.sku-status-filter.medium:hover,
.sku-status-filter.medium.active {
  border-color: #fde68a;
  background: #fef3c7;
  color: #92400e;
}

.sku-status-filter.missing:hover,
.sku-status-filter.missing.active {
  border-color: #c7d2fe;
  background: #e0e7ff;
  color: #3730a3;
}

.dashboard-product-monitor {
  --monitor-alert: #b91c1c;
  --monitor-alert-soft: #fff1f2;
  --monitor-watch: #b45309;
}

.dashboard-product-monitor .product-monitor-alert-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.product-monitor-pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-product-monitor .product-monitor-alert-card {
  display: grid;
  grid-template-columns: 104px minmax(360px, 1.5fr) minmax(360px, 1.2fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: start;
  min-height: 150px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--monitor-alert-soft);
}

.product-monitor-image,
.product-monitor-thumb {
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
}

.product-monitor-image {
  width: 104px;
  aspect-ratio: 3 / 4;
}

.product-monitor-thumb {
  width: 64px;
  aspect-ratio: 3 / 4;
}

.product-monitor-image.is-empty,
.product-monitor-thumb.is-empty {
  display: grid;
  place-items: center;
  border: 1px dashed #fecaca;
  background: #fff;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.product-monitor-thumb.is-empty {
  font-size: 11px;
}

.product-monitor-image .product-image-preview-trigger,
.product-monitor-thumb .product-image-preview-trigger {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.product-monitor-image img,
.product-monitor-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .dashboard-product-monitor .product-monitor-alert-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .product-monitor-image {
    width: 78px;
  }
}

.product-monitor-copy,
.product-monitor-main,
.product-monitor-action {
  display: grid;
  align-content: start;
  min-width: 0;
}

.product-monitor-action {
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.product-monitor-action strong {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--monitor-alert);
  font-size: 12px;
}

.product-monitor-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.dashboard-product-monitor .product-monitor-title b {
  display: block;
  overflow: visible;
  white-space: normal;
}

.product-monitor-title b,
.product-monitor-product strong {
  overflow-wrap: anywhere;
}

.product-monitor-title i,
.product-monitor-status i {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--monitor-alert);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.product-monitor-copy p,
.product-monitor-main p,
.product-monitor-copy em,
.product-monitor-action em,
.product-monitor-copy small,
.product-monitor-main small,
.product-monitor-product em,
.product-monitor-status span,
.product-monitor-day p {
  display: block;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.product-monitor-copy p,
.product-monitor-main p {
  margin: 7px 0 0;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 800;
}

.product-monitor-copy em,
.product-monitor-action em,
.product-monitor-copy small,
.product-monitor-main small,
.product-monitor-product em,
.product-monitor-status span,
.product-monitor-day p {
  margin-top: 5px;
  font-size: 12px;
}

.dashboard-product-monitor .product-monitor-copy small,
.dashboard-product-monitor .product-monitor-main small {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  overflow: visible;
  white-space: normal;
}

.product-copy-id,
.product-monitor-copy-id {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.product-copy-id b,
.product-monitor-copy-id b {
  color: #475569;
  font-weight: 800;
}

.product-copy-id button,
.product-monitor-copy-id button {
  padding: 2px 6px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.product-copy-id button.copied,
.product-monitor-copy-id button.copied {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}

.product-monitor-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.product-monitor-metrics span {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  background: #fff;
  color: #7f1d1d;
  font-size: 12px;
}

.product-monitor-metrics b {
  font-size: 20px;
}

@media (max-width: 1180px) {
  .dashboard-product-monitor .product-monitor-alert-card {
    grid-template-columns: 92px minmax(0, 1fr) minmax(260px, 0.9fr);
  }

  .dashboard-product-monitor .product-monitor-alert-card .product-monitor-metrics {
    grid-column: 2 / -1;
  }
}

@media (max-width: 760px) {
  .dashboard-product-monitor .product-monitor-alert-card .product-monitor-metrics,
  .dashboard-product-monitor .product-monitor-alert-card .product-monitor-action {
    grid-column: 1 / -1;
  }

  .product-monitor-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.product-monitor-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.product-monitor-day {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.product-monitor-day.alert {
  border-color: #fecaca;
  background: #fff7f7;
}

.product-monitor-day > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.product-monitor-day span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-inventory {
  --inventory-accent: #0f766e;
  --inventory-soft: #f0fdfa;
}

.dashboard-inventory .inventory-hero .dashboard-hero-meta {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.inventory-query-panel {
  display: grid;
  gap: 10px;
}

.inventory-search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.inventory-search-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.inventory-search-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-search-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.inventory-search-form input:focus {
  border-color: var(--inventory-accent);
  outline: 2px solid rgba(15, 118, 110, 0.16);
}

.inventory-query-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-inventory .inventory-results {
  display: grid;
  gap: 0;
  overflow-x: auto;
  border: 1px solid #dbe7e5;
  border-radius: 8px;
  background: #fff;
}

.dashboard-inventory .inventory-results-head,
.dashboard-inventory .inventory-row {
  display: grid;
  grid-template-columns: 70px minmax(340px, 1fr) repeat(4, minmax(110px, 0.36fr));
  gap: 0;
  align-items: center;
  min-width: 940px;
}

.dashboard-inventory .inventory-results-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 34px;
  border-bottom: 1px solid #dbe7e5;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-inventory .inventory-results-head span,
.dashboard-inventory .inventory-row > * {
  min-width: 0;
  padding: 7px 8px;
  border-right: 1px solid #edf2f7;
}

.dashboard-inventory .inventory-results-head span:last-child,
.dashboard-inventory .inventory-row > *:last-child {
  border-right: 0;
}

.dashboard-inventory .inventory-row {
  min-height: 50px;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
}

.dashboard-inventory .inventory-row:nth-child(odd) {
  background: #fbfefd;
}

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

.dashboard-inventory .inventory-thumb {
  width: 54px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}

.dashboard-inventory .inventory-thumb .product-image-preview-trigger,
.dashboard-inventory .inventory-thumb .product-image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.dashboard-inventory .inventory-thumb .product-image-placeholder {
  border: 1px dashed #99f6e4;
  background: #fff;
  color: var(--inventory-accent);
  font-size: 10px;
  font-weight: 900;
}

.dashboard-inventory .inventory-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-inventory .inventory-main {
  min-width: 0;
}

.dashboard-inventory .inventory-main strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.dashboard-inventory .inventory-id-line,
.dashboard-inventory .inventory-main p {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  align-items: center;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.dashboard-inventory .inventory-product-id-line {
  gap: 4px 6px;
  margin-top: 5px;
}

.dashboard-inventory .inventory-product-id-line .product-copy-id {
  padding: 2px 5px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 800;
}

.dashboard-inventory .inventory-main p span {
  overflow-wrap: anywhere;
}

.dashboard-inventory .product-copy-id button {
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
}

.dashboard-inventory .inventory-metrics {
  display: contents;
}

.dashboard-inventory .inventory-metrics span {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 50px;
  padding: 7px 8px;
  border-right: 1px solid #edf2f7;
}

.dashboard-inventory .inventory-metrics span:last-child {
  border-right: 0;
}

.dashboard-inventory .inventory-metrics em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-inventory .inventory-metrics b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 1280px) {
  .dashboard-inventory .inventory-results-head,
  .dashboard-inventory .inventory-row {
    grid-template-columns: 64px minmax(280px, 1fr) repeat(4, minmax(94px, 0.32fr));
    min-width: 780px;
  }
}

@media (max-width: 760px) {
  .dashboard-inventory .inventory-hero .dashboard-hero-meta,
  .inventory-search-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.product-monitor-table {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.product-monitor-head,
.product-monitor-row {
  display: grid;
  grid-template-columns: 44px minmax(420px, 1.8fr) minmax(128px, 0.5fr) minmax(180px, 0.85fr);
  gap: 10px;
  align-items: center;
  min-width: 780px;
}

.product-monitor-head {
  padding: 10px 12px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.product-monitor-row {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.product-monitor-row.alert {
  border-color: #fecaca;
  background: #fff7f7;
}

.product-monitor-row.watch {
  border-color: #fed7aa;
  background: #fffaf4;
}

.product-monitor-product {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.product-monitor-row > span:first-child {
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 900;
}

.product-monitor-row > b {
  font-size: 13px;
}

.product-monitor-status i.good {
  background: #dcfce7;
  color: #166534;
}

.product-monitor-status i.watch {
  background: #fef3c7;
  color: var(--monitor-watch);
}

.product-monitor-status i.alert {
  background: #fee2e2;
  color: var(--monitor-alert);
}

.sku-pagination-bar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sku-pagination-bar label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sku-pagination-bar select {
  height: 34px;
  min-width: 112px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.sku-page-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.sku-page-actions span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.sku-page-actions .ghost-button {
  height: 34px;
  padding-inline: 12px;
}

.sku-detail-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.sku-detail-controls .sku-date-filter {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid #dbe7e1;
  border-radius: 10px;
  background: #fff;
}

.sku-detail-controls label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sku-detail-controls select,
.sku-detail-controls input[type="month"],
.sku-detail-controls input[type="date"] {
  height: 34px;
  min-width: 132px;
  padding: 0 10px;
  border: 1px solid #dbe7e1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.sku-detail-table {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.sku-detail-table table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
}

.sku-detail-table th,
.sku-detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  white-space: nowrap;
}

.sku-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.sku-detail-table td {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.sku-detail-table tbody tr:hover td {
  background: #f8fafc;
}

.sku-page-actions .ghost-button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}


.sku-rank-head,
.sku-rank-row {
  display: grid;
  grid-template-columns: 48px minmax(190px, 1.2fr) repeat(5, 76px) 78px 82px 76px 86px 92px minmax(260px, 1.6fr);
  gap: 12px;
  align-items: center;
  min-width: 1380px;
}

.sku-rank-head {
  padding: 10px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.sku-rank-row {
  padding: 12px 14px;
  border: 1px solid #e4eae2;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.sku-rank-row b {
  color: var(--accent-strong);
}

.sku-rank-row strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.sku-rank-row em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  overflow-wrap: anywhere;
}

.sku-rank-row i {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 800;
}

.sku-rank-row i.urgent {
  background: #fee2e2;
  color: #991b1b;
}

.sku-rank-row i.high {
  background: #ffedd5;
  color: #9a3412;
}

.sku-rank-row i.medium {
  background: #fef3c7;
  color: #92400e;
}

.sku-rank-row i.missing {
  background: #e0e7ff;
  color: #3730a3;
}

.sku-rank-row i.enough {
  background: #dcfce7;
  color: #166534;
}

.sku-reason-text {
  color: #33443c;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.sku-daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.sku-daily-card {
  align-content: start;
  padding: 12px;
  border-color: #e2e8f0;
  background: #fff;
  box-shadow: none;
}

.sku-daily-card.rise {
  border-color: #d9e7df;
}

.sku-daily-card.fall {
  border-color: #eadede;
}

.sku-daily-delta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #f8fafc;
}

.sku-daily-delta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sku-daily-delta strong {
  font-size: 15px;
  line-height: 1;
}

.sku-daily-delta.rise strong {
  color: #15803d;
}

.sku-daily-delta.fall strong {
  color: #dc2626;
}

.sku-daily-delta.flat strong {
  color: #64748b;
}

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

.replenish-rule-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dfe9e4;
  border-radius: 8px;
  background: #fbfdfb;
}

.replenish-rule-grid span,
.replenish-rule-grid p {
  color: var(--muted);
}

.replenish-rule-grid span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.replenish-rule-grid strong {
  display: block;
  line-height: 1.35;
}

.replenish-rule-grid p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.sku-style-table .compact-table-head,
.sku-style-table .compact-table-row {
  grid-template-columns: minmax(160px, 1.4fr) 100px 120px 140px;
}

.sku-top-table {
  overflow: auto;
  display: grid;
  gap: 8px;
}

.sku-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
}

.sku-filter-bar > div {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px;
  border: 1px solid #dbe7e1;
  border-radius: 8px;
  background: #f8fbf9;
}

.filter-chip {
  min-width: 58px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #31524a;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(14, 131, 117, 0.18);
}

.sku-top-head,
.sku-top-row {
  display: grid;
  grid-template-columns: 68px minmax(230px, 1.45fr) repeat(3, minmax(90px, 0.55fr)) minmax(112px, 0.68fr) minmax(112px, 0.68fr) minmax(210px, 1.25fr);
  gap: 14px;
  align-items: center;
  min-width: 1180px;
}

.sku-top-head {
  padding: 10px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.sku-top-row {
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid #e4eae2;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.sku-top-row > span:first-child {
  color: var(--accent-strong);
  font-size: 17px;
  font-weight: 900;
}

.sku-top-product strong,
.sku-top-product em,
.sku-top-number strong,
.sku-top-number em,
.sku-top-status em {
  display: block;
  overflow-wrap: anywhere;
}

.sku-top-product strong {
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 1.35;
}

.sku-top-product em,
.sku-top-number em,
.sku-top-status em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.sku-top-number {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sku-top-number strong {
  font-size: 16px;
  line-height: 1.1;
}

.sku-top-number.replenish strong {
  color: var(--accent-strong);
}

.sku-top-status {
  min-width: 0;
}

.sku-top-row i {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 800;
}

.sku-top-row i.urgent {
  background: #fee2e2;
  color: #991b1b;
}

.sku-top-row i.high {
  background: #ffedd5;
  color: #9a3412;
}

.sku-top-row i.medium {
  background: #fef3c7;
  color: #92400e;
}

.sku-top-row i.missing {
  background: #e0e7ff;
  color: #3730a3;
}

.sku-top-row i.enough {
  background: #dcfce7;
  color: #166534;
}

.sku-replenish-head {
  grid-template-columns: minmax(240px, 0.48fr) minmax(0, 1fr);
}

.sku-rule-summary {
  display: grid;
  gap: 6px;
  justify-self: stretch;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.sku-client-table {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.sku-style-card-list {
  gap: 8px;
  overflow: visible;
}

.sku-style-head {
  min-width: 0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.sku-client-head,
.sku-client-row {
  display: grid;
  grid-template-columns: 48px minmax(390px, 1.85fr) repeat(5, minmax(72px, 0.44fr)) minmax(78px, 0.48fr) minmax(78px, 0.48fr) minmax(78px, 0.48fr) minmax(86px, 0.52fr) minmax(86px, 0.52fr) minmax(430px, 2fr);
  gap: 12px;
  align-items: center;
  min-width: 1860px;
}

.sku-client-head {
  padding: 10px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.sku-client-row {
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid #e4eae2;
  border-radius: 8px;
  background: #fff;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.sku-style-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-width: 0;
  padding: 12px 14px 9px;
}

.sku-style-card-main {
  display: grid;
  grid-template-columns: 48px minmax(390px, 1.85fr) repeat(5, minmax(72px, 0.44fr)) minmax(78px, 0.48fr) minmax(78px, 0.48fr) minmax(78px, 0.48fr) minmax(86px, 0.52fr) minmax(86px, 0.52fr) minmax(430px, 2fr);
  gap: 12px;
  align-items: center;
}

.sku-client-row > .sku-variant-strip {
  grid-column: auto;
}

.sku-client-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.sku-rank-index {
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 900;
}

.sku-product-cell,
.sku-status-cell {
  min-width: 0;
}

.sku-product-cell {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.sku-style-card .sku-product-cell {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
}

.sku-product-thumb {
  overflow: hidden;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  background: #eef3ef;
}

.sku-style-card .sku-product-thumb {
  width: 74px;
  height: 74px;
}

.sku-product-thumb .product-image {
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

.sku-product-thumb img {
  object-fit: cover;
}

.sku-product-copy {
  min-width: 0;
}

.sku-style-code-line {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.sku-product-cell strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sku-product-cell span,
.sku-product-cell em,
.sku-value-cell span,
.sku-stock-cell span,
.sku-advice-cell span,
.sku-status-cell span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sku-style-metrics {
  display: contents;
}

.sku-style-metric {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sku-style-metric strong {
  display: block;
  min-width: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.sku-style-metric span,
.sku-style-metric em {
  display: none;
}

.sku-style-metric.coverage strong {
  color: #991b1b;
}

.sku-style-metric.sales strong {
  color: #0f172a;
}

.sku-style-metric.advice strong {
  color: var(--accent-strong);
  font-size: 16px;
}

.sku-variant-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 9px 0 0 60px;
  border-top: 1px solid #eef2f7;
}

.sku-variant-card {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(56px, auto);
  gap: 3px 8px;
  align-items: center;
  min-width: 0;
  width: 214px;
  padding: 6px 8px;
  border: 1px solid #dbe5ee;
  border-radius: 6px;
  background: #f8fafc;
}

.sku-variant-card strong,
.sku-variant-card span,
.sku-variant-card em,
.sku-variant-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-variant-card strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.sku-variant-card span {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.sku-variant-card em {
  justify-self: end;
  color: var(--accent-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.sku-variant-card small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.sku-value-cell {
  min-width: 0;
  padding: 0;
}

.sku-value-cell strong {
  display: block;
  font-size: 14px;
  line-height: 1.1;
}

.sku-metric-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sku-metric-group div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sku-metric-group span,
.sku-metric-group b {
  display: block;
}

.sku-metric-group span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.sku-metric-group b {
  margin-top: 3px;
  font-size: 16px;
}

.sku-stock-cell strong,
.sku-advice-cell strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.sku-advice-cell strong {
  color: var(--accent-strong);
}

.sku-status-cell i {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.sku-status-cell i.urgent {
  background: #fee2e2;
  color: #991b1b;
}

.sku-status-cell i.high {
  background: #ffedd5;
  color: #9a3412;
}

.sku-status-cell i.medium {
  background: #fef3c7;
  color: #92400e;
}

.sku-status-cell i.missing {
  background: #e0e7ff;
  color: #3730a3;
}

.sku-status-cell i.enough {
  background: #dcfce7;
  color: #166534;
}

.sku-status-cell .sku-reason-title {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sku-status-cell .sku-reason-list {
  display: grid;
  gap: 3px;
  margin: 7px 0 0;
  padding: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  list-style: none;
}

.sku-status-cell .sku-reason-list li {
  position: relative;
  min-width: 0;
  padding-left: 10px;
  overflow-wrap: anywhere;
}

.sku-status-cell .sku-reason-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent);
  content: "·";
}

.traffic-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

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

.traffic-source-card,
.traffic-fine-grid article,
.traffic-quality-grid article,
.traffic-month-grid article {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.traffic-rank-table {
  overflow: auto;
  display: grid;
  gap: 8px;
}

.traffic-rank-head,
.traffic-rank-row {
  display: grid;
  grid-template-columns: 58px minmax(320px, 1.8fr) 100px 100px 86px 128px 90px 90px;
  gap: 12px;
  align-items: center;
  min-width: 1080px;
}

.traffic-level4-head,
.traffic-level4-row {
  display: grid;
  grid-template-columns: 52px minmax(150px, 0.75fr) minmax(300px, 1.65fr) 92px 78px 124px 82px 82px;
  gap: 12px;
  align-items: center;
  min-width: 1060px;
}

.traffic-rank-head {
  padding: 10px 14px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.traffic-level4-head {
  padding: 10px 14px;
  border-radius: 12px;
  background: #12342f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.traffic-rank-row {
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.traffic-level4-row {
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.traffic-rank-row.rise {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.traffic-rank-row.fall {
  border-color: #fecaca;
  background: #fff1f2;
}

.traffic-level4-row.rise {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.traffic-level4-row.fall {
  border-color: #fecaca;
  background: #fff1f2;
}

.traffic-rank-row span,
.traffic-level4-row span,
.traffic-change-row span,
.traffic-fine-grid p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.traffic-conclusion-panel {
  border-color: #c7ddd5;
  background: #f7fbf9;
}

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

.traffic-insight-card {
  display: grid;
  gap: 8px;
  min-height: 134px;
  padding: 15px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: #fff;
}

.traffic-insight-card span,
.traffic-alert-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.traffic-insight-card strong {
  font-size: 22px;
  line-height: 1.15;
}

.traffic-insight-card p,
.traffic-alert-item p {
  margin: 0;
  color: #5f6f68;
  font-size: 12px;
  line-height: 1.45;
}

.traffic-insight-card b {
  align-self: end;
  font-size: 16px;
}

.traffic-insight-card.rise,
.traffic-alert-item.rise,
.traffic-action-panel.rise {
  border-color: #86efac;
  background: #f0fdf4;
}

.traffic-insight-card.rise strong,
.traffic-insight-card.rise b,
.traffic-alert-item.rise strong {
  color: #166534;
}

.traffic-insight-card.fall,
.traffic-alert-item.fall,
.traffic-action-panel.fall {
  border-color: #fca5a5;
  background: #fff1f2;
}

.traffic-insight-card.fall strong,
.traffic-insight-card.fall b,
.traffic-alert-item.fall strong {
  color: #991b1b;
}

.traffic-insight-card.warn,
.traffic-alert-item.warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.traffic-insight-card.warn strong,
.traffic-insight-card.warn b,
.traffic-alert-item.warn strong {
  color: #92400e;
}

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

.traffic-action-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e4eae2;
  border-radius: 16px;
}

.traffic-alert-list {
  display: grid;
  gap: 10px;
}

.traffic-alert-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.traffic-alert-item {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #e4eae2;
  border-radius: 12px;
  background: #fff;
}

.traffic-alert-item > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.traffic-alert-item span {
  flex: 0 0 auto;
}

.traffic-date-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.traffic-date-strip span,
.traffic-date-strip b {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.traffic-date-strip span {
  background: #12342f;
  color: #fff;
  font-weight: 800;
}

.traffic-date-strip b {
  border: 1px solid #dfe8df;
  background: #fff;
  color: #31524a;
  font-weight: 700;
}

.traffic-detail-section {
  display: block;
}

.traffic-detail-section summary {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.traffic-detail-section summary::-webkit-details-marker {
  display: none;
}

.traffic-detail-section summary::after {
  content: "展开";
  justify-self: end;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.traffic-detail-section[open] summary {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4eae2;
}

.traffic-detail-section[open] summary::after {
  content: "收起";
}

.traffic-detail-section summary span {
  color: #10221e;
  font-size: 18px;
  font-weight: 900;
}

.traffic-detail-section summary em,
.traffic-section-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.traffic-section-note {
  margin-bottom: 10px;
}

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

.traffic-change-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: #fff;
}

.traffic-change-head,
.traffic-change-row,
.traffic-fine-grid article > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.traffic-change-head span,
.traffic-fine-grid article > div:first-child span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.traffic-change-row {
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8faf8;
  font-size: 13px;
}

.traffic-change-row.rise {
  background: #f0fdf4;
}

.traffic-change-row.fall {
  background: #fff1f2;
}

.traffic-change-row b,
.traffic-change-row em {
  flex: 0 0 auto;
}

.traffic-change-row em {
  color: var(--muted);
  font-style: normal;
}

.traffic-fine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.traffic-daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.traffic-daily-grid article {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 12px;
  background: #fff;
}

.traffic-daily-grid article.rise {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.traffic-daily-grid article.fall {
  border-color: #fecaca;
  background: #fff1f2;
}

.traffic-daily-grid article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.traffic-daily-grid strong {
  font-size: 13px;
}

.traffic-daily-grid span,
.traffic-daily-grid p {
  color: var(--muted);
  font-size: 12px;
}

.traffic-daily-grid b {
  font-size: 20px;
}

.traffic-daily-grid p {
  margin: 0;
  line-height: 1.45;
}

.traffic-daily-alerts {
  margin-top: 4px;
}

.traffic-level4-layout,
.traffic-level4-change {
  display: grid;
  gap: 12px;
}

.traffic-fine-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.traffic-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.traffic-month-grid article.active {
  border-color: rgba(15, 118, 110, 0.28);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(37, 99, 235, 0.035)),
    #fff;
}

.traffic-month-grid article > div,
.traffic-quality-grid article > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.traffic-month-grid strong,
.traffic-quality-grid strong {
  font-size: 15px;
}

.traffic-month-grid span,
.traffic-quality-grid article > div:first-child span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.traffic-month-grid b {
  font-size: 24px;
}

.traffic-month-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.traffic-quality-grid dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.traffic-quality-grid dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.traffic-quality-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.traffic-quality-grid dd {
  margin: 0;
  font-weight: 800;
}

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

.zone-metrics div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8faf8;
}

.zone-metrics b {
  font-size: 14px;
}

.zone-card-detailed {
  gap: 12px;
}

.zone-card-clickable {
  width: 100%;
  border: 1px solid #dfe8df;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.zone-card-clickable:hover,
.zone-card-clickable.selected {
  border-color: #0f766e;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.12);
}

.zone-card-clickable:hover {
  transform: translateY(-1px);
}

.zone-card-clickable.selected .zone-card-head span {
  background: #0f766e;
  color: #fff;
}

.zone-periods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.zone-periods div {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #edf1eb;
  border-radius: 8px;
  background: #fbfcfb;
}

.zone-periods em,
.zone-analysis {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.zone-periods b {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.zone-summary-list {
  display: grid;
  gap: 10px;
}

.zone-metrics.zone-metrics-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.zone-analysis {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e5ebe3;
  border-radius: 8px;
  background: #f8faf8;
  color: #31433a;
}

.zone-summary-list {
  display: grid;
  gap: 10px;
}

.zone-summary-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.45fr)
    minmax(70px, 0.42fr)
    repeat(5, minmax(92px, 0.58fr))
    minmax(92px, 0.52fr)
    minmax(90px, 0.48fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid #dfe8df;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.zone-summary-row:hover,
.zone-summary-row.selected {
  border-color: #0f9f95;
  background: #f5fffc;
}

.zone-summary-head {
  padding: 10px 14px;
  border-color: #dcebe7;
  background: #eaf5f2;
  color: #19322c;
  cursor: default;
}

.zone-summary-head span {
  color: #19322c;
  font-size: 13px;
  font-weight: 800;
}

.zone-summary-head:hover {
  border-color: #dcebe7;
  background: #eaf5f2;
}

.zone-summary-row div {
  display: grid;
  gap: 4px;
}

.zone-summary-row > span {
  display: grid;
  gap: 4px;
}

.zone-summary-row strong {
  font-size: 15px;
}

.zone-summary-row em,
.zone-summary-row span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.zone-summary-row b {
  color: var(--text);
  font-size: 14px;
  justify-self: start;
}

.zone-summary-row > span b {
  justify-self: start;
}

.zone-detail-panel {
  gap: 14px;
}

.zone-back-button {
  background: #fff;
}

.zone-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.zone-detail-summary div {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #dfe8df;
  border-radius: 12px;
  background: #f8faf8;
}

.zone-detail-summary span,
.zone-detail-row em {
  color: var(--muted);
  font-size: 12px;
}

.zone-detail-summary strong {
  font-size: 17px;
}

.zone-detail-table {
  overflow: hidden;
  border: 1px solid #dfe8df;
  border-radius: 14px;
  background: #fff;
}

.zone-detail-head,
.zone-detail-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(100px, 0.7fr) repeat(4, minmax(130px, 0.8fr)) minmax(130px, 0.8fr);
  gap: 10px;
  align-items: center;
  min-width: 1180px;
}

.zone-operation-table {
  overflow-x: hidden;
  width: 100%;
}

.zone-operation-table .zone-detail-head,
.zone-operation-table .zone-detail-row {
  grid-template-columns:
    86px
    minmax(340px, 2.2fr)
    96px
    minmax(104px, 0.72fr)
    minmax(104px, 0.72fr)
    minmax(104px, 0.72fr)
    minmax(104px, 0.72fr)
    minmax(104px, 0.72fr)
    minmax(142px, 0.95fr);
  min-width: 0;
  gap: 8px;
}

.zone-detail-head {
  padding: 11px 14px;
  background: #eaf5f2;
  color: #19322c;
  font-size: 13px;
  font-weight: 800;
}

.zone-detail-row {
  padding: 12px 14px;
  border-top: 1px solid #edf1ed;
}

.zone-total-row {
  background: #f4fbf8;
  font-weight: 800;
}

.zone-total-row em {
  font-weight: 500;
}

.zone-detail-row > span:first-child,
.zone-operation-table .zone-detail-row > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  align-content: center;
}

.zone-detail-row b,
.zone-detail-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-operation-table .zone-detail-row {
  align-items: stretch;
  min-height: 68px;
}

.zone-operation-table .zone-detail-row b {
  font-size: 14px;
  line-height: 1.35;
}

.zone-operation-table .zone-detail-row em {
  font-size: 12px;
  line-height: 1.35;
}

.zone-operation-table .zone-detail-row > span:nth-child(2) b {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.zone-operation-table .zone-detail-row > span:nth-child(2) em {
  font-size: 12px;
}

.zone-operation-table .zone-detail-row > span:nth-child(n + 4) {
  justify-items: start;
}

.zone-operation-table .zone-detail-row > span:nth-child(n + 4) b {
  font-size: 14px;
}

.zone-operation-table .zone-detail-row > span:nth-child(n + 4) em {
  color: #6b7d74;
  font-size: 11px;
}

.zone-operation-table .zone-detail-row > span:first-child em,
.zone-operation-table .zone-detail-row > span:nth-child(n + 5):nth-child(-n + 7) em {
  display: none;
}

.zone-operation-table .zone-detail-row > span:nth-child(3),
.zone-operation-table .zone-detail-row > span:nth-child(8) {
  font-size: 14px;
}

.zone-operation-table .zone-detail-row > span:nth-child(4) em {
  max-width: 92px;
}

.zone-action-pill,
.zone-position-pill,
.zone-trend-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef7f2;
  color: #0f5132;
  font-size: 12px;
  font-weight: 800;
}

.zone-position-pill {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.zone-action-pill.bad {
  background: #fff1f2;
  color: #be123c;
}

.zone-action-pill.remove,
.zone-trend-pill.remove {
  background: #ffe4e6;
  color: #be123c;
  box-shadow: inset 0 0 0 1px #fecdd3;
}

.zone-action-pill.down,
.zone-trend-pill.down {
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.zone-action-pill.up,
.zone-trend-pill.up {
  background: #dcfce7;
  color: #15803d;
  box-shadow: inset 0 0 0 1px #bbf7d0;
}

.zone-action-pill.flat,
.zone-trend-pill.flat {
  background: #eef7f2;
  color: #0f766e;
}

.zone-action-pill.warn,
.zone-status-warn {
  background: #fff7ed;
  color: #c2410c;
}

.zone-action-pill.ok {
  background: #ecfdf5;
  color: #047857;
}

.zone-row-remove {
  background: #fff8f8;
}

.zone-row-down {
  background: #fffaf3;
}

.zone-row-up {
  background: #f6fff9;
}

.zone-detail-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.zone-detail-pager > div {
  display: flex;
  gap: 8px;
}

.dashboard-zone-detail-mode > .dashboard-panel:last-child {
  display: none;
}


.compact-dashboard {
  gap: 12px;
  min-height: auto;
  padding: 14px;
}

.compact-dashboard .dashboard-hero,
.compact-hero {
  padding: 16px 18px;
}

.compact-panel {
  gap: 12px;
  padding: 16px;
}

.zone-overview-grid .stat-tile strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.zone-result-list {
  display: grid;
  gap: 10px;
}

.zone-result-card {
  display: grid;
  grid-template-columns: 34px minmax(320px, 1.05fr) minmax(420px, 1.35fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #e1e8df;
  border-radius: 14px;
  background: #fff;
}

.zone-result-card.good {
  border-color: rgba(15, 118, 110, 0.3);
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.06), #fff 34%);
}

.zone-result-card.bad {
  border-color: rgba(178, 88, 66, 0.22);
}

.zone-result-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.zone-result-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.zone-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.zone-result-head strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.zone-result-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.zone-result-head b {
  flex: 0 0 auto;
  height: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
}

.zone-result-card.bad .zone-result-head b {
  background: #fff1ed;
  color: #9a4b36;
}

.zone-result-card.flat .zone-result-head b {
  background: #f3f5f1;
  color: #617065;
}

.zone-result-bars {
  display: grid;
  gap: 8px;
}

.zone-result-bars div {
  display: grid;
  grid-template-columns: 92px minmax(120px, 1fr) 54px;
  gap: 8px;
  align-items: center;
}

.zone-result-bars span,
.zone-result-bars em,
.zone-result-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.zone-result-bars em {
  color: var(--text);
  text-align: right;
  font-weight: 800;
}

.zone-result-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-self: center;
}

.zone-result-metrics div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8faf8;
}

.zone-result-metrics strong {
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.activity-list,
.plan-month-grid {
  display: grid;
  gap: 12px;
}

.activity-list {
  gap: 10px;
}

.activity-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) 128px minmax(210px, 0.9fr) minmax(210px, 0.9fr) 86px;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 15px 16px;
  border: 1px solid #e0e7de;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbfdfb);
  box-shadow: 0 8px 18px rgba(31, 54, 41, 0.035);
}

.activity-main,
.activity-number,
.activity-time,
.activity-status {
  min-width: 0;
}

.activity-main {
  display: grid;
  gap: 7px;
}

.activity-main strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.35;
}

.activity-main span,
.activity-status span,
.plan-month-head,
.plan-pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-main span,
.activity-status span,
.plan-month-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.activity-number,
.activity-time {
  display: grid;
  gap: 5px;
}

.activity-number span,
.activity-time span {
  color: var(--muted);
  font-size: 12px;
}

.activity-number strong {
  font-size: 20px;
  line-height: 1.1;
}

.activity-time strong {
  color: #27362d;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.activity-status {
  display: flex;
  justify-content: flex-end;
}

.plan-pair span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.plan-month-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.plan-command {
  display: grid;
  grid-template-columns: minmax(520px, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

.plan-command-main,
.plan-command-side,
.plan-year-card,
.plan-pace-card {
  border: 1px solid #dfe8dd;
  border-radius: 8px;
  background: #fff;
}

.plan-command-main {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f5fbf8 58%, #eef7f1 100%);
}

.plan-command-main h3 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.plan-command-main > strong {
  color: #0e4f49;
  font-size: 26px;
  line-height: 1.2;
}

.plan-command-main > p {
  max-width: 760px;
  color: #53645e;
  font-size: 15px;
  line-height: 1.7;
}

.plan-command-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-command-metrics div,
.plan-command-side div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e0e8dd;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.plan-command-metrics span,
.plan-command-side span,
.plan-year-card span,
.plan-pace-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-command-metrics b {
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.plan-command-side {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f9fbf8;
}

.plan-command-side strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.plan-command-side em {
  color: #5f7068;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

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

.plan-year-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 15px;
  background: linear-gradient(180deg, #fff, #f8faf8);
}

.plan-year-card strong {
  color: #0f2d29;
  font-size: 20px;
  line-height: 1.2;
}

.plan-year-card p {
  color: #5f7068;
  font-size: 12px;
  line-height: 1.55;
}

.plan-pace-panel,
.plan-channel-panel {
  gap: 14px;
}

.plan-pace-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(92px, 1fr));
  gap: 8px;
}

.plan-pace-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 104px;
  padding: 10px;
}

.plan-pace-card > div,
.plan-pace-card p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-pace-card strong {
  color: var(--text);
  font-size: 15px;
}

.plan-pace-card span {
  padding: 2px 7px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
}

.plan-pace-card p b {
  font-size: 15px;
}

.plan-pace-card p em {
  color: #66766d;
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

.plan-pace-card.behind {
  border-color: #f2c891;
  background: #fffaf1;
}

.plan-pace-card.behind span {
  background: #fff1d6;
  color: #94620c;
}

.plan-pace-card.pending {
  background: #fbfcfb;
  opacity: 0.76;
}

.plan-decision-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) repeat(2, minmax(220px, 0.9fr));
  gap: 12px;
}

.plan-cockpit {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(620px, 1.28fr);
  gap: 12px;
  align-items: stretch;
}

.plan-cockpit-title,
.plan-cockpit-card {
  border: 1px solid #dfe8dd;
  border-radius: 8px;
  background: #fff;
}

.plan-cockpit-title {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 176px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f4faf6 100%);
}

.plan-cockpit-title p,
.plan-cockpit-title span,
.plan-cockpit-card span,
.plan-cockpit-card em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-cockpit-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.15;
}

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

.plan-cockpit-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 176px;
  padding: 18px;
  background: linear-gradient(180deg, #fff, #f8fbf8);
}

.plan-cockpit-card.primary {
  background: linear-gradient(135deg, #0f766e 0%, #11534a 100%);
  border-color: transparent;
  color: #fff;
}

.plan-cockpit-card.warn {
  border-color: #efc27f;
  background: #fffaf1;
}

.plan-cockpit-card.primary span,
.plan-cockpit-card.primary p,
.plan-cockpit-card.primary em {
  color: rgba(255, 255, 255, 0.82);
}

.plan-cockpit-card strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
}

.plan-cockpit-card.primary strong {
  color: #fff;
}

.plan-cockpit-card p {
  color: #53645e;
  font-size: 13px;
  line-height: 1.55;
}

.plan-cockpit-card div {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(92, 114, 104, 0.16);
}

.plan-cockpit-card.primary div {
  border-color: rgba(255, 255, 255, 0.2);
}

.plan-cockpit-card b {
  font-size: 20px;
}

.plan-channel-table {
  display: grid;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.plan-channel-head,
.plan-channel-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.15fr 1fr 0.72fr 0.72fr;
  align-items: center;
  gap: 14px;
}

.plan-channel-head {
  min-height: 44px;
  padding: 0 18px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.plan-channel-row {
  min-height: 64px;
  padding: 11px 18px;
  border-top: 1px solid #eef2f7;
  font-size: 13px;
}

.plan-channel-row.is-total {
  min-height: 70px;
  border-top-color: #dbe4ea;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 55%),
    #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 #dbe4ea, inset 0 -1px 0 #dbe4ea;
}

.plan-channel-row.is-total > span {
  color: var(--text);
}

.plan-channel-row.is-total b,
.plan-channel-row.is-total span:last-child {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.plan-channel-row b {
  font-size: 14px;
}

.plan-channel-row .progress {
  margin-top: 7px;
}

.plan-channel-row .is-over {
  color: inherit;
  font-weight: inherit;
}

.plan-channel-row .is-under {
  color: inherit;
  font-weight: inherit;
}

.plan-channel-row .is-ok {
  color: inherit;
  font-weight: inherit;
}

.plan-budget-table {
  display: grid;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.plan-budget-head,
.plan-budget-row {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 0.85fr 1.05fr 0.85fr 1fr;
  align-items: center;
  gap: 14px;
}

.plan-budget-head {
  min-height: 44px;
  padding: 0 18px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.plan-budget-row {
  min-height: 62px;
  padding: 12px 18px;
  border-top: 1px solid #eef2f7;
  font-size: 13px;
}

.plan-budget-row.is-summary {
  border-top-color: #dbe4ea;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.07), transparent 58%),
    #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 #dbe4ea, inset 0 -1px 0 #dbe4ea;
}

.plan-budget-row.is-summary > span {
  color: var(--text);
}

.plan-budget-row.is-summary b,
.plan-budget-row.is-summary span:not(:first-child) {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.plan-budget-row b {
  font-size: 14px;
}

.plan-budget-row .is-over {
  color: #94620c;
  font-weight: 900;
}

.plan-budget-row .is-under {
  color: #9f2f1f;
  font-weight: 900;
}

.plan-budget-row .is-ok {
  color: #0f766e;
  font-weight: 900;
}

.plan-budget-row:hover,
.plan-channel-row:hover,
.plan-month-table-row:hover,
.plan-daily-row:hover {
  background: #f8fafc;
}

.plan-budget-row.is-summary:hover,
.plan-channel-row.is-total:hover {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 55%),
    #ffffff;
}

.plan-month-list {
  display: grid;
  gap: 6px;
}

.plan-month-table {
  overflow-x: auto;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 14px;
  background: #fff;
}

.plan-month-table-head,
.plan-month-table-row {
  display: grid;
  grid-template-columns: 88px minmax(170px, 1fr) minmax(170px, 1fr) repeat(5, minmax(148px, 0.9fr)) minmax(112px, 0.72fr);
  min-width: 1380px;
  align-items: stretch;
}

.plan-month-table-head {
  min-height: 46px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.plan-month-table-head span,
.plan-month-table-row > span {
  padding: 13px 14px;
  border-right: 1px solid #eef2f7;
}

.plan-month-table-head span:last-child,
.plan-month-table-row > span:last-child {
  border-right: 0;
}

.plan-month-table-row {
  border-top: 1px solid #eef2f7;
}

.plan-month-table-row.is-current {
  background:
    linear-gradient(90deg, rgba(180, 83, 9, 0.09), transparent 34%),
    #fffdf7;
}

.plan-month-table-row.is-current:hover {
  background:
    linear-gradient(90deg, rgba(180, 83, 9, 0.11), transparent 36%),
    #fffdf7;
}

.plan-month-table-row.is-placeholder {
  color: #6b756d;
}

.plan-month-table-month,
.plan-month-table-cell {
  display: grid;
  align-content: start;
  gap: 4px;
}

.plan-month-table-cell.is-over {
  background: rgba(251, 191, 36, 0.11);
}

.plan-month-table-cell.is-under {
  background: transparent;
}

.plan-month-table-month b {
  font-size: 17px;
}

.plan-month-table-row.is-current .plan-month-table-month b {
  color: #92400e;
}

.plan-month-table-month em {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e6f6f3;
  color: var(--accent-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.plan-month-table-cell i,
.plan-month-table-cell em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.plan-month-table-cell b {
  font-size: 13px;
  line-height: 1.35;
}

.plan-month-table-cell .is-over {
  color: #8a5600;
  font-weight: 900;
}

.plan-month-table-cell .is-under {
  color: #9f2f1f;
  font-weight: 900;
}

.plan-month-table-cell .is-ok {
  color: inherit;
  font-weight: 800;
}

.plan-month-row {
  display: grid;
  grid-template-columns: 132px minmax(280px, 0.9fr) minmax(440px, 1.15fr);
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #e5ebe3;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.plan-month-summary-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0 0;
  border-top: 1px solid #edf1eb;
  background: transparent;
}

.plan-month-summary-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-month-summary-row b {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.plan-month-row.is-current {
  border-color: rgba(11, 122, 117, 0.46);
  background: #fff;
  box-shadow: none;
}

.plan-month-row.is-placeholder {
  border-style: dashed;
  background: #fdfefd;
}

.plan-month-row.is-placeholder .plan-month-head span {
  background: #f3f6f3;
  color: #6b756d;
}

.plan-month-bars {
  display: grid;
  gap: 8px;
}

.plan-month-bars div {
  display: grid;
  grid-template-columns: 72px minmax(94px, auto) minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
}

.plan-month-bars span,
.plan-month-insight span,
.plan-focus-grid p {
  color: var(--muted);
  font-size: 12px;
}

.plan-month-bars b,
.plan-month-insight b {
  font-size: 13px;
  white-space: nowrap;
}

.plan-month-insight {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.plan-month-insight div {
  display: grid;
  gap: 4px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.plan-month-insight .is-over,
.plan-completion-cell.is-over {
  color: #8a5600;
  font-weight: 900;
}

.plan-month-insight .is-under,
.plan-completion-cell.is-under {
  color: #9f2f1f;
  font-weight: 900;
}

.plan-month-insight .is-ok,
.plan-completion-cell.is-ok {
  color: inherit;
  font-weight: 800;
}

.plan-month-insight b {
  overflow-wrap: anywhere;
  white-space: normal;
}

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

.plan-focus-grid article {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid #e0e7de;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbf7);
}

.plan-focus-grid strong {
  font-size: 15px;
}

.plan-focus-grid p {
  line-height: 1.6;
}

.plan-channel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.plan-channel-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 138px;
  padding: 13px;
  border: 1px solid #e0e7de;
  border-radius: 8px;
  background: #fff;
}

.plan-channel-grid article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-channel-grid strong {
  font-size: 14px;
}

.plan-channel-grid span {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.plan-channel-grid b {
  font-size: 18px;
}

.plan-channel-grid p,
.plan-channel-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.plan-channel-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf1eb;
}

.plan-channel-list div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.plan-channel-list span {
  color: var(--muted);
  font-size: 12px;
}

.plan-channel-list b {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.plan-channel-list b + b {
  color: #27362d;
}

.plan-channel-list .is-over em,
.plan-channel-list .is-under em {
  font-weight: 900;
}

.plan-channel-list .is-over em {
  color: #8a5600;
}

.plan-channel-list .is-under em {
  color: #9f2f1f;
}

.plan-completion-cell {
  font-weight: 900;
}

.plan-daily-table {
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 14px;
  background: #fff;
}

.plan-month-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-month-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #dfe6dd;
  border-radius: 999px;
  background: #fff;
  color: #31433a;
  font-weight: 800;
}

.plan-month-tabs button.active {
  border-color: rgba(15, 118, 110, 0.45);
  background: #0f766e;
  color: #fff;
}

.plan-month-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 14px;
  background: #f8fafc;
}

.plan-month-select-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.plan-daily-head,
.plan-daily-row {
  display: grid;
  grid-template-columns: 118px repeat(7, minmax(184px, 1fr)) minmax(92px, 0.55fr);
  min-width: 1540px;
}

.plan-daily-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.plan-budget-head span,
.plan-channel-head span,
.plan-month-table-head span,
.plan-daily-head span {
  letter-spacing: 0;
}

.plan-daily-head > span,
.plan-daily-row > span {
  padding: 10px 12px;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  overflow-wrap: anywhere;
}

.plan-daily-head > span {
  border-color: rgba(255, 255, 255, 0.16);
}

.plan-daily-row {
  color: var(--text);
  font-size: 12px;
}

.plan-daily-row::before,
.plan-daily-row::after,
.plan-date-cell::before,
.plan-date-cell::after {
  display: none;
  content: none;
}

.plan-daily-row > .plan-date-cell {
  border-left: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}

.plan-daily-row.has-over-plan > .plan-date-cell,
.plan-daily-row.has-under-plan > .plan-date-cell,
.plan-daily-row.has-over-plan.has-under-plan > .plan-date-cell,
.plan-daily-row > span:first-child {
  border-left: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}

.plan-daily-row:nth-child(odd) {
  background: #fbfcfd;
}

.plan-date-cell {
  display: grid;
  align-content: center;
  gap: 4px;
  line-height: 1.2;
}

.plan-date-cell strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.plan-date-cell em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.metric-pair {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  padding: 0;
}

.metric-pair em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 19px;
  border-radius: 999px;
  background: #eef4ed;
  color: #5f7068;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.metric-pair b {
  color: #11211b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.metric-pair.is-over {
  margin: -4px;
  padding: 4px;
  border-radius: 6px;
}

.metric-pair.is-over {
  background: #fff8ea;
}

.metric-pair.is-under {
  background: transparent;
}

.metric-pair.is-over b:last-child {
  color: #8a5600;
}

.metric-pair.is-under b:last-child {
  color: #9f2f1f;
}

.metric-pair.is-empty b {
  color: #8a9790;
  font-weight: 700;
}

.plan-month-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e0e7de;
  border-radius: 16px;
  background: #fff;
}

.plan-month-card.is-current {
  border-color: rgba(15, 118, 110, 0.42);
  background: linear-gradient(180deg, #fff, #f4fbf8);
}

.plan-month-head strong {
  font-size: 16px;
}

.plan-pair b {
  font-size: 13px;
  text-align: right;
}

.plan-pair.muted b {
  color: var(--muted);
}

.inventory-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.inventory-status article {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid #e0e7de;
  border-radius: 16px;
  background: #fff;
}

.inventory-status span,
.inventory-status p,
.inventory-metrics em,
.inventory-action span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.inventory-status strong {
  font-size: 24px;
  line-height: 1.1;
}

.inventory-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.inventory-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid #e0e7de;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 54, 41, 0.06);
}

.inventory-card-head,
.inventory-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-card-head strong {
  font-size: 16px;
  line-height: 1.25;
}

.inventory-product-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.inventory-product-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-product-title span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-card-head span {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

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

.inventory-metrics div {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f8faf8;
}

.inventory-metrics b,
.inventory-action b {
  font-size: 14px;
}

.inventory-action {
  padding-top: 2px;
}

.inventory-decision-grid,
.inventory-rank-grid {
  display: grid;
  gap: 12px;
}

.inventory-decision-grid {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.inventory-decision-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid #e0e7de;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.inventory-decision-card.primary {
  background: linear-gradient(135deg, #0f766e, #143b35);
  color: #fff;
}

.inventory-decision-card span,
.inventory-decision-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.inventory-decision-card.primary span,
.inventory-decision-card.primary p {
  color: rgba(255, 255, 255, 0.78);
}

.inventory-decision-card strong {
  font-size: 18px;
  line-height: 1.15;
}

.inventory-rank-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-rank {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #e0e7de;
  border-radius: 18px;
  background: #fff;
}

.inventory-rank-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.inventory-rank-head strong {
  font-size: 15px;
}

.inventory-rank-head span {
  color: var(--muted);
  font-size: 12px;
}

.inventory-rank-list {
  display: grid;
  gap: 8px;
}

.inventory-rank-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8faf8;
}

.inventory-rank-row b {
  color: var(--muted);
  font-size: 12px;
}

.inventory-rank-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-rank-row strong {
  color: var(--accent-strong);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-replenishment {
  gap: 14px;
}

.dashboard-replenishment .dashboard-hero {
  align-items: center;
}

.replenish-decision-grid {
  grid-template-columns: 1.35fr 1fr 1fr;
}

.replenish-rank-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.replenish-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid #e0e7de;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(28, 49, 39, 0.05);
}

.replenish-card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.replenish-card-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.replenish-card-head strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replenish-card-head span,
.replenish-main-action span,
.replenish-metrics em,
.replenish-foot {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.replenish-card-head b {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf7f3;
  color: var(--accent-strong);
  font-size: 12px;
}

.replenish-main-action {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 14px;
  background: #f5faf7;
}

.replenish-main-action strong {
  color: var(--accent-strong);
  font-size: 18px;
}

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

.replenish-metrics div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  background: #f8faf8;
}

.replenish-metrics b {
  font-size: 14px;
}

.replenish-foot {
  display: grid;
  gap: 5px;
  padding-top: 2px;
}

.replenish-foot a {
  width: fit-content;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.offsite-view {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 16px 18px 18px;
  background: #f7faf7;
}

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

.offsite-summary div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e4eae2;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fbf7);
}

.offsite-summary span,
.offsite-group-head p,
.product-card dt {
  color: var(--muted);
  font-size: 12px;
}

.offsite-summary strong {
  font-size: 22px;
  line-height: 1;
}

.offsite-group {
  display: grid;
  gap: 12px;
}

.offsite-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.offsite-group-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.offsite-group-head p {
  margin: 4px 0 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.product-card {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.product-image {
  display: grid;
  place-items: center;
  height: 250px;
  min-height: 250px;
  max-height: 250px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(37, 99, 235, 0.08)),
    #f1f5f9;
  overflow: hidden;
}

.product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #eef5f2;
}

.product-image-preview-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-image-preview-trigger:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.45);
  outline-offset: -3px;
}

.image-preview-open {
  overflow: hidden;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 18, 16, 0.72);
}

.image-preview-modal.hidden {
  display: none;
}

.image-preview-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, 96vw);
  height: min(860px, 92vh);
  overflow: hidden;
  border: 1px solid rgba(229, 235, 232, 0.7);
  border-radius: 8px;
  background: #f7faf8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e3ebe6;
  background: #fff;
}

.image-preview-head strong {
  min-width: 0;
  overflow: hidden;
  color: #10201c;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview-close {
  flex: 0 0 auto;
}

.image-preview-body {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  background: #f7faf8;
}

.image-preview-body img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain !important;
  object-position: center center !important;
}

.dashboard-offsite .product-card {
  width: 230px;
  height: 500px;
  grid-template-rows: 282px minmax(0, 1fr);
}

.dashboard-offsite .product-image {
  width: 100%;
  height: 282px !important;
  min-height: 282px !important;
  max-height: 282px !important;
  aspect-ratio: auto;
}

.dashboard-offsite .product-grid {
  grid-template-columns: repeat(auto-fill, 230px);
  align-items: start;
}

.dashboard-offsite .product-image-preview-trigger {
  display: grid;
  place-items: center;
}

.dashboard-offsite .product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.dashboard-offsite .product-body {
  min-height: 0;
  gap: 5px;
  padding: 10px 12px 11px;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-offsite .product-title-row h4 {
  display: -webkit-box;
  min-height: 19px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 14px;
  line-height: 1.3;
}

.dashboard-offsite .product-card dl {
  display: grid;
  grid-auto-rows: 21px;
  gap: 3px;
  min-height: 0;
  overflow: hidden;
}

.dashboard-offsite .product-card dl div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  overflow: hidden;
}

.dashboard-offsite .product-card dd {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.25;
}

.dashboard-offsite .product-card dt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
}

.product-image-placeholder {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px dashed #b9c6b8;
  border-radius: 14px;
  color: #667167;
  font-weight: 700;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 12px 13px 13px;
}

.product-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.product-title-row h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.product-title-row span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f5f2;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.product-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.product-card dl div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
}

.product-card dd {
  margin: 0;
  min-width: 0;
  color: #26322b;
  overflow-wrap: anywhere;
}

.dashboard-home-products {
  gap: 18px;
}

.home-products-hero {
  background: #fff;
}

.home-method-panel {
  gap: 12px;
}

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

.home-method-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #dfe8df;
  border-radius: 14px;
  background: #f8faf7;
}

.home-method-grid strong,
.home-method-grid b {
  color: var(--text);
}

.home-method-grid span {
  color: var(--muted);
  font-size: 12px;
}

.home-zone-board {
  gap: 14px;
}

.home-zone-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.home-zone-filter select {
  min-width: 220px;
  height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid #d6e0d8;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.offsite-period-filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 14px;
}

.offsite-period-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(100%, 560px);
}

.offsite-period-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.offsite-period-status.expired {
  border-color: rgba(185, 28, 28, 0.18);
  background: #fff7f7;
  color: var(--danger);
}

.offsite-period-filter select {
  flex: 1 1 300px;
  min-width: 300px;
  max-width: 360px;
  height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid #d6e0d8;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.offsite-toolbar-screenshot {
  border-color: rgba(15, 118, 110, 0.35);
  background: #e9f7f3;
  color: var(--accent-strong);
}

.offsite-toolbar-screenshot:disabled {
  cursor: wait;
  opacity: 0.72;
}

.offsite-capture-area {
  display: grid;
  gap: 16px;
}

.offsite-capture-area.is-capturing {
  padding: 0;
  background: #f3f6f2;
}

.home-zone-summary {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-zone-logic {
  display: grid;
  grid-template-columns: 1.15fr 1.55fr 1.55fr 1.2fr;
  gap: 10px;
}

.home-zone-logic article {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 94px;
  padding: 13px 14px;
  border: 1px solid #dfe8df;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfb 0%, #f5f9f6 100%);
}

.home-zone-logic span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.home-zone-logic strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.home-zone-logic p {
  margin: 0;
  color: #44534c;
  font-size: 13px;
  line-height: 1.55;
}

.home-zone-rules-panel {
  gap: 14px;
}

.home-zone-rules-single {
  display: grid;
  gap: 12px;
}

.home-zone-rule-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  border: 1px solid #dfe8df;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.045);
}

.home-zone-rule-card.active {
  border-color: rgba(15, 118, 110, 0.42);
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.96) 42%),
    #fff;
}

.home-zone-rule-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.home-zone-rule-head > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.home-zone-rule-head h5 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.28;
}

.home-zone-rule-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-offsite .offsite-promotion-badge {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fff7ed;
  color: #9a3412;
}

.home-zone-rule-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.home-zone-rule-card dl div {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #edf1ed;
}

.home-zone-rule-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.home-zone-rule-card dd {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.56;
  overflow-wrap: anywhere;
}

.home-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe8df;
  border-radius: 14px;
}

.home-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf1ed;
  background: #fbfdfc;
  color: var(--muted);
  font-size: 12px;
}

.home-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.home-clean-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.home-clean-table th,
.home-clean-table td {
  padding: 12px;
  border-bottom: 1px solid #edf1ed;
  text-align: left;
  vertical-align: middle;
}

.home-clean-table th {
  color: #fff;
  background: #111a28;
  font-size: 13px;
}

.home-clean-table th:not(:nth-child(2)),
.home-clean-table td:not(:nth-child(2)) {
  text-align: center;
}

.home-clean-table th:nth-child(2),
.home-clean-table td:nth-child(2) {
  text-align: left;
}

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

.home-clean-table td:nth-child(1),
.home-clean-table td:nth-child(n+4) {
  white-space: nowrap;
}

.home-clean-table th:nth-child(1),
.home-clean-table td:nth-child(1) {
  width: 72px;
}

.home-clean-table th:nth-child(2),
.home-clean-table td:nth-child(2) {
  width: 420px;
}

.home-clean-table th:nth-child(3),
.home-clean-table td:nth-child(3) {
  width: 120px;
}

.home-clean-table th:nth-child(4),
.home-clean-table td:nth-child(4) {
  width: 96px;
}

.home-clean-table th:nth-child(5),
.home-clean-table td:nth-child(5) {
  width: 116px;
}

.home-clean-table th:nth-child(6),
.home-clean-table td:nth-child(6),
.home-clean-table th:nth-child(7),
.home-clean-table td:nth-child(7) {
  width: 92px;
}

.home-clean-table th:nth-child(8),
.home-clean-table td:nth-child(8) {
  width: 270px;
}

.home-product-id {
  color: var(--accent-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  word-break: break-all;
}

.home-product-cell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.home-product-row-image {
  overflow: hidden;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #eef3ef;
}

.home-product-row-image .product-image {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.home-product-cell strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.home-product-cell p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.home-reason-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e7f4f1;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .home-zone-summary,
  .home-zone-logic,
  .home-zone-rule-card dl,
  .home-method-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .home-zone-filter {
    align-items: start;
    flex-direction: column;
  }

  .home-zone-filter,
  .home-zone-filter select,
  .home-product-row-image {
    width: 100%;
  }
}

.rules-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  justify-content: end;
  background: rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(3px);
}

.rules-panel.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(3px);
}

.modal-backdrop[hidden] {
  display: none;
}

.user-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, 96vw);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
}

.user-admin-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.user-form {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.inline-check {
  display: inline-flex !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px !important;
}

.inline-check input {
  width: auto;
  height: auto;
}

.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-actions .ghost-button {
  background: #fff;
  color: var(--text);
}

.user-list-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.user-table th,
.user-table td {
  max-width: none;
  white-space: nowrap;
}

.table-action {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.table-action.danger {
  background: #fee2e2;
  color: #991b1b;
}

.rules-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(560px, 92vw);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: #fbfcfd;
  box-shadow: -28px 0 70px rgba(15, 23, 42, 0.18);
}

.rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.rules-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.rules-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 16px;
}

.rule-item {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.rule-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rule-item strong {
  font-size: 14px;
}

.rule-item span {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4ed;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rule-item p {
  color: #2c382f;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.logic-summary {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f5fbf8);
}

.logic-summary strong {
  font-size: 18px;
}

.logic-summary p {
  color: #2c382f;
  line-height: 1.65;
}

.logic-summary span,
.logic-changes p {
  color: var(--muted);
  font-size: 12px;
}

.logic-list {
  display: grid;
  gap: 9px;
}

.logic-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e0e7de;
  border-radius: 12px;
  background: #fff;
}

.logic-list b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
}

.logic-list p {
  color: #233029;
  font-size: 13px;
  line-height: 1.65;
}

.logic-changes {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: #f6faf7;
}

.logic-changes b {
  margin-right: 8px;
  color: var(--text);
}

.maintenance-card {
  width: min(920px, 96vw);
}

.maintenance-body {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px;
}

.maintenance-tabs {
  display: inline-flex;
  gap: 6px;
  width: fit-content;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f1f5f9;
}

.maintenance-tab {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.maintenance-tab.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: var(--surface-shadow);
}

.maintenance-page {
  display: grid;
  align-content: start;
  gap: 12px;
}

.maintenance-page.hidden {
  display: none;
}

.maintenance-collapse {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.maintenance-collapse summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  list-style: none;
}

.maintenance-collapse summary::-webkit-details-marker {
  display: none;
}

.maintenance-collapse summary::after {
  content: "展开";
  float: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.maintenance-collapse[open] summary {
  border-bottom: 1px solid var(--line);
}

.maintenance-collapse[open] summary::after {
  content: "收起";
}

.maintenance-collapse > :not(summary) {
  margin: 16px 18px;
}

.maintenance-rule-hero,
.maintenance-rule-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.maintenance-rule-hero h4 {
  margin: 3px 0 8px;
  font-size: 20px;
}

.maintenance-rule-hero p,
.maintenance-rule-search span,
.maintenance-rule-page-head p,
.maintenance-rule-page-head span,
.maintenance-rule-changes p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.maintenance-rule-search {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
}

.maintenance-rule-search span {
  font-weight: 900;
}

.maintenance-rule-search input {
  min-height: 40px;
  border-radius: 8px;
  background: #fbfcfd;
}

.maintenance-rules-list {
  display: grid;
  gap: 12px;
}

.maintenance-rule-page {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.maintenance-rule-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2ed;
}

.maintenance-rule-page-head strong {
  display: block;
  margin: 3px 0 5px;
  font-size: 18px;
}

.maintenance-rule-page-head b,
.maintenance-rule-title span {
  flex: 0 0 auto;
  height: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f6f1;
  color: var(--accent-strong);
  font-size: 12px;
}

.maintenance-rule-block {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}

.maintenance-rule-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.maintenance-rule-title strong {
  font-size: 15px;
}

.maintenance-rule-block dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.maintenance-rule-block dl div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.maintenance-rule-block dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.maintenance-rule-block dd {
  margin: 0;
  color: #24332b;
  font-size: 13px;
  line-height: 1.55;
}

.maintenance-rule-changes {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: #f6faf7;
}

.maintenance-rule-changes b {
  margin-right: 8px;
  color: var(--text);
}

.maintenance-upload-card {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 42%),
    #fff;
  box-shadow: var(--surface-shadow);
}

.maintenance-upload-card h4 {
  margin: 4px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.maintenance-upload-card p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.maintenance-upload-form {
  justify-content: flex-end;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.upload-gate {
  display: grid;
  grid-template-columns: auto minmax(160px, auto) minmax(260px, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.upload-gate span {
  justify-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f2ee;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.upload-gate strong {
  font-size: 14px;
}

.upload-gate p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-gate.previewing,
.upload-gate.uploading,
.upload-gate.queued,
.upload-gate.processing {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.upload-gate.previewing span,
.upload-gate.uploading span,
.upload-gate.queued span,
.upload-gate.processing span {
  background: #dbeafe;
  color: #1d4ed8;
}

.upload-gate.ready,
.upload-gate.success {
  border-color: rgba(15, 118, 110, 0.34);
  background: #ecfdf5;
}

.upload-gate.ready span,
.upload-gate.success span {
  background: #ccfbf1;
  color: var(--accent-strong);
}

.upload-gate.blocked,
.upload-gate.error {
  border-color: #fecaca;
  background: #fff7f7;
}

.upload-gate.blocked span,
.upload-gate.error span {
  background: #fee2e2;
  color: #991b1b;
}

.maintenance-upload-form button.is-ready {
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.maintenance-mode {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e0e7de;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.maintenance-mode > span {
  color: var(--text);
  font-weight: 800;
}

.maintenance-mode label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f6faf7;
}

.maintenance-mode input {
  width: auto;
  height: auto;
  padding: 0;
}

.module-import-options {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: #f8fbf9;
}

.module-import-options label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.module-import-options select {
  min-height: 38px;
  border-radius: 10px;
  background: #fff;
}

.module-import-options p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.module-import-options .module-replace-hint {
  color: #0f766e;
  font-weight: 700;
}

.independent-import-options {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: #f8fbf9;
}

.independent-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e0e7de;
  border-radius: 12px;
  background: #fff;
}

.independent-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.independent-panel strong {
  font-size: 14px;
}

.independent-import-options label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.independent-import-options input,
.independent-import-options select {
  min-height: 38px;
  border-radius: 10px;
  background: #fff;
}

.independent-import-options p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.independent-rename-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.rename-source-hint {
  font-size: 12px;
}

.display-name-options {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: #fff;
}

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

.display-name-head > div {
  display: grid;
  gap: 4px;
}

.display-name-head strong {
  font-size: 15px;
}

.display-name-head p,
.display-name-options p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.display-name-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.2fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.display-name-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.display-name-grid input,
.display-name-grid select {
  min-height: 38px;
  border-radius: 10px;
  background: #fff;
}

.product-image-options {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: #fff;
}

.business-index-options {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: #fff;
}

.business-index-head,
.product-image-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.business-index-head strong,
.product-image-head strong {
  font-size: 15px;
}

.business-index-head p,
.business-index-options p,
.product-image-head p,
.product-image-options p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.product-image-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, auto) auto auto;
  gap: 10px;
  align-items: end;
}

.product-image-grid label:not(.file-pick) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-image-grid input[type="text"] {
  min-height: 38px;
  border-radius: 10px;
  background: #fff;
}

.product-image-file {
  min-height: 38px;
}

.product-image-dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 12px;
  border: 1px dashed rgba(15, 118, 110, 0.42);
  border-radius: 12px;
  background: #f8fbf9;
  outline: none;
}

.product-image-dropzone * {
  user-select: none;
}

.product-image-dropzone:focus,
.product-image-dropzone.dragging {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.product-image-preview {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-status.success {
  color: #047857;
}

.product-image-status.exists {
  color: #a16207;
}

.product-image-status.error {
  color: #b42318;
}

.upload-preview {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 16px;
  background: #fff;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-head strong {
  font-size: 17px;
}

.preview-head p,
.preview-field-map p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.preview-field-map p b {
  display: inline-block;
  min-width: 82px;
  margin-right: 8px;
  color: var(--ink);
}

.preview-field-map p em {
  font-style: normal;
  color: var(--muted);
}

.preview-field-map .field-map-missing {
  color: #991b1b;
}

.preview-field-map .field-map-extra {
  color: #92400e;
}

.preview-head > span {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.preview-head > span.bad {
  background: #fee2e2;
  color: #991b1b;
}

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

.quality-strip div {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #e2e8df;
  border-radius: 12px;
  background: #f8faf8;
}

.quality-strip span,
.quality-strip em,
.preview-source-card small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.quality-strip strong {
  font-size: 20px;
  line-height: 1.05;
}

.quality-issues {
  display: grid;
  gap: 8px;
}

.quality-issues p {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.5;
}

.quality-issues .blocker {
  background: #fef2f2;
  color: #991b1b;
}

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

.preview-source-card {
  display: grid;
  gap: 10px;
  min-height: 116px;
  padding: 13px;
  border: 1px solid #e2e8df;
  border-radius: 14px;
  background: #fbfcfb;
}

.preview-source-card.ready {
  border-color: rgba(15, 118, 110, 0.28);
  background: linear-gradient(180deg, #fff, #f4fbf8);
}

.preview-source-card.missing {
  opacity: 0.68;
}

.preview-source-card.blocked {
  border-color: #fecaca;
  background: #fff7f7;
}

.preview-source-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-source-card span {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.preview-source-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.preview-source-card b {
  align-self: end;
  font-size: 18px;
}

.preview-field-map {
  display: grid;
  gap: 8px;
}

.preview-field-map > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7faf7;
}

.preview-field-map span {
  font-size: 13px;
  font-weight: 800;
}

.maintenance-log {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #dfe6dd;
  border-radius: 14px;
  background: #111827;
  color: #fff;
}

.maintenance-log p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.maintenance-log.warn {
  background: #7c4a03;
}

.maintenance-log.error {
  background: #7f1d1d;
}

.quality-history {
  display: grid;
  gap: 10px;
}

.quality-history-list {
  display: grid;
  gap: 8px;
}

.quality-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid #e0e7de;
  border-radius: 12px;
  background: #fff;
}

.quality-history-item.success {
  border-color: #a7f3d0;
  background: #f4fdf8;
}

.quality-history-item.pending,
.quality-history-item.ok {
  border-color: #bae6fd;
  background: #f8fcff;
}

.quality-history-item.bad {
  border-color: #fecaca;
  background: #fff7f7;
}

.quality-history-main {
  min-width: 0;
}

.quality-history-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.quality-history-title strong {
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-history-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.quality-history-source {
  color: var(--ink) !important;
  font-weight: 700;
}

.quality-history-note {
  color: #991b1b !important;
}

.quality-history-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.quality-history-write-mode {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.quality-history-item.success .quality-history-status {
  background: #d1fae5;
  color: #047857;
}

.quality-history-item.bad .quality-history-status {
  background: #fee2e2;
  color: #b91c1c;
}

.quality-history-item.pending .quality-history-status {
  background: #fef3c7;
  color: #92400e;
}

.quality-history-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, auto));
  gap: 8px;
  margin: 0;
}

.quality-history-metrics div {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e7eee6;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.quality-history-metrics dt {
  color: var(--muted);
  font-size: 11px;
}

.quality-history-metrics dd {
  margin: 0;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.quality-history-steps {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quality-history-steps span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4ee;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 4px;
}

.source-list-head strong {
  font-size: 16px;
}

.source-list-head span,
.source-item p,
.source-item small,
.source-count span {
  color: var(--muted);
  font-size: 12px;
}

.source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e0e7de;
  border-radius: 14px;
  background: #fff;
}

.source-item div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.source-item strong {
  font-size: 14px;
}

.source-item p,
.source-item small {
  overflow-wrap: anywhere;
}

.source-status-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
}

.source-status-metrics div {
  display: grid;
  gap: 2px;
  min-width: 92px;
  padding: 7px 9px;
  border: 1px solid #e4ece4;
  border-radius: 10px;
  background: #f8fbf8;
}

.source-status-metrics dt {
  color: var(--muted);
  font-size: 11px;
}

.source-status-metrics dd {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.source-count {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
}

.source-count b {
  font-size: 20px;
}

.source-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.source-rename {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.maintenance-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 15px;
  border: 1px solid #e0e7de;
  border-radius: 14px;
  background: #fff;
}

.maintenance-step.primary {
  border-color: rgba(15, 118, 110, 0.32);
  background: linear-gradient(180deg, #fff, #f4fbf8);
}

.maintenance-step > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #edf7f4;
  color: var(--accent-strong);
  font-weight: 800;
}

.maintenance-step h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.maintenance-step p,
.maintenance-note p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.maintenance-note {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
}

.maintenance-note p {
  color: rgba(255, 255, 255, 0.76);
}

.empty {
  padding: 28px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .boot-view,
  .login-view {
    justify-items: center;
    padding: 28px 18px 40px;
  }

  .login-view {
    align-items: end;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .boot-card,
  .login-card {
    margin-left: 0;
  }

  .login-card {
    margin-top: 0;
  }

  .geo-panel {
    left: 50%;
  }

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

  .sidebar {
    min-height: auto;
    max-height: 42vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .top-actions,
  .maintenance-upload-form {
    justify-content: flex-start;
  }

  .maintenance-upload-card {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-gate {
    grid-template-columns: 1fr;
  }

  .module-import-options {
    grid-template-columns: 1fr;
  }

  .independent-rename-grid,
  .display-name-grid {
    grid-template-columns: 1fr;
  }

  .display-name-head,
  .business-index-head {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

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

  .offsite-period-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .offsite-period-filter select {
    min-width: 0;
    width: 100%;
  }

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

  .dashboard-offsite .offsite-toolbar-actions {
    justify-content: flex-start;
  }

  .dashboard-offsite .offsite-target-control,
  .dashboard-offsite .offsite-target-control select {
    width: 100%;
    max-width: none;
  }

  .dashboard-hero-meta,
  .dashboard-grid-4,
  .dashboard-grid-5,
  .traffic-insight-grid,
  .traffic-action-grid {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .sku-style-card-main {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .sku-style-card-main .sku-style-metrics,
  .sku-style-card-main .sku-status-cell {
    grid-column: 2 / -1;
  }

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

  .inventory-decision-grid,
  .inventory-rank-grid,
  .plan-daily-metric-strip,
  .plan-decision-grid,
  .plan-focus-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .plan-month-row {
    grid-template-columns: 1fr;
  }

  .plan-month-insight {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .activity-row {
    grid-template-columns: minmax(0, 1.2fr) 120px minmax(180px, 1fr) minmax(180px, 1fr);
  }

  .activity-status {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .zone-metrics,
  .preview-source-grid,
  .quality-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quality-history-item {
    grid-template-columns: 1fr;
  }

  .user-admin-body {
    grid-template-columns: 1fr;
  }

  .quality-history-item dl div {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  select,
  .pager {
    width: 100%;
  }

  .pager .icon-button {
    flex: 1;
  }

  .dashboard-shell {
    padding: 12px;
  }

  .dashboard-grid-4,
  .dashboard-grid-5,
  .traffic-insight-grid,
  .traffic-action-grid,
  .ops-grid,
  .dashboard-hero-meta,
  .zone-result-card,
  .zone-result-metrics,
  .inventory-decision-grid,
  .inventory-rank-grid,
  .plan-daily-metric-strip,
  .plan-decision-grid,
  .plan-focus-grid,
  .plan-channel-grid,
  .plan-channel-list,
  .plan-month-insight,
  .preview-source-grid,
  .quality-strip,
  .compact-table-head,
  .compact-table-row {
    grid-template-columns: 1fr;
  }

  .activity-row {
    grid-template-columns: 1fr;
  }

  .zone-result-bars div {
    grid-template-columns: 1fr;
  }

  .zone-result-bars em {
    text-align: left;
  }

  .activity-status {
    grid-column: auto;
  }

  .quality-history-item dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ops-head button,
  .ops-actions .ghost-button {
    width: 100%;
  }

  .dashboard-panel-head,
  .monthly-card-head,
  .traffic-card-head,
  .zone-card-head,
  .monthly-row,
  .monthly-meta,
  .budget-list div {
    flex-direction: column;
    align-items: flex-start;
  }

  .zone-metrics {
    grid-template-columns: 1fr;
  }

  .sku-style-card {
    padding: 12px;
  }

  .sku-style-card-main {
    grid-template-columns: 1fr;
  }

  .sku-style-card-main .sku-style-metrics,
  .sku-style-card-main .sku-status-cell {
    grid-column: auto;
  }

  .sku-style-card .sku-product-cell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sku-style-card .sku-product-thumb {
    width: 76px;
    height: 76px;
  }

  .sku-style-metrics,
  .sku-variant-strip {
    grid-template-columns: 1fr;
  }
}

/* Locked visual contract: offsite promotion cards must keep a stable poster layout. */
.dashboard-offsite .offsite-product-grid {
  grid-template-columns: repeat(auto-fill, 230px) !important;
  align-items: start;
}

.dashboard-offsite .offsite-product-card {
  width: 230px !important;
  height: 500px !important;
  grid-template-rows: 282px minmax(0, 1fr) !important;
}

.dashboard-offsite .offsite-product-image {
  width: 100% !important;
  height: 282px !important;
  min-height: 282px !important;
  max-height: 282px !important;
  aspect-ratio: auto !important;
}

.dashboard-offsite .offsite-product-image .product-image-preview-trigger {
  display: grid !important;
  place-items: center;
}

.dashboard-offsite .offsite-product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.dashboard-offsite .offsite-product-body {
  min-height: 0;
  gap: 5px;
  padding: 10px 12px 11px;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-offsite .offsite-product-body .product-title-row h4 {
  display: -webkit-box;
  min-height: 19px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 14px;
  line-height: 1.3;
}

.dashboard-offsite .offsite-product-body dl {
  display: grid;
  grid-auto-rows: 21px;
  gap: 3px;
  min-height: 0;
  overflow: hidden;
}

.dashboard-offsite .offsite-product-body dl div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  overflow: hidden;
}

.dashboard-offsite .offsite-product-body dd,
.dashboard-offsite .offsite-product-body dt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.dashboard-offsite .offsite-product-body dd {
  display: block;
  font-size: 13px;
}

.dashboard-offsite .offsite-product-body dt {
  font-size: 12px;
}

/* Offsite screenshot balance: keep card size, center each group in the capture. */
.dashboard-offsite .offsite-capture-area {
  justify-items: stretch;
  gap: 22px;
  padding: 0 12px 18px;
}

.dashboard-offsite .offsite-group {
  width: 100%;
  max-width: 1680px;
}

.dashboard-offsite .offsite-group-head {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

.dashboard-offsite .offsite-product-grid {
  justify-content: center !important;
  justify-items: center;
  gap: 14px !important;
  width: 100%;
  margin: 0 auto;
}

.dashboard-offsite .offsite-capture-area.is-capturing {
  width: fit-content;
  max-width: none;
  margin: 0 auto;
  padding: 12px 22px 24px;
  background: #f3f6f2;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group,
.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group-head {
  width: 1680px;
  max-width: 1680px;
}

/* Final offsite centering override for page and screenshots. */
.dashboard-offsite > .dashboard-hero,
.dashboard-offsite > .offsite-period-filter,
.dashboard-offsite > .offsite-toolbar,
.dashboard-offsite > .offsite-capture-area {
  width: 100% !important;
}

.dashboard-offsite .offsite-capture-area {
  display: grid !important;
  justify-content: stretch !important;
  justify-items: stretch !important;
  width: 100% !important;
}

.dashboard-offsite .offsite-group {
  width: 100% !important;
  max-width: 1680px !important;
  margin-inline: auto !important;
}

.dashboard-offsite .offsite-group-head {
  width: 100% !important;
  max-width: 1680px !important;
  margin-inline: auto !important;
}

.dashboard-offsite .offsite-product-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  align-items: flex-start !important;
  justify-content: center !important;
  justify-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 1680px !important;
  margin-inline: auto !important;
}

.dashboard-offsite .offsite-product-card {
  width: 100% !important;
  min-width: 0 !important;
  height: 500px !important;
  grid-template-rows: 282px minmax(0, 1fr) !important;
}

.dashboard-offsite .offsite-product-image {
  height: 282px !important;
  min-height: 282px !important;
  max-height: 282px !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group,
.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group-head {
  width: 1680px !important;
  max-width: 1680px !important;
}

/* Visual upgrade layer: intentionally stronger than the base theme. */
.shell {
  background: #f3f6f8;
}

.sidebar {
  padding: 22px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.92)),
    #ffffff;
}

.brand {
  min-height: 56px;
}

.mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.object-item {
  min-height: 48px;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.object-item:hover {
  border-color: #dbe6ea;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.object-item.active {
  border-color: rgba(15, 118, 110, 0.38);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(37, 99, 235, 0.04)),
    #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.object-item.active::before {
  inset: 11px auto 11px 0;
  width: 4px;
  background: linear-gradient(180deg, #0f766e, #2dd4bf);
}

.main {
  background:
    radial-gradient(circle at 72% -8%, rgba(15, 118, 110, 0.12), transparent 30%),
    linear-gradient(180deg, #fbfcfd 0%, #f3f6f8 100%);
}

.topbar {
  border-bottom-color: rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.035);
}

.topbar h2 {
  font-size: 32px;
  font-weight: 900;
}

.top-actions .ghost-button {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.workspace.dashboard-mode {
  padding: 16px 28px 28px;
  background: transparent;
}

.sheet-view {
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.1);
}

.dashboard-shell {
  gap: 20px;
  padding: 0;
  background: transparent;
}

.dashboard-panel {
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.075);
}

.dashboard-panel-head {
  min-height: 34px;
}

.dashboard-panel-head h4 {
  font-size: 18px;
  font-weight: 900;
}

.dashboard-panel-head p {
  max-width: 78ch;
}

.dashboard-plan {
  gap: 20px;
}

.dashboard-plan .plan-summary-main {
  grid-template-columns: minmax(320px, 0.62fr) minmax(0, 1fr);
  align-items: center;
  min-height: 268px;
  padding: 32px 34px;
  border: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 6%, rgba(45, 212, 191, 0.24), transparent 26%),
    radial-gradient(circle at 54% 110%, rgba(37, 99, 235, 0.12), transparent 26%),
    linear-gradient(135deg, #0f172a 0%, #12342f 48%, #0f766e 100%);
  color: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
}

.dashboard-plan .plan-summary-main.is-risk {
  background:
    radial-gradient(circle at 86% 6%, rgba(251, 191, 36, 0.24), transparent 26%),
    radial-gradient(circle at 54% 110%, rgba(37, 99, 235, 0.1), transparent 26%),
    linear-gradient(135deg, #111827 0%, #3b2f18 45%, #92400e 100%);
}

.dashboard-plan .plan-summary-main > span,
.dashboard-plan .plan-summary-main p,
.dashboard-plan .plan-summary-main small {
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-plan .plan-summary-main > span,
.dashboard-plan .plan-summary-main > p {
  display: none !important;
}

.dashboard-plan .plan-summary-main strong {
  color: #fff;
  font-size: 34px;
  max-width: 420px;
}

.dashboard-plan .plan-summary-title {
  display: grid;
  gap: 12px;
  align-content: center;
}

.plan-data-freshness {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.plan-data-freshness b {
  color: #fff;
  font-size: 13px;
}

.dashboard-plan .plan-summary-metrics div {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.dashboard-plan .plan-summary-metrics b {
  color: #fff;
  font-size: 19px;
}

.dashboard-plan .plan-daily-metric-date,
.dashboard-plan .plan-daily-metric-card {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.dashboard-plan .plan-daily-metric-date small,
.dashboard-plan .plan-daily-metric-card small,
.dashboard-plan .plan-daily-metric-date em,
.dashboard-plan .plan-daily-metric-card em {
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-plan .plan-daily-metric-date b,
.dashboard-plan .plan-daily-metric-card b {
  color: #fff;
}

.plan-budget-table,
.plan-channel-table,
.plan-month-table,
.plan-daily-table {
  border-color: rgba(226, 232, 240, 0.86);
  border-radius: 16px;
}

.plan-budget-head,
.plan-channel-head,
.plan-month-table-head {
  background: #f8fafc;
  color: #475569;
}

.plan-budget-row,
.plan-channel-row,
.plan-month-table-row {
  background: #fff;
}

.plan-budget-row.is-summary,
.plan-channel-row.is-total {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.1), transparent 55%),
    #ffffff;
}

.plan-month-table-row.is-current {
  background:
    linear-gradient(90deg, rgba(251, 191, 36, 0.16), transparent 40%),
    #fffaf0;
}

.plan-month-table-cell.is-over {
  background: rgba(251, 191, 36, 0.16);
}

.plan-month-table-month em {
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.plan-daily-head {
  background: linear-gradient(135deg, #0f172a, #12342f);
}

/* Hide low-value chrome labels requested out of the UI. */
.brand p,
.topbar .eyebrow,
.current-user,
.sidebar .brand .mark,
.plan-summary-main::before {
  display: none !important;
  content: none !important;
}

.offsite-add-button {
  margin-right: auto;
  min-height: 44px;
  padding-inline: 18px;
  font-weight: 800;
}

.offsite-add-dialog {
  width: min(720px, calc(100vw - 40px));
}

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

.offsite-add-form label,
.offsite-add-wide {
  display: grid;
  gap: 8px;
}

.offsite-add-form label span,
.offsite-field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.offsite-add-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  background: #fff;
  outline: none;
}

.offsite-add-form input:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.offsite-period-mode {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: #f8fafc;
}

.offsite-period-mode button {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-weight: 900;
}

.offsite-period-mode button.active {
  background: #fff;
  color: #0f766e;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.offsite-period-panel {
  display: grid;
  gap: 12px;
}

.offsite-period-panel[hidden] {
  display: none;
}

.offsite-new-period-inline {
  grid-template-columns: 180px minmax(0, 1fr);
}

.offsite-add-wide {
  grid-column: 1 / -1;
}

.offsite-image-dropzone {
  min-height: 180px;
  padding: 14px;
  border-style: dashed;
}

.offsite-image-dropzone img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
}

.offsite-image-actions,
.offsite-add-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.offsite-image-actions {
  justify-content: flex-start;
}

.offsite-add-actions {
  margin-top: 18px;
}

.offsite-add-actions > div {
  display: flex;
  gap: 10px;
}

.offsite-add-actions [data-offsite-add-status] {
  margin: 0;
}

.offsite-size-picker {
  display: grid;
  gap: 10px;
}

.offsite-size-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.offsite-size-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.offsite-size-head .ghost-button {
  height: 32px;
  padding-inline: 10px;
  border-radius: 8px;
  font-size: 12px;
}

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

.offsite-size-row {
  display: grid;
  grid-template-columns: minmax(58px, 0.85fr) minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.offsite-size-row select,
.offsite-size-row input {
  min-width: 0;
  height: 38px;
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.offsite-size-row input {
  text-align: center;
}

.offsite-size-picker p {
  min-height: 20px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.offsite-size-picker p.error {
  color: #b91c1c;
}

@media (max-width: 760px) {
  .offsite-add-form {
    grid-template-columns: 1fr;
  }

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

  .offsite-new-period-inline {
    grid-template-columns: 1fr;
  }

  .offsite-add-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Final hard lock: station offsite promotion grid must render 7 cards per row. */
.dashboard-offsite .offsite-capture-area .offsite-group,
.dashboard-offsite .offsite-capture-area .offsite-group-head,
.dashboard-offsite .offsite-capture-area .offsite-product-grid {
  width: min(100%, 1680px) !important;
  max-width: 1680px !important;
  margin-inline: auto !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 14px !important;
  justify-content: center !important;
  justify-items: stretch !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 500px !important;
  grid-template-rows: 282px minmax(0, 1fr) !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-image {
  height: 282px !important;
  min-height: 282px !important;
  max-height: 282px !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group,
.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group-head,
.dashboard-offsite .offsite-capture-area.is-capturing .offsite-product-grid {
  width: 1680px !important;
  max-width: 1680px !important;
}

/* Offsite page polish: keep controls compact so the product wall stays first. */
.dashboard-offsite > .offsite-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 1680px) !important;
  margin-inline: auto !important;
  padding: 8px 0 12px !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.dashboard-offsite .offsite-toolbar-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-offsite .offsite-toolbar-title strong {
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.dashboard-offsite .offsite-toolbar-title span,
.dashboard-offsite .offsite-toolbar-title em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-offsite .offsite-toolbar-title em {
  color: #0f766e;
}

.dashboard-offsite .offsite-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.dashboard-offsite .offsite-toolbar-actions .offsite-add-button + .offsite-target-control {
  display: none;
}

.dashboard-offsite .offsite-toolbar-actions .offsite-target-control {
  order: 1;
}

.dashboard-offsite .offsite-toolbar-actions .offsite-add-button {
  order: 2;
}

.dashboard-offsite .offsite-toolbar-actions .offsite-period-toggle {
  order: 3;
}

.dashboard-offsite .offsite-add-button,
.dashboard-offsite .offsite-period-toggle,
.dashboard-offsite .offsite-group-add {
  height: 34px;
  border-radius: 8px;
  border-color: rgba(15, 118, 110, 0.22);
  background: #ffffff;
  color: #0f2f2c;
}

.dashboard-offsite .offsite-period-toggle.active {
  background: rgba(15, 118, 110, 0.1);
}

.dashboard-offsite .offsite-add-button {
  padding-inline: 14px;
}

.dashboard-offsite .offsite-target-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-offsite .offsite-target-control select {
  min-width: 150px;
  max-width: 260px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  outline: none;
}

.dashboard-offsite .offsite-period-create {
  grid-column: 1 / -1;
  display: none;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.dashboard-offsite .offsite-period-create.is-open {
  display: flex;
}

.dashboard-offsite .offsite-period-create label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-offsite .offsite-period-create input {
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.dashboard-offsite .offsite-period-create input[type="date"] {
  width: 148px;
}

.dashboard-offsite .offsite-period-create input[type="text"] {
  width: min(210px, 100%);
}

.dashboard-offsite .offsite-period-create button {
  height: 34px;
  border-radius: 8px;
}

.dashboard-offsite .offsite-period-create em {
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-offsite .offsite-period-create em.error {
  color: #b91c1c;
}

.dashboard-offsite .offsite-period-create em.success {
  color: #0f766e;
}

.dashboard-offsite .offsite-empty-period {
  grid-column: 1 / -1;
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background: rgba(240, 253, 250, 0.5);
  color: #0f766e;
  font-weight: 900;
}

.dashboard-offsite .offsite-group {
  gap: 14px !important;
}

.dashboard-offsite .offsite-group-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 16px !important;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.82) 34%),
    #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.dashboard-offsite .offsite-group-head h3 {
  font-size: 18px;
  font-weight: 900;
}

.dashboard-offsite .offsite-group-head p {
  margin-top: 4px;
  color: #64748b;
  font-weight: 700;
}

.dashboard-offsite .offsite-group-add {
  padding-inline: 13px;
  font-size: 12px;
}

.offsite-add-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 38px 0 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.offsite-add-form select:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

/* Responsive density pass: keep the offsite wall proportional at different zoom levels. */
.dashboard-offsite {
  --offsite-content-width: 1680px;
  --offsite-screenshot-content-width: 1206px;
  --offsite-screenshot-columns: 5;
  --offsite-page-gutter: clamp(14px, 1.25vw, 28px);
  --offsite-card-gap: clamp(10px, 0.75vw, 14px);
}

.dashboard-offsite > .dashboard-hero,
.dashboard-offsite > .offsite-period-filter,
.dashboard-offsite > .offsite-toolbar,
.dashboard-offsite > .offsite-capture-area {
  width: min(calc(100% - (var(--offsite-page-gutter) * 2)), var(--offsite-content-width)) !important;
  max-width: var(--offsite-content-width) !important;
  margin-inline: auto !important;
}

.dashboard-offsite > .offsite-period-filter,
.dashboard-offsite > .offsite-toolbar {
  padding-block: 8px 12px !important;
}

.dashboard-offsite .offsite-capture-area {
  padding: 0 0 18px !important;
}

.dashboard-offsite .offsite-capture-area .offsite-group,
.dashboard-offsite .offsite-capture-area .offsite-group-head,
.dashboard-offsite .offsite-capture-area .offsite-product-grid {
  width: 100% !important;
  max-width: var(--offsite-content-width) !important;
  margin-inline: auto !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 230px)) !important;
  gap: var(--offsite-card-gap) !important;
  align-items: start !important;
  justify-content: start !important;
  justify-items: stretch !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-card {
  height: auto !important;
  min-height: 0 !important;
  grid-template-rows: auto minmax(150px, auto) !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-image {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 230 / 282 !important;
  background: #0f172a !important;
  overflow: hidden !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing {
  width: fit-content !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding: 12px 22px 24px !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group,
.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group-head,
.dashboard-offsite .offsite-capture-area.is-capturing .offsite-product-grid {
  width: var(--offsite-screenshot-content-width) !important;
  max-width: var(--offsite-screenshot-content-width) !important;
  margin-inline: auto !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-product-grid {
  grid-template-columns: repeat(var(--offsite-screenshot-columns), minmax(0, 1fr)) !important;
  gap: 14px !important;
  justify-content: center !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-image .product-image-preview-trigger {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-image img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-body {
  min-height: 0 !important;
  padding: clamp(8px, 0.68vw, 11px) clamp(9px, 0.78vw, 12px) !important;
  gap: clamp(4px, 0.36vw, 6px) !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-body .product-title-row h4 {
  min-height: 0 !important;
  font-size: clamp(12px, 0.72vw, 14px) !important;
  line-height: 1.28 !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-body dl {
  grid-auto-rows: minmax(18px, auto) !important;
  gap: clamp(2px, 0.22vw, 3px) !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-body dl div {
  grid-template-columns: clamp(46px, 3.5vw, 56px) minmax(0, 1fr) !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-body dt {
  font-size: clamp(10px, 0.62vw, 12px) !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-body dd {
  font-size: clamp(11px, 0.68vw, 13px) !important;
}

@media (max-width: 1500px) {
  .dashboard-offsite .offsite-capture-area .offsite-product-grid {
    grid-template-columns: repeat(var(--offsite-columns-large, 7), minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1260px) {
  .dashboard-offsite .offsite-capture-area .offsite-product-grid {
    grid-template-columns: repeat(var(--offsite-columns-medium, 6), minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1040px) {
  .dashboard-offsite .offsite-capture-area .offsite-product-grid {
    grid-template-columns: repeat(var(--offsite-columns-compact, 4), minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .dashboard-offsite .offsite-capture-area .offsite-product-grid {
    grid-template-columns: repeat(var(--offsite-columns-narrow, 2), minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .dashboard-offsite .offsite-capture-area .offsite-product-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.dashboard-home-products {
  --home-row-image-width: clamp(64px, 4.2vw, 92px);
}

.dashboard-home-products .home-clean-table th,
.dashboard-home-products .home-clean-table td {
  padding: clamp(8px, 0.55vw, 12px);
}

.dashboard-home-products .home-clean-table th:nth-child(2),
.dashboard-home-products .home-clean-table td:nth-child(2) {
  width: clamp(420px, 30vw, 620px);
}

.dashboard-home-products .home-product-cell {
  grid-template-columns: var(--home-row-image-width) minmax(0, 1fr);
  justify-content: start;
  gap: clamp(12px, 0.9vw, 20px);
}

.dashboard-home-products .home-product-row-image {
  width: var(--home-row-image-width);
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: clamp(10px, 0.7vw, 16px);
  background: #eef3ef;
}

.dashboard-home-products .home-product-row-image .product-image {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  background: #eef3ef;
}

.dashboard-home-products .home-product-row-image .product-image-preview-trigger {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.dashboard-home-products .home-product-row-image img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center;
  background: #eef3ef;
}

.dashboard-taobao-products {
  gap: 14px;
}

.taobao-products-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.taobao-products-panel {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.055);
}

.taobao-products-filter {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
}

.taobao-products-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.taobao-products-filter-head > div:first-child {
  display: grid;
  gap: 3px;
}

.taobao-products-filter-head strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.taobao-products-filter-head span {
  color: #64748b;
  font-size: 12px;
}

.taobao-products-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.taobao-products-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) repeat(7, minmax(118px, 1fr));
  gap: 10px;
  align-items: end;
}

.taobao-products-filter label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.taobao-products-filter label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.taobao-products-filter input,
.taobao-products-filter select {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #dbe5eb;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.taobao-products-filter input:focus,
.taobao-products-filter select:focus {
  border-color: #14b8a6;
  outline: 2px solid rgba(20, 184, 166, 0.16);
  outline-offset: 0;
}

.taobao-products-toolbar {
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

.taobao-products-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 245px);
}

.taobao-products-table {
  width: 100%;
  min-width: 1660px;
  border-collapse: collapse;
  table-layout: fixed;
}

.taobao-products-table th,
.taobao-products-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f4;
  text-align: left;
  vertical-align: middle;
}

.taobao-products-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.taobao-products-table tbody tr:hover td {
  background: #f8fafc;
}

.taobao-products-table th:nth-child(1),
.taobao-products-table td:nth-child(1) {
  width: 56px;
  text-align: center;
}

.taobao-products-table th:nth-child(2),
.taobao-products-table td:nth-child(2) {
  width: 84px;
  text-align: center;
}

.taobao-products-table th:nth-child(3),
.taobao-products-table td:nth-child(3) {
  width: 330px;
}

.taobao-products-table th:nth-child(4),
.taobao-products-table td:nth-child(4) {
  width: 168px;
}

.taobao-products-table th:nth-child(5),
.taobao-products-table td:nth-child(5),
.taobao-products-table th:nth-child(6),
.taobao-products-table td:nth-child(6) {
  width: 145px;
}

.taobao-products-table th:nth-child(7),
.taobao-products-table td:nth-child(7) {
  width: 170px;
}

.taobao-products-table th:nth-child(8),
.taobao-products-table td:nth-child(8),
.taobao-products-table th:nth-child(9),
.taobao-products-table td:nth-child(9) {
  width: 110px;
}

.taobao-products-table th:nth-child(10),
.taobao-products-table td:nth-child(10) {
  width: 185px;
}

.taobao-products-table th:nth-child(11),
.taobao-products-table td:nth-child(11),
.taobao-products-table th:nth-child(12),
.taobao-products-table td:nth-child(12) {
  width: 96px;
  text-align: right;
}

.taobao-products-table th:nth-child(13),
.taobao-products-table td:nth-child(13) {
  width: 170px;
}

.taobao-promotion-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.taobao-promotion-pill.muted {
  background: #f1f5f9;
  color: #94a3b8;
}

.taobao-product-thumb {
  width: 56px;
  height: 72px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 8px;
  background: #eef3ef;
}

.taobao-product-thumb .product-image-preview-trigger,
.taobao-product-thumb img {
  width: 100%;
  height: 100%;
}

.taobao-product-thumb img {
  object-fit: cover;
  object-position: center top;
}

.taobao-product-thumb .product-image-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  font-size: 12px;
}

.taobao-product-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.taobao-product-main strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
}

.taobao-product-main span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.taobao-product-main em {
  color: #0f766e;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.copy-code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.copy-code-list .product-copy-id {
  max-width: 100%;
}

@media (max-width: 1200px) {
  .taobao-products-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .taobao-products-filter-head {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Final SKU table override: metric cells are plain table values, not cards. */
.dashboard-taobao-sku .sku-client-row .sku-value-cell {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dashboard-taobao-sku .sku-client-row .sku-value-cell span {
  display: none !important;
}

.dashboard-taobao-sku .sku-client-row .sku-value-cell strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
}

.dashboard-taobao-sku .sku-product-cell {
  grid-template-columns: var(--sku-row-image-width, clamp(64px, 4.2vw, 92px)) minmax(0, 1fr);
  gap: clamp(12px, 0.9vw, 20px);
}

.dashboard-taobao-sku .sku-product-thumb {
  width: var(--sku-row-image-width, clamp(64px, 4.2vw, 92px));
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: clamp(10px, 0.7vw, 16px);
}

.dashboard-taobao-sku .sku-product-thumb .product-image {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  background: #eef3ef;
}

.dashboard-taobao-sku .sku-product-thumb .product-image-preview-trigger {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.dashboard-taobao-sku .sku-product-thumb img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center;
}

/* Compact style-level replenishment rows. */
.dashboard-taobao-sku .sku-style-card .sku-product-cell {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
}

.dashboard-taobao-sku .sku-style-card .sku-product-thumb {
  width: 74px;
  height: 74px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
}

.dashboard-taobao-sku .sku-style-card .sku-product-cell strong {
  font-size: 14px;
  line-height: 1.22;
}

.dashboard-taobao-sku .sku-style-card .sku-variant-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 9px 0 0 60px;
  border-top: 1px solid #eef2f7;
}

.dashboard-taobao-sku .sku-style-card .sku-variant-card {
  grid-template-columns: minmax(120px, 1fr) minmax(56px, auto);
  width: 214px;
  max-width: 214px;
  padding: 6px 8px;
}

/* Final offsite image contract: every card uses the same poster slot. */
.dashboard-offsite .offsite-capture-area .offsite-product-card,
.dashboard-offsite .offsite-product-card {
  width: var(--offsite-card-width) !important;
  min-width: var(--offsite-card-width) !important;
  max-width: var(--offsite-card-width) !important;
  height: var(--offsite-card-height) !important;
  min-height: var(--offsite-card-height) !important;
  grid-template-rows: var(--offsite-image-height) minmax(0, 1fr) !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-image,
.dashboard-offsite .offsite-product-image {
  position: relative !important;
  width: 100% !important;
  height: var(--offsite-image-height) !important;
  min-height: var(--offsite-image-height) !important;
  max-height: var(--offsite-image-height) !important;
  aspect-ratio: auto !important;
  background: #eef5f2 !important;
  overflow: hidden !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-product-card {
  height: 500px !important;
  grid-template-rows: 282px minmax(0, 1fr) !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-product-image {
  height: 282px !important;
  min-height: 282px !important;
  max-height: 282px !important;
  aspect-ratio: auto !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-image .product-image-preview-trigger,
.dashboard-offsite .offsite-product-image .product-image-preview-trigger {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: #fff !important;
}

.dashboard-offsite .offsite-capture-area .offsite-product-image img,
.dashboard-offsite .offsite-product-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  transform: none !important;
}

/* Offsite promotion hard contract: page is 8 columns; screenshot export is 5 columns. */
.dashboard-offsite {
  --offsite-page-columns: 7;
  --offsite-export-columns: 5;
  --offsite-card-gap: 14px;
  --offsite-card-height: 500px;
  --offsite-image-height: 282px;
  --offsite-card-width: 230px;
  --offsite-page-width: calc((var(--offsite-card-width) * var(--offsite-page-columns)) + (var(--offsite-card-gap) * (var(--offsite-page-columns) - 1)));
  --offsite-export-width: calc((230px * var(--offsite-export-columns)) + (var(--offsite-card-gap) * (var(--offsite-export-columns) - 1)));
}

.dashboard-offsite > .dashboard-hero,
.dashboard-offsite > .offsite-period-filter,
.dashboard-offsite > .offsite-toolbar,
.dashboard-offsite > .offsite-capture-area {
  width: min(calc(100% - 28px), var(--offsite-page-width)) !important;
  max-width: var(--offsite-page-width) !important;
  margin-inline: auto !important;
}

.dashboard-offsite .offsite-capture-area {
  display: grid !important;
  justify-content: center !important;
  justify-items: center !important;
  padding: 0 0 18px !important;
}

.dashboard-offsite .offsite-group,
.dashboard-offsite .offsite-group-head,
.dashboard-offsite .offsite-product-grid {
  width: 100% !important;
  max-width: var(--offsite-page-width) !important;
  margin-inline: auto !important;
}

.dashboard-offsite .offsite-product-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--offsite-page-columns), var(--offsite-card-width)) !important;
  gap: var(--offsite-card-gap) !important;
  align-items: start !important;
  justify-content: center !important;
  justify-items: center !important;
}

.dashboard-offsite .offsite-product-card {
  width: var(--offsite-card-width) !important;
  min-width: 0 !important;
  max-width: var(--offsite-card-width) !important;
  height: var(--offsite-card-height) !important;
  min-height: var(--offsite-card-height) !important;
  grid-template-rows: var(--offsite-image-height) minmax(0, 1fr) !important;
}

.dashboard-offsite .offsite-product-image {
  position: relative !important;
  width: 100% !important;
  height: var(--offsite-image-height) !important;
  min-height: var(--offsite-image-height) !important;
  max-height: var(--offsite-image-height) !important;
  aspect-ratio: auto !important;
  background: #eef5f2 !important;
  overflow: hidden !important;
}

.dashboard-offsite .offsite-product-image .product-image-preview-trigger {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.dashboard-offsite .offsite-product-image .product-image-preview-trigger:focus,
.dashboard-offsite .offsite-product-image .product-image-preview-trigger:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

.dashboard-offsite .offsite-product-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  transform: none !important;
  background: #fff !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing {
  width: fit-content !important;
  max-width: none !important;
  padding: 12px 22px 24px !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group,
.dashboard-offsite .offsite-capture-area.is-capturing .offsite-group-head,
.dashboard-offsite .offsite-capture-area.is-capturing .offsite-product-grid {
  width: var(--offsite-export-width) !important;
  max-width: var(--offsite-export-width) !important;
}

.dashboard-offsite .offsite-capture-area.is-capturing .offsite-product-grid {
  grid-template-columns: repeat(var(--offsite-export-columns), minmax(0, 1fr)) !important;
}

/* Empty offsite periods are controls, not product walls. */
.dashboard-offsite.is-empty-period > .offsite-capture-area {
  align-content: start !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding: 0 0 24px !important;
}

.dashboard-offsite.is-empty-period .offsite-group,
.dashboard-offsite .offsite-group.is-empty {
  width: min(100%, 760px) !important;
  max-width: 760px !important;
}

.dashboard-offsite.is-empty-period .offsite-group-head,
.dashboard-offsite .offsite-group.is-empty .offsite-group-head {
  width: 100% !important;
  max-width: 760px !important;
  min-height: 0 !important;
}

.dashboard-offsite.is-empty-period .offsite-product-grid,
.dashboard-offsite .offsite-product-grid.is-empty {
  display: block !important;
  width: 100% !important;
  max-width: 760px !important;
  min-height: 0 !important;
  grid-template-columns: none !important;
}

.dashboard-offsite.is-empty-period .offsite-empty-period,
.dashboard-offsite .offsite-product-grid.is-empty .offsite-empty-period {
  min-height: 72px !important;
  padding: 18px 20px !important;
}

/* Keep the auth gallery atmospheric so the login form remains the focus. */
.login-view {
  align-items: end;
  padding: clamp(18px, 4vh, 42px) clamp(18px, 5vw, 72px) clamp(52px, 8vh, 92px);
}

.boot-view .auth-gallery,
.login-view .auth-gallery {
  inset: clamp(14px, 2vw, 28px);
  height: auto;
}

.boot-view .auth-gallery.ready,
.login-view .auth-gallery.ready {
  opacity: 0.92;
  transform: scale(0.985);
}

.boot-card {
  z-index: 3;
}

.login-card {
  z-index: 3;
  width: min(342px, calc(100vw - 36px));
  padding: clamp(16px, 2.2vh, 22px) clamp(18px, 2.4vw, 26px) clamp(18px, 2.4vh, 24px);
  gap: clamp(8px, 1vh, 12px);
  border-radius: 16px;
}

.auth-gallery::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.12) 22%, transparent 42%),
    linear-gradient(90deg, rgba(248, 250, 252, 0.52), transparent 24%, transparent 76%, rgba(248, 250, 252, 0.52)),
    linear-gradient(180deg, rgba(248, 250, 252, 0.56), transparent 30%, transparent 70%, rgba(248, 250, 252, 0.56));
}

.auth-gallery::after {
  inset: 18px;
  border-color: rgba(148, 163, 184, 0.12);
}
