/* ============================================================
   BRANDISBY — PRODUCT / CHECKOUT / AUTH / DASHBOARD STYLES
   ============================================================ */

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.product-page { background: var(--cream); }

.product-layout {
  margin-top: var(--nav-h);
  padding: 2.5rem var(--pad-x) 5rem;
}
.product-layout-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
}

/* Gallery */
.product-gallery { position: sticky; top: calc(var(--nav-h) + 1.5rem); }

.gallery-main {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(135deg, rgba(90,60,48,0.1), rgba(90,60,48,0.25));
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; margin-bottom: 0.75rem;
  box-shadow: var(--shadow-lg);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.gallery-thumb {
  width: 68px; height: 68px; border-radius: var(--r-md);
  overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: border-color var(--t-fast);
  background: var(--cream-2); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--brown); }

/* Product Info */
.product-info { padding-top: 0.5rem; }

.product-breadcrumb {
  font-size: 0.78rem; color: var(--muted); margin-bottom: 1.25rem;
}
.product-breadcrumb a { color: var(--brown); text-decoration: none; }
.product-breadcrumb a:hover { text-decoration: underline; }
.product-breadcrumb span { margin: 0 0.4rem; }

.product-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300; margin-bottom: 1rem; color: var(--dark);
  line-height: 1.1;
}

.product-price-row {
  display: flex; align-items: center; gap: 1.25rem; margin-bottom: 0.75rem;
}
.product-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem; font-weight: 400; color: var(--brown);
}
.stock-badge { font-size: 0.78rem; }

.product-category { margin-bottom: 1.5rem; }

.product-desc {
  font-size: 0.95rem; line-height: 1.85; color: var(--text-soft);
  font-weight: 300; margin-bottom: 2rem;
  border-bottom: 1px solid var(--cream-2); padding-bottom: 2rem;
}

/* Customization */
.customize-section {
  background: var(--cream); border-radius: var(--r-lg);
  padding: 1.5rem; margin-bottom: 2rem;
  border: 1.5px solid var(--cream-3);
}
.customize-title {
  font-size: 0.95rem; font-weight: 600;
  margin-bottom: 1.25rem; color: var(--text);
  display: flex; align-items: center; gap: 0.5rem;
}

.custom-field { margin-bottom: 1.1rem; }
.custom-field:last-child { margin-bottom: 0; }
.custom-hint { font-size: 0.72rem; color: var(--muted); margin-top: 0.3rem; display: block; }

.font-picker { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
.font-opt {
  padding: 0.4rem 0.9rem; border-radius: var(--r-pill);
  border: 1.5px solid var(--cream-3); background: var(--white);
  font-size: 0.8rem; cursor: pointer; transition: all var(--t-fast);
  color: var(--text-soft);
}
.font-opt.active { background: var(--brown); color: var(--white); border-color: var(--brown); }
.font-opt:not(.active):hover { border-color: var(--brown); color: var(--brown); }

.upload-zone {
  border: 2px dashed rgba(90,60,48,0.2); border-radius: var(--r-md);
  padding: 1.5rem; text-align: center; cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base);
  background: var(--white);
}
.upload-zone:hover { border-color: var(--brown); background: rgba(90,60,48,0.02); }
.upload-zone-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.upload-zone p { font-size: 0.85rem; color: var(--text-soft); margin-bottom: 0.25rem; }
.upload-zone span { font-size: 0.72rem; color: var(--muted); }
.upload-zone-preview { display: none; max-width: 100%; border-radius: var(--r-md); margin-top: 0.75rem; }

/* Add to Cart */
.product-buy-row {
  display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem;
}
.qty-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--cream-3); border-radius: var(--r-pill);
  overflow: hidden; background: var(--white);
}
.qty-wrap-btn {
  width: 40px; height: 46px; border: none; background: none;
  cursor: pointer; font-size: 1.2rem; color: var(--text-soft);
  transition: background var(--t-fast);
  display: flex; align-items: center; justify-content: center;
}
.qty-wrap-btn:hover { background: var(--cream-2); }
.qty-wrap-num {
  width: 44px; text-align: center; font-size: 1rem; font-weight: 500;
  border: none; outline: none; background: none;
  -moz-appearance: textfield;
}
.qty-wrap-num::-webkit-outer-spin-button,
.qty-wrap-num::-webkit-inner-spin-button { -webkit-appearance: none; }

.add-to-cart-btn {
  flex: 1; padding: 0.85rem 1.5rem;
  background: var(--brown); color: var(--white);
  border: none; border-radius: var(--r-pill);
  font-size: 0.95rem; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: all var(--t-base);
  box-shadow: 0 4px 16px rgba(90,60,48,0.3);
}
.add-to-cart-btn:hover { background: var(--brown-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(90,60,48,0.38); }
.add-to-cart-btn:active { transform: translateY(0); }

.product-trust {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.product-trust-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--muted);
}

@media (max-width: 800px) {
  .product-layout-inner { grid-template-columns: 1fr; gap: 2rem; }
  .product-gallery { position: static; }
  .gallery-main { aspect-ratio: 4/3; }
}
@media (max-width: 480px) {
  .product-buy-row { flex-direction: column; }
  .add-to-cart-btn, .qty-wrap { width: 100%; justify-content: center; }
}

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-page { background: var(--cream); }

.checkout-nav {
  position: sticky; top: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 var(--pad-x);
  background: var(--white);
  border-bottom: 1px solid var(--cream-2);
}
.checkout-nav-inner {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.checkout-steps {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--muted);
}
.checkout-step-label { color: var(--muted); transition: color var(--t-fast); }
.checkout-step-label.active { color: var(--brown); font-weight: 500; }
.checkout-step-sep { color: var(--cream-3); }

.checkout-layout {
  padding: 2.5rem var(--pad-x) 5rem;
}
.checkout-layout-inner {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 360px;
  gap: 2.5rem; align-items: start;
}

/* Steps */
.checkout-card {
  background: var(--white); border-radius: var(--r-xl);
  padding: 2rem; box-shadow: var(--shadow-sm);
}
.checkout-step-panel { display: none; }
.checkout-step-panel.active { display: block; }

.checkout-step-title {
  font-size: 1.5rem; font-weight: 300; margin-bottom: 2rem;
}

/* Cart review items */
.review-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--cream-2);
}
.review-item:last-child { border-bottom: none; }
.review-item-img {
  width: 60px; height: 60px; border-radius: var(--r-md); flex-shrink: 0;
  overflow: hidden; background: var(--cream-2);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.review-item-img img { width: 100%; height: 100%; object-fit: cover; }
.review-item-info { flex: 1; min-width: 0; }
.review-item-name { font-weight: 500; font-size: 0.9rem; margin-bottom: 0.15rem; }
.review-item-custom { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.review-item-qty { font-size: 0.78rem; color: var(--muted); }
.review-item-price { font-weight: 600; color: var(--brown); font-size: 0.95rem; flex-shrink: 0; }

/* Forms */
.checkout-form-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 2rem; flex-wrap: wrap;
}

/* Payment */
.payment-option {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; border: 2px solid var(--cream-3);
  border-radius: var(--r-lg); cursor: pointer; margin-bottom: 0.75rem;
  transition: border-color var(--t-fast);
}
.payment-option.selected { border-color: var(--brown); background: rgba(90,60,48,0.03); }
.payment-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--muted-2); flex-shrink: 0;
  position: relative; transition: border-color var(--t-fast);
}
.payment-option.selected .payment-radio { border-color: var(--brown); }
.payment-option.selected .payment-radio::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--brown);
}
.payment-label { flex: 1; }
.payment-label-name { font-weight: 500; font-size: 0.9rem; }
.payment-label-desc { font-size: 0.78rem; color: var(--muted); }

.payment-secure-note {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; color: var(--muted);
  padding: 0.75rem 1rem; background: var(--cream);
  border-radius: var(--r-md); margin-bottom: 1.5rem;
}

/* Order Summary sidebar */
.order-summary-card {
  background: var(--white); border-radius: var(--r-xl);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--nav-h) + 1.5rem);
}
.order-summary-title {
  font-size: 1.1rem; font-weight: 500; margin-bottom: 1.25rem;
}
.summary-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--cream-2);
}
.summary-item:last-of-type { border-bottom: none; }
.summary-item-img {
  width: 40px; height: 40px; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--cream-2); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.summary-item-img img { width: 100%; height: 100%; object-fit: cover; }
.summary-item-name { flex: 1; font-size: 0.82rem; font-weight: 500; }
.summary-item-price { font-size: 0.82rem; font-weight: 600; color: var(--brown); }

.summary-totals { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--cream-2); }
.summary-row {
  display: flex; justify-content: space-between;
  font-size: 0.875rem; padding: 0.35rem 0;
}
.summary-row.total {
  font-weight: 600; font-size: 1rem;
  border-top: 1.5px solid var(--cream-3); margin-top: 0.5rem; padding-top: 0.85rem;
}
.summary-row.total span:last-child {
  font-family: 'Cormorant Garamond', serif; font-size: 1.4rem;
  font-weight: 400; color: var(--brown);
}
.summary-brand-note {
  margin-top: 1.25rem; padding: 0.75rem;
  background: var(--cream); border-radius: var(--r-md);
  font-size: 0.75rem; color: var(--muted); text-align: center;
}

@media (max-width: 800px) {
  .checkout-layout-inner { grid-template-columns: 1fr; }
  .order-summary-card { position: static; }
}
@media (max-width: 480px) {
  .checkout-card { padding: 1.25rem; }
  .checkout-form-actions { flex-direction: column-reverse; }
  .checkout-form-actions > * { width: 100%; }
}

/* ============================================================
   ORDER CONFIRMATION
   ============================================================ */
.confirm-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem var(--pad-x); background: var(--cream);
}
.confirm-card {
  background: var(--white); border-radius: var(--r-xl);
  padding: 3rem 2.5rem; max-width: 560px; width: 100%;
  box-shadow: var(--shadow-xl); text-align: center;
}
.confirm-icon { font-size: 4rem; margin-bottom: 1.25rem; animation: popIn 0.5s cubic-bezier(0.18,1.5,0.5,1); }
@keyframes popIn { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.confirm-title { font-size: 2.5rem; font-weight: 300; margin-bottom: 0.5rem; }
.confirm-subtitle { font-size: 0.95rem; color: var(--text-soft); line-height: 1.7; margin-bottom: 1.75rem; }

.confirm-details {
  background: var(--cream); border-radius: var(--r-lg);
  padding: 1.25rem; margin-bottom: 1.75rem; text-align: left;
}
.confirm-detail-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0.5rem 0; font-size: 0.875rem;
  border-bottom: 1px solid rgba(90,60,48,0.08);
}
.confirm-detail-row:last-child { border-bottom: none; }
.confirm-detail-label { color: var(--muted); }
.confirm-detail-value { font-weight: 500; text-align: right; max-width: 60%; }
.confirm-order-id { font-family: 'Courier New', monospace; color: var(--brown); }

.confirm-items { text-align: left; margin-bottom: 1.75rem; }
.confirm-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0; border-bottom: 1px solid var(--cream-2);
}
.confirm-item:last-child { border-bottom: none; }
.confirm-item-img {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--cream-2); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.confirm-item-img img { width: 100%; height: 100%; object-fit: cover; }
.confirm-item-name { flex: 1; font-size: 0.875rem; font-weight: 500; }
.confirm-item-price { font-size: 0.875rem; font-weight: 600; color: var(--brown); }

.confirm-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.confirm-footer-note { font-size: 0.75rem; color: var(--muted); }
.confirm-footer-note a { color: var(--brown); text-decoration: none; }

@media (max-width: 480px) {
  .confirm-card { padding: 2rem 1.25rem; }
  .confirm-actions { flex-direction: column; }
  .confirm-actions .btn { width: 100%; }
}

/* ============================================================
   AUTH PAGES (Login / Signup)
   ============================================================ */
.auth-page { background: var(--cream); min-height: 100vh; }

.auth-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* Left panel */
.auth-panel-left {
  background: var(--dark); position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 3rem;
}
.auth-panel-left::after {
  content: 'BRANDISBY';
  position: absolute; bottom: -3rem; left: -1rem;
  font-family: 'Cormorant Garamond', serif; font-size: 12rem; font-weight: 600;
  color: rgba(255,255,255,0.025); white-space: nowrap; pointer-events: none;
  letter-spacing: 0.05em; line-height: 1;
}
.auth-left-content { position: relative; z-index: 1; max-width: 360px; }
.auth-left-title { font-size: clamp(2.5rem, 4vw, 3.8rem); font-weight: 300; color: var(--white); line-height: 1.05; margin-bottom: 1.5rem; }
.auth-left-title em { font-style: italic; color: var(--gold); }
.auth-left-sub { font-size: 1rem; color: rgba(255,255,255,0.45); font-weight: 300; line-height: 1.75; margin-bottom: 2.5rem; }
.auth-left-features { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-feature { font-size: 0.875rem; color: rgba(255,255,255,0.55); display: flex; align-items: flex-start; gap: 0.6rem; }
.auth-feature::before { content: '✦'; color: var(--gold); flex-shrink: 0; margin-top: 0.1rem; }

/* Right panel */
.auth-panel-right {
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 3rem; overflow-y: auto;
}
.auth-form-wrap { width: 100%; max-width: 420px; }

.auth-back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--muted); text-decoration: none;
  margin-bottom: 2.5rem; transition: color var(--t-fast);
}
.auth-back-link:hover { color: var(--brown); }

.auth-heading { font-size: 2.2rem; font-weight: 300; margin-bottom: 0.35rem; }
.auth-sub { font-size: 0.875rem; color: var(--text-soft); margin-bottom: 2rem; }
.auth-sub a { color: var(--brown); text-decoration: none; font-weight: 500; }
.auth-sub a:hover { text-decoration: underline; }

/* Handle input */
.handle-wrap {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--cream-3); border-radius: var(--r-md);
  overflow: hidden; background: var(--white);
  transition: border-color var(--t-base);
}
.handle-wrap:focus-within { border-color: var(--brown); }
.handle-wrap .input {
  border: none; border-radius: 0; box-shadow: none;
  flex: 1;
}
.handle-wrap .input:focus { box-shadow: none; }
.handle-suffix {
  padding: 0.75rem 0.9rem; background: var(--cream);
  border-left: 1px solid var(--cream-3);
  font-size: 0.8rem; font-weight: 600; color: var(--brown);
  white-space: nowrap; display: flex; align-items: center;
  letter-spacing: 0.01em;
}
.handle-status { font-size: 0.75rem; margin-top: 0.3rem; min-height: 1rem; }
.handle-status.ok   { color: var(--green); }
.handle-status.taken { color: var(--red); }
.handle-status.checking { color: var(--muted); }

/* Color swatches */
.color-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.color-input { width: 44px; height: 44px; border: none; border-radius: var(--r-md); cursor: pointer; padding: 2px; background: none; }
.color-label-txt { font-family: 'Courier New', monospace; font-size: 0.82rem; }
.color-swatches { display: flex; gap: 0.4rem; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: border-color var(--t-fast);
}
.color-swatch.active, .color-swatch:hover { border-color: var(--dark); }

/* Logo upload */
.logo-upload-area {
  border: 2px dashed rgba(90,60,48,0.2); border-radius: var(--r-lg);
  padding: 1.5rem; cursor: pointer; transition: all var(--t-base);
  background: var(--white); text-align: center;
  display: flex; align-items: center; justify-content: center;
  min-height: 90px;
}
.logo-upload-area:hover { border-color: var(--brown); background: rgba(90,60,48,0.02); }

/* Step progress */
.auth-step { display: none; }
.auth-step.active { display: block; }

/* Success screen */
.auth-success { text-align: center; padding: 1rem 0; }
.auth-success-icon { font-size: 4rem; margin-bottom: 1rem; animation: popIn 0.5s cubic-bezier(0.18,1.5,0.5,1); }
.brand-link-box {
  background: var(--dark); border-radius: var(--r-md);
  padding: 0.9rem 1.25rem; display: inline-block; margin: 1rem 0;
  font-family: 'Courier New', monospace; font-size: 0.95rem; color: var(--gold-light);
}

@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 3rem 1.5rem; }
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-page { display: flex; background: #f0ebe6; min-height: 100vh; }

/* Sidebar */
.dash-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--dark);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 800;
  transition: transform var(--t-slow);
  overflow-y: auto;
}

.dash-sidebar-logo {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.dash-nav { flex: 1; padding: 1rem 0.75rem; }
.dash-nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 0.85rem; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 400; color: rgba(255,255,255,0.5);
  text-decoration: none; cursor: pointer; border: none;
  background: none; width: 100%; text-align: left;
  transition: all var(--t-fast); margin-bottom: 0.15rem;
}
.dash-nav-item:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.dash-nav-item.active { color: var(--white); background: rgba(90,60,48,0.45); }
.dash-nav-icon { font-size: 1rem; flex-shrink: 0; }
.dash-nav-divider {
  height: 1px; background: rgba(255,255,255,0.05);
  margin: 0.75rem 0.85rem;
}

.dash-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.dash-user { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.dash-user-av {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: rgba(90,60,48,0.5);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 600; color: var(--white);
  overflow: hidden;
}
.dash-user-av img { width: 100%; height: 100%; object-fit: cover; }
.dash-user-name { font-size: 0.82rem; font-weight: 500; color: var(--white); line-height: 1.2; }
.dash-user-email { font-size: 0.7rem; color: rgba(255,255,255,0.35); }
.dash-signout-btn {
  width: 100%; padding: 0.45rem; font-size: 0.78rem;
  color: rgba(255,255,255,0.35); background: none;
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--r-md);
  cursor: pointer; font-family: inherit; transition: all var(--t-fast);
}
.dash-signout-btn:hover { color: var(--white); border-color: rgba(255,255,255,0.2); }

/* Main area */
.dash-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* Topbar */
.dash-topbar {
  height: var(--nav-h); background: var(--white);
  border-bottom: 1px solid rgba(90,60,48,0.08);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.75rem; position: sticky; top: 0; z-index: 100;
  flex-shrink: 0;
}
.dash-topbar-left { display: flex; align-items: center; gap: 1rem; }
.dash-hamburger {
  display: none; width: 36px; height: 36px; border-radius: var(--r-md);
  border: none; background: var(--cream-2); cursor: pointer;
  align-items: center; justify-content: center; font-size: 1rem;
}
.dash-topbar-title { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 400; }

.dash-topbar-right { display: flex; align-items: center; gap: 1rem; }
.dash-store-link { font-family: 'Courier New', monospace; font-size: 0.72rem; color: var(--muted); }
.dash-view-store {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--brown); text-decoration: none;
  padding: 0.4rem 0.9rem; border: 1.5px solid rgba(90,60,48,0.22);
  border-radius: var(--r-pill); transition: all var(--t-fast);
}
.dash-view-store:hover { background: var(--brown); color: var(--white); border-color: var(--brown); }

/* Content */
.dash-content { flex: 1; padding: 2rem 1.75rem; overflow-y: auto; }

.dash-tab { display: none; }
.dash-tab.active { display: block; }

/* Stats */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem; margin-bottom: 2rem;
}
.stat-card {
  background: var(--white); border-radius: var(--r-lg);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.stat-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 300; color: var(--dark); line-height: 1; margin-bottom: 0.3rem;
}
.stat-value-sm { font-size: 0.82rem; font-family: 'Courier New', monospace; color: var(--brown); font-weight: normal; word-break: break-all; }
.stat-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Tables */
.dash-section-title { font-size: 1.1rem; font-weight: 500; margin-bottom: 1rem; }
.table-card { background: var(--white); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--cream); padding: 0.8rem 1.25rem;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; text-align: left; white-space: nowrap;
}
.data-table td {
  padding: 1rem 1.25rem; font-size: 0.875rem;
  border-bottom: 1px solid rgba(90,60,48,0.05);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(90,60,48,0.015); }
.table-empty { text-align: center; padding: 3rem !important; color: var(--muted); }
.table-wrap { overflow-x: auto; }

.table-action {
  padding: 0.3rem 0.75rem; font-size: 0.75rem;
  border: 1.5px solid var(--cream-3); border-radius: var(--r-sm);
  background: none; cursor: pointer; font-family: inherit; color: var(--text-soft);
  transition: all var(--t-fast); margin-right: 0.3rem;
}
.table-action:hover { background: var(--brown); color: var(--white); border-color: var(--brown); }
.table-action.danger:hover { background: var(--red); border-color: var(--red); }

/* Dashboard tab headers */
.dash-tab-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.dash-tab-heading { font-size: 1.6rem; font-weight: 300; }

/* Settings grid */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.settings-card { background: var(--white); border-radius: var(--r-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.settings-card-title { font-size: 1.1rem; font-weight: 500; margin-bottom: 1.5rem; }

/* Toggle switch */
.toggle-label { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; user-select: none; font-size: 0.875rem; }
.toggle-input { display: none; }
.toggle-track {
  width: 40px; height: 22px; background: var(--cream-3);
  border-radius: var(--r-pill); position: relative; flex-shrink: 0;
  transition: background var(--t-base);
}
.toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); box-shadow: var(--shadow-sm);
  transition: transform var(--t-base);
}
.toggle-input:checked + .toggle-track { background: var(--brown); }
.toggle-input:checked + .toggle-track::after { transform: translateX(18px); }

/* Custom options panel */
.custom-opts { background: var(--cream); border-radius: var(--r-md); padding: 1rem; margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.6rem; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(27,21,19,0.6);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity var(--t-base);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white); border-radius: var(--r-xl);
  width: 100%; max-width: 580px; max-height: 90dvh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-xl);
  transform: translateY(24px) scale(0.98); transition: transform var(--t-base);
}
.modal-backdrop.open .modal-box { transform: translateY(0) scale(1); }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem; border-bottom: 1px solid var(--cream-2); flex-shrink: 0;
}
.modal-title { font-size: 1.3rem; font-weight: 400; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--cream-2); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; color: var(--text-soft);
  transition: background var(--t-fast);
}
.modal-close:hover { background: var(--cream-3); }
.modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.modal-foot {
  padding: 1.25rem 1.5rem; border-top: 1px solid var(--cream-2);
  display: flex; justify-content: flex-end; gap: 0.75rem; flex-shrink: 0;
}

/* Img upload in modal */
.img-upload-area {
  border: 2px dashed rgba(90,60,48,0.2); border-radius: var(--r-md);
  padding: 1rem; text-align: center; cursor: pointer;
  transition: all var(--t-base); min-height: 80px;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.img-upload-area:hover { border-color: var(--brown); }
.img-upload-preview { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.img-upload-preview img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--r-sm); }

/* Dashboard responsive */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .dash-hamburger { display: flex; }
  .dash-store-link { display: none; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .dash-content { padding: 1.25rem 1rem; }
  .dash-topbar { padding: 0 1rem; }
  .dash-view-store span { display: none; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}
