﻿:root {
  --green-950: #07180d;
  --green-900: #0b2615;
  --green-800: #11391f;
  --green-700: #18512d;
  --gold-500: #d8a821;
  --gold-400: #f2c84b;
  --clay-600: #93652b;
  --paper: #f4f6f7;
  --paper-2: #e7ebee;
  --ink: #1b241c;
  --muted: #6d746a;
  --line: rgba(27, 36, 28, 0.14);
  --shadow: 0 18px 42px rgba(7, 24, 13, 0.16);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: white;
  background:
    radial-gradient(circle at 28% 22%, rgba(242, 200, 75, 0.12), transparent 28%),
    linear-gradient(135deg, var(--green-950), var(--green-800));
}

.login-card {
  width: min(100%, 430px);
  display: grid;
  gap: 14px;
  padding: 34px;
  background: rgba(7, 24, 13, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
}

.login-logo {
  width: min(100%, 300px);
  justify-self: center;
  object-fit: contain;
}

.login-card h1 {
  margin: 2px 0 8px;
  text-align: center;
  color: white;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.login-card > p:first-of-type {
  justify-self: center;
  margin: 0;
  padding: 4px 10px;
  color: var(--gold-400);
  background: rgba(242, 200, 75, 0.1);
  border: 1px solid rgba(242, 200, 75, 0.24);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-card input {
  min-height: 48px;
  padding: 0 13px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  outline: none;
}

.login-card input:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(242, 200, 75, 0.12);
}

.login-card input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.login-card button {
  min-height: 48px;
  color: var(--green-950);
  background: var(--gold-400);
  border: 1px solid rgba(242, 200, 75, 0.45);
  border-radius: 8px;
  font-weight: 900;
}

.login-card button:disabled {
  opacity: 0.62;
  cursor: wait;
}

#priceImportDialog {
  width: min(96vw, 1120px);
  max-width: none;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.price-import-card {
  width: 100%;
  max-width: none;
  max-height: calc(100dvh - 36px);
  display: grid;
  gap: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.price-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  color: white;
  background: var(--green-800);
}

.price-import-head h2,
.price-import-head p {
  margin: 0;
}

.price-import-head h2 {
  font-size: 1.35rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.price-import-head p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
}

.price-import-file,
.price-import-status,
.price-import-preview {
  margin: 0 26px;
  min-width: 0;
}

.price-import-file {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.price-import-file input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.price-import-status {
  padding: 12px 14px;
  color: var(--green-900);
  background: rgba(24, 81, 45, 0.08);
  border: 1px solid rgba(24, 81, 45, 0.18);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.price-import-status.is-error {
  color: #8a1d16;
  background: rgba(186, 35, 22, 0.09);
  border-color: rgba(186, 35, 22, 0.28);
}

.price-import-preview {
  display: grid;
  gap: 12px;
}

.price-import-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.price-import-stats div {
  min-width: 0;
  padding: 11px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.price-import-stats strong,
.price-import-stats span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.price-import-stats strong {
  color: var(--green-900);
  font-size: 1.18rem;
}

.price-import-stats span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.price-import-list {
  max-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.92rem;
}

.price-import-list h3 {
  margin: 0 0 8px;
  color: var(--green-900);
  font-size: 0.95rem;
}

.price-import-list ul {
  margin: 0;
  padding-left: 18px;
}

.price-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 26px 22px;
  min-width: 0;
}

.price-import-actions button {
  min-height: 44px;
  padding: 0 18px;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--green-700);
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
}

.price-import-actions button[type="submit"],
#priceImportApply {
  color: white;
  background: var(--green-800);
}

#priceImportCancel {
  color: var(--green-800);
  background: transparent;
}

@media (max-width: 620px) {
  #priceImportDialog {
    width: calc(100vw - 18px);
  }

  .price-import-card {
    max-height: calc(100dvh - 18px);
    gap: 12px;
  }

  .price-import-head,
  .price-import-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .price-import-file,
  .price-import-status,
  .price-import-preview {
    margin-left: 16px;
    margin-right: 16px;
  }
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px 18px;
  overflow: hidden;
  color: white;
  background: var(--green-950);
  border-right: 1px solid rgba(242, 200, 75, 0.22);
}

.brand {
  display: block;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  max-height: 98px;
  object-fit: contain;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.catalog-index {
  min-height: 0;
}

.nav-title {
  margin: 0 0 10px;
  color: var(--gold-400);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.nav-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 142px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-item,
.segment-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  color: inherit;
  background: transparent;
}

.nav-item {
  color: rgba(255, 255, 255, 0.82);
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(242, 200, 75, 0.38);
  background: rgba(242, 200, 75, 0.12);
  color: white;
}

.nav-item span:first-child,
.segment-chip span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count {
  flex: 0 0 auto;
  min-width: 38px;
  padding: 3px 7px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
}

main {
  min-width: 0;
}

.hero {
  position: relative;
  min-height: 332px;
  display: flex;
  align-items: end;
  overflow: hidden;
  color: white;
  background: var(--green-900);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 24, 13, 0.82), rgba(7, 24, 13, 0.22) 46%, rgba(7, 24, 13, 0.1)),
    linear-gradient(0deg, rgba(7, 24, 13, 0.84), transparent 58%);
}

.hero-content {
  position: relative;
  max-width: 720px;
  padding: 38px clamp(18px, 4vw, 54px);
}

.hero-content p,
.hero-content span {
  margin: 0;
  color: var(--gold-400);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1 {
  margin: 6px 0 10px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-content span {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
}

.user-menu {
  position: absolute;
  top: 22px;
  right: clamp(18px, 3vw, 42px);
  z-index: 3;
}

.user-menu-toggle {
  min-height: 40px;
  padding: 0 14px;
  color: var(--green-950);
  background: rgba(242, 200, 75, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 238px;
  display: grid;
  gap: 8px;
  padding: 10px;
  color: white;
  background: rgba(7, 24, 13, 0.96);
  border: 1px solid rgba(242, 200, 75, 0.22);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.user-menu-profile {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.user-menu-profile span {
  color: var(--gold-400);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.user-menu-profile strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.user-menu-panel button,
.user-menu-link {
  min-height: 38px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-weight: 800;
  text-align: left;
  padding: 0 10px;
}

.user-menu-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.user-menu-link[hidden] {
  display: none;
}

.user-menu-panel button:hover,
.user-menu-link:hover {
  border-color: rgba(242, 200, 75, 0.36);
  background: rgba(242, 200, 75, 0.12);
}

.access-strip {
  display: grid;
  grid-template-columns: minmax(340px, 0.8fr) minmax(360px, 0.9fr) minmax(250px, 0.55fr);
  gap: 10px;
  padding: 8px clamp(16px, 3vw, 34px);
  background: #f6f7f8;
  border-bottom: 1px solid var(--line);
}

.login-preview,
.client-field {
  position: relative;
  min-width: 0;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.access-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.access-head strong {
  color: var(--green-900);
  font-size: 1rem;
}

.access-head span {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: var(--clay-600);
  background: rgba(216, 168, 33, 0.14);
  border: 1px solid rgba(216, 168, 33, 0.28);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.login-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.login-actions button {
  min-height: 40px;
  padding: 0 14px;
  color: white;
  background: var(--green-800);
  border: 1px solid rgba(7, 24, 13, 0.18);
  border-radius: 8px;
  font-weight: 900;
}

.login-actions button:last-child {
  color: var(--green-800);
  background: #f8fafb;
  border-color: rgba(216, 168, 33, 0.42);
}

.login-actions button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.login-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.login-card .login-status {
  min-height: 20px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.login-status.is-error {
  color: #9b1c1c;
}

.login-card .login-status.is-error {
  color: #ffd6d6;
}

.access-head span.is-active {
  color: var(--green-900);
  background: rgba(24, 81, 45, 0.12);
  border-color: rgba(24, 81, 45, 0.25);
}

.login-fields label,
.client-field {
  display: grid;
  gap: 5px;
}

.login-fields span,
.client-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-field input {
  border-color: rgba(216, 168, 33, 0.54);
  box-shadow: inset 0 0 0 1px rgba(216, 168, 33, 0.08);
}

.client-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.client-search-row button {
  min-height: 36px;
  color: var(--green-800);
  background: #f8fafb;
  border: 1px solid rgba(216, 168, 33, 0.44);
  border-radius: 8px;
  font-weight: 900;
}

.client-results {
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(100% - 10px);
  z-index: 25;
  display: grid;
  gap: 5px;
  max-height: 340px;
  overflow: auto;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.client-option {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 9px 10px;
  text-align: left;
  color: var(--ink);
  background: #f6f7f8;
  border: 1px solid transparent;
  border-radius: 8px;
}

.client-option:hover {
  border-color: rgba(216, 168, 33, 0.46);
  background: #eef2f4;
}

.client-option strong,
.client-option span,
.client-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-option span,
.client-option small {
  color: var(--muted);
  font-size: 0.78rem;
}

.client-option.empty {
  padding: 14px;
  color: var(--muted);
  background: #f6f7f8;
  text-align: center;
}

.client-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #f3f8ed;
  border: 1px solid rgba(24, 81, 45, 0.18);
  border-radius: 8px;
}

.client-selected div {
  min-width: 0;
}

.client-selected strong,
.client-selected span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-selected strong {
  color: var(--green-900);
}

.client-selected span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.client-selected b {
  flex: 0 0 auto;
  display: grid;
  min-width: 48px;
  height: 36px;
  place-items: center;
  color: white;
  background: var(--green-800);
  border-radius: 8px;
}

.client-selected-panel {
  min-height: 58px;
}

.quote-shortcut {
  display: grid;
  min-height: 58px;
  padding: 7px;
  background: #eef6ec;
  border: 1px solid rgba(24, 81, 45, 0.18);
  border-radius: 8px;
}

.quote-shortcut button {
  width: 100%;
  min-height: 40px;
  color: var(--green-900);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(24, 81, 45, 0.28);
  border-radius: 8px;
  font-weight: 900;
}

.quote-shortcut button:hover {
  color: white;
  background: var(--green-800);
}

.toolbar {
  display: grid;
  gap: 6px;
  padding: 8px clamp(16px, 3vw, 34px);
  background: #f6f7f8;
  border-bottom: 1px solid var(--line);
}

.toolbar-fields,
.toolbar-actions {
  display: grid;
  grid-template-columns:
    minmax(300px, 1.35fr)
    minmax(170px, 0.75fr)
    minmax(170px, 0.75fr)
    minmax(190px, 0.85fr)
    minmax(150px, 0.65fr);
  gap: 10px;
  align-items: end;
}

.toolbar label,
.search {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.toolbar span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(24, 81, 45, 0.12);
}

input:disabled,
select:disabled {
  color: rgba(27, 36, 28, 0.52);
  background: #e9edf0;
  cursor: not-allowed;
}

.summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  padding: 1px clamp(16px, 3vw, 34px) 0;
  background: var(--line);
}

.summary-bar div {
  display: grid;
  gap: 0;
  padding: 8px 14px;
  background: var(--paper);
}

.summary-bar strong {
  color: var(--green-800);
  font-size: 1.2rem;
  line-height: 1.05;
}

.summary-bar span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 22px clamp(16px, 3vw, 34px) 34px;
}

.segment-panel,
.results-area {
  min-width: 0;
}

.segment-panel {
  display: none;
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  background: #f6f7f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel-head,
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.results-head h2 {
  margin: 0;
  color: var(--green-900);
  font-size: 1.05rem;
}

.panel-head span {
  color: var(--gold-500);
  font-weight: 900;
}

.segment-list {
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding: 10px;
}

.segment-chip {
  color: var(--ink);
}

.segment-chip:hover,
.segment-chip.active {
  color: var(--green-950);
  background: rgba(216, 168, 33, 0.16);
  border-color: rgba(216, 168, 33, 0.36);
}

.results-head {
  margin-bottom: 16px;
}

.results-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.toolbar-actions #manualProductOpen {
  grid-column: 1;
}

.toolbar-actions #clearFilters {
  grid-column: 2;
}

#manualProductOpen,
#clearFilters,
.load-more,
.quote-button,
.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--green-700);
  border-radius: 8px;
  color: white;
  background: var(--green-800);
  font-weight: 800;
  text-decoration: none;
}

#clearFilters {
  color: var(--green-800);
  background: transparent;
}

#manualProductOpen {
  font-weight: 600;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: white;
  background: #2d8a45;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(7, 24, 13, 0.22);
  font-size: 1.25rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

.product-card {
  display: grid;
  min-height: 276px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(7, 24, 13, 0.06);
}

.product-visual {
  position: relative;
  min-height: 128px;
  padding: 12px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(135deg, rgba(17, 57, 31, 0.96), rgba(147, 101, 43, 0.78)),
    var(--green-800);
}

.product-visual.has-photo {
  display: grid;
  place-items: center;
  min-height: 166px;
  padding: 0;
  background: #f2f4f5;
}

.product-visual::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -36px;
  width: 116px;
  height: 116px;
  border: 18px solid rgba(242, 200, 75, 0.26);
  border-radius: 50%;
}

.product-visual.has-photo::after {
  display: none;
}

.product-visual img {
  width: 100%;
  height: 166px;
  object-fit: contain;
  padding: 12px;
}

.product-visual strong,
.product-visual span {
  position: relative;
  z-index: 1;
}

.product-visual strong {
  display: block;
  max-width: 74%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
}

.product-visual span {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green-950);
  background: var(--gold-400);
  font-size: 0.78rem;
  font-weight: 900;
}

.product-visual.has-photo span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  box-shadow: 0 8px 18px rgba(7, 24, 13, 0.14);
}

.product-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 10px;
  padding: 14px;
}

.codes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.code-pill {
  padding: 4px 7px;
  color: var(--green-900);
  background: var(--paper-2);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.product-body h3 {
  margin: 0;
  min-height: 46px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.85rem;
}

.meta b {
  color: var(--ink);
}

.price-box {
  display: grid;
  gap: 5px;
  padding: 10px;
  background: #f8fafb;
  border: 1px solid rgba(216, 168, 33, 0.28);
  border-radius: 8px;
}

.price-box.card > span,
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-box span,
.price-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.price-box strong,
.price-row strong {
  color: var(--green-900);
  font-size: 0.95rem;
}

.price-row.discount strong {
  color: var(--clay-600);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.detail-button {
  color: var(--green-800);
  background: white;
}

.card-actions .quote-button:only-child {
  grid-column: 1 / -1;
}

.quote-button.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.load-more {
  display: block;
  margin: 18px auto 0;
  min-width: 230px;
}

.empty-state {
  padding: 34px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  margin-bottom: 6px;
  color: var(--green-900);
  font-size: 1.05rem;
}

dialog {
  width: min(720px, calc(100vw - 26px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(7, 24, 13, 0.64);
}

.dialog-card {
  position: relative;
  background: white;
}

.close-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: white;
  background: rgba(7, 24, 13, 0.54);
  font-weight: 900;
}

.manual-product-card {
  position: relative;
  margin: 0;
  background: #f6f7f8;
}

.manual-product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  color: white;
  background: linear-gradient(135deg, var(--green-950), var(--green-700));
}

.manual-product-head h2,
.manual-product-head p {
  margin: 0;
}

.manual-product-head p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.manual-product-head .close-dialog {
  position: static;
  flex: 0 0 auto;
}

.manual-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 18px 22px;
}

.manual-product-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-product-grid .span-2 {
  grid-column: 1 / -1;
}

.manual-product-grid input,
.manual-product-grid textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  text-transform: none;
}

.manual-product-grid textarea {
  resize: vertical;
}

.manual-product-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 20px;
}

.manual-product-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--green-700);
  border-radius: 8px;
  color: white;
  background: var(--green-800);
  font-weight: 900;
}

.manual-product-actions button:first-child {
  color: var(--green-800);
  background: transparent;
}

.quote-consultation-card {
  background: #f6f7f8;
}

.quote-consultation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  color: white;
  background: linear-gradient(135deg, var(--green-950), var(--green-700));
}

.quote-consultation-head h2,
.quote-consultation-head p {
  margin: 0;
}

.quote-consultation-head p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.quote-consultation-head .close-dialog {
  position: static;
  flex: 0 0 auto;
}

.quote-consultation-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.quote-consultation-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-consultation-filters input,
.quote-consultation-filters select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

#quoteFilterCanceled {
  width: auto;
  min-height: auto;
  justify-self: flex-start;
}

.quote-consultation-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
}

.quote-consultation-toolbar button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--green-700);
  border-radius: 8px;
  color: white;
  background: var(--green-800);
  font-weight: 900;
}

.quote-consultation-toolbar span {
  color: var(--muted);
  font-weight: 800;
}

.quote-consultation-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding: 16px 18px 20px;
}

.quote-consultation-empty,
.quote-consultation-row {
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-consultation-row {
  display: grid;
  gap: 10px;
}

.quote-consultation-main {
  display: grid;
  gap: 3px;
}

.quote-consultation-grid {
  display: grid;
  grid-template-columns: 92px 130px minmax(170px, 1.1fr) minmax(220px, 1.3fr) minmax(140px, 0.8fr) 110px;
  gap: 8px;
}

.quote-consultation-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quote-consultation-grid b {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.quote-consultation-grid span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-consultation-grid button {
  width: fit-content;
  padding: 0;
  color: #078a91;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.quote-consultation-main strong {
  color: var(--green-900);
  font-size: 1rem;
}

.quote-consultation-main span,
.quote-consultation-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.quote-consultation-controls {
  display: grid;
  grid-template-columns: 90px 160px minmax(0, 1fr);
  gap: 8px;
}

.quote-consultation-controls button,
.quote-consultation-controls select,
.quote-consultation-controls input {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-consultation-controls button {
  color: var(--green-800);
  background: transparent;
  font-weight: 900;
}

.quote-consultation-row summary {
  color: var(--green-900);
  font-weight: 900;
  cursor: pointer;
}

.quote-consultation-items {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.quote-consultation-item {
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--paper);
  border-radius: 8px;
}

.quote-consultation-item strong {
  color: var(--ink);
}

.quote-item-edit {
  display: grid;
  grid-template-columns: 120px 120px minmax(0, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.quote-item-edit label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-item-edit input {
  min-height: 34px;
  padding: 0 8px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  text-transform: none;
}

.quote-observation-card {
  margin: 0;
  background: #f6f7f8;
}

.quote-observation-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 20px;
}

.quote-observation-body label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-observation-body textarea {
  width: 100%;
  min-height: 130px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  text-transform: none;
}

.quote-observation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.quote-observation-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--green-700);
  border-radius: 8px;
  color: white;
  background: var(--green-800);
  font-weight: 900;
}

.quote-observation-actions button:first-child {
  color: var(--green-800);
  background: transparent;
}

.detail-hero {
  padding: 26px 58px 22px 24px;
  color: white;
  background: linear-gradient(135deg, var(--green-950), var(--green-700));
}

.detail-hero p,
.detail-hero h2 {
  margin: 0;
}

.detail-hero p {
  color: var(--gold-400);
  font-weight: 900;
}

.detail-hero h2 {
  margin-top: 8px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.detail-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 20px 22px;
}

.detail-price {
  grid-column: 1 / -1;
}

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

.detail-price .price-row {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-content: stretch;
}

.detail-photo {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 14px;
  background: #f2f4f5;
  border-radius: 8px;
}

.detail-photo-empty {
  align-content: center;
  gap: 14px;
}

.detail-photo-placeholder {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 190px;
  width: 100%;
  color: var(--muted);
  background: white;
  border: 1px dashed rgba(13, 65, 32, 0.28);
  border-radius: 8px;
  text-align: center;
}

.detail-photo-placeholder strong {
  color: var(--green-800);
}

.detail-main-photo {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.detail-main-photo img {
  max-width: 100%;
  max-height: 330px;
  object-fit: contain;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.detail-thumb {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.detail-thumb:hover,
.detail-thumb.active {
  border-color: var(--gold-500);
  box-shadow: inset 0 0 0 2px rgba(216, 168, 33, 0.22);
}

.detail-gallery img {
  max-width: 100%;
  max-height: 70px;
  padding: 4px;
}

.detail-photo-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-photo-upload label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.detail-photo-upload span,
.detail-photo-upload small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-photo-upload small {
  grid-column: 1 / -1;
  text-transform: none;
}

.detail-photo-upload input {
  min-width: 0;
}

.detail-photo-upload button {
  min-height: 40px;
  padding: 0 16px;
  color: white;
  background: var(--green-800);
  border: 1px solid var(--green-800);
  border-radius: 8px;
  font-weight: 800;
}

.photo-zoom {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(7, 24, 13, 0.84);
  cursor: zoom-out;
}

.photo-zoom[hidden] {
  display: none !important;
}

.photo-zoom img {
  max-width: min(96vw, 1180px);
  max-height: 92vh;
  object-fit: contain;
  padding: 14px;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.photo-zoom-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.detail-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: var(--paper);
  border-radius: 8px;
}

.detail-row span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-row strong {
  overflow-wrap: anywhere;
}

.detail-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.cart-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  color: var(--green-950);
  background: var(--gold-400);
  border: 1px solid rgba(7, 24, 13, 0.22);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.cart-toggle strong {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  padding: 0 7px;
  color: white;
  background: var(--green-900);
  border-radius: 999px;
  font-size: 0.82rem;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(430px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #f6f7f8;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(104%);
  transition: transform 180ms ease;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  color: white;
  background: var(--green-950);
}

.cart-head h2,
.cart-head p {
  margin: 0;
}

.cart-head h2 {
  font-size: 1.12rem;
}

.cart-head p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.cart-head button {
  width: 36px;
  height: 36px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 900;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.cart-empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: zoom-in;
}

.cart-item strong,
.cart-item span {
  display: block;
}

.cart-item strong {
  color: var(--ink);
  line-height: 1.25;
}

.cart-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cart-price {
  margin-top: 8px;
}

.cart-price .price-box {
  padding: 8px;
}

.cart-price .price-row {
  gap: 8px;
}

.cart-price .price-row span,
.cart-price .price-box span {
  font-size: 0.7rem;
}

.cart-price .price-row strong,
.cart-price .price-box strong {
  font-size: 0.82rem;
}

.cart-side {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 8px;
}

.cart-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 98px;
  height: 64px;
  color: white;
  background: linear-gradient(135deg, var(--green-950), var(--green-700));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  background: #f2f4f5;
}

.cart-thumb span {
  max-width: 86px;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qty-control {
  display: grid;
  grid-template-columns: 32px 34px 32px;
  align-items: center;
  overflow: hidden;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qty-control button {
  height: 34px;
  color: var(--green-900);
  background: var(--paper);
  border: 0;
  font-weight: 900;
}

.qty-control b {
  text-align: center;
}

.remove-cart {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  color: #8b2f21;
  background: transparent;
  border: 1px solid rgba(139, 47, 33, 0.28);
  border-radius: 8px;
  font-weight: 800;
}

.cart-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  background: white;
  border-top: 1px solid var(--line);
}

.cart-actions button,
.cart-actions a {
  min-height: 42px;
  border: 1px solid var(--green-700);
  border-radius: 8px;
  font-weight: 900;
}

.cart-actions button {
  color: var(--green-800);
  background: transparent;
}

.cart-actions button:disabled {
  color: rgba(27, 36, 28, 0.42);
  background: #e9edf0;
  border-color: rgba(27, 36, 28, 0.12);
  cursor: not-allowed;
}

@media (max-width: 1080px) {
  .app-shell,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .segment-panel {
    position: static;
    height: auto;
    max-height: none;
  }

  .sidebar {
    padding: 14px 16px;
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 1fr);
    max-height: none;
    overflow-x: auto;
  }

  .toolbar-fields,
  .toolbar-actions {
    grid-template-columns: minmax(260px, 1.2fr) repeat(2, minmax(160px, 1fr));
  }

  .toolbar-fields label:nth-child(4),
  .toolbar-fields label:nth-child(5) {
    grid-column: span 1;
  }

  .toolbar-actions #manualProductOpen,
  .toolbar-actions #clearFilters {
    grid-column: auto;
  }

  .access-strip {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 680px) {
  .hero {
    min-height: 236px;
  }

  .toolbar-fields,
  .toolbar-actions,
  .summary-bar,
  .detail-body,
  .login-fields,
  .detail-price .price-box {
    grid-template-columns: 1fr;
  }

  .detail-photo-upload {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    gap: 9px;
  }

  .content-grid {
    padding-inline: 12px;
  }

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

  .results-head,
  .results-actions,
  .card-actions,
  .detail-actions,
  .cart-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .manual-product-grid {
    grid-template-columns: 1fr;
  }

  .manual-product-grid .span-2 {
    grid-column: auto;
  }

  .quote-consultation-filters,
  .quote-consultation-grid,
  .quote-consultation-controls,
  .quote-item-edit {
    grid-template-columns: 1fr;
  }

  .cart-toggle {
    right: 12px;
    bottom: 12px;
  }
}

