/* ==========================================================================
   VINTAGE VIBES SELLER — vintage.css
   Mobile-first, plain CSS, no build step. Loaded LAST after vendor CSS.
   Section map — each later task edits ONLY its own banner-marked section.
   ========================================================================== */

/* === 01 TOKENS & RESET EXTRAS (owner: T1) === */

:root {
  --vv-paper: #F4EDDD;
  --vv-surface: #FFFBF2;
  --vv-ink: #32271E;
  --vv-ink-soft: #6B5D4F;
  --vv-clay: #B04A17;
  --vv-ochre: #C98A2D;
  --vv-sage: #5F7157;
  --vv-line: #E4D8C2;
  --vv-ink-faint: #7E6D5A; /* secondary text on --vv-surface/--vv-paper; verified 4.82:1 contrast (--vv-line fails at 1.36:1, unusable as text) */
  --vv-danger: #A63D2F;

  --vv-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --vv-font-body: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --vv-font-mono: ui-monospace, 'SF Mono', Menlo, monospace;

  --vv-radius: 10px;
  --vv-radius-sm: 6px;
  --vv-shadow: 0 2px 8px rgba(50, 39, 30, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--vv-paper);
}

body {
  background: var(--vv-paper);
  color: var(--vv-ink);
  font-family: var(--vv-font-body);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--vv-clay);
  color: #FFF8EC;
}

a {
  color: var(--vv-clay);
}

hr {
  border: none;
  border-top: 1px solid var(--vv-line);
}

/* === 02 TYPOGRAPHY & @FONT-FACE (owner: T1) === */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/fraunces-variable-latin.woff2') format('woff2-variations'),
       url('../fonts/fraunces-variable-latin.woff2') format('woff2');
}

.vv-display,
.vv-wordmark,
.vv-page-title,
.vv-stat-value {
  font-family: var(--vv-font-display);
  font-weight: 600;
  color: var(--vv-ink);
}

.vv-wordmark {
  font-weight: 700;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

.vv-numeral {
  font-variant-numeric: tabular-nums;
}

.vv-mono {
  font-family: var(--vv-font-mono);
}

.vv-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vv-ink-soft);
}

h1, .vv-h1 { font-size: 26px; }
h2, .vv-h2 { font-size: 20px; }
h3, .vv-h3 { font-size: 17px; }
p, .vv-body { font-size: 15px; }
small, .vv-small { font-size: 13px; }

/* === 03 BUTTONS, FORMS, INPUTS (owner: T1) === */

.vv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--vv-radius-sm);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.vv-btn:active {
  transform: translateY(1px);
}

.vv-btn-primary {
  background: var(--vv-clay);
  color: #FFF8EC;
}

.vv-btn-primary:hover,
.vv-btn-primary:focus {
  background: #99400f;
  color: #FFF8EC;
}

.vv-btn-secondary {
  background: transparent;
  color: var(--vv-clay);
  border: 1px solid var(--vv-clay);
}

.vv-btn-danger {
  background: var(--vv-danger);
  color: #FFF8EC;
}

.vv-btn-block {
  width: 100%;
}

.vv-input,
.vv-select {
  width: 100%;
  border: 1px solid var(--vv-line);
  border-radius: var(--vv-radius-sm);
  background: var(--vv-surface);
  color: var(--vv-ink);
  padding: 11px 14px;
  font-size: 15px;
  font-family: var(--vv-font-body);
}

.vv-input:focus,
.vv-select:focus {
  outline: none;
  border-color: var(--vv-clay);
  box-shadow: 0 0 0 3px rgba(176, 74, 23, 0.15);
}

.vv-input-group {
  position: relative;
}

.vv-input-group .vv-input {
  padding-right: 42px;
}

.vv-input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--vv-ink-soft);
  cursor: pointer;
  background: none;
  border: none;
}

.vv-field-error {
  color: var(--vv-danger);
  font-size: 13px;
  margin-top: 4px;
}

.vv-input.is-invalid,
.vv-select.is-invalid {
  border-color: var(--vv-danger);
}

/* === 04 CARDS, TAG & RECEIPT MOTIF (owner: T1) === */

.vv-card {
  background: var(--vv-surface);
  border: 1px solid var(--vv-line);
  border-radius: var(--vv-radius);
  box-shadow: var(--vv-shadow);
  padding: 16px;
}

/* swing-tag motif: mobile list item read as an inventory tag */
.vv-tag-card {
  position: relative;
  background: var(--vv-surface);
  border: 1px solid var(--vv-line);
  border-radius: var(--vv-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.vv-tag-card::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vv-paper);
  border: 1px solid var(--vv-line);
}

.vv-tag-chip {
  display: inline-block;
  font-family: var(--vv-font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  background: var(--vv-paper);
  border: 1px dashed var(--vv-line);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--vv-ink-soft);
}

.vv-tag-price {
  float: right;
  font-family: var(--vv-font-body);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--vv-clay);
}

/* receipt motif: detail modals rendered as a thermal receipt */
.vv-receipt {
  position: relative;
  background: var(--vv-surface);
  padding-top: 20px;
}

.vv-receipt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background-image: radial-gradient(circle at 8px 0, transparent 5px, var(--vv-surface) 5px);
  background-size: 16px 10px;
  background-repeat: repeat-x;
}

.vv-receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--vv-line);
  font-size: 14px;
}

.vv-receipt-row:last-child {
  border-bottom: none;
}

.vv-receipt-amount {
  font-family: var(--vv-font-mono);
  font-variant-numeric: tabular-nums;
}

.vv-receipt-total {
  font-weight: 700;
  border-top: 2px solid var(--vv-ink);
  margin-top: 8px;
  padding-top: 10px;
}

/* === 05 MODALS, SHEETS (owner: T1) === */

.modal-content {
  background: var(--vv-surface);
  border: none;
  border-radius: var(--vv-radius);
  box-shadow: 0 8px 24px rgba(50, 39, 30, 0.18);
}

.modal-header {
  border-bottom: 1px solid var(--vv-line);
}

.modal-footer {
  border-top: 1px solid var(--vv-line);
}

.vv-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--vv-surface);
  border-top-left-radius: var(--vv-radius);
  border-top-right-radius: var(--vv-radius);
  box-shadow: 0 -4px 16px rgba(50, 39, 30, 0.15);
  transform: translateY(100%);
  transition: transform 200ms ease;
  z-index: 1050;
}

.vv-sheet.is-open {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .vv-sheet,
  .vv-btn,
  * {
    transition-duration: 0.001ms !important;
  }
}

/* === 06 APP SHELL: BAR/TABS/NAV (owner: T2) === */

body.vv-body {
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

.vv-wordmark {
  font-family: var(--vv-font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--vv-ink);
  text-decoration: none;
  white-space: nowrap;
}

.vv-wordmark:hover {
  color: var(--vv-clay);
  text-decoration: none;
}

/* --- Mobile app bar (< 992px) --- */

.vv-appbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  background: var(--vv-surface);
  border-bottom: 1px solid var(--vv-line);
}

.vv-user-chip {
  font-size: 13px;
  color: var(--vv-ink-soft);
  display: flex;
  align-items: center;
  cursor: pointer;
}

.vv-user-chip,
.vv-user-chip:hover,
.vv-user-chip:focus {
  text-decoration: none;
  color: var(--vv-ink-soft);
}

/* Desktop-only header pieces — hidden on mobile so only .vv-appbar shows there */
.vv-topbar-brand,
.vv-desktop-nav,
.vv-topbar-user {
  display: none;
}

/* --- Bottom tab bar (mobile) --- */

.vv-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: flex;
  background: var(--vv-surface);
  border-top: 1px solid var(--vv-line);
  padding-bottom: env(safe-area-inset-bottom);
}

.vv-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 6px;
  color: var(--vv-ink-soft);
  text-decoration: none;
  font-size: 11px;
  border-top: 2px solid transparent;
}

.vv-tab i {
  font-size: 18px;
}

.vv-tab:hover {
  text-decoration: none;
  color: var(--vv-ink-soft);
}

.vv-tab.active {
  color: var(--vv-clay);
  border-top-color: var(--vv-clay);
}

/* --- Bottom sheet (more menu / user menu) --- */

.vv-sheet-modal .modal-dialog {
  margin: 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: none;
}

.vv-sheet-modal .modal-content.vv-receipt {
  border-radius: var(--vv-radius) var(--vv-radius) 0 0;
  padding: 8px 0 max(16px, env(safe-area-inset-bottom));
}

.vv-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--vv-line);
  margin: 4px auto 8px;
}

.vv-sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vv-sheet-list li + li {
  border-top: 1px dashed var(--vv-line);
}

.vv-sheet-list a {
  display: block;
  padding: 14px 20px;
  color: var(--vv-ink);
  text-decoration: none;
}

.vv-sheet-list a:hover,
.vv-sheet-list a.active {
  color: var(--vv-clay);
  text-decoration: none;
}

/* --- Desktop shell (>= 992px) --- */

@media (min-width: 992px) {
  body.vv-body {
    padding-bottom: 0;
  }

  .vv-appbar {
    display: none;
  }

  .vv-tabbar {
    display: none;
  }

  .vv-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 60px;
    padding: 0 24px;
    background: var(--vv-surface);
    border-bottom: 1px solid var(--vv-line);
  }

  .vv-topbar-brand,
  .vv-desktop-nav,
  .vv-topbar-user {
    display: block;
  }

  .vv-desktop-nav {
    display: flex;
  }

  .vv-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0 auto 0 0;
    padding: 0;
  }

  .vv-nav-item {
    position: relative;
  }

  .vv-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--vv-radius-sm);
    color: var(--vv-ink-soft);
    text-decoration: none;
    font-size: 14px;
  }

  .vv-nav-link:hover {
    background: var(--vv-paper);
    color: var(--vv-ink);
    text-decoration: none;
  }

  .vv-nav-item.active > .vv-nav-link,
  .vv-nav-home.active {
    color: var(--vv-clay);
    font-weight: 600;
  }

  .vv-nav-sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--vv-surface);
    border: 1px solid var(--vv-line);
    border-radius: var(--vv-radius-sm);
    box-shadow: var(--vv-shadow);
    padding: 4px 0;
    list-style: none;
    margin: 4px 0 0;
    z-index: 1040;
  }

  .vv-nav-dropdown:hover > .vv-nav-sub {
    display: block;
  }

  .vv-nav-sub .vv-nav-link {
    display: block;
    border-radius: 0;
  }

  .vv-topbar-user {
    margin-left: auto;
  }
}

/* === 07 LOGIN (owner: T3) === */

.vv-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--vv-paper);
}

.vv-login-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vv-login-wordmark {
  font-size: 26px;
  margin-bottom: 4px;
}

.vv-login-tagline {
  font-family: var(--vv-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vv-ink-soft);
  margin-bottom: 28px;
}

.vv-login-form {
  width: 100%;
  text-align: left;
}

.vv-login-copyright {
  margin-top: 28px;
  color: var(--vv-ink-soft);
  font-size: 13px;
}

.vv-login-copyright p {
  margin: 0;
}

/* === 08 DASHBOARD (STATS/CHARTS) (owner: T4) === */

.vv-stat-tile {
  margin-bottom: 0;
}

.vv-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vv-ink-soft);
  margin-bottom: 4px;
}

.vv-stat-value {
  font-family: var(--vv-font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.vv-stat-tile--today .vv-stat-value {
  color: var(--vv-clay);
}

.vv-stat-tile--month .vv-stat-value {
  color: var(--vv-ink);
}

.vv-text-soft {
  color: var(--vv-ink-soft);
}

/* receipt-styled DataTable — used where recent-list rows exceed 10 (Recent Sales) */
.vv-receipt-table {
  width: 100%;
  margin-bottom: 0;
}

.vv-receipt-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vv-ink-soft);
  border-bottom: 1px solid var(--vv-line);
  border-top: none;
  font-weight: 600;
  padding: 6px 0;
}

.vv-receipt-table tbody td {
  border-bottom: 1px dashed var(--vv-line);
  font-size: 14px;
  padding: 8px 0;
  vertical-align: middle;
}

.vv-receipt-table tbody tr:last-child td {
  border-bottom: none;
}

.vv-receipt-table .vv-receipt-amount {
  font-family: var(--vv-font-mono);
  font-variant-numeric: tabular-nums;
}

#recent-order-table_wrapper .dataTables_paginate {
  font-family: var(--vv-font-body);
  font-size: 13px;
  padding-top: 8px;
}

#recent-order-table_wrapper .paginate_button {
  color: var(--vv-ink-soft) !important;
  border-radius: var(--vv-radius-sm) !important;
}

#recent-order-table_wrapper .paginate_button.current {
  background: var(--vv-clay) !important;
  border-color: var(--vv-clay) !important;
  color: #fff !important;
}

/* === 09 DATATABLES & CARD LIST (owner: T5) === */

/* --- Page head: title left, breadcrumbs right (desktop only) --- */
.vv-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 16px 0 12px;
}

.vv-page-title {
  font-size: 22px;
}

.vv-page-subtitle {
  font-size: 13px;
  color: var(--vv-ink-soft);
}

.vv-breadcrumb {
  display: none;
  background: transparent;
  font-size: 13px;
}

.vv-breadcrumb .breadcrumb-item,
.vv-breadcrumb .breadcrumb-item a {
  color: var(--vv-ink-soft);
}

.vv-breadcrumb .breadcrumb-item.active {
  color: var(--vv-clay);
}

@media (min-width: 768px) {
  .vv-breadcrumb {
    display: flex;
  }
}

/* --- Form description strip --- */
.vv-page-desc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--vv-ink-soft);
}

.vv-page-desc-right {
  margin-left: auto;
}

/* --- Filter panel --- */
.vv-filter-card {
  padding: 0;
  margin-bottom: 12px;
}

.vv-filter-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 12px 16px;
  font-family: var(--vv-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--vv-ink);
  cursor: pointer;
}

.vv-filter-caret {
  margin-left: auto;
  font-size: 12px;
  color: var(--vv-ink-soft);
  transition: transform 150ms ease;
}

.vv-filter-card.is-open .vv-filter-caret {
  transform: rotate(180deg);
}

.vv-filter-body {
  display: none;
  padding: 0 16px 16px;
}

.vv-filter-card.is-open .vv-filter-body {
  display: block;
}

.vv-filter-fields {
  display: grid;
  gap: 12px;
}

.vv-filter-field label {
  display: block;
  margin-bottom: 4px;
}

.vv-filter-actions .vv-btn {
  width: 100%;
  padding: 11px 20px;
}

@media (min-width: 768px) {
  .vv-filter-body {
    display: block;
  }

  .vv-filter-toggle {
    pointer-events: none;
  }

  .vv-filter-caret {
    display: none;
  }

  .vv-filter-fields {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
  }

  .vv-filter-actions .vv-btn {
    width: auto;
  }
}

/* --- List card + table (desktop) --- */
.vv-list-card {
  padding: 8px 16px 16px;
  overflow-x: auto;
}

.vv-table {
  margin-bottom: 8px;
  color: var(--vv-ink);
}

.vv-table thead th {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vv-ink-soft);
  border-top: none;
  border-bottom: 2px solid var(--vv-ink);
  white-space: nowrap;
}

.vv-table tbody td {
  border-top: 1px dashed var(--vv-line);
  font-size: 14px;
  vertical-align: middle;
}

.vv-table .text-right {
  font-variant-numeric: tabular-nums;
}

#datatable .btn-outline-primary {
  color: var(--vv-clay);
  border-color: var(--vv-clay);
}

#datatable .btn-outline-primary:hover,
#datatable .btn-outline-primary:focus {
  background: var(--vv-clay);
  color: #FFF8EC;
}

#datatable td.dataTables_empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--vv-ink-soft);
  border-top: none;
}

/* rows carry .vv-tag-card for the mobile card view — neutralize its chrome on desktop */
@media (min-width: 768px) {
  #datatable tbody tr.vv-tag-card {
    background: transparent;
    border: none;
  }

  #datatable tbody tr.vv-tag-card::before {
    display: none;
  }
}

/* --- DataTables chrome: processing, length, info + pagination (receipt footer) --- */
.dataTables_processing {
  background: var(--vv-surface) !important;
  border: 1px solid var(--vv-line);
  border-radius: var(--vv-radius-sm);
  box-shadow: var(--vv-shadow);
  color: var(--vv-ink-soft);
  font-size: 13px;
}

.dataTables_length {
  display: none;
  font-size: 13px;
  color: var(--vv-ink-soft);
}

.dataTables_length select {
  border: 1px solid var(--vv-line);
  border-radius: var(--vv-radius-sm);
  background: var(--vv-surface);
  color: var(--vv-ink);
}

.dataTables_info {
  font-family: var(--vv-font-mono);
  font-size: 12px;
  color: var(--vv-ink-soft);
  border-top: 1px dashed var(--vv-line);
  padding-top: 12px !important;
}

.dataTables_paginate {
  border-top: 1px dashed var(--vv-line);
  padding-top: 8px;
}

.dataTables_paginate .page-item .page-link {
  border: 1px solid var(--vv-line);
  background: var(--vv-surface);
  color: var(--vv-ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dataTables_paginate .page-item.active .page-link {
  background: var(--vv-clay);
  border-color: var(--vv-clay);
  color: #FFF8EC;
}

.dataTables_paginate .page-item.disabled .page-link {
  background: transparent;
  color: var(--vv-line);
}

@media (min-width: 768px) {
  .dataTables_length {
    display: block;
  }
}

/* Load more button is mobile-only — hidden by default (desktop keeps pagination) */
.vv-load-more-wrap {
  display: none;
}

/* --- Mobile card list (< 768px): rows become swing-tag cards --- */
@media (max-width: 767.98px) {
  /* drop the outer card chrome so tags sit on paper and the hole isn't clipped */
  .vv-list-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
  }

  /* mobile replaces Prev/Next pagination + length menu with "Muat lebih banyak" */
  .vv-load-more-wrap {
    display: block;
    margin-top: 14px;
  }

  #datatable_wrapper .dataTables_paginate,
  #datatable_wrapper .dataTables_length {
    display: none;
  }

  #datatable thead {
    display: none;
  }

  #datatable,
  #datatable tbody {
    display: block;
    width: 100%;
  }

  #datatable tbody tr {
    display: block;
    /* .vv-tag-card (added in createdRow) supplies bg/border/radius/hole */
  }

  #datatable tbody tr.vv-tag-card {
    padding: 10px 14px;
  }

  #datatable tbody td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 5px 0;
    border: none;
    border-bottom: 1px dashed var(--vv-line);
    text-align: right;
  }

  #datatable tbody td:last-child {
    border-bottom: none;
  }

  #datatable tbody td::before {
    content: attr(data-label);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vv-ink-soft);
    text-align: left;
    flex-shrink: 0;
  }

  /* first column (detail/eye action) hidden on mobile — the card already shows
     every field the detail modal would, so the popup is redundant here */
  #datatable tbody tr.vv-tag-card td:first-child {
    display: none;
  }

  #datatable td.dataTables_empty {
    display: block;
    text-align: center;
  }

  #datatable td.dataTables_empty::before {
    display: none;
  }
}

/* --- Detail modals: receipt treatment (classes added by the layout JS) --- */
.vv-list-modals .modal-header {
  border-bottom: none;
  padding-bottom: 4px;
}

.vv-list-modals .modal-title {
  font-family: var(--vv-font-display);
  font-size: 17px;
}

.vv-list-modals .list-group-item.vv-receipt-row {
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px dashed var(--vv-line);
  padding: 10px 16px;
}

.vv-list-modals .list-group-item.vv-receipt-row:last-child {
  border-bottom: none;
}

.vv-list-modals .vv-receipt-row span:last-child {
  font-variant-numeric: tabular-nums;
}

.vv-list-modals .modal-footer .btn-secondary {
  background: transparent;
  border: 1px solid var(--vv-clay);
  color: var(--vv-clay);
  border-radius: var(--vv-radius-sm);
  font-weight: 600;
}

/* === 10 UTILITIES & PRINT (owner: T1) === */

.vv-hidden {
  display: none !important;
}

.vv-mt-8 { margin-top: 8px; }
.vv-mt-16 { margin-top: 16px; }
.vv-mb-8 { margin-bottom: 8px; }
.vv-mb-16 { margin-bottom: 16px; }

.vv-flex {
  display: flex;
}

.vv-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vv-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

@media print {
  .vv-no-print {
    display: none !important;
  }
}

/* ==========================================================================
   === 10 FRESH REDESIGN (2026-07) — ledger identity, semantic color ===
   Loaded last; overrides earlier rules where needed.
   ========================================================================== */

/* --- App-bar brand lockup: wordmark + stamped SELLER tag (replaces $title) --- */
.vv-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.vv-brand:hover { text-decoration: none; }
.vv-brand .vv-wordmark { font-size: 20px; line-height: 1; }
.vv-brand-tag {
  font-family: var(--vv-font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vv-clay);
  border: 1px solid var(--vv-line);
  border-radius: 3px;
  padding: 2px 5px;
}
/* keep the desktop brand hidden on mobile, inline-flex on desktop */
.vv-topbar-brand { display: none; }
@media (min-width: 992px) {
  .vv-topbar-brand { display: inline-flex; }
}

/* --- Semantic color: money-in = sage, stock-on-hand = ochre, clay = brand/action --- */
.vv-money { color: var(--vv-sage); }
.vv-stock { color: var(--vv-ochre); }

/* --- Section titles: Fraunces, one clear step below the hero total --- */
.vv-section-title {
  font-family: var(--vv-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--vv-ink);
}

/* --- Calm empty / zero states (not a bare 0) --- */
.vv-receipt-note {
  font-family: var(--vv-font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--vv-ink-soft);
}

/* --- Month hero: the receipt total is the page's thesis --- */
.vv-hero { margin-top: 16px; }
.vv-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.vv-hero-stamp {
  font-family: var(--vv-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vv-clay);
  border: 1px solid var(--vv-clay);
  border-radius: var(--vv-radius-sm);
  padding: 3px 9px;
}
.vv-hero-caption {
  font-family: var(--vv-font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--vv-ink-soft);
}
.vv-hero-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.vv-hero-total-label {
  font-family: var(--vv-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vv-ink-soft);
}
.vv-hero-total-value {
  font-family: var(--vv-font-display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
  .vv-hero-total-value { font-size: 40px; }
}

/* --- Daily sales "tape": chart sits on paper, no card chrome --- */
.vv-tape { margin-top: 22px; }
.vv-tape-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.vv-tape-canvas {
  position: relative;
  height: 190px;
}
@media (min-width: 768px) {
  .vv-tape-canvas { height: 240px; }
}

/* --- Bottom tab: active state is an inked stamp, not a full top border --- */
@media (max-width: 991.98px) {
  .vv-tab { position: relative; }
  .vv-tab.active { border-top-color: transparent; }
  .vv-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 3px;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: var(--vv-clay);
  }
}

/* --- Mobile swing-tag cards (default): title/amount lead, quiet meta below.
   This is Goods Receipt's card now (grouped list, no photo). stock-item/
   sales-detail (.vv-table-has-thumb) get their own photo-led "ledger row"
   layout in section 12 below instead. --- */
@media (max-width: 767.98px) {
  #datatable tbody tr.vv-tag-card {
    display: flex;
    flex-direction: column;
  }

  /* row index carries no meaning on a card */
  #datatable tbody td[data-label="No"] { display: none; }

  /* Receiving No = the card's identity on the grouped goods-receipt list
     (a receipt number, so mono rather than Description's prose Fraunces). */
  #datatable.vv-table-goods-receipt tbody td[data-label="Receiving No"] {
    order: -2;
    display: block;
    text-align: left;
    font-family: var(--vv-font-mono);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--vv-ink);
    padding: 0 0 8px;
    border-bottom: none;
  }
  #datatable.vv-table-goods-receipt tbody td[data-label="Receiving No"]::before { display: none; }

  /* Amount = the number the eye lands on (goods-receipt only) */
  #datatable tbody td[data-label="Amount"] {
    order: -1;
    align-items: baseline;
    font-family: var(--vv-font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--vv-clay);
    font-variant-numeric: tabular-nums;
    padding: 0 0 8px;
    margin-bottom: 6px;
    border-bottom: 1px dashed var(--vv-line);
  }
  #datatable tbody td[data-label="Amount"]::before {
    font-family: var(--vv-font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--vv-ink-soft);
    align-self: center;
  }
}

/* ==========================================================================
   === 11 ITEM THUMBNAILS (2026-07) — stock-item + sales-detail only ===
   Frame + fallback shared by the mobile swing-tag rail and the desktop
   detail-modal hero. Goods Receipt has no single item, so it never gets
   an Image column and is unaffected by any of this.
   ========================================================================== */

.vv-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--vv-radius-sm);
  border: 1px solid var(--vv-line);
  box-shadow: inset 0 0 0 3px var(--vv-surface);
  overflow: hidden;
  background: var(--vv-paper);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vv-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 150ms ease;
}

.vv-thumb-img.is-loaded {
  opacity: 1;
}

.vv-thumb-fallback {
  font-family: var(--vv-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--vv-ochre);
}

/* --- Desktop detail-modal hero: locked to the source's native 100x80 (5:4)
   ratio scaled 1.6x, so it never upscales past what the thumbnail can bear --- */
.vv-thumb-modal-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 20px 4px;
}

.vv-thumb-modal {
  width: 160px;
  height: 128px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 4px var(--vv-surface);
}

.vv-thumb-modal .vv-thumb-fallback {
  font-size: 15px;
}

/* faint warm overlay disguises upscaled softness as swing-tag texture,
   not a broken image */
.vv-thumb-modal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(176, 74, 23, 0.05), rgba(50, 39, 30, 0.07));
  pointer-events: none;
}

/* --- Desktop: Image column stays out of the table entirely (photo only
   appears in the detail modal's .vv-thumb-modal above) --- */
#datatable.vv-table-has-thumb thead th:nth-child(2) {
  display: none;
}

@media (min-width: 768px) {
  #datatable.vv-table-has-thumb tbody td[data-label="Image"] {
    display: none;
  }
}

/* ==========================================================================
   === 12 LEDGER-ROW CARD (2026-07, v2) — stock-item + sales-detail only ===
   The client felt the earlier floated-photo card had the photo and the
   title fighting for the top of the card. Rebuilt photo-first (design
   direction "A" — a Vinted/Depop-style thumbnail list row): the photo is
   a fixed left column spanning the full card height via CSS grid (no more
   absolute positioning), title/price/meta stack in the column beside it.
   Category (and Transaction/Receiving No, Qty) are cut from the card —
   still real columns for the desktop table, just hidden here — reachable
   by tapping the card, which reuses the existing detail modal (see the
   tap-to-detail handler in layouts_seller/datatables.blade.php).
   ========================================================================== */
@media (max-width: 767.98px) {
  #datatable.vv-table-has-thumb tbody tr.vv-tag-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    column-gap: 12px;
    cursor: pointer;
  }

  /* quiet tap-to-detail affordance, since the card no longer shows every field */
  #datatable.vv-table-has-thumb tbody tr.vv-tag-card::after {
    content: '\203A';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
    color: var(--vv-line);
  }

  /* Photo: fixed-width left column that STRETCHES to fill the full card
     height — a small centered square inside a taller card read as
     undersized/disconnected; filling the row makes the photo as prominent
     as the text beside it.
     The .vv-thumb child is forced position:absolute + inset:0 (scoped to
     this context only — the modal's .vv-thumb-modal usage elsewhere is
     untouched) so the <img>'s own natural aspect ratio (many real photos
     here are tall portraits, e.g. 900x1600) can't leak into the grid's
     row-height calculation: an in-flow img with no explicit height
     resolves its height from that aspect ratio, which inflates row 1 far
     past the text column's real height. Taking it out of flow removes
     that influence, so align-self:stretch can size purely off the text. */
  #datatable.vv-table-has-thumb tbody td[data-label="Image"] {
    position: relative;
    grid-column: 1;
    /* explicit span, not "1 / -1" — with no grid-template-rows declared,
       -1 doesn't reliably resolve to "the last implicitly-created row" and
       was only spanning row 1. Col2 stacks exactly 3 rows now (title,
       price, and one shared SKU+date meta strip), so span that count. */
    grid-row: 1 / span 3;
    width: 84px;
    align-self: stretch;
    padding: 0;
    border: none;
    overflow: hidden;
  }
  #datatable.vv-table-has-thumb tbody td[data-label="Image"] .vv-thumb {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    box-shadow: none;
  }
  #datatable.vv-table-has-thumb tbody td[data-label="Image"]::before {
    display: none;
  }

  /* Title leads, clamped to 2 lines so a long name can't inflate row height.
     max-height is a hard backstop: -webkit-line-clamp alone doesn't reliably
     constrain a CSS Grid item's track sizing in every engine — without it, a
     long title's true (unclamped) height can still stretch the grid row and
     bleed into the price line below.
     Title/price/SKU/date are all placed with explicit grid-row (not order +
     auto-placement) — mixing the two burned us once already (see the image
     span fix above), so every col2 item states its row plainly. */
  #datatable.vv-table-has-thumb tbody td[data-label="Description"] {
    grid-column: 2;
    grid-row: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 40px;
    text-align: left;
    font-family: var(--vv-font-display);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--vv-ink);
    padding: 0;
    border-bottom: none;
  }
  #datatable.vv-table-has-thumb tbody td[data-label="Description"]::before {
    display: none;
  }

  /* Price: second, still the dominant clay figure. It carries the card's
     whole right-hand visual weight, so it stays on its own line rather
     than folding into the meta strip below. */
  #datatable.vv-table-has-thumb tbody td[data-label="Price Unit"] {
    grid-column: 2;
    grid-row: 2;
    display: block;
    text-align: left;
    font-family: var(--vv-font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--vv-clay);
    font-variant-numeric: tabular-nums;
    padding: 5px 0 0;
    border-bottom: none;
  }
  #datatable.vv-table-has-thumb tbody td[data-label="Price Unit"]::before {
    display: none;
  }

  /* SKU + date: one shared meta strip, not two orphan lines. Both items
     explicitly share grid-row 3 (same cell) and are kept apart purely via
     justify-self — SKU pinned to the start edge, date to the end edge —
     so the gap between them reads as a deliberate space-between binding,
     like a swing-tag's code-left/date-right layout, with no separator
     glyph needed. */
  #datatable.vv-table-has-thumb tbody td[data-label="SKU Code"],
  #datatable.vv-table-has-thumb tbody td[data-label="Date Received"],
  #datatable.vv-table-has-thumb tbody td[data-label="Date Sales"] {
    grid-column: 2;
    grid-row: 3;
    display: block;
    text-align: left;
    font-family: var(--vv-font-mono);
    font-size: 10px;
    letter-spacing: 0.02em;
    line-height: 1;
    padding: 5px 0 0;
    border-bottom: none;
  }
  #datatable.vv-table-has-thumb tbody td[data-label="SKU Code"] {
    justify-self: start;
    font-weight: 400;
    color: var(--vv-ochre);
  }
  #datatable.vv-table-has-thumb tbody td[data-label="SKU Code"]::before {
    display: none;
  }
  #datatable.vv-table-has-thumb tbody td[data-label="Date Received"],
  #datatable.vv-table-has-thumb tbody td[data-label="Date Sales"] {
    justify-self: end;
    color: var(--vv-ink-soft);
  }
  #datatable.vv-table-has-thumb tbody td[data-label="Date Received"]::before,
  #datatable.vv-table-has-thumb tbody td[data-label="Date Sales"]::before {
    display: none;
  }

  /* Sales Details' date carries a sale timestamp — keep the date itself in
     ink-soft (matching Unsold Items) but recede the time further so the
     moment-of-sale is present without competing with the date. */
  #datatable.vv-table-has-thumb tbody td[data-label="Date Sales"] .vv-time-part {
    color: var(--vv-ink-faint);
    font-size: 9px;
  }

  /* Cut from the mobile card — still real desktop-table columns, reachable
     here by tapping the row (opens the same detail modal) */
  #datatable.vv-table-has-thumb tbody td[data-label="Receiving No"],
  #datatable.vv-table-has-thumb tbody td[data-label="Transaction No"],
  #datatable.vv-table-has-thumb tbody td[data-label="Category"],
  #datatable.vv-table-has-thumb tbody td[data-label="Qty"] {
    display: none;
  }
}

/* === 11 TOAST (owner: T3) === */

.vv-toast-container {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

@media (min-width: 992px) {
  .vv-toast-container {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 100%;
    max-width: 360px;
  }
}

.vv-toast {
  background: var(--vv-surface);
  border: 1px solid var(--vv-line);
  border-left: 4px solid var(--vv-ink-soft);
  border-radius: var(--vv-radius);
  box-shadow: var(--vv-shadow);
  padding: 12px 16px;
  color: var(--vv-ink);
  font-family: var(--vv-font-body);
  font-size: 14px;
  line-height: 1.4;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.vv-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.vv-toast-success {
  border-left-color: var(--vv-sage);
}

.vv-toast-error {
  border-left-color: var(--vv-danger);
}

@media (prefers-reduced-motion: reduce) {
  .vv-toast {
    transition-duration: 0.001ms !important;
  }
}
