:root {
  --orange: #ff6400;
  --orange-2: #ff8a38;
  --bg: #050505;
  --panel: #111111;
  --panel-2: #17110e;
  --line: rgba(255, 255, 255, 0.14);
  --muted: #bdbdbd;
  --text: #ffffff;
  --green: #55d58c;
  --red: #ff7670;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 100, 0, 0.18), transparent 30rem),
    radial-gradient(circle at 100% 20%, rgba(0, 110, 98, 0.18), transparent 34rem),
    #030303;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.brand img {
  width: 174px;
  height: auto;
  display: block;
}

.brand span {
  color: var(--orange);
  font-size: 18px;
}

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

.top-actions a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: #f2f2f2;
  font-weight: 800;
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.sidebar,
.workspace {
  min-width: 0;
}

.sidebar {
  display: grid;
  gap: 14px;
  align-content: start;
}

.account-card,
.summary-card,
.data-card,
.admin-card,
.nav-card,
.hero-panel,
.catalog-panel,
.entry-panel,
.inventory-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border-radius: 10px;
  padding: 18px;
  min-width: 0;
}

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

.side-link {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 10px;
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}

.side-link.is-active {
  border-color: var(--orange);
  background: rgba(255, 100, 0, 0.16);
  color: #ffd2bd;
}

.eyebrow {
  color: var(--orange-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  font-size: clamp(34px, 4.5vw, 68px);
  max-width: 980px;
}

h2 {
  font-size: 24px;
}

p {
  color: #e7e7e7;
  line-height: 1.5;
}

.auth-grid,
.data-card {
  display: grid;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #070707;
  color: #fff;
  border-radius: 8px;
  padding: 11px 12px;
  min-height: 42px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 100, 0, 0.16);
}

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

.checkline {
  display: flex;
  align-items: start;
  gap: 9px;
  color: #d9d9d9;
  font-size: 13px;
  line-height: 1.35;
}

.fine-print {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 10px 0 0;
}

.checkline input {
  width: auto;
  min-height: 0;
  margin-top: 2px;
}

.btn {
  border: 1px solid rgba(255, 100, 0, 0.62);
  background: transparent;
  color: #fff;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
  border-color: var(--orange);
  outline: none;
}

.btn-primary {
  background: var(--orange);
  color: #111;
  border-color: var(--orange);
}

.btn-danger {
  border-color: rgba(255, 118, 112, 0.7);
  color: #ffd3d0;
}

.full {
  width: 100%;
}

.hidden {
  display: none !important;
}

.file-btn input {
  display: none;
}

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

.summary-grid div {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.26);
  border-radius: 8px;
  padding: 12px;
}

.summary-grid b {
  display: block;
  color: #fff;
  font-size: 20px;
  margin-bottom: 4px;
}

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

.workspace {
  display: grid;
  gap: 16px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255, 100, 0, 0.13) 0 1px, transparent 1px 90px),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

.hero-panel p {
  max-width: 900px;
  font-size: 17px;
  margin-bottom: 0;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.trust-row span {
  border: 1px solid rgba(255, 100, 0, 0.42);
  background: rgba(255, 100, 0, 0.12);
  border-radius: 999px;
  color: #ffd8c4;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.estimate-card {
  border: 1px solid rgba(255, 100, 0, 0.45);
  border-radius: 10px;
  background: rgba(0,0,0,0.32);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.estimate-card b {
  font-size: 42px;
  color: var(--green);
}

.estimate-card span:last-child {
  color: var(--muted);
  line-height: 1.35;
}

.pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 100, 0, 0.16);
  color: #ffd2b8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.workflow-strip div {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.32);
  border-radius: 10px;
  padding: 11px;
  min-width: 0;
}

.workflow-strip b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--orange);
  color: #111;
  flex: 0 0 auto;
}

.workflow-strip span {
  color: #f3f3f3;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

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

.category-card {
  border: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.78);
  border-radius: 10px;
  padding: 13px;
  cursor: pointer;
  text-align: left;
  color: #fff;
}

.category-card.is-active {
  border-color: var(--orange);
  background: rgba(255, 100, 0, 0.14);
}

.category-card b {
  display: block;
  font-size: 17px;
  margin-bottom: 5px;
}

.category-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.catalog-panel {
  background:
    linear-gradient(135deg, rgba(255, 100, 0, 0.13) 0 1px, transparent 1px 72px),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
}

.spot-panel {
  border: 1px solid rgba(255, 100, 0, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 100, 0, 0.12) 0 1px, transparent 1px 82px),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-radius: 10px;
  padding: 18px;
  min-width: 0;
}

.spot-panel p {
  max-width: 820px;
  margin: 8px 0 0;
}

.spot-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: min(260px, 100%);
}

.spot-actions span,
.spot-editor summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.spot-grid,
.melt-grid {
  display: grid;
  gap: 10px;
}

.spot-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

.melt-grid {
  grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
  margin-top: 10px;
}

.spot-card,
.melt-card {
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(0,0,0,0.34);
  border-radius: 10px;
  padding: 13px;
  min-width: 0;
}

.spot-card span,
.melt-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.spot-card b,
.melt-card b {
  display: block;
  color: #fff;
  font-size: 23px;
  line-height: 1.1;
  margin: 6px 0 5px;
}

.spot-card small,
.melt-card small {
  color: #d7d7d7;
  font-size: 12px;
  line-height: 1.35;
}

.melt-card.is-total {
  border-color: rgba(255, 100, 0, 0.55);
  background: linear-gradient(180deg, rgba(255, 100, 0, 0.18), rgba(0,0,0,0.32));
}

.melt-bars {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.melt-bar {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
  color: #eeeeee;
  font-size: 12px;
  font-weight: 800;
}

.melt-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}

.melt-bar-track i {
  display: block;
  height: 100%;
  width: var(--bar-width, 0%);
  background: linear-gradient(90deg, var(--orange), #f5d47b);
  border-radius: inherit;
}

.spot-editor {
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 12px;
}

.spot-editor summary {
  cursor: pointer;
  width: fit-content;
}

.spot-input-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.spot-input-grid label {
  display: grid;
  gap: 6px;
  color: #f1f1f1;
  font-size: 12px;
  font-weight: 900;
}

.catalog-tools {
  display: flex;
  gap: 8px;
  width: min(620px, 100%);
}

.catalog-tools input {
  min-width: 240px;
}

.product-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.product-catalog.is-family-view {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-breadcrumb {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 8px;
  color: #fff;
  font-weight: 900;
}

.catalog-breadcrumb .btn {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

.catalog-breadcrumb small {
  color: var(--muted);
  font-size: 12px;
}

.product-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.38);
  border-radius: 10px;
  padding: 10px;
  min-width: 0;
}

.product-family-card {
  grid-template-columns: 96px minmax(0, 1fr);
  background:
    linear-gradient(135deg, rgba(255, 100, 0, 0.16), rgba(0, 0, 0, 0.36) 42%),
    rgba(0, 0, 0, 0.44);
  border-color: rgba(255, 100, 0, 0.34);
}

.product-thumb {
  width: 76px;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 90, 31, 0.35);
  background: #090909;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.product-family-thumb {
  width: 96px;
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 34%, rgba(255, 100, 0, 0.18), #080808 70%);
}

.product-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.product-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.16;
}

.product-card p {
  margin: 0;
  color: #e9e9e9;
  font-size: 12px;
  line-height: 1.35;
}

.product-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.main-grid {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

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

.entry-panel {
  display: grid;
  gap: 12px;
}

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

.field label {
  font-size: 13px;
  color: #f1f1f1;
  font-weight: 900;
}

.two,
.three {
  display: grid;
  gap: 10px;
}

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

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

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

.photo-tile {
  border: 1px dashed rgba(255, 100, 0, 0.5);
  background: rgba(255, 100, 0, 0.06);
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
}

.photo-tile span {
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  color: #ffd0b8;
  font-weight: 900;
  text-transform: uppercase;
}

.photo-tile input {
  display: none;
}

.photo-tile div {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 10px;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ai-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 100, 0, 0.35);
  background: rgba(255, 100, 0, 0.08);
  border-radius: 10px;
  padding: 14px;
}

.ai-box p {
  margin: 0;
  color: #efefef;
}

.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  flex: 1 1 320px;
}

.search-row input,
.search-row select {
  min-width: 0;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.tab {
  white-space: nowrap;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: #090909;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.tab.is-active {
  background: var(--orange);
  color: #111;
  border-color: var(--orange);
}

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

.item-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.018));
  overflow: hidden;
  min-width: 0;
}

.item-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.08);
}

.item-photo {
  aspect-ratio: 4 / 3;
  background: #090909;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.item-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-body {
  padding: 14px;
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.item-top h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 8px 0;
}

.value-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.value-row div {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  padding: 8px;
}

.value-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.value-row b {
  display: block;
  font-size: 14px;
  margin-top: 3px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.card-actions .btn {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
}

.empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 100, 0, 0.6);
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  transition: opacity 0.16s ease, transform 0.16s ease;
  text-align: center;
  max-width: min(680px, 92vw);
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%);
}

@media (max-width: 1180px) {
  .layout,
  .main-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

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

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

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

  .product-catalog.is-family-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar,
  .panel-head,
  .search-row,
  .catalog-tools,
  .spot-actions,
  .ai-box {
    flex-direction: column;
    align-items: stretch;
  }

  .layout {
    padding: 10px;
  }

  .topbar {
    position: static;
  }

  .top-actions {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .btn {
    width: 100%;
  }

  .top-actions a {
    width: auto;
    flex: 0 0 auto;
  }

  .category-board,
  .workflow-strip,
  .product-catalog,
  .spot-grid,
  .melt-grid,
  .spot-input-grid,
  .nav-card,
  .cards,
  .two,
  .three,
  .photo-grid,
  .summary-grid,
  .value-row {
    grid-template-columns: 1fr;
  }

  .product-catalog {
    max-height: 620px;
    overflow: auto;
    padding-right: 0;
  }

  .product-catalog.is-family-view {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .product-family-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .product-thumb {
    width: 70px;
  }

  .product-family-thumb {
    width: 82px;
  }

  .catalog-breadcrumb {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-tools input {
    min-width: 0;
  }

  .melt-bar {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .spot-actions {
    justify-items: stretch;
  }

  .melt-bar span:last-child {
    grid-column: 1 / -1;
  }

  .brand {
    font-size: 18px;
  }

  .brand img {
    width: 132px;
  }

  h1 {
    font-size: 38px;
  }
}
