:root {
  color-scheme: light;
  --ink: #1c211f;
  --muted: #69716e;
  --soft: #f1f2ee;
  --paper: #f7f7f3;
  --card: #ffffff;
  --line: #dfe2dc;
  --forest: #174b3b;
  --forest-2: #256b54;
  --mint: #dcece5;
  --coral: #cf604e;
  --coral-soft: #f9e7e2;
  --gold: #b88a30;
  --violet: #7044b7;
  --shadow: 0 18px 48px rgba(31, 39, 35, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input { font: inherit; }

button { color: inherit; }

.login-page {
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 88% 10%, rgba(23, 75, 59, 0.14), transparent 25rem),
    radial-gradient(circle at 8% 88%, rgba(207, 96, 78, 0.11), transparent 24rem),
    var(--paper);
}

.login-shell { width: min(100%, 430px); }
.login-card { padding: clamp(26px, 7vw, 42px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 255, 255, 0.95); box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 38px; }
.login-brand > span:last-child { display: grid; gap: 1px; }
.login-brand strong { font-family: Georgia, serif; font-size: 1.28rem; font-weight: 500; }
.login-brand small { color: var(--muted); font-size: 0.7rem; }
.login-card h1 { margin: 8px 0 12px; font-family: Georgia, serif; font-size: clamp(2rem, 9vw, 2.75rem); font-weight: 400; letter-spacing: -0.04em; }
.login-intro { margin: 0 0 24px; color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.login-error { margin-bottom: 16px; padding: 11px 13px; border: 1px solid #e8b9af; border-radius: 10px; color: #843f33; background: var(--coral-soft); font-size: 0.75rem; line-height: 1.45; }
.login-form { display: grid; gap: 15px; }
.login-form label { display: grid; gap: 6px; }
.login-form label span { color: var(--muted); font-size: 0.69rem; font-weight: 750; }
.login-form input { width: 100%; padding: 12px 13px; border: 1px solid #d4d9d3; border-radius: 10px; color: var(--ink); background: white; outline: none; }
.login-form input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(37, 107, 84, 0.13); }
.login-form button { margin-top: 4px; padding: 13px 16px; border: 0; border-radius: 10px; color: white; background: var(--forest); font-weight: 800; cursor: pointer; }
.login-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 0; color: #858c88; font-size: 0.64rem; }
.login-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--forest-2); box-shadow: 0 0 0 4px rgba(37, 107, 84, 0.1); }
.logout-button { padding: 8px 10px; border: 1px solid #d6dad5; border-radius: 9px; color: var(--muted); background: white; font-size: 0.67rem; font-weight: 750; cursor: pointer; }

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 28px 20px 20px;
  border-right: 1px solid #d6d9d3;
  background: #eeefe9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--forest);
  font-family: Georgia, serif;
  font-size: 1.4rem;
}

.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-family: Georgia, serif; font-size: 1.28rem; font-weight: 500; }
.brand small { color: var(--muted); font-size: 0.7rem; }

.nav {
  display: grid;
  gap: 5px;
  margin-top: 46px;
}

.nav-link {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  width: 100%;
  padding: 12px 13px;
  border: 0;
  border-radius: 10px;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link span {
  color: #929995;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.6); transform: translateX(2px); }
.nav-link.is-active { color: white; background: var(--forest); box-shadow: 0 8px 22px rgba(23, 75, 59, 0.2); }
.nav-link.is-active span { color: #b9d7cc; }

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid #d2d8d2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.57);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--forest-2);
  box-shadow: 0 0 0 5px rgba(37, 107, 84, 0.12);
}

.sidebar-status div { display: grid; gap: 2px; }
.sidebar-status strong { font-size: 0.74rem; }
.sidebar-status small { color: var(--muted); font-size: 0.65rem; }
.sidebar-version { margin: 13px 2px 0; color: #959b97; font-size: 0.65rem; }

.workspace {
  min-width: 0;
  padding: 34px clamp(24px, 4vw, 64px) 64px;
  background:
    radial-gradient(circle at 96% 1%, rgba(23, 75, 59, 0.08), transparent 24rem),
    radial-gradient(circle at 8% 94%, rgba(207, 96, 78, 0.07), transparent 26rem),
    var(--paper);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto 30px;
}

.eyebrow,
.card-label {
  display: block;
  margin: 0 0 7px;
  color: var(--coral);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.topbar h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.safety-pill,
.dry-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid #b9d0c6;
  border-radius: 999px;
  color: var(--forest);
  background: rgba(233, 242, 237, 0.86);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.safety-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--forest-2); }

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.icon-button:hover { border-color: #abb4ae; }

.view {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  animation: rise 220ms ease;
}

.view.is-active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 1280px;
  min-height: 440px;
  margin: 0 auto;
  color: var(--muted);
}

.loading-state.is-hidden { display: none; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #cfd5d0;
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 20;
  max-width: min(390px, calc(100vw - 48px));
  padding: 13px 16px;
  border-radius: 11px;
  color: white;
  background: var(--forest);
  box-shadow: 0 14px 40px rgba(20, 35, 29, 0.25);
  font-size: 0.82rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #8f3a2e; }

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  min-height: 340px;
  overflow: hidden;
  padding: clamp(30px, 5vw, 58px);
  border-radius: 24px;
  color: white;
  background:
    radial-gradient(circle at 80% 28%, rgba(159, 203, 184, 0.16), transparent 15rem),
    linear-gradient(135deg, #123e31, #1d5a46);
  box-shadow: 0 26px 65px rgba(23, 75, 59, 0.2);
}

.hero-card::after {
  position: absolute;
  right: -8%;
  bottom: -46%;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.hero-card .card-label { color: #f0a99a; }

.hero-card h2 {
  margin: 25px 0 18px;
  font-family: Georgia, serif;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.hero-card p { max-width: 610px; margin: 0; color: #c8ddd5; line-height: 1.65; }

.hero-orbit { position: relative; z-index: 1; min-height: 230px; }

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.hero-orbit::before { width: 205px; height: 205px; }
.hero-orbit::after { width: 300px; height: 300px; }

.orbit-center,
.orbit-item {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.orbit-center {
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 84px;
  height: 84px;
  color: var(--forest);
  background: #f3f0e7;
  font-family: Georgia, serif;
  font-size: 2.3rem;
  transform: translate(-50%, -50%);
}

.orbit-item { z-index: 3; width: 55px; height: 55px; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; }
.orbit-web { top: 10%; right: 4%; color: white; background: #7d4d75; }
.orbit-olx { bottom: 2%; left: 3%; color: #341d5c; background: #d8c3fb; }

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

.metric-card,
.panel,
.version-card,
.price-group,
.catalog-row,
.promotion-card,
.schedule-day,
.guard-grid article,
.parity-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  min-height: 142px;
  padding: 19px;
  border-radius: 16px;
}

.metric-card > span { color: var(--muted); font-size: 0.74rem; font-weight: 700; }
.metric-card strong { align-self: center; font-family: Georgia, serif; font-size: 2.8rem; font-weight: 500; }
.metric-card small { align-self: end; color: #919793; font-size: 0.68rem; }

.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.panel { padding: 24px; border-radius: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
h3 { margin: 0; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.neutral-badge { padding: 7px 9px; border-radius: 999px; color: var(--muted); background: #f0f1ed; font-size: 0.64rem; font-weight: 750; }
.channel-list { display: grid; gap: 9px; padding-top: 16px; }

.channel-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid #e6e8e3;
  border-radius: 12px;
  background: #fbfbf8;
}

.channel-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: white; font-family: Georgia, serif; font-size: 1.2rem; }
.channel-icon.woocommerce { background: #7d4d75; }
.channel-icon.olx { background: var(--violet); }
.channel-copy { display: grid; gap: 3px; min-width: 0; }
.channel-copy small { overflow: hidden; color: var(--muted); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.disabled-badge { padding: 6px 8px; border-radius: 7px; color: #7d5b2f; background: #f6ead5; font-size: 0.61rem; font-weight: 850; }

.workflow { display: grid; gap: 0; margin: 11px 0 0; padding: 0; list-style: none; }
.workflow li { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 11px; padding: 10px 0; }
.workflow li:not(:last-child)::after { position: absolute; top: 42px; bottom: -4px; left: 17px; width: 1px; background: var(--line); content: ""; }
.workflow li > span { display: grid; z-index: 1; width: 35px; height: 35px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--forest); background: white; font-size: 0.67rem; font-weight: 850; }
.workflow li div { display: grid; gap: 3px; padding-top: 1px; }
.workflow small { color: var(--muted); font-size: 0.68rem; }

.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.section-intro > div:first-child { max-width: 770px; }
.section-intro h2 { margin: 6px 0 10px; font-family: Georgia, serif; font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 400; letter-spacing: -0.04em; }
.section-intro p { margin: 0; color: var(--muted); line-height: 1.65; }
.version-card { display: grid; min-width: 175px; padding: 16px 18px; border-radius: 14px; }
.version-card small { color: var(--muted); font-size: 0.66rem; }
.version-card strong { padding: 4px 0; font-family: Georgia, serif; font-size: 1.75rem; font-weight: 500; }
.version-card span { color: #8c938f; font-size: 0.65rem; }

.price-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.price-group { overflow: hidden; border-radius: 18px; }
.price-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 21px; border-bottom: 1px solid var(--line); background: #fbfbf8; }
.price-group-head h3 { font-size: 1.8rem; }
.price-group-head p { max-width: 390px; margin: 5px 0 0; color: var(--muted); font-size: 0.67rem; line-height: 1.45; }
.point-count { padding: 6px 9px; border-radius: 999px; color: var(--forest); background: var(--mint); font-size: 0.62rem; font-weight: 800; white-space: nowrap; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th { padding: 10px 13px; color: #8d9490; font-size: 0.59rem; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.price-table td { padding: 10px 13px; border-top: 1px solid #edf0eb; font-size: 0.76rem; }
.price-table td:first-child { font-weight: 750; }
.price-editor { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.price-input { width: 74px; padding: 7px 8px; border: 1px solid #d5dad5; border-radius: 8px; text-align: right; background: white; }
.price-input:focus { outline: 2px solid rgba(37, 107, 84, 0.2); border-color: var(--forest-2); }
.currency { color: var(--muted); font-size: 0.65rem; }
.small-button { padding: 7px 9px; border: 0; border-radius: 8px; color: white; background: var(--forest); font-size: 0.63rem; font-weight: 800; cursor: pointer; }
.small-button.secondary { color: var(--muted); background: #eff1ed; }
.small-button:disabled { opacity: 0.55; cursor: wait; }

.search-box { display: flex; align-items: center; gap: 8px; min-width: 250px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.search-box span { color: var(--muted); font-size: 1.2rem; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.fixture-warning { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 13px 16px; border: 1px solid #e5cf9e; border-radius: 12px; color: #6d5730; background: #fff6df; font-size: 0.75rem; }
.fixture-warning strong { padding: 4px 7px; border-radius: 6px; color: white; background: var(--gold); font-size: 0.62rem; text-transform: uppercase; }
.catalog-list { display: grid; gap: 10px; }
.catalog-row { display: grid; grid-template-columns: 1.2fr 0.55fr 1fr auto; align-items: center; gap: 18px; padding: 17px 19px; border-radius: 14px; }
.product-main { display: grid; gap: 4px; min-width: 0; }
.product-main small { color: var(--coral); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.06em; }
.product-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-meta { display: grid; gap: 3px; }
.product-meta small { color: var(--muted); font-size: 0.63rem; }
.dimension-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.dimension-chip { padding: 5px 7px; border-radius: 7px; color: #66706b; background: #f0f2ee; font-size: 0.59rem; }
.dimension-chip.is-olx { color: var(--forest); background: var(--mint); font-weight: 800; }
.availability { padding: 6px 8px; border-radius: 999px; color: var(--forest); background: var(--mint); font-size: 0.6rem; font-weight: 800; }
.empty-state { padding: 45px; border: 1px dashed #cdd2cd; border-radius: 16px; color: var(--muted); text-align: center; }

.promotion-list { display: grid; gap: 15px; }
.promotion-card { display: grid; grid-template-columns: 1fr auto; gap: 25px; padding: 24px; border-radius: 18px; }
.promotion-card h3 { margin-top: 6px; }
.promotion-card p { max-width: 700px; margin: 8px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.promotion-status { align-self: start; padding: 7px 10px; border-radius: 999px; color: #6d5730; background: #fff0cc; font-size: 0.62rem; font-weight: 850; text-transform: uppercase; }
.promotion-channels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.promotion-channel { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 0.68rem; }
.promotion-channel.paid { color: #8b3c30; border-color: #ecc4bc; background: var(--coral-soft); }
.paid-warning { display: flex; gap: 15px; margin-top: 17px; padding: 20px; border: 1px solid #e8b9af; border-radius: 16px; background: var(--coral-soft); }
.warning-mark { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: white; background: var(--coral); font-weight: 900; }
.paid-warning p { margin: 4px 0 0; color: #7d4f46; font-size: 0.77rem; line-height: 1.55; }

.schedule-summary { margin-bottom: 13px; }
.schedule-list { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.schedule-day { min-width: 130px; overflow: hidden; border-radius: 14px; }
.schedule-day-head { padding: 12px 13px; border-bottom: 1px solid var(--line); background: #f7f8f4; }
.schedule-day-head strong { display: block; font-size: 0.73rem; text-transform: capitalize; }
.schedule-day-head small { color: var(--muted); font-size: 0.6rem; }
.schedule-items { display: grid; gap: 8px; padding: 10px; }
.schedule-item { padding: 10px; border-left: 3px solid var(--forest-2); border-radius: 7px; background: #f5f7f4; }
.schedule-item.hide { border-left-color: var(--coral); }
.schedule-item time { display: block; color: var(--muted); font-size: 0.59rem; }
.schedule-item strong { display: block; margin: 3px 0; font-size: 0.68rem; }
.schedule-item small { display: block; overflow: hidden; color: #7e8581; font-size: 0.57rem; text-overflow: ellipsis; white-space: nowrap; }

.guard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.guard-grid article { min-height: 180px; padding: 21px; border-radius: 16px; }
.guard-grid article > span { color: var(--coral); font-size: 0.64rem; font-weight: 850; letter-spacing: 0.08em; }
.guard-grid strong { display: block; margin-top: 27px; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.guard-grid p { margin: 7px 0 0; color: var(--muted); font-size: 0.74rem; line-height: 1.55; }
.parity-card { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 30px; margin-top: 16px; padding: 25px; border-radius: 18px; }
.parity-card p { margin: 0; color: var(--muted); line-height: 1.65; }

@media (max-width: 1120px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .price-groups { grid-template-columns: 1fr; }
  .catalog-row { grid-template-columns: 1fr 0.5fr 1fr; }
  .catalog-row .availability { grid-column: 1 / -1; justify-self: start; }
  .guard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 15px; border-right: 0; border-bottom: 1px solid #d6d9d3; }
  .brand { display: none; }
  .nav { display: flex; overflow-x: auto; margin: 0; padding-bottom: 2px; }
  .nav-link { flex: 0 0 auto; grid-template-columns: 1fr; width: auto; padding: 9px 12px; }
  .nav-link span { display: none; }
  .sidebar-status, .sidebar-version { display: none; }
  .workspace { padding-top: 24px; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-orbit { display: none; }
  .two-column { grid-template-columns: 1fr; }
  .schedule-list { grid-template-columns: repeat(7, 150px); }
}

@media (max-width: 650px) {
  .workspace { padding-right: 15px; padding-left: 15px; }
  .topbar { align-items: flex-start; }
  .safety-pill { display: none; }
  .hero-card { min-height: 0; padding: 28px 23px; border-radius: 18px; }
  .hero-card h2 { margin-top: 18px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 125px; padding: 15px; }
  .metric-card strong { font-size: 2.2rem; }
  .section-intro { align-items: stretch; flex-direction: column; gap: 15px; }
  .version-card, .search-box { min-width: 0; width: 100%; }
  .price-table th:nth-child(2), .price-table td:nth-child(2) { display: none; }
  .price-table td, .price-table th { padding-right: 9px; padding-left: 9px; }
  .price-editor { flex-wrap: wrap; }
  .catalog-row { grid-template-columns: 1fr; gap: 10px; }
  .catalog-row .availability { grid-column: auto; }
  .promotion-card, .parity-card { grid-template-columns: 1fr; }
  .guard-grid { grid-template-columns: 1fr; }
  .guard-grid article { min-height: 150px; }
}

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