@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ================================================================
   CSS Reset & Base
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #f7f7f7;
  color: #000;
  margin: 0;
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
}

/* ================================================================
   Design Tokens
   ================================================================ */
:root {
  --violet: #660066;
  --violet-50: #faf0fa;
  --violet-100: #f0d6f0;
  --violet-200: #dba8db;
  --violet-300: #c278c2;
  --violet-400: #a34da3;
  --violet-500: #862786;
  --violet-600: #660066;
  --violet-700: #550055;
  --violet-800: #440044;
  --violet-900: #330033;
  --violet-950: #1f001f;
  --yellow: #FFEB00;
  --yellow-50: #fffde6;
  --yellow-100: #fffacc;
  --yellow-200: #fff599;
  --yellow-300: #fff066;
  --yellow-400: #FFEB00;
  --yellow-500: #e6d400;
  --yellow-600: #ccbc00;
  --sak-bg: #f7f7f7;
  --sak-border: #e0e0e0;
  --sak-text: #000000;
  --sak-mid: #6b6b6b;
  --sak-dark: #1c1c1c;
  --radius: 3px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

/* ================================================================
   Layout: Sidebar + Main
   ================================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: var(--violet-950);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow: hidden;
}

.sidebar-accent {
  height: 4px;
  background: var(--yellow);
  width: 100%;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo .logo-img {
  height: 20px;
  filter: brightness(0) invert(1);
}

.sidebar-logo .logo-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-item.active {
  background: var(--violet-600);
  color: #fff;
}

.nav-item svg {
  flex-shrink: 0;
}

.nav-admin-section {
  margin-top: 8px;
}

.nav-admin-label {
  padding: 16px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
}

.sidebar-user {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--violet-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.user-email {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.logout-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 4px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Main wrapper */
.main-wrapper {
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================================================================
   Demo Banner
   ================================================================ */
.demo-banner {
  background: var(--yellow);
  padding: 8px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--sak-dark);
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  z-index: 35;
}

/* ================================================================
   Topbar
   ================================================================ */
.topbar {
  position: sticky;
  top: 30px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  border-bottom: 1px solid var(--sak-border);
  background: #fff;
  padding: 0 24px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sak-text);
  white-space: nowrap;
}

.topbar-search {
  position: relative;
  margin-left: 16px;
}

.topbar-search-input {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  padding: 6px 12px 6px 30px;
  border: 1px solid var(--sak-border);
  border-radius: var(--radius);
  background: var(--sak-bg);
  width: 200px;
  outline: none;
  transition: border-color 0.15s, width 0.2s;
}

.topbar-search-input:focus {
  border-color: var(--violet-300);
  width: 260px;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--sak-mid);
  margin-left: auto;
}

.topbar-contact a:hover {
  color: var(--violet);
  transition: color 0.15s;
}

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

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--sak-text);
}

.cart-btn:hover {
  background: var(--sak-bg);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--yellow-400);
  color: var(--violet-950);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================================================
   Content Area
   ================================================================ */
.content {
  flex: 1;
  padding: 24px;
  margin-top: 30px; /* offset for demo banner */
}

/* ================================================================
   Footer
   ================================================================ */
.footer {
  border-top: 1px solid var(--sak-border);
  background: #fff;
  padding: 16px 24px;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--sak-mid);
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left strong {
  color: var(--sak-dark);
}

.footer-left a:hover {
  color: var(--violet);
}

/* ================================================================
   Buttons
   ================================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--violet);
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary:hover {
  background: var(--violet-700);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: #fff;
  color: var(--sak-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--sak-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  line-height: 1.4;
}

.btn-secondary:hover {
  background: #fafafa;
  border-color: #999;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--yellow);
  color: #000;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  line-height: 1.4;
}

.btn-accent:hover {
  background: var(--yellow-500);
}

.btn-accent:active {
  transform: scale(0.98);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: #dc2626;
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  line-height: 1.4;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ================================================================
   Inputs
   ================================================================ */
.input-field {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  border: 1px solid #979797;
  border-radius: var(--radius);
  background: #fff;
  height: calc(2.5rem + 2px);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.input-field:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 0.2rem rgba(102,0,102,0.25);
}

.input-field::placeholder {
  color: var(--sak-mid);
}

textarea.input-field {
  height: auto;
  resize: vertical;
}

select.input-field {
  appearance: auto;
  cursor: pointer;
}

.label-field {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sak-mid);
  margin-bottom: 6px;
}

/* ================================================================
   Cards
   ================================================================ */
.card {
  background: #fff;
  border: 1px solid var(--sak-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

/* ================================================================
   Badges
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 2px;
}

.badge-violet {
  background: rgba(102,0,102,0.1);
  color: #660066;
}

.badge-yellow {
  background: rgba(255,235,0,0.25);
  color: #7a6d00;
}

.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.badge-red {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-gray {
  background: #f3f4f6;
  color: #6b7280;
}

/* ================================================================
   Toast Notifications
   ================================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideInUp 0.3s ease-out;
}

.toast-success {
  background: #16a34a;
}

.toast-error {
  background: #dc2626;
}

.toast-info {
  background: var(--violet);
}

/* ================================================================
   Modal / Overlay
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: #fff;
  border-radius: 6px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideInUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--sak-border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--sak-mid);
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: var(--sak-text);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--sak-border);
}

/* ================================================================
   Grid Utilities
   ================================================================ */
.grid { display: grid; gap: 20px; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ================================================================
   Category Cards (Dashboard)
   ================================================================ */
.category-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.category-header {
  background: var(--violet);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.category-header-left svg {
  opacity: 0.8;
}

.category-header-left span {
  font-weight: 600;
  font-size: 14px;
}

.category-count {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
}

.category-image {
  position: relative;
  background: linear-gradient(to bottom, #f9fafb, #fff);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  overflow: hidden;
}

.category-image img {
  max-height: 160px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
  transition: opacity 0.2s;
}

.category-products {
  flex: 1;
  padding: 0 20px 12px;
}

.category-products .product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--sak-border);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s;
}

.category-products .product-row:last-child {
  border-bottom: none;
}

.category-products .product-row:hover {
  color: var(--violet);
}

.product-row-left {
  flex: 1;
  min-width: 0;
}

.product-row-name {
  font-size: 14px;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-row-format {
  font-size: 11px;
  color: var(--sak-mid);
}

.product-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  flex-shrink: 0;
}

.product-row-price {
  font-size: 12px;
  color: var(--sak-mid);
}

.category-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--sak-border);
  background: rgba(249,250,251,0.5);
  display: flex;
  justify-content: flex-end;
}

.category-footer a {
  font-size: 12px;
  font-weight: 700;
  color: var(--violet);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.category-footer a:hover {
  color: var(--violet-700);
}

/* ================================================================
   Product Detail
   ================================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--sak-mid);
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--violet);
}

.breadcrumb .sep {
  color: rgba(107,107,107,0.5);
}

.breadcrumb .current {
  color: var(--sak-dark);
  font-weight: 500;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.product-image-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--sak-border);
  border-radius: 4px;
  padding: 40px;
  min-height: 480px;
}

.product-image-box img {
  max-height: 440px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.specs-table {
  width: 100%;
  border: 1px solid var(--sak-border);
  border-radius: 4px;
  overflow: hidden;
}

.specs-table tr:nth-child(even) {
  background: #fff;
}

.specs-table tr:nth-child(odd) {
  background: #f9fafb;
}

.specs-table td {
  padding: 10px 16px;
  font-size: 14px;
}

.specs-table td:first-child {
  font-weight: 600;
  color: var(--sak-dark);
  width: 33%;
}

.specs-table td:last-child {
  color: var(--sak-mid);
}

/* Tier selection */
.tier-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--sak-border);
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: left;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.tier-btn:hover:not(:disabled) {
  border-color: #999;
}

.tier-btn.selected {
  border-color: var(--violet);
  background: var(--violet-50);
  box-shadow: 0 0 0 2px rgba(102,0,102,0.2);
}

.tier-btn:disabled {
  background: #f3f4f6;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

.tier-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tier-btn.selected .tier-radio {
  border-color: var(--violet);
}

.tier-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
  display: none;
}

.tier-btn.selected .tier-radio-dot {
  display: block;
}

.tier-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--violet-50);
  border: 1px solid var(--violet-200);
  border-radius: 8px;
  padding: 12px 16px;
}

.tier-summary .qty {
  font-size: 14px;
  color: var(--violet-700);
}

.tier-summary .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--violet-700);
}

/* ================================================================
   Price Tiers Table (in category detail/product page)
   ================================================================ */
.price-table {
  width: 100%;
  font-size: 14px;
  background: #f9fafb;
  border: 1px solid var(--sak-border);
  border-radius: 3px;
  overflow: hidden;
}

.price-table thead tr {
  border-bottom: 1px solid var(--sak-border);
}

.price-table th {
  padding: 6px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--sak-mid);
}

.price-table th:last-child,
.price-table td:last-child {
  text-align: right;
}

.price-table th:nth-child(2),
.price-table td:nth-child(2) {
  text-align: right;
}

.price-table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--sak-border);
}

.price-table tr:last-child td {
  border-bottom: none;
}

/* ================================================================
   Cart Table
   ================================================================ */
.cart-table {
  width: 100%;
}

.cart-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sak-mid);
  background: rgba(249,250,251,0.5);
  border-bottom: 1px solid var(--sak-border);
}

.cart-table tbody td {
  padding: 16px;
  border-bottom: 1px solid var(--sak-border);
  font-size: 14px;
  vertical-align: middle;
}

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

.cart-table tbody tr:hover {
  background: rgba(249,250,251,0.5);
}

.remove-btn {
  padding: 6px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--sak-mid);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* ================================================================
   Order Summary sidebar
   ================================================================ */
.order-summary {
  position: sticky;
  top: 96px;
}

/* ================================================================
   Checkout Form
   ================================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--sak-mid);
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--violet);
  width: 16px;
  height: 16px;
}

/* ================================================================
   History / Orders Table
   ================================================================ */
.orders-table {
  width: 100%;
  font-size: 14px;
}

.orders-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sak-mid);
  border-bottom: 1px solid var(--sak-border);
  background: rgba(249,250,251,0.5);
}

.orders-table .order-row {
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--sak-border);
}

.orders-table .order-row:hover {
  background: rgba(249,250,251,0.5);
}

.orders-table .order-row td {
  padding: 12px 16px;
}

.order-detail {
  background: rgba(249,250,251,0.8);
  padding: 16px 24px;
  border-bottom: 1px solid var(--sak-border);
}

.order-detail-table {
  width: 100%;
  font-size: 14px;
  margin-bottom: 12px;
}

.order-detail-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--sak-mid);
  padding-bottom: 8px;
}

.order-detail-table th:last-child,
.order-detail-table td:last-child {
  text-align: right;
}

.order-detail-table td {
  padding: 4px 0;
}

/* ================================================================
   Admin Stats Cards
   ================================================================ */
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.violet { background: var(--violet-50); color: var(--violet); }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.yellow { background: #fef9c3; color: #ca8a04; }
.stat-icon.blue { background: #dbeafe; color: #2563eb; }

.stat-label {
  font-size: 12px;
  color: var(--sak-mid);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--sak-dark);
}

/* ================================================================
   Admin Products Table
   ================================================================ */
.products-table {
  width: 100%;
  font-size: 14px;
}

.products-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sak-mid);
  border-bottom: 1px solid var(--sak-border);
  background: rgba(249,250,251,0.5);
}

.products-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--sak-border);
  vertical-align: middle;
}

.products-table tbody tr:hover {
  background: rgba(249,250,251,0.5);
}

/* ================================================================
   Login Page
   ================================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
}

.login-brand {
  position: relative;
  width: 60%;
  background: var(--violet-950);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--violet-950), rgba(85,0,85,0.8), var(--violet-950));
}

.login-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(102,0,102,0.4), transparent 70%);
}

.login-brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 480px;
}

.login-brand-content .logo-img {
  height: 48px;
  filter: brightness(0) invert(1);
  margin-bottom: 32px;
}

.login-brand-content h1 {
  font-size: 36px;
  color: #fff;
  margin-bottom: 12px;
}

.login-brand-divider {
  width: 64px;
  height: 4px;
  background: var(--yellow);
  margin: 0 auto 16px;
}

.login-brand-content p {
  color: var(--violet-300);
  font-size: 18px;
}

.login-brand-footer {
  position: absolute;
  bottom: 32px;
  z-index: 1;
  font-size: 12px;
  color: rgba(163,77,163,0.6);
  text-align: center;
}

.login-form-panel {
  width: 40%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.login-form {
  width: 100%;
  max-width: 384px;
}

.login-form h2 {
  font-size: 24px;
  margin-bottom: 32px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form .password-wrapper {
  position: relative;
}

.login-form .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sak-mid);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.login-form .toggle-password:hover {
  color: var(--sak-text);
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 14px;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-out;
}

/* ================================================================
   Offerte / Confirmation page
   ================================================================ */
.success-header {
  text-align: center;
  margin-bottom: 32px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.success-icon svg {
  color: #16a34a;
}

.info-box {
  background: var(--violet-50);
  border: 1px solid var(--violet-200);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  gap: 12px;
}

.info-box svg {
  color: var(--violet);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-box p {
  font-size: 14px;
  color: var(--violet-700);
}

/* ================================================================
   Category Detail View
   ================================================================ */
.category-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
}

.product-list-sidebar .list-header {
  background: var(--violet);
  padding: 10px 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-list-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 1px solid var(--sak-border);
  border-left: 3px solid transparent;
  transition: background 0.15s;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.product-list-item:hover {
  background: #f9fafb;
}

.product-list-item.selected {
  background: var(--violet-50);
  border-left-color: var(--violet);
}

.product-list-thumb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border-radius: 3px;
  overflow: hidden;
}

.product-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-list-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--sak-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-list-item.selected .product-list-name {
  color: var(--violet);
}

.product-list-format {
  font-size: 11px;
  color: var(--sak-mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================================================================
   Spinner
   ================================================================ */
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--violet-600);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
}

/* ================================================================
   Empty state
   ================================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 16px;
  animation: fadeIn 0.3s ease-out;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--sak-mid);
}

/* ================================================================
   Wizard / Web-to-Print Modal
   ================================================================ */
.wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
}

.wizard-step {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sak-mid);
  border-bottom: 3px solid var(--sak-border);
  transition: color 0.15s, border-color 0.15s;
}

.wizard-step.active {
  color: var(--violet);
  border-bottom-color: var(--violet);
}

.wizard-step.completed {
  color: #16a34a;
  border-bottom-color: #16a34a;
}

/* ================================================================
   Utility classes
   ================================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }
.text-violet { color: var(--violet); }
.text-mid { color: var(--sak-mid); }
.text-dark { color: var(--sak-dark); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mr-2 { margin-right: 8px; }
.ml-1 { margin-left: 4px; }
.ml-3 { margin-left: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.w-full { width: 100%; }
.max-w-sm { max-width: 384px; }
.max-w-md { max-width: 448px; }
.max-w-3xl { max-width: 768px; }
.max-w-5xl { max-width: 1024px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none; }
.block { display: block; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.border-t { border-top: 1px solid var(--sak-border); }
.border-b { border-bottom: 1px solid var(--sak-border); }
.bg-gray-50 { background: #f9fafb; }
.bg-white { background: #fff; }
.rounded-lg { border-radius: 8px; }
.whitespace-pre-line { white-space: pre-line; }

/* ================================================================
   Animations
   ================================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

.animate-slideInUp {
  animation: slideInUp 0.3s ease-out;
}

/* ================================================================
   Custom Scrollbar
   ================================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #979797;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 1024px) {
  .sidebar {
    display: none;
  }
  .main-wrapper {
    margin-left: 0;
  }
  .demo-banner {
    left: 0;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .category-detail {
    grid-template-columns: 1fr;
  }
  .login-brand {
    width: 100%;
    padding: 48px 24px;
  }
  .login-form-panel {
    width: 100%;
  }
  .login-page {
    flex-direction: column;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .topbar-contact {
    display: none;
  }
  .content {
    padding: 16px;
  }
}
