/* ============================================================
   ThriftEd Closet (Vendor Portal) — Stylesheet
   Brand:    #f06724 / #7b3331 / #0f9eda / #daa15b
   Fonts:    Space Grotesk · DM Sans · Calistoga (logo)
   Extends the admin design system with closet-specific bits
   (closet card, image grid, payout summary, etc).
   ============================================================ */

/* ── 1. Design tokens ─────────────────────────────────────── */
:root {
  --orange:        #f06724;
  --orange-deep:   #d24f0e;
  --orange-soft:   #fde9dc;
  --maroon:        #7b3331;
  --maroon-deep:   #5a2422;
  --maroon-soft:   #f4e3e2;
  --blue:          #0f9eda;
  --blue-soft:     #d6f0fa;
  --gold:          #daa15b;
  --gold-soft:     #f6e8d3;

  --success:       #14a26b;
  --success-soft:  #d8f4e6;
  --warning:       #e8a008;
  --warning-soft:  #fbeec9;
  --danger:        #d8423d;
  --danger-soft:   #f8dcdb;
  --info:          #0f9eda;
  --info-soft:     #d6f0fa;

  --cream:         #fdf3e3;
  --cream-deep:    #f7e8cf;
  --paper:         #ffffff;
  --ink:           #1a1110;
  --ink-soft:      #4a3a36;
  --ink-muted:     #87766f;

  --bg:            #f6f3ec;
  --bg-card:       #ffffff;
  --border:        #ece4d4;
  --border-strong: #d8cdb6;

  --shadow-sm:     0 1px 2px rgba(26, 17, 16, 0.05);
  --shadow:        0 4px 12px rgba(26, 17, 16, 0.06);
  --shadow-md:     0 8px 24px rgba(26, 17, 16, 0.08);
  --shadow-lg:     0 18px 48px rgba(123, 51, 49, 0.12);

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-pill:   999px;

  --font-display:  'Space Grotesk', system-ui, sans-serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-editorial:'Calistoga', Georgia, serif;
  --font-mono:     'SF Mono', Menlo, Consolas, monospace;

  --sidebar-w:     264px;
  --topbar-h:      64px;
  --transition:    160ms ease;
}

/* ── 2. Base ──────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: var(--orange); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange-deep); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--cream-deep);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--ink-soft);
}
svg { flex-shrink: 0; }

/* ── 3. Layout ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--paper);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform var(--transition);
  overflow: hidden;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 18px 22px 16px;
  font-family: var(--font-editorial);
  font-size: 24px;
  color: var(--maroon);
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}
.logo-bag {
  background: var(--orange);
  color: var(--cream);
  padding: 1px 8px 3px;
  border-radius: 5px 5px 12px 12px;
  margin-left: 2px;
  position: relative;
  font-size: 22px;
}
.logo-bag::before, .logo-bag::after {
  content: ""; position: absolute; top: -4px;
  width: 3px; height: 6px;
  border: 1.5px solid var(--cream);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}
.logo-bag::before { left: 7px; }
.logo-bag::after  { right: 7px; }
.sidebar-logo-sub {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-left: auto;
  margin-bottom: -4px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.nav-group-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  padding: 16px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 1px;
  transition: background var(--transition), color var(--transition);
}
.nav-item:hover {
  background: var(--cream);
  color: var(--ink);
}
.nav-item.active {
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-weight: 600;
}
.nav-item.active svg { color: var(--orange); }
.nav-count {
  margin-left: auto;
  background: var(--orange);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  min-width: 18px;
  text-align: center;
}
.nav-item.active .nav-count { background: var(--orange-deep); }

.sidebar-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.sidebar-foot-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-muted);
}
.status-live {
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(20, 162, 107, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(20, 162, 107, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(20, 162, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 162, 107, 0); }
}

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left var(--transition);
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
}
.sidebar-toggle { display: none; }

.topbar-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  height: 38px;
  color: var(--ink-muted);
  transition: border-color var(--transition);
}
.topbar-search:focus-within {
  border-color: var(--orange);
  background: var(--paper);
}
.topbar-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13.5px;
  color: var(--ink);
  min-width: 0;
}
.topbar-search input::placeholder { color: var(--ink-muted); }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.icon-btn:hover { background: var(--cream); color: var(--ink); }

.badge-dot {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--orange);
  color: var(--paper);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: var(--radius-pill);
  min-width: 16px;
  text-align: center;
  border: 2px solid var(--paper);
}

.topbar-user .user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  transition: background var(--transition);
}
.topbar-user .user-trigger:hover { background: var(--cream); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: 13px; font-weight: 600; color: var(--ink); }
.user-meta small { font-size: 11px; color: var(--ink-muted); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.dropdown-menu a:hover { background: var(--cream); color: var(--ink); }
.dropdown-menu a.danger { color: var(--danger); }
.dropdown-menu a.danger:hover { background: var(--danger-soft); }
.dropdown-menu hr { margin: 4px 0; }

.content-wrap {
  padding: 28px 32px 48px;
  max-width: 1400px;
}

/* ── 4. Page header & breadcrumbs ─────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 4px;
}
.page-head p {
  color: var(--ink-muted);
  font-size: 13.5px;
}
.breadcrumbs {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs a:hover { color: var(--orange); }
.breadcrumbs .sep { color: var(--border-strong); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── 5. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--orange);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(240, 103, 36, 0.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--orange-deep);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 103, 36, 0.35);
}
.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--cream);
  border-color: var(--maroon);
  color: var(--maroon);
}
.btn-success { background: var(--success); color: var(--paper); }
.btn-success:hover { background: #0f8c5b; }
.btn-danger { background: var(--danger); color: var(--paper); }
.btn-danger:hover { background: #b8332e; }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--cream); }
.btn-sm { padding: 6px 12px; font-size: 12px; gap: 6px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ── 6. Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.card-header p { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.card-body { padding: 22px; }
.card-foot {
  padding: 14px 22px;
  background: #fbf8f0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* ── 7. KPI / Stat cards ──────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.stat-card-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.stat-card-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-soft);
  color: var(--orange-deep);
}
.stat-card-icon.maroon { background: var(--maroon-soft); color: var(--maroon); }
.stat-card-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-card-icon.gold { background: var(--gold-soft); color: var(--gold); }
.stat-card-icon.success { background: var(--success-soft); color: var(--success); }
.stat-card-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.stat-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}
.stat-trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ── 8. Grid helpers ──────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-23 { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-23 { grid-template-columns: 1fr; }
}

/* ── 9. Tables ────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-controls {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fbf8f0;
}
.table-controls .input,
.table-controls .select {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}
.table-controls .input:focus,
.table-controls .select:focus { border-color: var(--orange); }
.table-controls .input { min-width: 240px; }

.table-scroll { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data-table th,
table.data-table td {
  padding: 13px 18px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
table.data-table thead th {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  background: #fbf8f0;
  white-space: nowrap;
}
table.data-table tbody tr {
  transition: background var(--transition);
}
table.data-table tbody tr:hover { background: #fbf8f0; }
table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data-table .row-actions {
  display: inline-flex;
  gap: 4px;
}
table.data-table a.row-link {
  color: var(--ink);
  font-weight: 600;
}
table.data-table a.row-link:hover { color: var(--orange); }
table.data-table .cell-secondary {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 1px;
  font-weight: 400;
}

/* Product mini cell with thumbnail */
.cell-product {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cell-product img,
.cell-product .thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--cream-deep);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}

/* ── 10. Badges ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-transform: capitalize;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: #a06f00; }
.badge-danger  { background: var(--danger-soft);  color: var(--danger); }
.badge-info    { background: var(--info-soft);    color: var(--info); }
.badge-muted   { background: #ece4d4;             color: var(--ink-muted); }
.badge-orange  { background: var(--orange-soft);  color: var(--orange-deep); }

/* ── 11. Forms ────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-1 { grid-template-columns: 1fr; }
@media (max-width: 700px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-group label .required { color: var(--danger); }
.form-group .help-text {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 6px;
}
.form-group .error-text {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
}

.form-control,
input[type="text"], input[type="email"], input[type="number"],
input[type="password"], input[type="search"], input[type="url"],
input[type="tel"], input[type="date"], input[type="datetime-local"],
input[type="time"], select, textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus,
input:focus, select:focus, textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 103, 36, 0.15);
}
textarea { min-height: 90px; resize: vertical; }
select { cursor: pointer; padding-right: 32px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%237b3331' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group-addon {
  background: var(--cream);
  border: 1px solid var(--border-strong);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

.checkbox, .radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  user-select: none;
}
.checkbox input, .radio input {
  width: 16px; height: 16px;
  accent-color: var(--orange);
}

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { display: none; }
.switch-track {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background var(--transition);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: var(--paper);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .switch-track { background: var(--orange); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }

/* ── 12. Flash messages ───────────────────────────────────── */
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  border-left: 3px solid;
  animation: flash-in 250ms ease;
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.flash-success { background: var(--success-soft); border-color: var(--success); color: #0c6e47; }
.flash-error   { background: var(--danger-soft);  border-color: var(--danger);  color: #8e1c19; }
.flash-warning { background: var(--warning-soft); border-color: var(--warning); color: #8a5e00; }
.flash-info    { background: var(--info-soft);    border-color: var(--info);    color: #07628b; }
.flash-close { font-size: 18px; line-height: 1; padding: 0 4px; color: inherit; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

/* ── 13. Pagination ──────────────────────────────────────── */
.pagination {
  padding: 14px 18px;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
  background: #fbf8f0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.page-btn:hover { background: var(--cream); color: var(--ink); }
.page-btn.active {
  background: var(--orange);
  color: var(--paper);
  border-color: var(--orange);
  font-weight: 700;
}
.page-btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.page-ellipsis { padding: 0 6px; color: var(--ink-muted); }

/* ── 14. Empty state ─────────────────────────────────────── */
.empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--ink-muted);
}
.empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--ink-muted);
}
.empty h3 { font-family: var(--font-display); color: var(--ink); margin-bottom: 6px; font-size: 16px; }
.empty p { font-size: 13.5px; }

/* ── 15. Modals ──────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 17, 16, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--paper);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform var(--transition);
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.modal-body { padding: 22px; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: #fbf8f0;
}

/* ── 16. Login page ──────────────────────────────────────── */
body.login-body {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100vh;
}
body.login-body .sidebar,
body.login-body .topbar { display: none; }
body.login-body .main { margin-left: 0; }
body.login-body .content-wrap { padding: 0; max-width: none; }

.login-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orange-soft) 0%, transparent 70%);
}
.login-card > * { position: relative; z-index: 1; }
.login-logo {
  font-family: var(--font-editorial);
  font-size: 32px;
  color: var(--maroon);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.login-logo .logo-bag { font-size: 28px; }
.login-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.login-card h1 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 18px 0 6px;
}
.login-card p.lead {
  color: var(--ink-muted);
  font-size: 13.5px;
  margin-bottom: 26px;
}
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card .btn { margin-top: 6px; }
.login-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
}

/* ── 17. Detail pages (orders, products) ─────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }

.kv-list { display: flex; flex-direction: column; gap: 10px; }
.kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  font-size: 13.5px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.kv:last-child { border-bottom: 0; padding-bottom: 0; }
.kv .k { color: var(--ink-muted); font-weight: 500; }
.kv .v { color: var(--ink); font-weight: 500; }
.kv .v strong { color: var(--maroon); }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -19px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--orange);
}
.timeline-item .when {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.timeline-item .what {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 2px;
}
.timeline-item .who { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }

/* ── 18. Chart canvas wrapper ─────────────────────────────── */
.chart-wrap { position: relative; height: 280px; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12px; }
.chart-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ── 19. Utilities ───────────────────────────────────────── */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-muted { color: var(--ink-muted); }
.text-sm { font-size: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-end { display: flex; justify-content: flex-end; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.hidden { display: none !important; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* ── 20. Layout overlay (mobile sidebar) ─────────────────── */
.layout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 17, 16, 0.5);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.layout-overlay.open { opacity: 1; pointer-events: auto; }

/* ── 21. Responsive ──────────────────────────────────────── */
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .content-wrap { padding: 20px; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-search { max-width: none; }
  .topbar-search kbd { display: none; }
  .user-meta { display: none; }
  .page-head h1 { font-size: 20px; }
}

/* ── 22. Print ───────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .page-actions, .pagination, .table-controls { display: none; }
  .main { margin-left: 0; }
  .content-wrap { padding: 0; }
  .card { border: 1px solid #ccc; box-shadow: none; }
}

/* ============================================================
   23. Vendor-specific additions
   ============================================================ */

/* Closet identity card at top of sidebar */
.closet-card {
  margin: 14px 16px 6px;
  padding: 14px;
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  color: var(--cream);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.closet-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,103,36,.5) 0%, transparent 70%);
}
.closet-card > * { position: relative; z-index: 1; }
.closet-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.2);
  flex-shrink: 0;
}
.closet-avatar-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.closet-meta { min-width: 0; flex: 1; }
.closet-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.closet-handle {
  font-size: 12px;
  color: rgba(253, 243, 227, 0.7);
  margin-top: 1px;
}
.closet-stats {
  font-size: 11px;
  color: rgba(253, 243, 227, 0.8);
  margin-top: 6px;
  display: flex;
  gap: 6px;
}
.closet-stats strong { color: var(--cream); }

/* Topbar greeting */
.topbar-greeting {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 1;
  font-size: 14px;
}
.topbar-greeting strong { color: var(--maroon); font-family: var(--font-display); }
.verified-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.avatar-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Onboarding progress card on dashboard */
.onboarding-card {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-deep) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.onboarding-card::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,103,36,.15) 0%, transparent 70%);
}
.onboarding-card > * { position: relative; z-index: 1; }
.onboarding-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.onboarding-card p { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 14px; }
.progress-bar {
  background: rgba(255,255,255,0.6);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-deep));
  border-radius: 999px;
  transition: width .4s ease;
}
.onboarding-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}
.onboarding-check .check-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-deep);
  color: var(--ink-muted);
  font-size: 11px;
}
.onboarding-check.done .check-icon {
  background: var(--success);
  color: white;
}
.onboarding-check.done { color: var(--ink-muted); text-decoration: line-through; }

/* Image upload grid for product editor */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.image-tile {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  background: var(--cream-deep);
}
.image-tile img { width: 100%; height: 100%; object-fit: cover; }
.image-tile .tile-tools {
  position: absolute;
  top: 6px; right: 6px;
  display: flex;
  gap: 4px;
}
.image-tile .tile-primary {
  position: absolute;
  bottom: 6px; left: 6px;
  background: var(--orange);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.image-tile.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.image-tile.empty:hover {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange-deep);
}

/* Earnings tile */
.earnings-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.earnings-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.earnings-tile-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.earnings-tile-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
.earnings-tile.featured {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  color: var(--cream);
  border-color: var(--maroon);
}
.earnings-tile.featured .earnings-tile-label { color: rgba(253,243,227,0.7); }
.earnings-tile.featured .earnings-tile-value { color: var(--cream); }

/* Empty state for new curators */
.welcome-banner {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  color: var(--cream);
  padding: 30px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,103,36,.35) 0%, transparent 70%);
}
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner h2 {
  font-family: var(--font-editorial);
  font-size: 28px;
  margin-bottom: 6px;
}
.welcome-banner p { color: rgba(253,243,227,0.85); font-size: 14px; margin-bottom: 16px; max-width: 520px; }
.welcome-banner .btn-primary {
  background: var(--orange);
  color: var(--cream);
}

/* Apply page — special centered layout */
body.apply-body {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-deep) 100%);
  min-height: 100vh;
  padding: 32px 16px;
}
body.apply-body .sidebar,
body.apply-body .topbar { display: none; }
body.apply-body .main { margin-left: 0; }
body.apply-body .content-wrap { padding: 0; max-width: 680px; margin: 0 auto; }

.apply-hero {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.apply-hero h1 {
  font-family: var(--font-editorial);
  font-size: 36px;
  color: var(--maroon);
  margin-bottom: 12px;
}
.apply-hero p { color: var(--ink-soft); font-size: 15px; max-width: 480px; margin: 0 auto; line-height: 1.6; }


/* ════════════════════════════════════════════════════════════
   SELLER GUIDE (guide.php) — onboarding / photography standards
   Content + images are admin-managed and loaded dynamically.
════════════════════════════════════════════════════════════ */
.vg-wrap { max-width: 900px; }

/* First-login banner */
.vg-gate-note {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--gold-soft); border: 1px solid var(--gold);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 22px;
}
.vg-gate-ic { font-size: 22px; line-height: 1; }
.vg-gate-note strong { display: block; color: var(--maroon-deep); font-size: 14px; margin-bottom: 3px; }
.vg-gate-note p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

/* Section shell */
.vg-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 28px; margin-bottom: 20px;
}
.vg-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.vg-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--maroon); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.vg-eyebrow {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 4px;
}
.vg-section h2 { font-size: 19px; line-height: 1.3; color: var(--ink); margin: 0; }

/* Body copy (admin-authored HTML) */
.vg-copy { font-size: 14px; line-height: 1.75; color: var(--ink-soft); }
.vg-copy p { margin: 0 0 12px; }
.vg-copy p:last-child { margin-bottom: 0; }
.vg-copy strong { color: var(--ink); }
.vg-copy ul, .vg-copy ol { margin: 0 0 12px; padding-left: 20px; }
.vg-copy li { margin-bottom: 9px; }
.vg-copy li:last-child { margin-bottom: 0; }
.vg-copy ol { counter-reset: none; }

/* Hero: copy beside one image */
.vg-hero { display: grid; grid-template-columns: 1fr 260px; gap: 24px; align-items: start; }
.vg-hero.vg-hero-solo { grid-template-columns: 1fr; }

/* Compare: rejected vs approved */
.vg-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }

/* Grid: the mandatory shots */
.vg-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; margin-top: 18px;
}

/* Shared figure */
.vg-shot { margin: 0; }
.vg-shot-img {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius);
  overflow: hidden; background: var(--cream-deep); border: 1px solid var(--border);
}
.vg-shot-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vg-shot-num {
  position: absolute; top: 8px; left: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(26,17,16,.82); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.vg-shot figcaption {
  display: flex; flex-direction: column; gap: 3px;
  margin-top: 8px; font-size: 12.5px; color: var(--ink);
}
.vg-shot figcaption strong { font-size: 12.5px; font-weight: 600; }
.vg-cap { color: var(--ink-muted); font-size: 12px; line-height: 1.5; }

/* Approved / rejected accents */
.vg-shot-approved .vg-shot-img { border: 2px solid var(--success); }
.vg-shot-rejected .vg-shot-img { border: 2px solid var(--danger); }
.vg-badge {
  align-self: flex-start; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: var(--radius-pill);
}
.vg-badge-approved { background: var(--success-soft); color: var(--success); }
.vg-badge-rejected { background: var(--danger-soft);  color: var(--danger); }

/* Enforcement notice */
.vg-notice {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--danger-soft); border: 1px solid var(--danger);
}
.vg-notice-ic {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--danger);
  display: flex; align-items: center; justify-content: center;
}
.vg-notice h2 { color: var(--maroon-deep); }
.vg-notice .vg-copy { color: var(--ink-soft); }

/* Accept footer */
.vg-accept {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 28px; text-align: center;
}
.vg-accept p { font-size: 13.5px; color: var(--ink-muted); margin: 0 0 16px; line-height: 1.6; }
.vg-accept .btn-lg { font-size: 15px; padding: 13px 28px; border-radius: var(--radius); }
.vg-accept-done { display: flex; gap: 14px; align-items: center; justify-content: space-between; text-align: left; flex-wrap: wrap; }
.vg-accept-done p { margin: 0; color: var(--ink-soft); }

@media (max-width: 760px) {
  .vg-section, .vg-accept { padding: 20px 18px; }
  .vg-hero { grid-template-columns: 1fr; }
  .vg-compare { grid-template-columns: 1fr 1fr; gap: 12px; }
  .vg-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 420px) {
  .vg-compare { grid-template-columns: 1fr; }
}
