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

:root {
  --ink: #102f46;
  --muted: #777da7;
  --line: #e8e3bc;
  --paper: #fffdf7;
  --canvas: #f6f3e4;
  --sidebar: #102f46;
  --accent: #c6ecae;
  --accent-deep: #885053;
  --coral: #fe5f55;
  --violet: #777da7;
  --blue: #94c9a9;
  --good: #557f6c;
  --warn: #e88632;
  --danger: #c63b32;
  --gold: #f1c15f;
  --cream: #e8e3bc;
  --plum: #885053;
  --radius: 18px;
  --shadow: 0 16px 36px rgba(16, 47, 70, 0.12);
  --border: var(--line);
  --surface-soft: #f5f2df;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(198, 236, 174, 0.58), transparent 24rem),
    radial-gradient(circle at 12% 92%, rgba(254, 95, 85, 0.17), transparent 28rem),
    var(--canvas);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

.boot-screen {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  gap: 14px;
  color: var(--muted);
}

.boot-logo,
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--sidebar);
  background: linear-gradient(135deg, var(--gold), var(--coral));
  border-radius: 13px;
  font-weight: 800;
}

.boot-line {
  width: 140px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--cream);
}

.boot-line::after {
  display: block;
  width: 55%;
  height: 100%;
  content: "";
  background: var(--accent-deep);
  border-radius: inherit;
  animation: loading 1.1s ease-in-out infinite alternate;
}

@keyframes loading {
  from {
    transform: translateX(-90%);
  }
  to {
    transform: translateX(170%);
  }
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 16px 18px;
  color: #edf4ed;
  background:
    linear-gradient(168deg, rgba(119, 125, 167, 0.28), transparent 34%),
    radial-gradient(circle at 20% 90%, rgba(198, 236, 174, 0.22), transparent 13rem),
    linear-gradient(180deg, var(--sidebar) 0 72%, #163f56 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 0 7px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.brand-copy span {
  display: block;
  margin-top: 2px;
  color: #9ca9a1;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-list {
  display: grid;
  flex: 1 1 auto;
  gap: 11px;
  min-height: 0;
  overflow-y: auto;
  padding: 0 3px 12px 0;
  scrollbar-color: rgba(198, 236, 174, 0.28) transparent;
  scrollbar-width: thin;
}

.nav-list::-webkit-scrollbar {
  width: 4px;
}

.nav-list::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(198, 236, 174, 0.28);
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-group + .nav-group {
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.nav-group-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  padding: 0 11px 4px;
  color: #728078;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-group-label::before {
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: rgba(198, 236, 174, 0.6);
}

.nav-group:has(.nav-item.active) .nav-group-label {
  color: #aab7af;
}

.nav-group:has(.nav-item.active) .nav-group-label::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(198, 236, 174, 0.1);
}

.nav-group:nth-child(2) .nav-group-label::before {
  background: var(--gold);
}

.nav-group:nth-child(3) .nav-group-label::before {
  background: var(--coral);
}

.nav-group:nth-child(4) .nav-group-label::before {
  background: var(--blue);
}

.nav-group-items {
  display: grid;
  gap: 3px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 10px 0 7px;
  color: #aeb9b1;
  text-align: left;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  transform: translateX(2px);
}

.nav-item:active {
  transform: scale(0.985);
}

.nav-item.active {
  color: var(--sidebar);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  font-weight: 700;
  box-shadow:
    0 8px 18px rgba(4, 12, 7, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 14px;
  transition: background 160ms ease;
}

.nav-item:hover .nav-icon {
  background: rgba(255, 255, 255, 0.075);
}

.nav-item.active .nav-icon {
  background: rgba(21, 32, 24, 0.1);
}

.nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.nav-badge {
  min-width: 23px;
  margin-left: auto;
  padding: 2px 6px;
  color: #162019;
  text-align: center;
  border-radius: 99px;
  background: var(--coral);
  font-size: 10px;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  padding: 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.sync-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dfe7e0;
  font-size: 11px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(198, 236, 174, 0.12);
}

.sidebar-foot p {
  margin: 9px 0 0;
  color: #8d9b91;
  font-size: 10px;
  line-height: 1.55;
}

.main {
  position: relative;
  min-width: 0;
  padding: 25px clamp(22px, 3vw, 46px) 48px;
}

.main::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  content: "";
  background: linear-gradient(
    90deg,
    #885053 0 12.5%,
    #fe5f55 12.5% 25%,
    #777da7 25% 37.5%,
    #94c9a9 37.5% 50%,
    #c6ecae 50% 62.5%,
    #e88632 62.5% 75%,
    #f1c15f 75% 87.5%,
    #e8e3bc 87.5%
  );
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 46px;
  margin-bottom: 27px;
}

.mobile-brand {
  display: none;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs strong {
  color: var(--ink);
  font-weight: 700;
}

.top-actions,
.heading-actions,
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.date-range label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-range label span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.date-range input {
  width: 128px;
  min-height: 30px;
  padding: 3px 6px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.date-range-arrow {
  color: var(--muted);
}

.icon-button,
.avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.avatar {
  color: white;
  border: 0;
  background: linear-gradient(135deg, var(--plum), var(--violet));
  font-size: 12px;
  font-weight: 800;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.account-copy strong,
.account-copy small {
  display: block;
}

.account-copy strong {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.account-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.page-heading h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.052em;
}

.page-heading h1::after {
  display: block;
  width: min(118px, 36%);
  height: 6px;
  margin-top: 10px;
  content: "";
  border-radius: 99px;
  background: linear-gradient(90deg, var(--coral), var(--gold), var(--blue));
}

.page-heading p:not(.eyebrow) {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.button:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(16, 47, 70, 0.09);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  color: var(--sidebar);
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 8px 18px rgba(198, 59, 50, 0.18);
}

.button.dark {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.button.danger {
  color: var(--danger);
  border-color: rgba(254, 95, 85, 0.32);
  background: rgba(254, 95, 85, 0.1);
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 10px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.select,
.search-input,
.field input,
.field select,
.field textarea {
  min-height: 41px;
  padding: 0 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: var(--paper);
  font-size: 12px;
  transition:
    border 160ms ease,
    box-shadow 160ms ease;
}

.field textarea {
  min-height: 78px;
  padding-top: 11px;
  resize: vertical;
}

.select:focus,
.search-input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(148, 201, 169, 0.3);
}

.search-input {
  width: min(300px, 100%);
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -8px 0 20px;
  padding: 12px 15px;
  color: #8f4d20;
  border: 1px solid rgba(232, 134, 50, 0.42);
  border-radius: 12px;
  background: rgba(241, 193, 95, 0.18);
  font-size: 11px;
  line-height: 1.5;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 14px;
}

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

.metric-card,
.panel,
.channel-card,
.integration-card {
  border: 1px solid rgba(232, 227, 188, 0.92);
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(16, 47, 70, 0.08);
}

.metric-card {
  position: relative;
  min-height: 147px;
  overflow: hidden;
  padding: 17px 18px;
  border-top: 5px solid var(--metric-color, var(--violet));
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, transparent 62%, var(--metric-tint) 100%),
    var(--paper);
}

.metric-card::after {
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 105px;
  height: 105px;
  content: "";
  border-radius: 50%;
  background: var(--metric-tint, rgba(217, 255, 85, 0.18));
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: #fffdf7;
  border-radius: 10px;
  background: var(--metric-color, var(--violet));
  font-size: 14px;
}

.metric-value {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-foot {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.metric-foot strong {
  color: var(--good);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel {
  overflow: hidden;
  border-radius: var(--radius);
}

.panel-pad {
  padding: 19px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.panel-head > div:first-child {
  padding-left: 10px;
  border-left: 4px solid var(--violet);
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.channel-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(54px, 1fr));
  align-items: end;
  height: 208px;
  gap: clamp(12px, 3vw, 32px);
  padding: 10px 8px 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(255, 253, 247, 0.96), rgba(232, 227, 188, 0.2));
}

.chart-column {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  flex-direction: column;
  height: 100%;
  gap: 8px;
}

.chart-value {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
}

.chart-bar {
  width: min(52px, 76%);
  min-height: 8px;
  margin: 0 auto;
  border-radius: 10px 10px 3px 3px;
  background: var(--bar-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  animation: rise 520ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes rise {
  from {
    height: 0 !important;
    opacity: 0;
  }
}

.chart-label {
  min-height: 29px;
  color: var(--muted);
  text-align: center;
  font-size: 9px;
  line-height: 1.35;
}

.stock-health {
  display: grid;
  gap: 13px;
}

.health-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  font-size: 11px;
}

.health-row strong {
  font-size: 12px;
}

.health-bar {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(232, 227, 188, 0.62);
}

.health-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 18px;
}

.quick-actions-panel {
  margin-bottom: 14px;
}

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

.quick-action {
  min-height: 68px;
  padding: 11px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--blue);
  cursor: pointer;
}

.quick-action:nth-child(2) {
  background: var(--coral);
}

.quick-action:nth-child(3) {
  background: var(--gold);
}

.quick-action:nth-child(4) {
  color: white;
  background: var(--violet);
}

.quick-action small {
  color: rgba(16, 47, 70, 0.76);
}

.quick-action:nth-child(4) small {
  color: rgba(255, 255, 255, 0.78);
}

.quick-action span {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
}

.quick-action strong {
  display: block;
  font-size: 10px;
}

.quick-action small {
  color: rgba(16, 47, 70, 0.76);
  font-size: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th {
  padding: 11px 15px;
  color: var(--cream);
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  padding: 13px 15px;
  border-bottom: 1px solid rgba(232, 227, 188, 0.72);
  font-size: 11px;
}

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

tbody tr:hover {
  background: rgba(198, 236, 174, 0.18);
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  color: var(--ink);
  border-radius: 10px;
  background: rgba(148, 201, 169, 0.25);
  font-size: 10px;
  font-weight: 800;
}

.product-cell strong {
  display: block;
  max-width: 235px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}

.product-cell span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 99px;
  background: rgba(232, 227, 188, 0.56);
  font-size: 9px;
  font-weight: 700;
}

.status.good,
.tag.a {
  color: var(--sidebar);
  background: var(--accent);
}

.status.warn,
.tag.b {
  color: var(--sidebar);
  background: var(--gold);
}

.status.danger,
.tag.c {
  color: white;
  background: var(--danger);
}

.inventory-available {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 9px;
}

.inventory-available.is-low {
  color: white;
  background: var(--danger);
  box-shadow: 0 5px 12px rgba(198, 59, 50, 0.22);
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: inherit;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.sort-button span {
  color: var(--plum);
  font-size: 11px;
}

.sort-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.stock-store-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.qty-positive {
  color: var(--good);
  font-weight: 800;
}

.qty-negative {
  color: var(--danger);
  font-weight: 800;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 14px;
}

.channel-card,
.integration-card {
  padding: 17px;
  border-radius: var(--radius);
}

.channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.channel-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

.channel-logo.wb {
  color: white;
  background: linear-gradient(135deg, var(--plum), var(--coral));
}

.channel-logo.ozon {
  color: white;
  background: linear-gradient(135deg, var(--violet), var(--sidebar));
}

.channel-logo.direct {
  color: var(--sidebar);
  background: var(--accent);
}

.channel-number {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.channel-card p,
.integration-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.integration-card .button {
  width: 100%;
  margin-top: 16px;
}

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

.abc-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.abc-letter {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 800;
}

.abc-chip.a .abc-letter {
  color: var(--sidebar);
  background: var(--accent);
}

.abc-chip.b .abc-letter {
  color: var(--sidebar);
  background: var(--gold);
}

.abc-chip.c .abc-letter {
  color: white;
  background: var(--coral);
}

.abc-chip strong {
  display: block;
  font-size: 17px;
}

.abc-chip span {
  color: var(--muted);
  font-size: 9px;
}

.empty-state {
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 24, 18, 0.48);
  backdrop-filter: blur(6px);
  animation: fade-in 160ms ease both;
}

.modal {
  width: min(610px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(9, 16, 11, 0.25);
  animation: modal-in 220ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.modal-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.close-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbf8;
  cursor: pointer;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #4e574f;
  font-size: 10px;
  font-weight: 700;
}

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

.field-help.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.sale-lines {
  display: grid;
  gap: 9px;
}

.line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.sale-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 110px 34px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbf8;
}

.sale-line .field {
  gap: 4px;
}

.sale-line input,
.sale-line select {
  width: 100%;
}

.remove-line {
  display: grid;
  place-items: center;
  width: 34px;
  height: 41px;
  color: var(--danger);
  border: 1px solid #f1d2ce;
  border-radius: 10px;
  background: #fff5f3;
  cursor: pointer;
}

.icon-danger {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--danger);
  border: 1px solid #f1d2ce;
  border-radius: 9px;
  background: #fff5f3;
  cursor: pointer;
  font-size: 16px;
}

.user-actions {
  display: flex;
  gap: 7px;
}

.credentials-box {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf5;
}

.credentials-box div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.credentials-box span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.credentials-box strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.password-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

.credential-warning {
  margin-top: 11px;
  padding: 11px 12px;
  color: #755710;
  border: 1px solid #ead499;
  border-radius: 11px;
  background: #fff9e8;
  font-size: 10px;
  line-height: 1.5;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  width: min(980px, 100%);
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(221, 226, 217, 0.9);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(19, 29, 22, 0.13);
}

.auth-visual {
  display: flex;
  flex-direction: column;
  padding: 38px;
  color: #f2f7f2;
  background:
    radial-gradient(circle at 80% 82%, rgba(198, 236, 174, 0.25), transparent 17rem),
    radial-gradient(circle at 12% 10%, rgba(136, 80, 83, 0.34), transparent 14rem),
    var(--sidebar);
}

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

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand strong {
  font-size: 14px;
}

.auth-brand span {
  margin-top: 2px;
  color: #94a399;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-message {
  margin: auto 0;
}

.auth-message .eyebrow {
  color: var(--accent);
}

.auth-message h1 {
  max-width: 500px;
  margin: 0;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.auth-message > p:last-child {
  max-width: 510px;
  margin: 18px 0 0;
  color: #aebbb2;
  font-size: 12px;
  line-height: 1.7;
}

.auth-points {
  display: grid;
  gap: 9px;
  color: #cad3cc;
  font-size: 10px;
}

.auth-points span::first-letter {
  color: var(--accent);
}

.auth-panel {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: clamp(30px, 5vw, 58px);
}

.auth-panel-head {
  margin-bottom: 25px;
}

.auth-panel-head h2 {
  margin: 7px 0 0;
  font-size: 30px;
  letter-spacing: -0.045em;
}

.auth-panel-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.auth-kicker {
  color: var(--accent-deep);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form .field input {
  width: 100%;
  min-height: 47px;
}

.auth-submit {
  width: 100%;
  min-height: 47px;
  margin-top: 3px;
}

.auth-error {
  margin-bottom: 16px;
  padding: 11px 12px;
  color: #9b3932;
  border: 1px solid #f0c5c1;
  border-radius: 11px;
  background: #fff2f0;
  font-size: 10px;
  line-height: 1.5;
}

.auth-footnote {
  margin: 20px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 9px;
  line-height: 1.5;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: grid;
  width: min(360px, calc(100vw - 44px));
  gap: 9px;
}

.toast {
  padding: 13px 15px;
  color: white;
  border-radius: 13px;
  background: var(--sidebar);
  box-shadow: var(--shadow);
  font-size: 11px;
  line-height: 1.5;
  animation: toast-in 240ms ease both;
}

.toast.error {
  background: var(--danger);
}

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

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

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

  .price-entry-copy {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 760px) {
  .auth-page {
    align-items: start;
    padding: 0;
    background: var(--paper);
  }

  .auth-shell {
    display: block;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-visual {
    min-height: 235px;
    padding: 25px 22px;
  }

  .auth-message {
    margin: 30px 0 0;
  }

  .auth-message h1 {
    max-width: 440px;
    font-size: 32px;
  }

  .auth-message > p:last-child,
  .auth-points {
    display: none;
  }

  .auth-panel {
    padding: 34px 22px 42px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: block;
    width: 100%;
    height: 67px;
    padding: 8px 10px;
    background: rgba(16, 47, 70, 0.96);
    backdrop-filter: blur(14px);
  }

  .brand,
  .nav-label,
  .sidebar-foot {
    display: none;
  }

  .nav-list {
    display: flex;
    justify-content: space-around;
    gap: 3px;
  }

  .nav-group,
  .nav-group-items {
    display: contents;
  }

  .nav-group-label {
    display: none;
  }

  .nav-group + .nav-group {
    padding-top: 0;
    border-top: 0;
  }

  .nav-item {
    justify-content: center;
    flex: 1;
    flex-direction: column;
    min-height: 50px;
    padding: 4px 2px;
    font-size: 8px;
    border-radius: 10px;
  }

  .nav-icon {
    width: auto;
    margin: 0 0 2px;
    font-size: 14px;
  }

  .nav-badge {
    display: none;
  }

  .main {
    padding: 16px 14px 92px;
  }

  .topbar {
    margin-bottom: 20px;
  }

  .breadcrumbs {
    display: none;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-brand .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }

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

  .heading-actions,
  .filters {
    width: 100%;
    flex-wrap: wrap;
  }

  .heading-actions .button,
  .heading-actions .select {
    flex: 1;
  }

  .date-range {
    width: 100%;
    justify-content: space-between;
  }

  .date-range input {
    width: 112px;
  }

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

  .metric-card {
    min-height: 130px;
    padding: 14px;
  }

  .metric-value {
    font-size: 24px;
  }

  .section-grid,
  .abc-summary {
    grid-template-columns: 1fr;
  }

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

  .price-entry-form {
    grid-template-columns: 1fr;
  }

  .price-entry-copy {
    grid-column: auto;
  }

  .field.full {
    grid-column: auto;
  }

  .field-help.full {
    grid-column: auto;
  }

  .sale-line {
    grid-template-columns: 1fr 72px;
  }

  .sale-line .field:first-child {
    grid-column: 1 / -1;
  }

  .sale-line .field:nth-child(3) {
    grid-column: 1 / 2;
  }
}

@media (max-width: 430px) {
  .metrics {
    grid-template-columns: 1fr;
  }

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

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

  .top-actions .icon-button {
    display: none;
  }

  .account-copy {
    display: none;
  }
}

@media (min-width: 761px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    height: calc(100vh - 60px);
    min-height: 0;
  }

  .sidebar {
    position: relative;
    top: auto;
    height: 100%;
    padding: 20px 16px 16px;
    overflow: hidden;
  }

  .brand {
    margin-bottom: 13px;
    padding: 0 4px 14px;
  }

  .nav-list {
    gap: 6px;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    gap: 2px;
  }

  .nav-group + .nav-group {
    padding-top: 6px;
  }

  .nav-group-label {
    min-height: 14px;
    padding-bottom: 1px;
    font-size: 7px;
  }

  .nav-item {
    min-height: 35px;
  }

  .nav-icon {
    width: 27px;
    height: 27px;
  }

  .sidebar-foot {
    padding: 10px 12px;
  }

  .sidebar-foot p {
    margin-top: 5px;
    line-height: 1.35;
  }

  .main {
    height: 100%;
    overflow-y: auto;
    scrollbar-color: #dfe3e7 transparent;
    scrollbar-width: thin;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .app-shell {
    height: calc(100vh - 32px);
  }
}

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

.store-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.store-summary {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 5px solid var(--violet);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.store-summary:nth-child(3n + 2) {
  border-top-color: var(--coral);
}

.store-summary:nth-child(3n + 3) {
  border-top-color: var(--blue);
}

.store-summary-head,
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.store-summary h3 {
  margin: 14px 0;
  font-size: 17px;
}

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

.store-summary-metrics span {
  min-width: 0;
}

.store-summary-metrics small,
.store-summary-metrics strong {
  display: block;
}

.store-summary-metrics small {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.store-summary-metrics strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.store-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.store-filter > div:first-child strong,
.store-filter > div:first-child span {
  display: block;
}

.store-filter > div:first-child span,
.muted {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.store-filter-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.store-filter-items label {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 7px;
  align-items: center;
  padding: 8px 11px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}

.store-filter-items input {
  grid-row: 1 / 3;
}

.store-filter-items span {
  font-weight: 700;
  font-size: 12px;
}

.store-filter-items small {
  color: var(--muted);
  font-size: 10px;
}

.warehouse-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.warehouse-tabs button {
  min-width: 180px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.warehouse-tabs button.active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.warehouse-tabs span,
.warehouse-tabs small {
  display: block;
}

.warehouse-tabs span {
  font-weight: 800;
}

.warehouse-tabs small {
  margin-top: 4px;
  color: var(--muted);
}

.document-list {
  padding: 0 18px 18px;
}

.document-list > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 9px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.document-list small {
  grid-column: 2;
  color: var(--muted);
}

.document-delete {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
}

.price-input {
  width: 130px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

.price-create-panel {
  margin-bottom: 14px;
}

.price-entry-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 0.55fr) minmax(150px, 0.42fr) auto;
  align-items: end;
  gap: 14px;
}

.price-entry-copy h2 {
  margin: 0;
  font-size: 14px;
}

.price-entry-copy p {
  max-width: 440px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.price-entry-form .field input {
  width: 100%;
}

.difference-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.warehouse-report {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.marketplace-warehouse {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.marketplace-warehouse summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, rgba(148, 201, 169, 0.32), var(--paper));
}

.marketplace-warehouse summary::-webkit-details-marker {
  display: none;
}

.marketplace-warehouse summary::before {
  content: "›";
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  transition: transform 160ms ease;
}

.marketplace-warehouse[open] summary::before {
  transform: rotate(90deg);
}

.marketplace-warehouse summary > span:first-of-type {
  margin-right: auto;
}

.marketplace-warehouse summary strong,
.marketplace-warehouse summary small {
  display: block;
}

.marketplace-warehouse summary strong {
  font-size: 13px;
}

.marketplace-warehouse summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.warehouse-summary-total {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.warehouse-total-row td {
  background: var(--surface-soft);
}

.inventory-grand-total {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  background: var(--sidebar);
  color: #fff;
  font-size: 12px;
}

.inventory-grand-total strong {
  color: var(--accent);
}

.auto-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 13px;
  color: #557f6c;
  border: 1px solid rgba(148, 201, 169, 0.54);
  border-radius: 11px;
  background: rgba(198, 236, 174, 0.24);
  font-size: 10px;
  font-weight: 700;
}

.auto-sync-badge > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(148, 201, 169, 0.2);
}

.assistant-shell {
  display: grid;
  grid-template-columns: minmax(230px, 0.36fr) minmax(0, 1fr);
  min-height: 630px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.assistant-intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 14%, rgba(241, 193, 95, 0.24), transparent 12rem),
    linear-gradient(155deg, #102f46 0%, #263f5a 58%, #885053 100%);
}

.assistant-logo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.assistant-intro h2 {
  margin: 16px 0 8px;
  font-size: 26px;
  letter-spacing: -0.045em;
}

.assistant-intro p {
  margin: 0;
  color: var(--cream);
  font-size: 11px;
  line-height: 1.7;
}

.assistant-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: #e5e4ed;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 9px;
  font-weight: 700;
}

.assistant-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.assistant-status.ready i {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(198, 236, 174, 0.13);
}

.assistant-status.offline i {
  background: var(--coral);
}

.assistant-safety {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
}

.assistant-safety strong {
  color: var(--gold);
  font-size: 10px;
}

.assistant-safety span {
  color: #aaa7bc;
  font-size: 9px;
  line-height: 1.6;
}

.assistant-chat {
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto auto;
  min-width: 0;
  background: var(--canvas);
}

.assistant-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.assistant-chat-head strong,
.assistant-chat-head span {
  display: block;
}

.assistant-chat-head strong {
  font-size: 13px;
}

.assistant-chat-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.assistant-clear {
  padding: 7px 9px;
  color: var(--muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.assistant-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 470px;
  overflow-y: auto;
  padding: 24px;
}

.assistant-welcome {
  max-width: 460px;
  margin: auto;
  padding: 30px;
  text-align: center;
}

.assistant-welcome img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(51, 21, 52, 0.18);
}

.assistant-welcome h3 {
  margin: 18px 0 8px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.assistant-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.assistant-message {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  max-width: min(660px, 86%);
}

.assistant-message.user {
  align-self: flex-end;
}

.assistant-message.luna {
  align-self: flex-start;
}

.assistant-message > img {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 10px;
}

.assistant-message > div > span {
  display: block;
  margin: 0 0 5px 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.assistant-message p {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px 16px 16px 16px;
  background: #fff;
  font-size: 11px;
  line-height: 1.65;
}

.assistant-message.user p {
  color: #fff;
  border-color: #25203f;
  border-radius: 16px 6px 16px 16px;
  background: #25203f;
}

.assistant-message.user > div > span {
  text-align: right;
}

.assistant-suggestions {
  display: flex;
  gap: 7px;
  padding: 0 22px 12px;
  overflow-x: auto;
}

.assistant-suggestions button {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: #51476d;
  border: 1px solid #ded8ec;
  border-radius: 99px;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
}

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

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.assistant-form textarea {
  width: 100%;
  min-height: 53px;
  max-height: 150px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid #dfe3dd;
  border-radius: 13px;
  outline: none;
  background: #fafbf8;
  font-size: 11px;
  line-height: 1.5;
}

.assistant-form textarea:focus {
  border-color: #8a79c2;
  box-shadow: 0 0 0 3px rgba(118, 88, 216, 0.09);
}

.assistant-form .button {
  min-height: 53px;
}

.assistant-typing {
  display: flex;
  gap: 4px;
}

.assistant-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8d88a0;
  animation: luna-typing 900ms ease-in-out infinite alternate;
}

.assistant-typing i:nth-child(2) {
  animation-delay: 150ms;
}

.assistant-typing i:nth-child(3) {
  animation-delay: 300ms;
}

@keyframes luna-typing {
  to {
    opacity: 0.3;
    transform: translateY(-3px);
  }
}

@media (max-width: 760px) {
  .store-filter {
    align-items: flex-start;
    flex-direction: column;
  }

  .store-filter-items {
    justify-content: flex-start;
  }

  .store-summary-metrics {
    grid-template-columns: 1fr;
  }

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

  .marketplace-warehouse summary,
  .inventory-grand-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .marketplace-warehouse summary::before {
    display: none;
  }

  .nav-list {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 58px;
  }

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

  .assistant-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 20px;
  }

  .assistant-logo {
    width: 76px;
    height: 76px;
    border-radius: 20px;
  }

  .assistant-intro h2 {
    margin-top: 10px;
    font-size: 21px;
  }

  .assistant-safety {
    grid-column: 1 / -1;
  }

  .assistant-messages {
    min-height: 360px;
    max-height: 50vh;
    padding: 18px;
  }

  .assistant-form {
    grid-template-columns: 1fr;
    padding: 14px 16px 16px;
  }

  .assistant-form .button {
    width: 100%;
  }
}

.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(24, 32, 24, 0.06);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent-deep);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(148, 201, 169, 0.4);
  outline-offset: 2px;
}

.theme-toggle-icon {
  display: block;
  transform: translateY(-1px);
}

.auth-theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 5;
}

html[data-theme="dark"] {
  --ink: #f5f1d8;
  --muted: #b8b9d0;
  --line: #355169;
  --paper: #102f46;
  --canvas: #091f2e;
  --sidebar: #071a27;
  --accent-deep: #94c9a9;
  --good: #94c9a9;
  --warn: #f1c15f;
  --danger: #fe5f55;
  --border: #355169;
  --surface-soft: #173b53;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 88% 4%, rgba(198, 236, 174, 0.1), transparent 25rem),
    radial-gradient(circle at 10% 88%, rgba(136, 80, 83, 0.18), transparent 28rem),
    var(--canvas);
}

html[data-theme="dark"] .boot-line {
  background: #2a3930;
}

html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .theme-toggle {
  background: rgba(16, 47, 70, 0.94);
}

html[data-theme="dark"] .button:hover {
  border-color: #53675b;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .button.dark {
  color: var(--ink);
  border-color: #425449;
  background: #111d16;
}

html[data-theme="dark"] .button.danger {
  color: #ffaaa3;
  border-color: #704139;
  background: #38231f;
}

html[data-theme="dark"] .notice,
html[data-theme="dark"] .credential-warning {
  color: #f0ce79;
  border-color: #62552d;
  background: #302b1a;
}

html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .channel-card,
html[data-theme="dark"] .integration-card {
  border-color: rgba(53, 81, 105, 0.95);
  background: rgba(16, 47, 70, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .metric-card {
  border-top-color: var(--metric-color, var(--violet));
  background:
    linear-gradient(145deg, transparent 62%, var(--metric-tint) 100%),
    var(--paper);
}

html[data-theme="dark"] .channel-chart {
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(9, 31, 46, 0.96), rgba(16, 47, 70, 0.7));
}

html[data-theme="dark"] .chart-bar {
  filter: brightness(1.14) saturate(1.08);
}

html[data-theme="dark"] .chart-bar[style*="#102F46"] {
  background: var(--accent);
}

html[data-theme="dark"] .health-bar {
  background: #24465e;
}

html[data-theme="dark"] .close-button,
html[data-theme="dark"] .sale-line,
html[data-theme="dark"] .credentials-box {
  background: #163950;
}

html[data-theme="dark"] .quick-action {
  color: var(--sidebar);
  border-color: transparent;
  background: var(--blue);
}

html[data-theme="dark"] .quick-action:nth-child(2) {
  background: var(--coral);
}

html[data-theme="dark"] .quick-action:nth-child(3) {
  background: var(--gold);
}

html[data-theme="dark"] .quick-action:nth-child(4) {
  color: white;
  background: var(--violet);
}

html[data-theme="dark"] th {
  color: #b8b9d0;
  background: #0d293d;
}

html[data-theme="dark"] td {
  border-bottom-color: #294a62;
}

html[data-theme="dark"] tbody tr:hover {
  background: rgba(148, 201, 169, 0.1);
}

html[data-theme="dark"] .product-thumb,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .status {
  color: var(--ink);
  background: #24465e;
}

html[data-theme="dark"] .status.good,
html[data-theme="dark"] .tag.a {
  color: var(--sidebar);
  background: var(--accent);
}

html[data-theme="dark"] .status.warn,
html[data-theme="dark"] .tag.b {
  color: var(--sidebar);
  background: var(--gold);
}

html[data-theme="dark"] .status.danger,
html[data-theme="dark"] .tag.c {
  color: white;
  background: var(--danger);
}

html[data-theme="dark"] .abc-chip.a .abc-letter {
  color: var(--sidebar);
  background: var(--accent);
}

html[data-theme="dark"] .abc-chip.b .abc-letter {
  color: var(--sidebar);
  background: var(--gold);
}

html[data-theme="dark"] .abc-chip.c .abc-letter {
  color: white;
  background: var(--coral);
}

html[data-theme="dark"] .modal-backdrop {
  background: rgba(3, 8, 5, 0.72);
}

html[data-theme="dark"] .modal {
  border-color: #45584b;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .field label {
  color: #c2ccc5;
}

html[data-theme="dark"] .remove-line,
html[data-theme="dark"] .icon-danger,
html[data-theme="dark"] .auth-error {
  color: #ff9d94;
  border-color: #704139;
  background: #38231f;
}

html[data-theme="dark"] .auth-shell {
  border-color: #34443b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .toast {
  background: #27382e;
}

html[data-theme="dark"] .toast.error {
  background: #6e302a;
}

html[data-theme="dark"] .store-summary,
html[data-theme="dark"] .store-filter,
html[data-theme="dark"] .warehouse-tabs button,
html[data-theme="dark"] .marketplace-warehouse,
html[data-theme="dark"] .assistant-shell,
html[data-theme="dark"] .assistant-chat-head,
html[data-theme="dark"] .assistant-message p,
html[data-theme="dark"] .assistant-suggestions button,
html[data-theme="dark"] .assistant-form {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper);
}

html[data-theme="dark"] .store-summary {
  border-top-color: var(--violet);
}

html[data-theme="dark"] .store-summary:nth-child(3n + 2) {
  border-top-color: var(--coral);
}

html[data-theme="dark"] .store-summary:nth-child(3n + 3) {
  border-top-color: var(--blue);
}

html[data-theme="dark"] .warehouse-tabs button.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

html[data-theme="dark"] .marketplace-warehouse summary,
html[data-theme="dark"] .warehouse-total-row td {
  background: #163950;
}

html[data-theme="dark"] .auto-sync-badge {
  color: #c6ecae;
  border-color: #456d62;
  background: #244f43;
}

html[data-theme="dark"] .assistant-chat {
  background: #0b2638;
}

html[data-theme="dark"] .assistant-message.user p {
  color: var(--sidebar);
  border-color: var(--accent);
  background: var(--accent);
}

html[data-theme="dark"] .assistant-suggestions button {
  color: #c8d2cb;
}

html[data-theme="dark"] .assistant-form textarea {
  color: var(--ink);
  border-color: var(--line);
  background: #0d293d;
}

html[data-theme="dark"] .assistant-typing i {
  background: #829087;
}

@media (max-width: 760px) {
  .auth-theme-toggle {
    top: 16px;
    right: 16px;
  }
}

/* Reference-inspired workspace redesign */

:root {
  --ink: #111827;
  --muted: #8b9099;
  --line: #eceef1;
  --paper: #ffffff;
  --canvas: #e7e8ea;
  --sidebar: #111827;
  --accent: #93d1ff;
  --accent-deep: #4aa9ed;
  --coral: #ff6b73;
  --violet: #8f98b3;
  --blue: #93d1ff;
  --good: #62cdb0;
  --warn: #ffad5d;
  --danger: #ff5d68;
  --gold: #ffd18b;
  --cream: #f5f6f7;
  --plum: #111827;
  --radius: 18px;
  --shadow: 0 22px 70px rgba(19, 27, 38, 0.13);
  --border: var(--line);
  --surface-soft: #f7f8f9;
  color-scheme: light;
}

html {
  min-height: 100%;
  background: #e4e5e7;
}

body {
  min-height: 100vh;
  padding: 30px;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.9), transparent 29rem),
    linear-gradient(145deg, #efeff0, #dedfe1);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  grid-template-columns: 228px minmax(0, 1fr);
  width: min(1480px, 100%);
  min-height: calc(100vh - 60px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh - 60px);
  padding: 28px 20px 22px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  margin-bottom: 24px;
  padding: 0 5px 24px;
  border-bottom-color: var(--line);
}

.boot-logo,
.brand-mark {
  width: 40px;
  height: 40px;
  color: var(--ink);
  border: 1px solid #dceeff;
  border-radius: 13px;
  background: #eaf5ff;
  box-shadow: none;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 14px;
  letter-spacing: -0.035em;
}

.brand-copy span {
  color: #a3a7ae;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.nav-list {
  gap: 12px;
  padding-right: 0;
  scrollbar-color: #dfe3e7 transparent;
}

.nav-group {
  gap: 5px;
}

.nav-group + .nav-group {
  padding-top: 12px;
  border-top-color: #f1f2f4;
}

.nav-group-label,
.nav-group:has(.nav-item.active) .nav-group-label {
  min-height: 18px;
  padding: 0 10px 3px;
  color: #b0b4bb;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.nav-group-label::before,
.nav-group:nth-child(2) .nav-group-label::before,
.nav-group:nth-child(3) .nav-group-label::before,
.nav-group:nth-child(4) .nav-group-label::before,
.nav-group:has(.nav-item.active) .nav-group-label::before {
  display: none;
}

.nav-group-items {
  gap: 3px;
}

.nav-item {
  min-height: 43px;
  padding: 0 10px 0 6px;
  color: #858a93;
  border-radius: 13px;
}

.nav-item:hover {
  color: var(--ink);
  background: #f7f8f9;
  transform: none;
}

.nav-item.active {
  color: var(--ink);
  background: #f4f7fa;
  box-shadow: none;
  font-weight: 700;
}

.nav-icon {
  width: 31px;
  height: 31px;
  margin-right: 9px;
  color: #737982;
  border-radius: 10px;
  background: transparent;
}

.nav-item:hover .nav-icon {
  color: var(--ink);
  background: #eceff2;
}

.nav-item.active .nav-icon {
  color: #287ebc;
  background: #dff1ff;
}

.nav-text {
  font-size: 11px;
}

.nav-badge {
  min-width: 22px;
  color: #b92f3a;
  border: 1px solid #ffd0d4;
  background: #fff0f1;
  font-size: 9px;
}

.sidebar-foot {
  padding: 14px;
  color: var(--ink);
  border-color: #e8eaed;
  border-radius: 16px;
  background: #f7f8f9;
}

.sync-line {
  color: var(--ink);
  font-size: 10px;
}

.sync-dot {
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(98, 205, 176, 0.14);
}

.sidebar-foot p {
  color: var(--muted);
}

.main {
  padding: 30px clamp(28px, 3.3vw, 50px) 46px;
  background: var(--paper);
}

.main::before {
  display: none;
}

.topbar {
  min-height: 44px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f1f3;
}

.breadcrumbs {
  color: #a0a4ab;
  font-size: 11px;
}

.breadcrumbs strong {
  color: var(--ink);
}

.top-actions {
  gap: 9px;
}

.icon-button,
.avatar,
.theme-toggle {
  width: 38px;
  height: 38px;
  border-color: #ebecef;
  border-radius: 50%;
  background: #f7f8f9;
  box-shadow: none;
}

.icon-button {
  color: #7b818a;
}

.avatar {
  color: var(--ink);
  background: #ffe5bf;
}

.account-copy strong {
  color: var(--ink);
}

.account-copy small {
  color: #a3a7ae;
}

.page-heading {
  align-items: flex-end;
  margin-bottom: 24px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--accent-deep);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.page-heading h1 {
  color: #0c1220;
  font-size: clamp(27px, 2.8vw, 39px);
  line-height: 1.08;
  letter-spacing: -0.048em;
}

.page-heading h1::after {
  display: none;
}

.page-heading p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.button {
  min-height: 39px;
  padding: 0 15px;
  color: #4d535c;
  border-color: #e8eaed;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: none;
  font-size: 11px;
}

.button:hover {
  color: var(--ink);
  border-color: #c9e7fb;
  background: #f7fbfe;
  box-shadow: none;
}

.button.primary {
  color: #11344d;
  border-color: #9fd6fb;
  background: #a8dcff;
  box-shadow: none;
}

.button.dark {
  border-color: #111827;
  background: #111827;
}

.button.danger {
  color: #c83b46;
  border-color: #ffd2d6;
  background: #fff3f4;
}

.button.small {
  min-height: 32px;
  font-size: 9px;
}

.select,
.search-input,
.field input,
.field select,
.field textarea {
  min-height: 39px;
  color: var(--ink);
  border-color: #e7e9ec;
  border-radius: 12px;
  background: #f8f9fa;
  font-size: 11px;
}

.select:focus,
.search-input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #8bcaf5;
  box-shadow: 0 0 0 3px rgba(147, 209, 255, 0.24);
}

.date-range {
  padding: 4px 6px;
  border-color: #e8eaed;
  border-radius: 999px;
  background: #f7f8f9;
}

.date-range input {
  font-size: 10px;
}

.store-filter {
  padding: 13px 16px;
  border-color: #eceef1;
  border-radius: 15px;
  background: #fafbfc;
  box-shadow: none;
}

.store-filter-items label {
  border-color: #e5e8eb;
  border-radius: 999px;
  background: #ffffff;
}

.store-filter-items label:has(input:checked) {
  border-color: #acd9f7;
  background: #eaf6ff;
  box-shadow: none;
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0;
  margin-bottom: 18px;
  padding: 8px 0;
  border-top: 1px solid #eceef1;
  border-bottom: 1px solid #eceef1;
}

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

.metric-card,
.panel,
.channel-card,
.integration-card {
  border-color: #eceef1;
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

.metric-card {
  min-height: 112px;
  padding: 16px 20px;
  border: 0;
  border-left: 1px solid #eceef1;
  border-radius: 0;
  background: #ffffff;
}

.metric-card:first-child {
  border-left: 0;
}

.metric-card::after {
  display: none;
}

.metric-top {
  justify-content: flex-start;
  gap: 11px;
  color: #5f6570;
  font-size: 9px;
  letter-spacing: 0;
  text-transform: none;
}

.metric-icon {
  order: -1;
  width: 36px;
  height: 36px;
  color: var(--metric-color, var(--ink));
  border: 1px solid #edf0f2;
  border-radius: 50%;
  background: #f5f6f7;
}

.metric-value {
  margin-top: 10px;
  color: #111827;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.045em;
}

.metric-foot {
  margin-top: 7px;
  color: #9a9fa7;
  font-size: 9px;
}

.metric-foot strong {
  color: var(--good);
}

.panel {
  border-radius: 18px;
}

.panel-pad {
  padding: 20px;
}

.panel-head {
  margin-bottom: 17px;
}

.panel-head > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.panel-head h2,
.panel-head h3 {
  color: #171d29;
  font-size: 14px;
}

.panel-head p {
  color: #9a9fa7;
  font-size: 9px;
}

.dashboard-grid {
  gap: 16px;
}

.channel-chart {
  height: 225px;
  border-color: #eef0f2;
  background:
    linear-gradient(#eff1f3 1px, transparent 1px) 0 0 / 100% 25%,
    #ffffff;
}

.chart-value {
  color: #5f6570;
}

.chart-bar {
  width: min(46px, 72%);
  border-radius: 12px 12px 4px 4px;
  box-shadow: none;
}

.chart-label {
  color: #8c929b;
}

.health-bar {
  height: 6px;
  background: #edf0f2;
}

.quick-actions {
  gap: 10px;
}

.quick-action,
html[data-theme="dark"] .quick-action {
  min-height: 76px;
  color: var(--ink);
  border-color: #e9ebee;
  border-radius: 15px;
  background: #ffffff;
}

.quick-action:hover {
  border-color: #cce9fc;
  background: #f8fcff;
}

.quick-action span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 9px;
  border-radius: 50%;
  background: #e4f3ff;
}

.quick-action:nth-child(2),
html[data-theme="dark"] .quick-action:nth-child(2) {
  color: var(--ink);
  background: #ffffff;
}

.quick-action:nth-child(2) span {
  background: #ffead5;
}

.quick-action:nth-child(3),
html[data-theme="dark"] .quick-action:nth-child(3) {
  color: var(--ink);
  background: #ffffff;
}

.quick-action:nth-child(3) span {
  background: #dff7ef;
}

.quick-action:nth-child(4),
html[data-theme="dark"] .quick-action:nth-child(4) {
  color: var(--ink);
  background: #ffffff;
}

.quick-action:nth-child(4) span {
  background: #ffe6e8;
}

.quick-action small,
.quick-action:nth-child(4) small {
  color: #9ba0a8;
}

.table-wrap {
  scrollbar-color: #dfe3e7 transparent;
}

table {
  color: #303641;
}

th,
html[data-theme="dark"] th {
  padding: 12px 15px;
  color: #90959e;
  border-bottom-color: #eceef1;
  background: #fafbfc;
  font-size: 8px;
  letter-spacing: 0.07em;
}

td {
  padding: 14px 15px;
  border-bottom-color: #f0f1f3;
  font-size: 10px;
}

tbody tr:hover {
  background: #f8fbfd;
}

.sort-button span {
  color: #55aee9;
}

.product-thumb {
  width: 34px;
  height: 34px;
  color: #286f9e;
  border-radius: 50%;
  background: #e5f4ff;
}

.product-cell strong {
  color: #2b313b;
  font-size: 10px;
}

.product-cell span {
  color: #9ba0a8;
}

.tag,
.status {
  min-height: 24px;
  padding: 0 9px;
  color: #5e646d;
  border: 1px solid #eaeced;
  background: #f5f6f7;
}

.status.good,
.tag.a,
html[data-theme="dark"] .status.good,
html[data-theme="dark"] .tag.a {
  color: #2e806b;
  border-color: #ccefe5;
  background: #e9f8f4;
}

.status.warn,
.tag.b,
html[data-theme="dark"] .status.warn,
html[data-theme="dark"] .tag.b {
  color: #a36222;
  border-color: #ffe0bd;
  background: #fff3e4;
}

.status.danger,
.tag.c,
html[data-theme="dark"] .status.danger,
html[data-theme="dark"] .tag.c {
  color: #bd3f49;
  border-color: #ffd1d5;
  background: #fff0f1;
}

.inventory-available {
  min-height: 26px;
  border-radius: 999px;
}

.inventory-available.is-low {
  color: #be3944;
  border: 1px solid #ffcbd0;
  background: #fff0f1;
  box-shadow: none;
}

.store-strip {
  gap: 12px;
  margin-bottom: 18px;
}

.store-summary,
html[data-theme="dark"] .store-summary,
.store-summary:nth-child(3n + 2),
.store-summary:nth-child(3n + 3),
html[data-theme="dark"] .store-summary:nth-child(3n + 2),
html[data-theme="dark"] .store-summary:nth-child(3n + 3) {
  padding: 17px;
  border: 1px solid #eceef1;
  border-top: 1px solid #eceef1;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
}

.store-summary h3 {
  color: #1d2430;
  font-size: 15px;
}

.store-summary-metrics small {
  color: #9ba0a8;
  font-size: 9px;
}

.store-summary-metrics strong {
  color: #252c37;
  font-size: 12px;
}

.channel-logo {
  border-radius: 50%;
}

.channel-logo.wb {
  background: #ff7882;
}

.channel-logo.ozon {
  background: #72bff2;
}

.channel-logo.direct {
  background: #78d4bc;
}

.section-grid {
  gap: 12px;
}

.channel-card,
.integration-card {
  padding: 17px;
  border-radius: 16px;
}

.abc-chip {
  border-color: #eceef1;
  border-radius: 14px;
  background: #fafbfc;
}

.abc-chip.a .abc-letter,
html[data-theme="dark"] .abc-chip.a .abc-letter {
  color: #2e806b;
  background: #dff6ef;
}

.abc-chip.b .abc-letter,
html[data-theme="dark"] .abc-chip.b .abc-letter {
  color: #a36222;
  background: #ffead2;
}

.abc-chip.c .abc-letter,
html[data-theme="dark"] .abc-chip.c .abc-letter {
  color: #bd3f49;
  background: #ffe3e6;
}

.warehouse-tabs button {
  border-color: #e8eaed;
  border-radius: 14px;
  background: #ffffff;
}

.warehouse-tabs button.active {
  border-color: #a8d7f7;
  background: #edf8ff;
  box-shadow: none;
}

.document-list > div {
  border-bottom-color: #eff1f3;
}

.price-create-panel {
  background: #f8fbfd;
}

.marketplace-warehouse {
  border-color: #e9ebee;
  border-radius: 15px;
}

.marketplace-warehouse summary,
html[data-theme="dark"] .marketplace-warehouse summary {
  background: #fafbfc;
}

.warehouse-total-row td {
  background: #f6f8f9;
}

.inventory-grand-total {
  color: #ffffff;
  background: #111827;
}

.inventory-grand-total strong {
  color: #9ed8ff;
}

.auto-sync-badge {
  color: #347e6b;
  border-color: #cdece3;
  border-radius: 999px;
  background: #eff9f6;
}

.assistant-shell,
html[data-theme="dark"] .assistant-shell {
  border-color: #e9ebee;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: none;
}

.assistant-intro {
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 12%, rgba(147, 209, 255, 0.42), transparent 15rem),
    #f6f7f8;
}

.assistant-intro p,
.assistant-safety span {
  color: #858b94;
}

.assistant-status {
  color: #326e60;
  border-color: #cfeee5;
  background: #eaf8f4;
}

.assistant-safety {
  border-color: #e7e9ec;
  background: rgba(255, 255, 255, 0.78);
}

.assistant-chat {
  background: #ffffff;
}

.assistant-chat-head,
.assistant-form {
  border-color: #eceef1;
  background: #ffffff;
}

.assistant-message p {
  border-color: #e8eaed;
  border-radius: 16px;
  background: #f7f8f9;
}

.assistant-message.user p,
html[data-theme="dark"] .assistant-message.user p {
  color: #244a65;
  border-color: #cce6f8;
  background: #e9f5fd;
}

.assistant-suggestions button {
  border-color: #e7e9ec;
  border-radius: 999px;
  background: #ffffff;
}

.assistant-form textarea {
  border-color: #e7e9ec;
  border-radius: 14px;
  background: #f8f9fa;
}

.modal-backdrop {
  background: rgba(22, 27, 35, 0.34);
  backdrop-filter: blur(10px);
}

.modal {
  border-color: #eceef1;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(18, 25, 35, 0.2);
}

.close-button,
.sale-line,
.credentials-box {
  border-color: #e9ebee;
  background: #f8f9fa;
}

.field label {
  color: #676d76;
}

.auth-page {
  min-height: calc(100vh - 60px);
}

.auth-shell {
  width: min(980px, 100%);
  min-height: 620px;
  border-color: rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.auth-visual {
  color: var(--ink);
  border-right: 1px solid #eceef1;
  background:
    radial-gradient(circle at 78% 15%, rgba(147, 209, 255, 0.52), transparent 15rem),
    radial-gradient(circle at 20% 88%, rgba(255, 209, 139, 0.45), transparent 16rem),
    #f5f6f7;
}

.auth-brand span,
.auth-message > p:last-child,
.auth-points {
  color: #7f858e;
}

.auth-message .eyebrow,
.auth-kicker {
  color: #3c9ddd;
}

.auth-error {
  color: #b53c46;
  border-color: #ffd0d4;
  background: #fff1f2;
}

.toast {
  color: white;
  border: 1px solid #2b3442;
  border-radius: 15px;
  background: #111827;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.22);
}

.toast.error {
  border-color: #d84c57;
  background: #d84c57;
}

html[data-theme="dark"] {
  --ink: #eef2f7;
  --muted: #9ca4af;
  --line: #2b323d;
  --paper: #181e28;
  --canvas: #0e1218;
  --sidebar: #eef2f7;
  --accent: #83c8f7;
  --accent-deep: #6dbbea;
  --good: #68cdb3;
  --warn: #efad67;
  --danger: #ef6973;
  --border: #2b323d;
  --surface-soft: #202733;
  --shadow: 0 26px 78px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

html[data-theme="dark"] {
  background: #0b0f15;
}

html[data-theme="dark"] body {
  color: var(--ink);
  background:
    radial-gradient(circle at 17% 10%, rgba(57, 69, 86, 0.52), transparent 30rem),
    #0e1218;
}

html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .main,
html[data-theme="dark"] .sidebar {
  border-color: #2b323d;
  background: #181e28;
}

html[data-theme="dark"] .brand-copy strong,
html[data-theme="dark"] .page-heading h1,
html[data-theme="dark"] .panel-head h2,
html[data-theme="dark"] .panel-head h3,
html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .product-cell strong,
html[data-theme="dark"] .store-summary h3,
html[data-theme="dark"] .store-summary-metrics strong,
html[data-theme="dark"] .sync-line,
html[data-theme="dark"] .breadcrumbs strong,
html[data-theme="dark"] .account-copy strong {
  color: var(--ink);
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active {
  color: var(--ink);
  background: #222a36;
}

html[data-theme="dark"] .nav-item.active .nav-icon {
  color: #8fd2ff;
  background: #233a4c;
}

html[data-theme="dark"] .sidebar-foot,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .date-range,
html[data-theme="dark"] .select,
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .store-filter,
html[data-theme="dark"] .store-filter-items label,
html[data-theme="dark"] .warehouse-tabs button,
html[data-theme="dark"] .quick-action,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .close-button,
html[data-theme="dark"] .sale-line,
html[data-theme="dark"] .credentials-box {
  color: var(--ink);
  border-color: #2d3541;
  background: #202733;
}

html[data-theme="dark"] .store-filter-items label:has(input:checked),
html[data-theme="dark"] .warehouse-tabs button.active {
  border-color: #477797;
  background: #22394a;
}

html[data-theme="dark"] .metrics {
  border-color: #2b323d;
}

html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .channel-card,
html[data-theme="dark"] .integration-card,
html[data-theme="dark"] .store-summary,
html[data-theme="dark"] .store-summary:nth-child(3n + 2),
html[data-theme="dark"] .store-summary:nth-child(3n + 3),
html[data-theme="dark"] .marketplace-warehouse,
html[data-theme="dark"] .assistant-shell,
html[data-theme="dark"] .assistant-chat,
html[data-theme="dark"] .assistant-chat-head,
html[data-theme="dark"] .assistant-form {
  color: var(--ink);
  border-color: #2b323d;
  background: #181e28;
}

html[data-theme="dark"] .metric-card {
  border-left-color: #2b323d;
}

html[data-theme="dark"] .overview-metrics .metric-top > span:first-child,
html[data-theme="dark"] .inventory-metrics .metric-top > span:first-child,
html[data-theme="dark"] .defects-metrics .metric-top > span:first-child,
html[data-theme="dark"] .marketplaces-metrics .metric-top > span:first-child,
html[data-theme="dark"] .admin-metrics .metric-top > span:first-child {
  color: #dce4ed;
}

html[data-theme="dark"] .metric-icon,
html[data-theme="dark"] .product-thumb,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .status {
  border-color: #313946;
  background: #252d39;
}

html[data-theme="dark"] th {
  color: #9ca4af;
  border-color: #303844;
  background: #202630;
}

html[data-theme="dark"] td {
  border-bottom-color: #29313c;
}

html[data-theme="dark"] tbody tr:hover {
  background: #202834;
}

html[data-theme="dark"] .channel-chart {
  border-color: #2b323d;
  background:
    linear-gradient(#2b323d 1px, transparent 1px) 0 0 / 100% 25%,
    #181e28;
}

html[data-theme="dark"] .quick-action:hover,
html[data-theme="dark"] .assistant-suggestions button {
  border-color: #3a4757;
  background: #222a36;
}

html[data-theme="dark"] .marketplace-warehouse summary,
html[data-theme="dark"] .warehouse-total-row td,
html[data-theme="dark"] .price-create-panel {
  background: #202733;
}

html[data-theme="dark"] .assistant-intro {
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 12%, rgba(86, 147, 188, 0.22), transparent 15rem),
    #202733;
}

html[data-theme="dark"] .assistant-message p,
html[data-theme="dark"] .assistant-form textarea {
  color: var(--ink);
  border-color: #303844;
  background: #202733;
}

html[data-theme="dark"] .auth-shell {
  border-color: #2b323d;
  background: #181e28;
}

html[data-theme="dark"] .auth-visual {
  color: var(--ink);
  border-right-color: #2b323d;
  background:
    radial-gradient(circle at 78% 15%, rgba(79, 143, 187, 0.25), transparent 15rem),
    radial-gradient(circle at 20% 88%, rgba(173, 121, 67, 0.16), transparent 16rem),
    #202733;
}

@media (max-width: 1180px) {
  body {
    padding: 16px;
  }

  .app-shell {
    grid-template-columns: 205px minmax(0, 1fr);
    min-height: calc(100vh - 32px);
    border-radius: 24px;
  }

  .sidebar {
    height: calc(100vh - 32px);
    padding-inline: 15px;
  }

  .main {
    padding-inline: 28px;
  }
}

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

  .metric-card:nth-child(odd) {
    border-left: 0;
  }

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

@media (max-width: 760px) {
  body {
    padding: 0;
    background: var(--paper);
  }

  .app-shell {
    display: block;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 72px;
    padding: 8px 10px;
    border: 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
  }

  html[data-theme="dark"] .sidebar {
    background: rgba(24, 30, 40, 0.96);
  }

  .brand,
  .sidebar-foot,
  .nav-group-label {
    display: none;
  }

  .nav-list {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    overflow-x: auto;
    padding: 0 2px 4px;
  }

  .nav-group,
  .nav-group-items {
    display: contents;
  }

  .nav-group + .nav-group {
    padding-top: 0;
    border-top: 0;
  }

  .nav-item {
    justify-content: center;
    flex: 0 0 70px;
    flex-direction: column;
    min-height: 54px;
    padding: 3px;
    border-radius: 12px;
  }

  .nav-icon {
    width: 25px;
    height: 25px;
    margin: 0 0 2px;
  }

  .nav-text {
    max-width: 65px;
    font-size: 7px;
  }

  .main {
    min-height: 100vh;
    padding: 17px 15px 94px;
  }

  .topbar {
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .page-heading {
    margin-bottom: 20px;
  }

  .page-heading h1 {
    font-size: 30px;
  }

  .metrics,
  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    border: 0;
  }

  .metric-card,
  html[data-theme="dark"] .metric-card {
    min-height: 124px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
  }

  .metric-card:nth-child(odd) {
    border-left: 1px solid var(--line);
  }

  .metric-icon {
    width: 32px;
    height: 32px;
  }

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

  .store-filter-items {
    width: 100%;
  }

  .assistant-shell {
    grid-template-columns: 1fr;
  }

  .auth-page {
    min-height: 100vh;
  }

  .auth-shell {
    min-height: 100vh;
    border-radius: 0;
  }
}

@media (max-width: 430px) {
  .metrics,
  .overview-metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    border-left: 1px solid var(--line);
  }

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

/* High-contrast tables and stock alerts */

.low-stock-quantity {
  color: #d9363e;
  font-size: 12px;
  font-weight: 900;
}

html[data-theme="dark"] table,
html[data-theme="dark"] td {
  color: #e8edf4;
}

html[data-theme="dark"] th {
  color: #dce3ec;
  border-bottom-color: #3a4451;
  background: #242c38;
}

html[data-theme="dark"] .sort-button {
  color: #dce3ec;
}

html[data-theme="dark"] .sort-button span {
  color: #8fd2ff;
}

html[data-theme="dark"] td strong,
html[data-theme="dark"] .product-cell strong {
  color: #f8fafc;
}

html[data-theme="dark"] .product-cell span,
html[data-theme="dark"] td .muted,
html[data-theme="dark"] .stock-store-note,
html[data-theme="dark"] .document-list small,
html[data-theme="dark"] .warehouse-tabs small,
html[data-theme="dark"] .store-filter-items small {
  color: #b8c2cf;
}

html[data-theme="dark"] .price-input {
  color: #f8fafc;
  border-color: #465260;
  background: #111821;
}

html[data-theme="dark"] .low-stock-quantity,
html[data-theme="dark"] td strong.low-stock-quantity {
  color: #ff747d;
}

/* Compact ABC report */

.abc-analysis-table {
  table-layout: fixed;
}

.abc-analysis-table .abc-col-class {
  width: 7%;
}

.abc-analysis-table .abc-col-sku {
  width: 13%;
}

.abc-analysis-table .abc-col-name {
  width: 20%;
}

.abc-analysis-table .abc-col-units {
  width: 9%;
}

.abc-analysis-table .abc-col-revenue,
.abc-analysis-table .abc-col-profit {
  width: 14%;
}

.abc-analysis-table .abc-col-share {
  width: 10%;
}

.abc-analysis-table .abc-col-cumulative {
  width: 13%;
}

.abc-analysis-table th:nth-child(3),
.abc-analysis-table td:nth-child(3) {
  max-width: 190px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.abc-analysis-table th:not(:nth-child(3)),
.abc-analysis-table td:not(:nth-child(3)) {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .abc-analysis-table {
    min-width: 760px;
  }
}

/* Packaging costs by store and exact period */

.packaging-cost-panel {
  margin-bottom: 14px;
}

.packaging-cost-form {
  display: grid;
  grid-template-columns:
    minmax(190px, 1fr)
    minmax(145px, 0.65fr)
    minmax(145px, 0.65fr)
    minmax(155px, 0.7fr)
    auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.packaging-cost-form .field input,
.packaging-cost-form .field select {
  width: 100%;
}

.packaging-cost-history {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.packaging-cost-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}

html[data-theme="dark"] .packaging-cost-history {
  border-color: #303844;
}

@media (max-width: 1100px) {
  .packaging-cost-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .packaging-cost-form .button {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .packaging-cost-form {
    grid-template-columns: 1fr;
  }
}

/* Dark theme controls: keep actions saturated and clearly distinct */

html[data-theme="dark"] .button {
  color: #eef2f7;
  border-color: #3b4655;
  background: #252e3a;
}

html[data-theme="dark"] .button:hover {
  color: #ffffff;
  border-color: #5d7185;
  background: #303b49;
}

html[data-theme="dark"] .button.primary {
  color: #102f46;
  border-color: #b5dfc5;
  background: #94c9a9;
  box-shadow: 0 8px 22px rgba(148, 201, 169, 0.18);
}

html[data-theme="dark"] .button.primary:hover {
  color: #102f46;
  border-color: #d8f4c8;
  background: #c6ecae;
}

html[data-theme="dark"] .button.danger {
  color: #ff9b94;
  border-color: #7d3d3d;
  background: #44252a;
}

html[data-theme="dark"] .button.danger:hover {
  color: #ffd9d6;
  border-color: #b65350;
  background: #593036;
}

html[data-theme="dark"] .quick-action {
  color: #f4f8fb;
  border-color: #3d6579;
  background: linear-gradient(145deg, #17384d, #214e61);
}

html[data-theme="dark"] .quick-action:nth-child(2) {
  color: #fff6f5;
  border-color: #8a4247;
  background: linear-gradient(145deg, #47272d, #633137);
}

html[data-theme="dark"] .quick-action:nth-child(3) {
  color: #fff8e8;
  border-color: #8a6535;
  background: linear-gradient(145deg, #44321f, #604726);
}

html[data-theme="dark"] .quick-action:nth-child(4) {
  color: #f7f4ff;
  border-color: #635779;
  background: linear-gradient(145deg, #302b40, #453b59);
}

html[data-theme="dark"] .quick-action:hover,
html[data-theme="dark"] .quick-action:nth-child(2):hover,
html[data-theme="dark"] .quick-action:nth-child(3):hover,
html[data-theme="dark"] .quick-action:nth-child(4):hover {
  border-color: #94c9a9;
  filter: brightness(1.08);
}

html[data-theme="dark"] .quick-action span {
  color: #102f46;
  background: #94c9a9;
}

html[data-theme="dark"] .quick-action:nth-child(2) span {
  background: #fe5f55;
}

html[data-theme="dark"] .quick-action:nth-child(3) span {
  background: #f1c15f;
}

html[data-theme="dark"] .quick-action:nth-child(4) span {
  color: #ffffff;
  background: #777da7;
}

html[data-theme="dark"] .quick-action small,
html[data-theme="dark"] .quick-action:nth-child(4) small {
  color: #c8d0da;
}

html[data-theme="dark"] .abc-chip {
  color: #eef2f7;
  border-color: #3b4655;
  background: #252e3a;
}

html[data-theme="dark"] .abc-chip.a {
  border-color: #426b60;
  background: linear-gradient(145deg, #203b39, #294a43);
}

html[data-theme="dark"] .abc-chip.b {
  border-color: #78613a;
  background: linear-gradient(145deg, #41351f, #554426);
}

html[data-theme="dark"] .abc-chip.c {
  border-color: #625778;
  background: linear-gradient(145deg, #302b40, #433a56);
}

html[data-theme="dark"] .abc-chip strong {
  color: #ffffff;
}

html[data-theme="dark"] .abc-chip span {
  color: #c8d0da;
}

html[data-theme="dark"] .abc-chip.a .abc-letter {
  color: #102f46;
  background: #94c9a9;
}

html[data-theme="dark"] .abc-chip.b .abc-letter {
  color: #102f46;
  background: #f1c15f;
}

html[data-theme="dark"] .abc-chip.c .abc-letter {
  color: #ffffff;
  background: #777da7;
}

html[data-theme="dark"] .assistant-safety {
  border-color: #34495a;
  background: #0d1b27;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 12px 28px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .assistant-safety strong {
  color: #ffffff;
}

html[data-theme="dark"] .assistant-safety span {
  color: #e8edf4;
}

/* Compact low-stock table on the overview */

.low-stock-table {
  overflow-x: hidden;
}

.low-stock-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  white-space: normal;
}

.low-stock-table th,
.low-stock-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.low-stock-table th:nth-child(1),
.low-stock-table td:nth-child(1) {
  width: 20%;
}

.low-stock-table th:nth-child(2),
.low-stock-table td:nth-child(2) {
  width: 27%;
  max-width: 180px;
}

.low-stock-table th:nth-child(3),
.low-stock-table td:nth-child(3) {
  width: 21%;
}

.low-stock-table th:nth-child(4),
.low-stock-table td:nth-child(4) {
  width: 32%;
}

.low-stock-table .status {
  white-space: nowrap;
}

.low-stock-table .stock-store-note {
  display: block;
  margin-top: 5px;
  white-space: normal;
}

/* System administration */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.admin-grid .panel {
  min-width: 0;
}

.admin-section {
  margin-bottom: 18px;
}

.admin-settings-form {
  display: grid;
  gap: 16px;
}

.admin-settings-form .button {
  justify-self: start;
}

.admin-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e7e9ec;
  border-radius: 14px;
  background: #f8f9fa;
  cursor: pointer;
}

.admin-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #42bfa0;
}

.admin-toggle span {
  display: grid;
  gap: 4px;
}

.admin-toggle strong {
  color: #172033;
  font-size: 12px;
}

.admin-toggle small {
  color: #777f89;
  font-size: 10px;
  line-height: 1.5;
}

.admin-checks {
  display: grid;
  gap: 10px;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid #e7e9ec;
  border-radius: 13px;
  background: #f8f9fa;
}

.admin-check-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.admin-check.is-ok .admin-check-icon {
  color: #102f46;
  background: #94c9a9;
}

.admin-check.is-warning .admin-check-icon {
  color: #102f46;
  background: #f1c15f;
}

.admin-check > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-check strong {
  color: #172033;
  font-size: 11px;
}

.admin-check span:not(.admin-check-icon) {
  color: #777f89;
  font-size: 9px;
  line-height: 1.45;
}

.admin-origins {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eceef1;
}

.admin-origins strong {
  color: #172033;
  font-size: 10px;
}

.admin-origins span {
  color: #777f89;
  font-size: 9px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.admin-agent {
  max-width: 250px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.admin-section code {
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.audit-code {
  display: block;
  margin-top: 4px;
  color: #8b929c;
  font-size: 8px;
  letter-spacing: 0.035em;
}

.audit-details {
  max-width: 290px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.5;
}

html[data-theme="dark"] .admin-toggle,
html[data-theme="dark"] .admin-check {
  border-color: #303844;
  background: #202630;
}

html[data-theme="dark"] .admin-toggle strong,
html[data-theme="dark"] .admin-check strong,
html[data-theme="dark"] .admin-origins strong,
html[data-theme="dark"] .admin-section code {
  color: #e8edf4;
}

html[data-theme="dark"] .admin-toggle small,
html[data-theme="dark"] .admin-check span:not(.admin-check-icon),
html[data-theme="dark"] .admin-origins span,
html[data-theme="dark"] .audit-code,
html[data-theme="dark"] .audit-details {
  color: #b8c2cf;
}

html[data-theme="dark"] .admin-origins {
  border-top-color: #303844;
}

@media (max-width: 980px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}
