:root {
  --bg: #f6f1eb;
  --panel: #fffdf9;
  --ink: #19130f;
  --muted: #75685d;
  --line: #ded1c3;
  --wine: #7d2e3d;
  --wine-dark: #5f1f2d;
  --green: #2f6b55;
  --sand: #eadfce;
  --danger: #9b2f2f;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, sans-serif;
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
}

.login-page {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(65, 44, 30, .16);
  margin: 0 auto;
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-mark {
  align-items: center;
  background: var(--wine);
  border-radius: 50%;
  color: white;
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

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

h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

h3 {
  font-size: 16px;
}

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

.form {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 6px;
}

input,
textarea {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
}

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

.btn {
  background: var(--wine);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 14px;
}

.btn:hover {
  background: var(--wine-dark);
}

.btn.secondary {
  background: var(--sand);
  color: var(--ink);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--wine);
}

.btn.danger {
  border-color: #e0b8b8;
  color: var(--danger);
}

.btn.small {
  min-height: 32px;
  padding: 6px 10px;
}

.stage-pill {
  background: var(--sand);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.stage-pill.ok {
  background: #e5f0e8;
  color: var(--green);
}

.stage-pill.warning {
  background: #f8e6c4;
  color: #7a4d0b;
}

.stage-pill.danger {
  background: #f7d6d6;
  color: var(--danger);
}

.file-upload-box {
  background: #fffaf2;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.file-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  position: relative;
  width: fit-content;
}

.file-button input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.divergence-thumb {
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 44px;
  object-fit: cover;
  vertical-align: middle;
  width: 44px;
}

.divergence-photo-preview {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.divergence-photo-preview img {
  border-radius: 8px;
  max-height: 420px;
  object-fit: contain;
  width: 100%;
}

.divergence-photo-preview.compact {
  max-width: 260px;
}

.divergence-photo-preview.compact img {
  max-height: 180px;
}

.alert {
  background: #fff3f1;
  border: 1px solid #ecc6bd;
  border-radius: 8px;
  color: var(--danger);
  margin-top: 12px;
  padding: 10px 12px;
}

.success {
  background: #edf7f1;
  border: 1px solid #badbc6;
  border-radius: 8px;
  color: var(--green);
  margin-bottom: 14px;
  padding: 12px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 12px;
}

.notice.success {
  background: #edf7f1;
  border-color: #badbc6;
  color: var(--green);
}

.notice.warning {
  background: #fff8e8;
  border-color: #e2bd75;
  color: #704414;
}

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

.sidebar {
  background: #241e19;
  color: white;
  padding: 20px 14px;
}

.sidebar .brand {
  margin-bottom: 22px;
}

.sidebar .brand-mark {
  background: white;
  color: var(--wine);
}

.sidebar small {
  color: #d8c8b6;
}

.menu {
  display: grid;
  gap: 8px;
}

.menu button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.menu button.active,
.menu button:hover {
  background: #3a3028;
  border-color: #6e6054;
}

.content {
  padding: 24px;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

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

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

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

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

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

.mini-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.company-form {
  display: grid;
  gap: 14px;
}

.inline-form.company-form-grid {
  margin-bottom: 0;
}

.company-logo-row {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 160px minmax(0, 1fr);
}

.company-logo-preview {
  align-items: center;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 120px;
  overflow: hidden;
  padding: 10px;
}

.company-logo-preview img {
  max-height: 110px;
  max-width: 100%;
  object-fit: contain;
}

.company-document-header {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
}

.company-document-header img {
  border-radius: 6px;
  max-height: 58px;
  max-width: 110px;
  object-fit: contain;
}

.company-document-header div {
  display: grid;
  gap: 3px;
}

.company-document-header span {
  color: var(--muted);
  font-size: 12px;
}

.bag-delivery-modal .inline-form[hidden] {
  display: none;
}

.representative-delivery-info {
  margin-top: 10px;
}

.print-delivery-receipt {
  background: white;
  color: #111;
  display: grid;
  gap: 8px;
  margin: 0 auto;
  max-width: 794px;
}

.delivery-receipt-copy {
  border: 1px solid var(--line);
  display: grid;
  font-size: 11px;
  gap: 6px;
  min-height: 520px;
  padding: 10px;
}

.receipt-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.receipt-title strong {
  font-size: 13px;
}

.receipt-title span {
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
  padding: 4px 8px;
}

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

.receipt-grid span {
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 2px;
  padding: 4px;
}

.receipt-grid small {
  color: var(--muted);
}

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

.receipt-notes {
  line-height: 1.5;
}

.cut-line {
  border-top: 1px dashed #777;
  color: #777;
  font-size: 11px;
  position: relative;
  text-align: center;
}

.cut-line span {
  background: white;
  padding: 0 8px;
  position: relative;
  top: -8px;
}

.quick-filter-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0 16px;
}

.quick-filter-btn {
  align-items: center;
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  text-align: left;
}

.quick-filter-btn:hover {
  border-color: var(--wine);
}

.quick-filter-btn.active {
  background: #f8e6c4;
  border-color: var(--wine);
  color: var(--wine);
  font-weight: 800;
}

.quick-filter-btn strong {
  font-size: 18px;
}

.product-section-block {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.product-search-form {
  grid-template-columns: minmax(260px, 1fr) 150px;
  margin: 14px 0;
}

.tray-import-panel {
  scroll-margin: 24px;
}

.tray-import-panel-highlight {
  animation: trayImportPulse 1.1s ease-in-out 3;
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(125, 46, 61, .14);
}

@keyframes trayImportPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(125, 46, 61, .08);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(125, 46, 61, .18);
  }
}

.document-chip {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sand);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 9px 10px;
  text-align: left;
}

.document-chip:hover {
  border-color: var(--wine);
}

.document-chip.pending {
  border-left-color: var(--wine);
}

.document-chip.signed {
  border-left-color: var(--green);
}

.document-chip small {
  color: var(--muted);
}

.dashboard-panel {
  margin-top: 16px;
}

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

.dashboard-action {
  align-items: center;
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sand);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px;
  text-align: left;
}

.dashboard-action.pending {
  border-left-color: var(--wine);
}

.dashboard-action.ok {
  border-left-color: var(--green);
}

.dashboard-action strong {
  font-size: 24px;
}

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

.attention-card {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sand);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 12px;
  text-align: left;
}

.attention-card:hover {
  border-color: var(--wine);
}

.attention-card.danger {
  border-left-color: var(--danger);
}

.attention-card.warning {
  border-left-color: #c88b2a;
}

.attention-card.info {
  border-left-color: var(--green);
}

.attention-card span,
.attention-card small {
  color: var(--muted);
}

.attention-card strong {
  font-size: 24px;
}

.guide-flow {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.guide-next-action {
  align-items: center;
  background: #fffaf4;
  border-left: 5px solid var(--wine);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.guide-next-action h2 {
  margin: 4px 0;
}

.guide-next-action p {
  margin-bottom: 0;
}

.guide-status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.guide-status-card {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 12px;
}

.guide-status-card span {
  color: var(--muted);
  font-size: 13px;
}

.guide-status-card strong {
  font-size: 22px;
}

.guide-status-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.guide-status-card .btn {
  justify-self: start;
}

.guide-step {
  align-items: center;
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 12px;
}

.guide-step h3,
.guide-step p {
  margin-bottom: 0;
}

.guide-step p {
  color: var(--muted);
  margin-top: 4px;
}

.guide-number {
  align-items: center;
  background: var(--wine);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.guide-card {
  margin-top: 14px;
}

.guide-checklist {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.guide-checklist div {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.guide-checklist p {
  margin-bottom: 0;
}

.task-list {
  display: grid;
  gap: 8px;
}

.task-row {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 12px;
  text-align: left;
}

.task-row:hover,
.dashboard-action:hover {
  border-color: var(--wine);
}

.task-row small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.supplier-filter-form {
  grid-template-columns: minmax(260px, 1fr) 220px 150px;
}

.platform-supplier-form {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
  padding: 12px;
}

.platform-plan-form {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0;
  padding: 12px;
}

.platform-supplier-form .btn {
  align-self: end;
}

.platform-plan-form .btn {
  align-self: end;
}

.form-banner {
  background: #edf7f1;
  border: 1px solid #badbc6;
  border-radius: 8px;
  color: var(--green);
  grid-column: 1 / -1;
  padding: 10px 12px;
}

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

.supplier-card {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

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

.supplier-card-grid small {
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.breakdown-list {
  display: grid;
  gap: 8px;
}

.breakdown-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
}

.breakdown-row:last-child {
  border-bottom: 0;
}

.progress-bar {
  background: var(--sand);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-bar span {
  background: var(--green);
  display: block;
  height: 100%;
}

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

.metric strong {
  display: block;
  font-size: 24px;
  margin-top: 8px;
}

.table-wrap {
  overflow: auto;
}

table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.badge {
  background: #e5f0e8;
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.badge.warning {
  background: #f8e6c4;
  color: #7a4d0b;
}

.badge.danger {
  background: #f7d6d6;
  color: var(--danger);
}

.badge.neutral {
  background: #eee7df;
  color: var(--muted);
}

.product-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.product-form-preview {
  align-items: center;
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  grid-template-columns: 64px 1fr auto;
  padding: 10px 12px;
}

.product-form-preview img {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
  width: 64px;
}

.product-form-preview small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.sale-product-preview {
  align-items: center;
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 72px minmax(0, 1fr);
  margin-bottom: 12px;
  padding: 10px;
}

.sale-product-preview img {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
  width: 72px;
}

.sale-product-preview span {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.block {
  display: block;
}

.status-detail {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 6px;
  max-width: 240px;
}

.bag-progress {
  background: var(--sand);
  border-radius: 999px;
  height: 7px;
  margin-top: 8px;
  max-width: 220px;
  overflow: hidden;
}

.bag-progress span {
  background: var(--green);
  display: block;
  height: 100%;
}

.bag-progress.compact {
  height: 5px;
  margin-top: 6px;
  max-width: 150px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.section-head.compact {
  margin-bottom: 8px;
}

.inline-form {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin-bottom: 16px;
  padding: 12px;
}

.inline-form.product-form {
  grid-template-columns: 120px minmax(220px, 1.6fr) minmax(160px, 1fr) 120px minmax(220px, 1.4fr);
}

.inline-form.sale-form-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.inline-form .btn {
  align-self: end;
}

.bag-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.product-picker {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding: 12px;
}

.check-row {
  align-items: flex-start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 10px;
}

.check-row input {
  min-height: auto;
  margin-top: 3px;
}

.check-row small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.empty-callout {
  background: #fbf8f4;
  border: 1px dashed #d6c3ad;
  border-radius: 8px;
  color: var(--muted);
  margin-bottom: 16px;
  padding: 16px;
}

.warning-callout {
  background: #fff8e8;
  border-color: #e2bd75;
  color: #704414;
}

.supplier-status-banner {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.supplier-status-banner strong {
  color: #5f2b16;
}

.form-wide-callout {
  grid-column: 1 / -1;
  margin-bottom: 0;
  padding: 10px 12px;
}

.bag-flow-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

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

.bag-flow-card .muted {
  display: block;
  margin-top: 4px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(25, 19, 15, .52);
  display: grid;
  inset: 0;
  padding: 18px;
  position: fixed;
  z-index: 20;
}

.modal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(25, 19, 15, .28);
  margin: 0 auto;
  max-height: calc(100vh - 36px);
  max-width: 720px;
  overflow: auto;
  padding: 18px;
  width: 100%;
}

.modal-card.wide {
  max-width: 920px;
}

.sale-success-modal {
  display: grid;
  gap: 16px;
  max-width: 620px;
  text-align: center;
}

.sale-success-icon {
  align-items: center;
  background: #e5f0e8;
  border-radius: 50%;
  color: var(--green);
  display: inline-flex;
  font-size: 28px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  justify-self: center;
  width: 54px;
}

.sale-success-summary {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
  text-align: left;
}

.sale-success-summary div {
  display: grid;
  gap: 3px;
}

.sale-success-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sale-success-actions {
  justify-content: center;
}

.attachment-form {
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.sales-table {
  margin-top: 14px;
}

.subpanel {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
  padding: 12px;
}

.attention-callout {
  background: #fff8e8;
  border: 1px solid #e7c989;
  border-radius: 8px;
  color: #6d4b00;
  margin: 12px 0;
  padding: 12px;
}

.document-summary {
  margin: 12px 0;
}

.highlight-row {
  background: #fffaf1;
}

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

.compact-actions {
  min-width: 180px;
}

.supplier-summary-grid {
  margin-top: 14px;
}

.settlement-history {
  margin-top: 16px;
}

.document-preview pre {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  line-height: 1.55;
  margin: 14px 0 0;
  max-height: 56vh;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.signature-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  padding: 14px;
}

.compact-success {
  margin-top: 14px;
}

.compact-table table {
  min-width: 620px;
}

.learning-progress {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
}

.university-next-card {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin: 14px 0;
}

.university-next-card p {
  margin: 4px 0 0;
}

.course-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.course-card {
  background: #fbf8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.course-card h3 {
  margin: 8px 0 4px;
}

.lesson-list {
  display: grid;
  gap: 8px;
}

.lesson-row {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 10px;
}

.lesson-row.active {
  background: #fffaf1;
  border-color: var(--wine);
  box-shadow: inset 4px 0 0 var(--wine);
}

.lesson-number {
  align-items: center;
  background: var(--sand);
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

@media (max-width: 900px) {
  .shell,
  .grid.two,
  .grid.three,
  .grid.four,
  .document-groups,
  .quick-filter-row,
  .product-filter-row,
  .dashboard-actions,
  .attention-grid,
  .guide-status-grid,
  .supplier-cards,
  .supplier-card-grid,
  .guide-step,
  .inline-form,
  .inline-form.sale-form-grid,
  .inline-form.product-form,
  .company-logo-row,
  .product-form-preview,
  .platform-plan-form,
  .platform-supplier-form {
    grid-template-columns: 1fr;
  }

  .university-next-card {
    grid-template-columns: 1fr;
  }

  .university-next-card .btn,
  .university-next-card .stage-pill {
    justify-self: start;
  }

  .guide-next-action {
    align-items: stretch;
    flex-direction: column;
  }

  .sidebar {
    position: static;
  }

  .topbar {
    flex-direction: column;
  }

  .lesson-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .lesson-row .stage-pill {
    grid-column: 2;
    justify-self: start;
  }

  .guide-step {
    align-items: flex-start;
  }

  .guide-step .btn {
    grid-column: 1 / -1;
  }
}

.smart-catalog-hero {
  align-items: center;
  background: linear-gradient(135deg, var(--wine), #a85f6d);
  border-radius: 14px;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 30px;
  position: relative;
}

.smart-catalog-hero::after {
  border: 28px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
  height: 150px;
  position: absolute;
  right: 20%;
  top: -80px;
  width: 150px;
}

.smart-catalog-hero h2 {
  font-size: 30px;
  margin-bottom: 8px;
}

.smart-catalog-hero p {
  margin-bottom: 0;
  max-width: 650px;
}

.smart-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.smart-assistant-button {
  background: white;
  color: var(--wine);
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

.smart-assistant-button:hover {
  background: var(--sand);
}

.smart-search-panel,
.smart-assistant-panel {
  margin-bottom: 18px;
}

.smart-search-panel > label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}

.smart-search-row {
  display: flex;
  gap: 10px;
}

.smart-search-row input {
  flex: 1;
  font-size: 16px;
  min-height: 48px;
}

.smart-result-count {
  font-size: 13px;
  margin: 12px 0 16px;
}

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

.smart-product-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(65, 44, 30, .07);
  min-width: 0;
  overflow: hidden;
}

.smart-product-card > img {
  aspect-ratio: 16 / 11;
  display: block;
  object-fit: cover;
  width: 100%;
}

.smart-product-body {
  padding: 16px;
}

.smart-product-body h3 {
  font-size: 18px;
  margin: 12px 0 4px;
}

.smart-product-sku {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.smart-product-body dl,
.smart-details-list {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
}

.smart-product-body dl div,
.smart-details-list div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.smart-product-body dt,
.smart-details-list dt {
  color: var(--muted);
  font-size: 12px;
}

.smart-product-body dd,
.smart-details-list dd {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  text-align: right;
}

.smart-product-price {
  color: var(--wine);
  display: block;
  font-size: 20px;
  margin-bottom: 14px;
}

.smart-product-actions {
  display: grid;
  gap: 8px;
}

.smart-product-actions .btn {
  align-items: center;
  display: flex;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.smart-empty {
  grid-column: 1 / -1;
}

.smart-assistant-panel .smart-eyebrow {
  color: var(--wine);
}

.smart-assistant-progress {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 20px;
}

.smart-assistant-progress > div {
  background: var(--sand);
  border-radius: 999px;
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
}

.smart-assistant-progress i {
  background: var(--wine);
  display: block;
  height: 100%;
  transition: width .2s ease;
}

.smart-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin: 20px 0;
}

.smart-option {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  min-height: 52px;
  padding: 12px;
}

.smart-option:hover,
.smart-option.selected {
  background: #f7eaed;
  border-color: var(--wine);
  color: var(--wine);
}

.smart-assistant-nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.smart-assistant-nav .btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.smart-details-card {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.1fr);
  max-width: 820px;
}

.smart-details-card > img {
  border-radius: 10px;
  width: 100%;
}

.smart-details-card .modal-actions a {
  align-items: center;
  display: inline-flex;
  text-decoration: none;
}

@media (max-width: 900px) {
  .smart-catalog-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 22px;
  }

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

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

  .smart-details-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .smart-products-grid {
    grid-template-columns: 1fr;
  }

  .smart-search-row,
  .smart-assistant-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .smart-options {
    grid-template-columns: 1fr 1fr;
  }

  .smart-details-card {
    max-height: 92vh;
    overflow-y: auto;
  }
}

.smart-sales-hero {
  background: linear-gradient(125deg, #74283a 0%, #9e5062 58%, #c58b8e 100%);
  border-radius: 18px;
  color: white;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(300px, 1.4fr) minmax(230px, .7fr);
  margin-bottom: 18px;
  overflow: hidden;
  padding: 30px;
  position: relative;
}

.smart-sales-hero::before {
  border: 34px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  content: "";
  height: 230px;
  position: absolute;
  right: -55px;
  top: -95px;
  width: 230px;
}

.smart-welcome,
.smart-hero-stats,
.smart-featured-mini {
  position: relative;
  z-index: 1;
}

.smart-welcome h2 {
  font-size: clamp(26px, 3vw, 38px);
  margin-bottom: 9px;
}

.smart-welcome p {
  font-size: 16px;
  margin-bottom: 20px;
}

.smart-start-selling {
  background: white;
  color: var(--wine);
}

.smart-start-selling:hover {
  background: var(--sand);
}

.smart-hero-stats {
  align-content: center;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.smart-hero-stats div {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  padding: 15px 10px;
  text-align: center;
}

.smart-hero-stats strong,
.smart-hero-stats span {
  display: block;
}

.smart-hero-stats strong {
  font-size: 25px;
}

.smart-hero-stats span {
  font-size: 11px;
  margin-top: 4px;
}

.smart-featured-mini {
  align-items: center;
  background: white;
  border-radius: 12px;
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  grid-template-columns: 68px 1fr auto;
  padding: 10px;
}

.smart-featured-mini img {
  border-radius: 9px;
  height: 58px;
  object-fit: cover;
  width: 68px;
}

.smart-featured-mini span,
.smart-featured-mini strong,
.smart-featured-mini small {
  display: block;
}

.smart-featured-mini span {
  color: var(--wine);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.smart-featured-mini button {
  background: var(--sand);
  border: 0;
  border-radius: 8px;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
  padding: 10px 14px;
}

.smart-main-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 30px;
}

.smart-main-actions > button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(65, 44, 30, .06);
  color: var(--ink);
  cursor: pointer;
  min-height: 126px;
  padding: 18px;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
}

.smart-main-actions > button:hover {
  box-shadow: 0 14px 30px rgba(65, 44, 30, .12);
  transform: translateY(-2px);
}

.smart-main-actions > button.bella {
  background: #f5e8eb;
  border-color: #d8afb8;
}

.smart-main-actions span,
.smart-main-actions strong,
.smart-main-actions small {
  display: block;
}

.smart-main-actions span {
  color: var(--wine);
  font-size: 25px;
  margin-bottom: 12px;
}

.smart-main-actions strong {
  font-size: 15px;
  margin-bottom: 5px;
}

.smart-main-actions small {
  color: var(--muted);
  line-height: 1.35;
}

.smart-section {
  margin-bottom: 34px;
  scroll-margin-top: 18px;
}

.smart-section-heading {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.smart-section-heading .smart-eyebrow,
.smart-assistant-title .smart-eyebrow,
.smart-recommendations .smart-eyebrow {
  color: var(--wine);
}

.smart-section-heading h2 {
  margin-bottom: 0;
}

.smart-section-heading > p {
  color: var(--muted);
  margin: 0;
}

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

.smart-showcase {
  background: linear-gradient(145deg, #fffdf9, #f3e9df);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  cursor: pointer;
  min-height: 126px;
  padding: 16px;
  text-align: left;
}

.smart-showcase:hover,
.smart-showcase.active {
  border-color: var(--wine);
  box-shadow: inset 0 0 0 1px var(--wine), 0 10px 24px rgba(65, 44, 30, .08);
}

.smart-showcase span,
.smart-showcase strong,
.smart-showcase small {
  display: block;
}

.smart-showcase span {
  font-size: 25px;
  margin-bottom: 11px;
}

.smart-showcase strong {
  margin-bottom: 5px;
}

.smart-showcase small {
  color: var(--muted);
  line-height: 1.3;
}

.smart-product-area {
  background: #efe6dc;
  border-radius: 18px;
  padding: 24px;
}

.smart-search-box {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  padding: 0 14px;
}

.smart-search-box > span {
  color: var(--wine);
  font-size: 24px;
}

.smart-search-box input {
  border: 0;
  flex: 1;
  min-height: 52px;
  outline: 0;
}

.smart-search-box button,
.smart-clear-filter {
  background: transparent;
  border: 0;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
}

.smart-clear-filter.hidden {
  visibility: hidden;
}

.smart-product-visual {
  position: relative;
}

.smart-product-visual > img {
  aspect-ratio: 16 / 11;
  display: block;
  object-fit: cover;
  width: 100%;
}

.smart-favorite {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border: 0;
  border-radius: 50%;
  color: var(--wine);
  cursor: pointer;
  display: flex;
  font-size: 25px;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 42px;
}

.smart-favorite.active {
  background: var(--wine);
  color: white;
}

.smart-product-tags {
  bottom: 10px;
  display: flex;
  gap: 6px;
  left: 10px;
  position: absolute;
}

.smart-product-tags span {
  background: #8f283d;
  border-radius: 999px;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 9px;
  text-transform: uppercase;
}

.smart-product-tags span.new {
  background: var(--green);
}

.smart-stock {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.smart-price-row {
  align-items: baseline;
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
}

.smart-price-row .smart-product-price {
  margin-bottom: 0;
}

.smart-price-row del {
  color: var(--muted);
  font-size: 12px;
}

.smart-link-button {
  background: transparent;
  border: 0;
  color: var(--wine);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 6px;
  text-decoration: underline;
}

.smart-assistant-title {
  align-items: center;
  display: flex;
  gap: 14px;
}

.smart-bella-avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--wine), #c78191);
  border-radius: 50%;
  color: white;
  display: flex;
  flex: 0 0 auto;
  font-family: Georgia, serif;
  font-size: 26px;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.smart-assistant-title h2,
.smart-assistant-title p {
  margin-bottom: 2px;
}

.smart-recommendations {
  border: 2px solid #d9b7bf;
  margin-bottom: 28px;
  scroll-margin-top: 18px;
}

.smart-related-title {
  margin-top: 28px;
}

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

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

@media (max-width: 900px) {
  .smart-sales-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 600px) {
  .smart-sales-hero,
  .smart-product-area {
    border-radius: 12px;
    padding: 18px;
  }

  .smart-hero-stats,
  .smart-main-actions {
    grid-template-columns: 1fr 1fr;
  }

  .smart-main-actions > button {
    min-height: 140px;
    padding: 14px;
  }

  .smart-showcases {
    display: flex;
    margin-right: -18px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .smart-showcase {
    flex: 0 0 165px;
  }

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

  .smart-section-heading > p {
    display: none;
  }

  .smart-featured-mini {
    grid-template-columns: 54px 1fr auto;
  }

  .smart-featured-mini img {
    height: 50px;
    width: 54px;
  }
}

.smart-details-page {
  display: grid;
  gap: 20px;
}

.smart-back-button {
  background: transparent;
  border: 0;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
  justify-self: start;
  padding: 4px 0;
}

.smart-official-label {
  align-items: center;
  background: #f5e8eb;
  border: 1px solid #debcc4;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 14px;
}

.smart-official-label span {
  color: var(--wine);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.smart-official-label small {
  color: var(--muted);
}

.smart-product-detail-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, .95fr);
  padding: 26px;
}

.smart-main-photo {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.smart-main-photo img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.smart-main-photo > span {
  background: rgba(25, 19, 15, .72);
  bottom: 10px;
  color: white;
  font-size: 11px;
  left: 10px;
  padding: 5px 8px;
  position: absolute;
}

.smart-gallery-thumbs {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 10px;
}

.smart-gallery-thumbs button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  min-height: 72px;
  overflow: hidden;
  padding: 0;
}

.smart-gallery-thumbs img {
  display: block;
  height: 72px;
  object-fit: cover;
  width: 100%;
}

.smart-video-thumb {
  align-items: center;
  background: #2a2220 !important;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.smart-video-thumb span {
  font-size: 22px;
}

.smart-product-detail-copy {
  align-self: center;
}

.smart-product-detail-copy h2 {
  font-size: clamp(28px, 3vw, 40px);
  margin: 12px 0 5px;
}

.smart-detail-price {
  color: var(--wine);
  font-size: 28px;
  font-weight: 800;
  margin: 22px 0;
}

.smart-detail-price del {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  margin-left: 10px;
}

.smart-detail-description {
  line-height: 1.65;
}

.smart-detail-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 20px;
}

.smart-detail-actions .btn {
  align-items: center;
  display: flex;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.smart-copy-notice {
  margin-top: 12px;
}

.smart-characteristics {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(180px, .35fr) 1fr;
}

.smart-characteristics .smart-eyebrow,
.smart-video-space .smart-eyebrow,
.smart-content-center .smart-eyebrow {
  color: var(--wine);
}

.smart-characteristics dl {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
}

.smart-characteristics dl div {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px;
}

.smart-characteristics dt {
  color: var(--muted);
  font-size: 12px;
}

.smart-characteristics dd {
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  text-align: right;
}

.smart-video-space {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(300px, .8fr) 1fr;
  scroll-margin-top: 18px;
}

.smart-video-placeholder {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #302725, #68444c);
  border-radius: 12px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.smart-video-placeholder span {
  font-size: 42px;
  margin-bottom: 12px;
}

.smart-video-placeholder small {
  margin-top: 8px;
  opacity: .65;
}

.smart-content-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.smart-content-tabs button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  font-weight: 800;
  padding: 9px 14px;
}

.smart-content-tabs button.active {
  background: var(--wine);
  border-color: var(--wine);
  color: white;
}

.smart-content-preview {
  align-items: center;
  background: #f5eee7;
  border-radius: 14px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(210px, .5fr) 1fr;
  padding: 18px;
}

.smart-content-preview > div:last-child p {
  font-size: 16px;
  line-height: 1.6;
}

.smart-content-art {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.smart-content-art img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.smart-content-art span {
  background: rgba(125, 46, 61, .9);
  bottom: 0;
  color: white;
  font-size: 12px;
  font-weight: 800;
  left: 0;
  padding: 9px;
  position: absolute;
  right: 0;
  text-align: center;
}

@media (max-width: 900px) {
  .smart-product-detail-hero,
  .smart-characteristics,
  .smart-video-space,
  .smart-content-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .smart-product-detail-hero {
    border-radius: 12px;
    padding: 16px;
  }

  .smart-official-label {
    align-items: flex-start;
    flex-direction: column;
  }

  .smart-detail-actions,
  .smart-characteristics dl {
    grid-template-columns: 1fr;
  }

  .smart-gallery-thumbs button,
  .smart-gallery-thumbs img {
    min-height: 58px;
    height: 58px;
  }
}

.intelligent-stock-hero {
  align-items: center;
  background: linear-gradient(125deg, #692637, #a15264 62%, #c8868b);
  border-radius: 18px;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 30px;
  position: relative;
}

.intelligent-stock-hero::after {
  border: 30px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
  height: 190px;
  position: absolute;
  right: 19%;
  top: -95px;
  width: 190px;
}

.intelligent-stock-hero > div,
.intelligent-stock-primary-action {
  position: relative;
  z-index: 1;
}

.intelligent-stock-hero h2 {
  font-size: clamp(27px, 3vw, 38px);
  margin-bottom: 8px;
}

.intelligent-stock-hero p {
  margin-bottom: 0;
}

.intelligent-stock-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.intelligent-stock-primary-action {
  background: white;
  color: var(--wine);
  flex: 0 0 auto;
}

.intelligent-stock-primary-action:hover {
  background: var(--sand);
}

.intelligent-stock-indicators {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.intelligent-stock-indicator {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(65, 44, 30, .06);
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 15px;
}

.intelligent-stock-indicator-icon {
  align-items: center;
  background: #f3e4e7;
  border-radius: 10px;
  color: var(--wine);
  display: flex;
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.intelligent-stock-indicator.available .intelligent-stock-indicator-icon,
.intelligent-stock-indicator.sold .intelligent-stock-indicator-icon {
  background: #e4f0e8;
  color: var(--green);
}

.intelligent-stock-indicator.favorite .intelligent-stock-indicator-icon {
  background: #f8e7eb;
  color: #a52f4b;
}

.intelligent-stock-indicator small,
.intelligent-stock-indicator strong {
  display: block;
}

.intelligent-stock-indicator small {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}

.intelligent-stock-indicator strong {
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.intelligent-stock-controls {
  margin-bottom: 14px;
}

.intelligent-stock-search {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  gap: 8px;
  padding: 0 12px;
}

.intelligent-stock-search > span {
  color: var(--wine);
  font-size: 24px;
}

.intelligent-stock-search input {
  border: 0;
  flex: 1;
  font-size: 15px;
  min-height: 50px;
  outline: 0;
}

.intelligent-stock-search button,
.intelligent-stock-result-heading button {
  background: transparent;
  border: 0;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
}

.intelligent-stock-filters {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.intelligent-stock-filters button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 13px;
}

.intelligent-stock-filters button.active {
  background: var(--wine);
  border-color: var(--wine);
  color: white;
}

.intelligent-stock-result-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 18px 0 12px;
}

.intelligent-stock-result-heading div {
  align-items: baseline;
  display: flex;
  gap: 6px;
}

.intelligent-stock-result-heading span {
  color: var(--wine);
  font-size: 22px;
  font-weight: 800;
}

.intelligent-stock-result-heading strong {
  font-size: 13px;
}

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

.intelligent-stock-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 9px 28px rgba(65, 44, 30, .07);
  min-width: 0;
  overflow: hidden;
}

.intelligent-stock-image {
  position: relative;
}

.intelligent-stock-image > img {
  aspect-ratio: 16 / 11;
  display: block;
  object-fit: cover;
  width: 100%;
}

.intelligent-favorite {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border: 0;
  border-radius: 50%;
  color: var(--wine);
  cursor: pointer;
  display: flex;
  font-size: 24px;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 42px;
}

.intelligent-favorite.active {
  background: var(--wine);
  color: white;
}

.intelligent-stock-tags {
  bottom: 10px;
  display: flex;
  gap: 6px;
  left: 10px;
  position: absolute;
}

.intelligent-stock-tags span {
  border-radius: 999px;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 9px;
  text-transform: uppercase;
}

.intelligent-stock-tags .new {
  background: var(--green);
}

.intelligent-stock-tags .promo {
  background: #9a263f;
}

.intelligent-stock-card-body {
  padding: 16px;
}

.intelligent-stock-availability {
  font-size: 11px;
  font-weight: 800;
}

.intelligent-stock-availability.available {
  color: var(--green);
}

.intelligent-stock-availability.unavailable {
  color: var(--danger);
}

.intelligent-stock-card h3 {
  font-size: 18px;
  margin: 10px 0 4px;
}

.intelligent-stock-sku {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 14px;
}

.intelligent-stock-facts {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 13px;
}

.intelligent-stock-facts small,
.intelligent-stock-facts strong {
  display: block;
}

.intelligent-stock-facts small,
.intelligent-stock-location small {
  color: var(--muted);
  font-size: 10px;
}

.intelligent-stock-facts strong,
.intelligent-stock-location strong {
  font-size: 12px;
}

.intelligent-stock-location {
  align-items: center;
  background: #f3ece4;
  border-radius: 9px;
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px;
}

.intelligent-stock-location > span {
  color: var(--wine);
  font-size: 20px;
}

.intelligent-stock-location small,
.intelligent-stock-location strong {
  display: block;
}

.intelligent-stock-card-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.intelligent-stock-card-actions .btn {
  align-items: center;
  display: flex;
  font-size: 12px;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.intelligent-stock-card-actions .btn:first-child {
  grid-column: 1 / -1;
}

.intelligent-stock-card-actions .btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.intelligent-stock-empty {
  padding: 48px 20px;
  text-align: center;
}

.intelligent-stock-empty > span {
  color: var(--wine);
  display: block;
  font-size: 40px;
  margin-bottom: 10px;
}

.intelligent-stock-details {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(240px, .85fr) minmax(300px, 1.15fr);
  max-width: 850px;
}

.intelligent-stock-details > img {
  border-radius: 11px;
  width: 100%;
}

.intelligent-stock-details dl {
  display: grid;
  gap: 0;
  margin: 16px 0;
}

.intelligent-stock-details dl div {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 0;
}

.intelligent-stock-details dt {
  color: var(--muted);
  font-size: 12px;
}

.intelligent-stock-details dd {
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  text-align: right;
}

@media (max-width: 1100px) {
  .intelligent-stock-indicators {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 700px) {
  .intelligent-stock-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 22px;
  }

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

  .intelligent-stock-grid,
  .intelligent-stock-details {
    grid-template-columns: 1fr;
  }

  .intelligent-stock-card-actions {
    grid-template-columns: 1fr;
  }

  .intelligent-stock-card-actions .btn:first-child {
    grid-column: auto;
  }
}

@media (max-width: 440px) {
  .intelligent-stock-indicators {
    grid-template-columns: 1fr;
  }

  .intelligent-stock-search {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .intelligent-stock-search input {
    min-width: 0;
  }
}

.commercial-welcome {
  align-items: center;
  background: linear-gradient(125deg, #682536, #984b5d 60%, #c47c86);
  border-radius: 18px;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 30px;
  position: relative;
}

.commercial-welcome::after {
  border: 34px solid rgba(255,255,255,.07);
  border-radius: 50%;
  content: "";
  height: 220px;
  position: absolute;
  right: 18%;
  top: -120px;
  width: 220px;
}

.commercial-welcome > * {
  position: relative;
  z-index: 1;
}

.commercial-welcome h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  margin-bottom: 8px;
}

.commercial-welcome p {
  font-size: 15px;
  margin-bottom: 0;
}

.commercial-eyebrow {
  color: var(--wine);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.commercial-welcome .commercial-eyebrow {
  color: white;
}

.commercial-today {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 12px;
  min-width: 145px;
  padding: 14px 18px;
  text-align: center;
}

.commercial-today span,
.commercial-today strong {
  display: block;
}

.commercial-today span {
  font-size: 10px;
  text-transform: uppercase;
}

.commercial-today strong {
  font-size: 16px;
  margin-top: 3px;
}

.commercial-indicators {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5,minmax(0,1fr));
  margin-bottom: 30px;
}

.commercial-indicator {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(65,44,30,.06);
  display: flex;
  gap: 11px;
  min-width: 0;
  padding: 15px;
}

.commercial-indicator-icon {
  align-items: center;
  background: #f2e4e7;
  border-radius: 10px;
  color: var(--wine);
  display: flex;
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.commercial-indicator.sales .commercial-indicator-icon,
.commercial-indicator.commission .commercial-indicator-icon {
  background: #e2efe7;
  color: var(--green);
}

.commercial-indicator small,
.commercial-indicator strong {
  display: block;
}

.commercial-indicator small {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}

.commercial-indicator strong {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-section {
  margin-bottom: 30px;
}

.commercial-section-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.commercial-section-heading h2,
.commercial-section-heading p {
  margin-bottom: 0;
}

.commercial-section-heading > p {
  color: var(--muted);
  font-size: 12px;
}

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

.commercial-action {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 11px;
  grid-template-columns: 42px 1fr auto;
  min-height: 92px;
  padding: 15px;
  text-align: left;
  text-decoration: none;
  transition: transform .15s ease,box-shadow .15s ease;
}

.commercial-action:hover {
  box-shadow: 0 12px 28px rgba(65,44,30,.11);
  transform: translateY(-2px);
}

.commercial-action > span {
  align-items: center;
  background: #f1e4e6;
  border-radius: 11px;
  color: var(--wine);
  display: flex;
  font-size: 22px;
  height: 42px;
  justify-content: center;
}

.commercial-action strong,
.commercial-action small {
  display: block;
}

.commercial-action small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

.commercial-action > i {
  color: var(--wine);
  font-style: normal;
}

.commercial-action.primary {
  background: var(--wine);
  border-color: var(--wine);
  color: white;
}

.commercial-action.primary > span {
  background: rgba(255,255,255,.15);
  color: white;
}

.commercial-action.primary small,
.commercial-action.primary > i {
  color: white;
}

.commercial-main-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0,1.6fr) minmax(270px,.7fr);
}

.commercial-alert-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.commercial-count {
  background: var(--sand);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  padding: 6px 9px;
}

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

.commercial-alert {
  align-items: flex-start;
  background: #faf6f1;
  border: 1px solid #eadfd4;
  border-left: 3px solid #b58454;
  border-radius: 9px;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.commercial-alert.promotion,
.commercial-alert.margin { border-left-color: var(--green); }
.commercial-alert.campaign,
.commercial-alert.new { border-left-color: #7c638e; }
.commercial-alert.danger { border-left-color: var(--danger); }

.commercial-alert-icon {
  align-items: center;
  background: white;
  border-radius: 8px;
  color: var(--wine);
  display: flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.commercial-alert strong {
  font-size: 12px;
}

.commercial-alert p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  margin: 3px 0 6px;
}

.commercial-alert button,
.commercial-text-action {
  background: transparent;
  border: 0;
  color: var(--wine);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  padding: 0;
}

.commercial-goal-card {
  background: #29211d;
  border-radius: 14px;
  color: white;
  padding: 20px;
}

.commercial-goal-card .commercial-eyebrow,
.commercial-goal-card dt {
  color: #ceb9aa;
}

.commercial-goal-percent {
  color: #f0c7a0;
  font-size: 22px;
}

.commercial-goal-ring {
  align-items: center;
  background: conic-gradient(#d99967 var(--goal),rgba(255,255,255,.12) 0);
  border-radius: 50%;
  display: flex;
  height: 130px;
  justify-content: center;
  margin: 8px auto 18px;
  width: 130px;
}

.commercial-goal-ring > div {
  align-items: center;
  background: #29211d;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  height: 104px;
  justify-content: center;
  width: 104px;
}

.commercial-goal-ring strong,
.commercial-goal-ring small {
  display: block;
}

.commercial-goal-ring strong { font-size: 25px; }
.commercial-goal-ring small { color: #ceb9aa; font-size: 10px; }

.commercial-goal-progress {
  background: rgba(255,255,255,.13);
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.commercial-goal-progress span {
  background: #d99967;
  display: block;
  height: 100%;
}

.commercial-goal-card dl {
  display: grid;
  gap: 0;
  margin: 14px 0;
}

.commercial-goal-card dl div {
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.commercial-goal-card dt,
.commercial-goal-card dd {
  font-size: 11px;
}

.commercial-goal-card dd {
  font-weight: 800;
  margin: 0;
}

.commercial-goal-card .btn { width: 100%; }

.commercial-recommended {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px,.8fr) minmax(330px,1.2fr);
  margin-bottom: 30px;
  overflow: hidden;
  padding: 0;
}

.commercial-product-visual {
  min-height: 330px;
  position: relative;
}

.commercial-product-visual img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.commercial-product-visual > span {
  background: var(--wine);
  border-radius: 999px;
  color: white;
  font-size: 10px;
  font-weight: 800;
  left: 14px;
  padding: 7px 10px;
  position: absolute;
  top: 14px;
}

.commercial-product-copy {
  align-self: center;
  padding: 26px 26px 26px 0;
}

.commercial-product-copy h2 {
  font-size: clamp(24px,2.6vw,34px);
}

.commercial-product-numbers {
  display: flex;
  gap: 30px;
  margin: 20px 0;
}

.commercial-product-numbers small,
.commercial-product-numbers strong {
  display: block;
}

.commercial-product-numbers small {
  color: var(--muted);
  font-size: 10px;
}

.commercial-product-numbers strong {
  color: var(--wine);
  font-size: 24px;
  margin-top: 3px;
}

.commercial-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.commercial-product-actions .btn {
  align-items: center;
  display: flex;
  text-decoration: none;
}

.commercial-sales-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.commercial-sales-list {
  display: grid;
}

.commercial-sales-list article {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 34px 1fr 110px 90px 70px;
  padding: 11px 0;
}

.commercial-sales-list article:last-child { border-bottom: 0; }

.commercial-sale-icon {
  align-items: center;
  background: #e3efe7;
  border-radius: 50%;
  color: var(--green);
  display: flex;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.commercial-sale-main strong,
.commercial-sale-main small {
  display: block;
}

.commercial-sale-main strong { font-size: 12px; }
.commercial-sale-main small,
.commercial-sales-list time { color: var(--muted); font-size: 10px; }
.commercial-sale-value { font-size: 12px; text-align: right; }

.commercial-sale-status {
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  padding: 5px 7px;
  text-align: center;
}

.commercial-sale-status.paid { background: #e3efe7; color: var(--green); }
.commercial-sale-status.pending { background: #fff0d8; color: #8a5b20; }

@media (max-width: 1150px) {
  .commercial-indicators { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .commercial-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 850px) {
  .commercial-main-grid,
  .commercial-recommended { grid-template-columns: 1fr; }
  .commercial-product-visual { min-height: 280px; }
  .commercial-product-copy { padding: 0 22px 24px; }
  .commercial-sales-list article { grid-template-columns: 34px 1fr auto; }
  .commercial-sales-list time { display: none; }
  .commercial-sale-value { text-align: left; }
}

@media (max-width: 600px) {
  .commercial-welcome { align-items: stretch; flex-direction: column; padding: 22px; }
  .commercial-today { align-self: flex-start; min-width: 130px; }
  .commercial-indicators { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .commercial-actions,
  .commercial-alerts { grid-template-columns: 1fr; }
  .commercial-section-heading { align-items: flex-start; flex-direction: column; }
  .commercial-section-heading > p { display: none; }
  .commercial-sales-list article { grid-template-columns: 30px 1fr auto; }
  .commercial-sale-status { display: none; }
  .commercial-product-numbers { gap: 18px; }
}

@media (max-width: 400px) {
  .commercial-indicators { grid-template-columns: 1fr; }
  .commercial-action { grid-template-columns: 38px 1fr auto; }
}

.clients-hero {
  align-items: center;
  background: linear-gradient(125deg,#682536,#a35365 62%,#c8898e);
  border-radius: 18px;
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 30px;
  position: relative;
}

.clients-hero::after {
  border: 32px solid rgba(255,255,255,.08);
  border-radius: 50%;
  content: "";
  height: 190px;
  position: absolute;
  right: 19%;
  top: -100px;
  width: 190px;
}

.clients-hero > * { position: relative; z-index: 1; }
.clients-hero h2 { font-size: clamp(28px,3vw,38px); margin-bottom: 8px; }
.clients-hero p { margin-bottom: 0; }

.clients-eyebrow {
  color: var(--wine);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.clients-hero .clients-eyebrow { color: white; }
.clients-new-primary { background: white; color: var(--wine); flex: 0 0 auto; }
.clients-new-primary:hover { background: var(--sand); }
.clients-notice { margin-bottom: 14px; }

.clients-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin-bottom: 18px;
}

.clients-summary article {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 7px 22px rgba(65,44,30,.06);
  display: flex;
  gap: 12px;
  padding: 15px;
}

.clients-summary article > span {
  align-items: center;
  background: #f3e5e8;
  border-radius: 10px;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.clients-summary small,
.clients-summary strong { display: block; }
.clients-summary small { color: var(--muted); font-size: 10px; }
.clients-summary strong { font-size: 20px; margin-top: 3px; }
.clients-controls { margin-bottom: 12px; }

.clients-search {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  gap: 8px;
  padding: 0 12px;
}

.clients-search > span { color: var(--wine); font-size: 24px; }
.clients-search input { border: 0; flex: 1; font-size: 15px; min-height: 50px; outline: 0; }
.clients-search button { background: transparent; border: 0; color: var(--wine); cursor: pointer; font-weight: 800; }

.clients-segments {
  display: flex;
  gap: 8px;
  margin-top: 13px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.clients-segments button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  padding: 8px 12px;
}

.clients-segments button.active { background: var(--wine); border-color: var(--wine); color: white; }
.clients-result-heading { margin: 16px 0 11px; }
.clients-result-heading strong { font-size: 12px; }

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

.client-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(65,44,30,.07);
  padding: 17px;
  position: relative;
}

.client-favorite {
  align-items: center;
  background: #f5e9eb;
  border: 0;
  border-radius: 50%;
  color: var(--wine);
  cursor: pointer;
  display: flex;
  font-size: 20px;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 13px;
  top: 13px;
  width: 36px;
}

.client-favorite.active { background: var(--wine); color: white; }

.client-avatar {
  align-items: center;
  background: linear-gradient(135deg,#8a3b4e,#d29ba0);
  border-radius: 50%;
  color: white;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  height: 50px;
  justify-content: center;
  margin-bottom: 12px;
  width: 50px;
}

.client-card-main h3 { font-size: 16px; margin-bottom: 3px; padding-right: 35px; }
.client-card-main p { color: var(--wine); font-size: 12px; font-weight: 800; margin-bottom: 5px; }
.client-card-main > span { color: var(--muted); font-size: 10px; }

.client-card-stats {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0;
  padding: 11px 0;
}

.client-card-stats span + span { border-left: 1px solid var(--line); padding-left: 12px; }
.client-card-stats strong,
.client-card-stats small { display: block; }
.client-card-stats strong { font-size: 14px; }
.client-card-stats small { color: var(--muted); font-size: 9px; }
.client-card-actions { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.client-card-actions .btn { align-items: center; display: flex; font-size: 11px; justify-content: center; text-decoration: none; }

.clients-empty { padding: 45px 20px; text-align: center; }
.clients-empty > span { color: var(--wine); display: block; font-size: 38px; margin-bottom: 8px; }
.clients-empty.compact { padding: 25px 12px; }

.clients-back {
  background: transparent;
  border: 0;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
  margin-bottom: 20px;
  padding: 0;
}

.clients-form-heading { margin-bottom: 16px; }
.clients-form-heading h2 { font-size: 30px; }
.clients-form-heading p { color: var(--muted); }
.clients-form { max-width: 900px; }
.clients-form-grid { display: grid; gap: 15px; grid-template-columns: 1fr 1fr; }
.clients-form-notes { grid-column: 1 / -1; }
.clients-form-notes textarea { min-height: 115px; }
.clients-form-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 20px; }

.client-profile-card {
  background: linear-gradient(125deg,#fffdf9,#f2e7df);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 14px;
  padding: 24px;
}

.client-profile-identity { align-items: center; display: flex; gap: 16px; position: relative; }
.client-avatar.large { flex: 0 0 auto; font-size: 22px; height: 70px; margin: 0; width: 70px; }
.client-profile-identity h2 { font-size: 28px; margin-bottom: 4px; }
.client-profile-identity p { color: var(--muted); margin-bottom: 0; }
.client-favorite.profile { border-radius: 999px; font-size: 11px; height: auto; margin-left: auto; padding: 9px 12px; position: static; width: auto; }
.client-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.client-profile-actions .btn { align-items: center; display: flex; text-decoration: none; }

.client-profile-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3,1fr);
  margin-bottom: 14px;
}

.client-profile-metrics article { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.client-profile-metrics small,
.client-profile-metrics strong { display: block; }
.client-profile-metrics small { color: var(--muted); font-size: 10px; }
.client-profile-metrics strong { font-size: 20px; margin-top: 5px; }
.client-profile-grid { display: grid; gap: 14px; grid-template-columns: .75fr 1.25fr; }
.client-category-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.client-category-tags span { background: #f2e3e7; border-radius: 999px; color: var(--wine); font-size: 10px; font-weight: 800; padding: 7px 10px; }
.client-notes-title { margin-top: 25px; }

.client-history > div:last-child { display: grid; }
.client-history article { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 90px 1fr auto; padding: 11px 0; }
.client-history article:last-child { border-bottom: 0; }
.client-history time { color: var(--muted); font-size: 10px; }
.client-history article span strong,
.client-history article span small { display: block; }
.client-history article span strong { font-size: 12px; }
.client-history article span small { color: var(--muted); font-size: 9px; }
.client-history article > strong { font-size: 12px; }

.representative-access-modal {
  max-width: 560px;
}

.representative-access-modal > label {
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
}

.access-security-note {
  background: #f8f1e7;
  border: 1px solid #ead9bf;
  border-radius: 12px;
  color: #654e35;
  font-size: 12px;
  line-height: 1.55;
  margin-top: 14px;
  padding: 14px;
}

.access-first-login {
  max-width: 460px;
}

.bling-total-conference {
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
  padding: 14px;
}

.bling-total-conference.approved { background: #edf8f1; border-color: #b8ddc4; }
.bling-total-conference.blocked { background: #fff0f0; border-color: #e7b6b6; }
.bling-total-conference small,
.bling-total-conference strong { display: block; }
.bling-total-conference small { color: var(--muted); font-size: 10px; }
.bling-total-conference strong { font-size: 15px; margin-top: 4px; }

.bling-validation-alert {
  background: #fff0f0;
  border: 1px solid #e7b6b6;
  border-radius: 14px;
  color: #7d2525;
  margin-bottom: 14px;
  padding: 14px;
}

.bling-validation-alert ul { margin: 8px 0; padding-left: 20px; }
.bling-validation-alert span { font-size: 12px; }
.bling-suspicious-row { background: #fff6f6; }

.bling-diagnostic-panel {
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 14px 0;
  padding: 12px;
}

.bling-diagnostic-panel summary { cursor: pointer; font-weight: 800; }
.bling-diagnostic-panel .row-actions { margin-top: 10px; }
.bling-diagnostic-panel pre {
  background: #24201d;
  border-radius: 10px;
  color: #f8f4ef;
  font-size: 11px;
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .bling-total-conference { grid-template-columns: 1fr 1fr; }
}

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

@media (max-width: 760px) {
  .clients-hero { align-items: stretch; flex-direction: column; padding: 22px; }
  .clients-new-primary { width: 100%; }
  .clients-grid,
  .client-profile-grid,
  .clients-form-grid { grid-template-columns: 1fr; }
  .clients-form-notes { grid-column: auto; }
  .client-profile-identity { align-items: flex-start; flex-wrap: wrap; }
  .client-favorite.profile { margin-left: 0; }
}

@media (max-width: 520px) {
  .clients-summary { grid-template-columns: 1fr; }
  .client-profile-metrics { grid-template-columns: 1fr; }
  .client-profile-actions,
  .clients-form-actions { align-items: stretch; flex-direction: column; }
  .client-profile-actions .btn { justify-content: center; }
  .client-history article { grid-template-columns: 1fr auto; }
  .client-history time { grid-column: 1 / -1; }
}

.commercial-empty-state {
  color: var(--muted);
  font-size: 12px;
  padding: 24px 8px;
  text-align: center;
}

.intelligent-stock-insights {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin: -4px 0 18px;
}

.intelligent-stock-insights article {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  padding: 13px 15px;
}

.intelligent-stock-insights article > span {
  align-items: center;
  background: #f1e5e7;
  border-radius: 9px;
  color: var(--wine);
  display: flex;
  flex: 0 0 auto;
  font-size: 18px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.intelligent-stock-insights small,
.intelligent-stock-insights strong,
.intelligent-stock-insights p {
  display: block;
}

.intelligent-stock-insights small {
  color: var(--muted);
  font-size: 10px;
}

.intelligent-stock-insights strong {
  font-size: 14px;
  margin-top: 2px;
}

.intelligent-stock-insights p {
  color: var(--muted);
  font-size: 10px;
  margin: 2px 0 0;
}

@media (max-width: 600px) {
  .intelligent-stock-insights {
    grid-template-columns: 1fr;
  }
}

.catalog-mode-switch {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
}

.catalog-mode-switch button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 10px 14px;
}

.catalog-mode-switch button.active {
  background: var(--wine);
  color: white;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(125, 46, 61, .25);
  outline-offset: 2px;
}

.btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

@media (max-width: 600px) {
  .catalog-mode-switch {
    display: grid;
    width: 100%;
  }
}

@page {
  size: A4 portrait;
  margin: 6mm;
}

@media print {
  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body * {
    visibility: hidden;
  }

  .modal-backdrop,
  .document-preview,
  .document-preview * {
    visibility: visible;
  }

  .modal-backdrop {
    align-items: start;
    background: white;
    display: block;
    inset: 0;
    padding: 0;
    position: absolute;
  }

  .document-preview {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    padding: 0;
    width: 100%;
  }

  .document-preview .row-actions,
  .document-preview .modal-actions,
  .signature-box {
    display: none;
  }

  .document-preview pre {
    background: white;
    border: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .delivery-receipt-preview {
    width: 210mm;
  }

  .print-delivery-receipt {
    max-width: none;
    width: 100%;
  }

  .delivery-receipt-copy {
    break-inside: avoid;
    min-height: 137mm;
  }
}

.share-box {
  align-items: center;
  background: #fff9f2;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr) auto;
  margin: 12px 0;
  padding: 12px;
}

.share-box input {
  min-width: 0;
}

.public-catalog-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.public-catalog-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.split-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.public-catalog-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 14px;
}

.public-product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.public-product-card h3 {
  font-size: 1rem;
  margin: 4px 0 8px;
}

.public-product-image {
  align-items: center;
  background: #f8f2ea;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 170px;
  overflow: hidden;
}

.public-product-image img {
  display: block;
  height: 100%;
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

@media (max-width: 900px) {
  .share-box {
    grid-template-columns: 1fr;
  }

  .public-catalog-page {
    padding: 14px;
  }

  .public-catalog-hero,
  .split-title {
    align-items: stretch;
    flex-direction: column;
  }
}
.representative-receiving-panel {
  margin-bottom: 20px;
  border-color: #e6c98f;
  background: linear-gradient(135deg, #fffdf8 0%, #fff8e8 100%);
}

.representative-receiving-panel .bag-flow-list {
  margin-top: 16px;
}

.representative-receiving-panel .bag-flow-card {
  align-items: stretch;
  display: grid;
  justify-content: stretch;
}

.bag-flow-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.bag-flow-header > div:first-child {
  display: grid;
  gap: 4px;
}

.bag-overview-columns {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 12px;
}

.representative-bag-summary,
.representative-delivery-info {
  align-content: start;
  display: grid;
  gap: 10px;
}

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

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

.bag-turnover {
  border-top: 1px solid #eadfd7;
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.bag-turnover div {
  display: grid;
  gap: 2px;
}

.bag-turnover span {
  color: #7a6253;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.bag-turnover strong {
  color: #2f211b;
  font-size: 0.95rem;
}

.compact-empty {
  margin: 0;
  padding: 10px;
}

.sale-cart-banner {
  align-items: center;
  background: #fffaf6;
  border: 1px solid #eadfd7;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 12px 0;
  padding: 12px;
}

.sale-cart-banner > div:first-child,
.sale-cart-total {
  display: grid;
  gap: 3px;
}

.sale-cart-banner span,
.sale-cart-total span {
  color: #7a6253;
  font-size: 0.9rem;
}

.sale-cart-panel {
  border: 1px solid #eadfd7;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.sale-cart-list {
  display: grid;
  gap: 8px;
}

.sale-cart-row {
  align-items: center;
  border: 1px solid #eadfd7;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 84px auto auto;
  padding: 10px;
}

.sale-cart-row > div {
  display: grid;
  gap: 3px;
}

.sale-cart-row span {
  color: #7a6253;
  font-size: 0.86rem;
}

.sale-cart-row label {
  margin: 0;
}

.sale-cart-row input {
  max-width: 72px;
}

.sale-cart-total {
  border-top: 1px solid #eadfd7;
  justify-items: end;
  padding-top: 10px;
}

.sale-cart-total strong {
  color: #2f211b;
  font-size: 1.2rem;
}

.intelligent-stock-availability.pending {
  color: #8a5a00;
  background: #fff2cc;
}
.sale-customer-picker,
.sale-quick-customer {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2d5cc;
  border-radius: 10px;
  background: #fffaf6;
}

.sale-customer-picker {
  grid-column: 1 / -1;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  align-items: end;
}

.sale-customer-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eadfd7;
}

.sale-customer-warning {
  color: #9a3412;
  font-weight: 700;
}

.sale-quick-customer {
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
}

.sale-quick-customer[hidden] {
  display: none;
}

.sale-quick-customer p {
  grid-column: 1 / -1;
  margin: 0;
}

.receiving-list-panel {
  border-top: 1px solid #eadfd7;
  margin-top: 14px;
  padding-top: 14px;
}

.stock-base-panel {
  border-top: 0;
  margin-top: 18px;
  padding-top: 0;
}

.stock-base-table th,
.stock-base-table td {
  vertical-align: top;
}

.divergence-summary {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

.divergence-summary span,
.divergence-summary a {
  font-size: 0.82rem;
}

.receiving-actions {
  margin: 10px 0;
}

.receiving-table th:first-child,
.receiving-table td:first-child {
  text-align: center;
  width: 36px;
}

.receiving-table input[type="checkbox"] {
  height: 18px;
  width: 18px;
}

.receiving-divergence-form {
  background: #fffaf6;
  border: 1px solid #eadfd7;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
}

@media (max-width: 720px) {
  .bag-flow-header {
    align-items: stretch;
    flex-direction: column;
  }

  .bag-overview-columns,
  .bag-summary-grid,
  .bag-delivery-grid {
    grid-template-columns: 1fr;
  }

  .sale-cart-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .sale-cart-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .sale-cart-row .btn,
  .sale-cart-banner .btn {
    width: 100%;
  }

  .sale-customer-picker,
  .sale-quick-customer {
    grid-template-columns: 1fr;
  }

  .sale-quick-customer p {
    grid-column: auto;
  }
}
.settlement-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.settlement-commercial-card {
  margin: 0;
}

.settlement-commercial-card details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eadfd7;
}

.settlement-commercial-card summary {
  cursor: pointer;
  font-weight: 700;
}
.settlement-return-modal {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.return-scan-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}

.return-quantity-input {
  width: 78px;
}

.manage-sale-modal {
  max-width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.manage-sale-modal .mini-panel {
  margin-top: 12px;
}

.settlement-statement-row > td {
  background: #fffdf8;
  padding: 0;
}

.settlement-statement {
  border: 1px solid #eadfd7;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin: 10px;
  padding: 14px;
}

.settlement-event-log {
  border-top: 1px solid #eadfd7;
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.task-row.static {
  cursor: default;
}

.task-row.static:hover {
  transform: none;
}

@media (max-width: 720px) {
  .return-scan-form { grid-template-columns: 1fr; }
}
