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

:root {
  --ink: #16171d;
  --ink-2: #272a33;
  --muted: #687080;
  --muted-2: #8b94a4;
  --line: #e6e9ef;
  --line-strong: #d3d9e3;
  --soft: #f6f7fa;
  --soft-orange: #fff3ea;
  --panel: rgba(255, 255, 255, 0.94);
  --brand: #ff6b00;
  --brand-2: #ff8a2a;
  --brand-dark: #d84d00;
  --accent: #0f766e;
  --accent-soft: #e7f6f4;
  --violet: #5954d6;
  --danger: #b42318;
  --danger-soft: #fff0ed;
  --ok: #147d45;
  --ok-soft: #e9f8ef;
  --warning: #a15c00;
  --warning-soft: #fff5db;
  --shadow-sm: 0 8px 24px rgba(22, 23, 29, 0.07);
  --shadow: 0 22px 60px rgba(22, 23, 29, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fff7f1 0, #ffffff 280px),
    #fbfcfd;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 0.9em;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(230, 233, 239, 0.86);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
}

.mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 107, 0, 0.35);
}

.mark::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #ffe1c8;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav button,
.link-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav button.active,
.nav button:hover,
.link-button:hover {
  background: var(--soft-orange);
  color: var(--brand-dark);
}

.nav button:active,
.primary:active,
.secondary:active,
.ghost:active,
.danger:active {
  transform: translateY(1px);
}

.primary,
.secondary,
.ghost,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 10px 15px;
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 14px 28px rgba(255, 107, 0, 0.27);
}

.primary:hover {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  box-shadow: 0 16px 34px rgba(255, 107, 0, 0.34);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none !important;
}

.secondary {
  background: #16171d;
  color: #fff;
  box-shadow: 0 14px 32px rgba(22, 23, 29, 0.18);
}

.secondary:hover {
  background: #272a33;
  transform: translateY(-1px);
}

.ghost {
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--line);
  color: var(--ink);
}

.ghost:hover,
.ghost.active {
  background: #fff7f0;
  border-color: #ffc99f;
  color: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(255, 107, 0, 0.1);
}

.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #ffcfc6;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 52px;
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: 70px 7vw 52px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 246, 239, 0.82) 44%, rgba(255, 255, 255, 0.2) 100%),
    url("https://images.unsplash.com/photo-1581092160607-ee22621dd758?auto=format&fit=crop&w=1800&q=82");
  background-size: cover;
  background-position: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 10px;
  border: 1px solid #ffd4b6;
  border-radius: 999px;
  background: rgba(255, 243, 234, 0.9);
  color: var(--brand-dark);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand);
}

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

h1 {
  max-width: 780px;
  font-size: clamp(46px, 5.8vw, 84px);
  line-height: 0.94;
  letter-spacing: 0;
  margin-bottom: 24px;
}

h2 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
  margin-bottom: 12px;
}

h3 {
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.lead {
  color: #414856;
  font-size: 19px;
  line-height: 1.62;
  max-width: 650px;
}

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

.hero-actions {
  margin-top: 30px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 210, 178, 0.95);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  display: block;
  height: 5px;
  margin: -22px -22px 20px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--violet));
}

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

.metric {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fffaf6);
}

.metric strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--brand-dark);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section {
  padding: 60px 7vw;
}

.band {
  background: #f5f7fb;
}

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

.card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.card {
  padding: 20px;
}

.card:hover {
  border-color: #ffd0ae;
  box-shadow: 0 18px 42px rgba(255, 107, 0, 0.12);
}

.panel {
  padding: 22px;
}

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

.page {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.sidebar {
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff, #fff8f2 58%, #f8fafc);
  padding: 24px 16px;
}

.sidebar h3 {
  margin-bottom: 4px;
}

.sidebar button {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.content {
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(255, 247, 240, 0.48), rgba(255, 255, 255, 0) 220px),
    #fbfcfd;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.toolbar p {
  margin-bottom: 0;
}

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

.kpi {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--brand);
}

.kpi b {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

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

.table th {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table tbody tr:hover {
  background: #fff8f2;
}

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

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

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

label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-2);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #ffc49a;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.14);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  filter: saturate(1.05) contrast(1.02);
}

.product-card .primary {
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft-orange);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.wide-split {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.compact-toolbar {
  margin-bottom: 14px;
}

.product-workbench {
  margin-bottom: 18px;
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 220px;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.searchbar.single {
  grid-template-columns: 1fr;
}

.product-admin-grid,
.catalog-grid {
  display: grid;
  gap: 14px;
}

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

.catalog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 660px;
  overflow: auto;
  padding-right: 4px;
}

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

.admin-product-card,
.catalog-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-product-card {
  grid-template-rows: 150px 1fr;
}

.catalog-card {
  padding-bottom: 14px;
}

.admin-product-card img,
.catalog-card img {
  width: 100%;
  aspect-ratio: 4 / 2.35;
  object-fit: cover;
  background: var(--soft);
}

.admin-product-body,
.catalog-card > div {
  padding: 0 14px;
}

.admin-product-card h3,
.catalog-card h3 {
  margin: 9px 0 6px;
  font-size: 17px;
}

.admin-product-card p,
.catalog-card p {
  min-height: 42px;
  margin: 0;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-meta span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
}

.quantity-line,
.quantity-chips,
.button-row,
.integration-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quantity-line {
  padding: 0 14px;
}

.quantity-line span,
.chip {
  min-height: 30px;
  border: 1px solid #ffd0ae;
  border-radius: 999px;
  background: #fff7f0;
  color: var(--brand-dark);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.chip:hover {
  background: var(--brand);
  color: #fff;
}

.button-row {
  align-items: center;
}

.button-row .primary,
.button-row .secondary,
.button-row .ghost {
  flex: 1 1 150px;
}

.product-form {
  margin-top: 12px;
}

.mini-preview {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #ffd0ae;
  border-radius: var(--radius);
  background: #fff7f0;
}

.mini-preview.full {
  grid-column: 1 / -1;
}

.mini-preview img {
  width: 86px;
  height: 64px;
  border: 1px solid #ffd0ae;
  border-radius: 7px;
  object-fit: cover;
  background: #fff;
}

.mini-preview b,
.mini-preview span {
  display: block;
}

.mini-preview span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quote-mini {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sticky-panel {
  position: sticky;
  top: 88px;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 28px;
  text-align: center;
  font-weight: 800;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 178px;
  border: 2px dashed #ffbf91;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #fffaf6, #ffffff);
  text-align: center;
  padding: 24px;
}

.dropzone input {
  border-color: #ffd7bc;
  background: #fff;
}

.notice {
  border: 1px solid #ffd2b2;
  background: #fff6ef;
  color: #7a3500;
  border-radius: var(--radius);
  padding: 13px;
}

.callout-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-color: #ffb178;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 68%);
}

.callout-panel .integration-status {
  justify-content: flex-end;
}

.form-error {
  margin: 12px 0 0;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
  border-radius: var(--radius);
  padding: 12px 13px;
  font-size: 14px;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: 380px;
  padding: 15px 17px;
  border-radius: var(--radius);
  background: #16171d;
  color: #fff;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.login-wrap {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(255, 107, 0, 0.13), rgba(15, 118, 110, 0.08)),
    #fbfcfd;
}

.login-box {
  width: min(480px, 100%);
  box-shadow: var(--shadow);
}

.login-help {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.version-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.small {
  font-size: 13px;
}

.order-flow {
  display: grid;
  gap: 10px;
}

.flow-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.settings-preview {
  display: grid;
  gap: 14px;
}

.preview-logo {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.preview-logo img {
  max-width: 220px;
  max-height: 72px;
  object-fit: contain;
}

.preview-hero {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.12);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.color-grid span {
  display: block;
  height: 46px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 980px) {
  .hero,
  .page,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar button {
    width: auto;
  }

  .searchbar,
  .wide-split {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }

  .kpis,
  .grid-3,
  .product-grid,
  .product-admin-grid,
  .catalog-grid,
  .catalog-grid.roomy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .topbar {
    align-items: flex-start;
    padding: 12px;
  }

  .hero,
  .section,
  .content {
    padding: 30px 16px;
  }

  .form-grid,
  .kpis,
  .metric-grid,
  .grid-3,
  .product-grid,
  .product-admin-grid,
  .catalog-grid,
  .catalog-grid.roomy,
  .callout-panel {
    grid-template-columns: 1fr;
  }

  .integration-status,
  .callout-panel .integration-status {
    justify-content: flex-start;
  }

  h1 {
    font-size: 44px;
  }
}
