/* ============================================================
   White Oak Vanity Ltd. — Custom CRM & Operations Design System
   Minimalist Scandinavian Luxury Aesthetic: Clean Sans-Serif, Muted Gray, Subtle Warm Oak
   ============================================================ */

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

:root {
  --wov-bg: #f8fafc;
  --wov-surface: #ffffff;
  --wov-surface-hover: #f1f5f9;
  --wov-dark: #0f172a;
  --wov-dark-surface: #1e293b;
  --wov-dark-border: rgba(255, 255, 255, 0.08);
  --wov-gold: #b5996a;
  --wov-gold-hover: #9c8254;
  --wov-gold-light: #fcfaf6;
  --wov-gold-border: #e6dcce;
  --wov-sand: #f8f6f0;
  --wov-sand-light: #fdfbf7;
  --wov-border: #e2e8f0;
  --wov-border-hairline: #f1f5f9;
  --wov-border-light: #f8fafc;
  --wov-text: #0f172a;
  --wov-text-muted: #64748b;
  --wov-text-light: #94a3b8;
  --wov-font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --wov-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --wov-font-mono: 'Inter', -apple-system, BlinkMacSystemFont, monospace;
  --wov-radius-sm: 6px;
  --wov-radius: 8px;
  --wov-radius-lg: 12px;
  --wov-shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
  --wov-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  --wov-shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.06);
  --wov-transition: all 0.15s ease;
  --sidebar-width: 250px;
  --topbar-height: 60px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--wov-font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--wov-text);
  background-color: var(--wov-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, .font-display {
  font-family: var(--wov-font-body);
  font-weight: 600;
  color: var(--wov-text);
  letter-spacing: -0.02em;
}

h1 { font-size: 1.6rem; line-height: 1.25; }
h2 { font-size: 1.35rem; line-height: 1.3; }
h3 { font-size: 1.15rem; line-height: 1.35; }
h4 { font-size: 1rem; line-height: 1.4; }

a {
  color: var(--wov-gold);
  text-decoration: none;
  transition: var(--wov-transition);
}
a:hover { color: var(--wov-gold-hover); }

/* Layout Shell */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--wov-dark);
  color: #e2e8f0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  border-right: 1px solid var(--wov-dark-border);
}

.sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--wov-dark-border);
}
.sidebar-logo-text {
  font-family: var(--wov-font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-transform: uppercase;
}
.sidebar-logo-sub {
  display: block;
  font-family: var(--wov-font-body);
  font-size: 0.68rem;
  color: var(--wov-gold);
  letter-spacing: 0.12em;
  font-weight: 600;
  text-transform: uppercase;
}
.sidebar-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--wov-gold), #8c7247);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-family: var(--wov-font-display);
  font-size: 1.1rem;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
.sidebar-menu-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  padding: 12px 10px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--wov-radius-sm);
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 500;
  transition: var(--wov-transition);
  margin-bottom: 2px;
}
.nav-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
  transition: var(--wov-transition);
  flex-shrink: 0;
}
.nav-link svg.icon-fill {
  fill: currentColor;
  stroke: none;
}
.nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}
.nav-link.active {
  background: rgba(181, 153, 106, 0.15);
  color: #ffffff;
  font-weight: 600;
  border-left: 3px solid var(--wov-gold);
}
.nav-link.active svg {
  stroke: var(--wov-gold);
}
.nav-link.active svg.icon-fill {
  fill: var(--wov-gold);
  stroke: none;
}
.nav-badge {
  margin-left: auto;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--wov-gold);
  color: #fff;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--wov-dark-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wov-gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}
.user-info {
  flex: 1;
  overflow: hidden;
}
.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-brand-subtitle {
  display: block;
  font-family: var(--wov-font-body);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--wov-gold);
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.9;
}

.sidebar-artisan-widget {
  margin: 12px 14px 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(181, 153, 106, 0.25);
  border-radius: var(--wov-radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-artisan-widget .artisan-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wov-dark-surface);
  border: 1px solid var(--wov-gold);
  color: var(--wov-gold);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-artisan-widget .artisan-details {
  flex: 1;
  min-width: 0;
}
.sidebar-artisan-widget .artisan-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.sidebar-artisan-widget .artisan-title {
  font-size: 0.64rem;
  color: #94a3b8;
  display: block;
  line-height: 1.2;
}
.sidebar-artisan-widget .artisan-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-height);
  background: var(--wov-surface);
  border-bottom: 1px solid var(--wov-border);
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
  overflow: hidden;
  box-sizing: border-box;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  color: var(--wov-dark);
  flex-shrink: 0;
}
.topbar-search {
  position: relative;
  flex: 1;
  max-width: 360px;
  min-width: 220px;
}
.topbar-search input {
  width: 100%;
  padding: 8px 64px 8px 38px;
  font-size: 0.83rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.topbar-search input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
.topbar-search input:focus {
  border-color: #b5996a;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(181, 153, 106, 0.16), 0 1px 3px rgba(0, 0, 0, 0.04);
}
.topbar-search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: #94a3b8;
  pointer-events: none;
  transition: stroke 0.2s ease;
}
.topbar-search:focus-within svg {
  stroke: #b5996a;
}
.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-family: var(--wov-font-mono, monospace);
  color: #94a3b8;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 2px 7px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #64748b;
  padding: 4px 8px;
}
.topbar-meta-item .location-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}
.topbar-currency-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #0f172a;
}

.topbar-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: var(--wov-surface);
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius-sm);
  color: var(--wov-text);
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--wov-transition);
  text-decoration: none;
}
.topbar-wa-btn:hover {
  background: var(--wov-surface-hover);
  border-color: #10b981;
  color: #065f46;
}
.topbar-wa-btn svg {
  color: #10b981;
  stroke: #10b981;
}
.wa-ping-wrap {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
  align-items: center;
  justify-content: center;
}
.wa-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #34d399;
  opacity: 0.75;
  animation: waPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.wa-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}
@keyframes waPing {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}
.topbar-wa-btn .wa-name {
  padding: 1px 6px;
  border-radius: 4px;
  background: #e6f4ea;
  color: #137333;
  font-size: 0.68rem;
  font-weight: 700;
}
.topbar-cta {
  box-shadow: 0 2px 6px rgba(181, 153, 106, 0.25);
}

.content-container {
  padding: 28px;
  flex: 1;
}

/* Page Headers */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 0.86rem;
  color: var(--wov-text-muted);
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--wov-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--wov-transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}
.btn-primary {
  background: var(--wov-dark);
  color: #ffffff;
  border-color: var(--wov-dark);
}
.btn-primary:hover {
  background: #232a36;
  color: #fff;
}
.btn-gold {
  background: linear-gradient(135deg, var(--wov-gold), #9c8254);
  color: #ffffff;
}
.btn-gold:hover {
  filter: brightness(1.06);
  color: #fff;
}
.btn-secondary {
  background: var(--wov-surface);
  color: var(--wov-text);
  border-color: var(--wov-border);
}
.btn-secondary:hover {
  background: var(--wov-surface-hover);
  border-color: #d1d5db;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}
.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}

/* Cards & Surfaces */
.card {
  background: var(--wov-surface);
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius);
  box-shadow: var(--wov-shadow-sm);
  padding: 20px;
  margin-bottom: 24px;
  transition: var(--wov-transition);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--wov-border-light);
}
.card-title {
  font-size: 1.15rem;
  font-weight: 600;
}

/* Metric / Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--wov-surface);
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--wov-shadow-sm);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--wov-gold);
}
.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wov-text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: var(--wov-font-display);
  color: var(--wov-dark);
  line-height: 1.1;
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--wov-text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-trend-up { color: #10b981; font-weight: 600; }
.stat-trend-down { color: #ef4444; font-weight: 600; }

/* 9-Stage Production Sequence Tracker */
.production-tracker {
  display: flex;
  align-items: center;
  background: var(--wov-surface);
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius);
  padding: 16px 20px;
  overflow-x: auto;
  gap: 8px;
  margin-bottom: 24px;
}
.tracker-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--wov-radius-sm);
  background: var(--wov-surface-hover);
  border: 1px solid var(--wov-border-light);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--wov-text-muted);
  white-space: nowrap;
  transition: var(--wov-transition);
}
.tracker-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.tracker-step.active {
  background: rgba(181, 153, 106, 0.12);
  border-color: var(--wov-gold);
  color: var(--wov-dark);
  font-weight: 600;
}
.tracker-step.active .tracker-num {
  background: var(--wov-gold);
  color: #fff;
}
.tracker-step.completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.tracker-step.completed .tracker-num {
  background: #10b981;
  color: #fff;
}
.tracker-arrow {
  color: var(--wov-border);
  font-size: 0.8rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
}
.badge-primary { background: #e0e7ff; color: #3730a3; }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-accent { background: var(--wov-gold-light); color: var(--wov-gold-dark); border: 1px solid var(--wov-gold-border); }

.badge-stage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 6px;
  font-size: 0.74rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}
.badge-step {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #475569;
  color: #fff;
  font-size: 0.62rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Data Tables */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius);
  background: var(--wov-surface);
  box-shadow: var(--wov-shadow-sm);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}
.data-table th {
  background: var(--wov-surface-hover);
  padding: 12px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wov-text-muted);
  border-bottom: 1px solid var(--wov-border);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--wov-border-light);
  color: var(--wov-text);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background-color: var(--wov-surface-hover);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wov-dark);
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-family: inherit;
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius-sm);
  background: #ffffff;
  color: var(--wov-text);
  outline: none;
  transition: var(--wov-transition);
}
.form-control:focus {
  border-color: var(--wov-gold);
  box-shadow: 0 0 0 3px var(--wov-gold-glow);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}
.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.form-col {
  flex: 1;
  min-width: 200px;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}
.kanban-col {
  flex: 0 0 300px;
  background: var(--wov-surface-hover);
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--wov-border);
}
.kanban-col-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--wov-dark);
}
.kanban-col-total {
  font-size: 0.75rem;
  color: var(--wov-gold-dark);
  font-weight: 600;
}
.kanban-items {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kanban-card {
  background: #ffffff;
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius-sm);
  padding: 12px;
  box-shadow: var(--wov-shadow-sm);
  cursor: pointer;
  transition: var(--wov-transition);
}
.kanban-card:hover {
  border-color: var(--wov-gold);
  transform: translateY(-2px);
  box-shadow: var(--wov-shadow);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 22, 30, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: var(--wov-surface);
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius-lg);
  box-shadow: var(--wov-shadow-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.modal-overlay.active .modal-box {
  transform: scale(1);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--wov-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--wov-border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--wov-surface-hover);
  border-radius: 0 0 var(--wov-radius-lg) var(--wov-radius-lg);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--wov-dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--wov-radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: var(--wov-shadow-lg);
  border-left: 4px solid var(--wov-gold);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
}
.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }
.toast-warning { border-left-color: #f59e0b; }
@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
  .atelier-location-badge { display: none !important; }
}
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .mobile-toggle {
    display: block;
  }
  .content-container {
    padding: 18px;
  }
}
@media (max-width: 768px) {
  .topbar-cad-badge { display: none !important; }
  .topbar-search { max-width: 180px; min-width: 120px; }
  .topbar-search input { padding: 6px 12px 6px 32px; font-size: 0.78rem; }
  .search-kbd { display: none !important; }
}


/* ============================================================
   Stitch Luxury Atelier UI Components & Design Tokens
   ============================================================ */

.dashboard-atelier-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--wov-border-hairline);
  padding-bottom: 20px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.atelier-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #725b31;
  background: var(--wov-sand);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.atelier-intro-title {
  font-family: var(--wov-font-display);
  font-size: 2.1rem;
  font-weight: 500;
  color: var(--wov-dark);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.atelier-intro-desc {
  font-size: 0.86rem;
  color: var(--wov-text-muted);
  max-width: 680px;
  margin-top: 4px;
  line-height: 1.5;
}
.kiln-telemetry-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--wov-surface);
  border: 1px solid var(--wov-border);
  padding: 10px 16px;
  border-radius: var(--wov-radius);
  box-shadow: var(--wov-shadow-sm);
}
.kiln-pill-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wov-text-light);
  display: block;
}
.kiln-pill-val {
  font-family: var(--wov-font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--wov-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kiln-pill-val .calibrated {
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 500;
}

/* 4-Card Minimalist KPI Stat Grid */
.stat-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card-luxury {
  background: #ffffff;
  border: 1px solid var(--wov-border);
  border-radius: var(--wov-radius);
  padding: 18px 20px;
  position: relative;
  box-shadow: var(--wov-shadow-sm);
  transition: var(--wov-transition);
}
.stat-card-luxury:hover {
  border-color: #cbd5e1;
  box-shadow: var(--wov-shadow);
}
.stat-card-luxury::before {
  display: none !important;
}

.stat-card-luxury .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.stat-card-luxury .card-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--wov-text-muted);
}
.stat-card-luxury .card-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: var(--wov-radius-sm);
  background: var(--wov-surface-hover);
  border: 1px solid var(--wov-border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wov-text-muted);
}
.stat-card-luxury .card-value {
  font-family: var(--wov-font-body);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--wov-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.stat-card-luxury .card-value-sub {
  font-family: var(--wov-font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--wov-text-muted);
  margin-left: 4px;
}
.stat-card-luxury .card-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--wov-text-muted);
}
.stat-card-luxury .badge-trend-up {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  color: #065f46;
  font-weight: 700;
  font-size: 0.7rem;
}

/* Workshop 9-Stage Horizontal Sequence Matrix */
.workshop-sequence-card {
  background: var(--wov-surface);
  border: 1px solid var(--wov-border-hairline);
  border-radius: var(--wov-radius);
  padding: 22px;
  box-shadow: var(--wov-shadow-sm);
  margin-bottom: 24px;
}
.workshop-sequence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--wov-border-hairline);
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.sequence-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sequence-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--wov-radius-sm);
  background: var(--wov-sand);
  color: #725b31;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sequence-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.74rem;
  color: var(--wov-text-muted);
}
.legend-dot-gold {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--wov-gold);
  display: inline-block;
  margin-right: 4px;
}
.legend-dot-gray {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #e2e8f0;
  display: inline-block;
  margin-right: 4px;
}

.sequence-matrix-scroll {
  overflow-x: auto;
  padding-bottom: 12px;
}
.sequence-matrix-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(130px, 1fr));
  gap: 10px;
  min-width: 1100px;
}
.stage-tile {
  background: var(--wov-surface-hover);
  border: 1px solid var(--wov-border-hairline);
  border-radius: var(--wov-radius-sm);
  padding: 12px;
  position: relative;
  transition: var(--wov-transition);
}
.stage-tile:hover {
  border-color: var(--wov-gold);
}
.stage-tile.active-commission {
  background: #fdfbf7;
  border: 2px solid var(--wov-gold);
  box-shadow: 0 2px 8px rgba(181, 153, 106, 0.15);
}
.stage-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.stage-tile-num {
  font-family: var(--wov-font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--wov-text-light);
  letter-spacing: 0.05em;
}
.stage-tile.active-commission .stage-tile-num {
  color: #725b31;
}
.stage-active-pill {
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--wov-gold);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
}
.stage-tile-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wov-dark);
  line-height: 1.3;
}
.stage-tile-sub {
  font-size: 0.68rem;
  color: var(--wov-text-muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stage-dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* Active Commissions Cards Row */
.active-commissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.commission-showcase-card {
  background: var(--wov-surface);
  border: 1px solid var(--wov-border-hairline);
  border-radius: var(--wov-radius-sm);
  padding: 14px;
  transition: var(--wov-transition);
}
.commission-showcase-card:hover {
  border-color: var(--wov-gold);
  box-shadow: var(--wov-shadow-sm);
}
.commission-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.commission-ref {
  font-family: var(--wov-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--wov-text-muted);
  background: var(--wov-surface-hover);
  padding: 2px 6px;
  border-radius: 3px;
}
.commission-stage-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #725b31;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.commission-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--wov-dark);
}
.commission-desc {
  font-size: 0.74rem;
  color: var(--wov-text-muted);
  margin-top: 3px;
  line-height: 1.4;
}
.commission-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--wov-border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
}
.commission-stone {
  color: var(--wov-text-muted);
  font-weight: 500;
}
.commission-status-ok {
  color: #065f46;
  font-weight: 600;
}

/* Bento 8 / 4 Grid Layout */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (min-width: 1200px) {
  .bento-grid {
    grid-template-columns: 8fr 4fr;
  }
}

/* Artisan Capacity & Shop Health Widget */
.capacity-card {
  background: var(--wov-surface);
  border: 1px solid var(--wov-border-hairline);
  border-radius: var(--wov-radius);
  padding: 20px;
  box-shadow: var(--wov-shadow-sm);
  margin-bottom: 18px;
}
.capacity-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--wov-border-hairline);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.capacity-card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--wov-dark);
}
.capacity-rate-badge {
  font-family: var(--wov-font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: #725b31;
}
.capacity-bar-group {
  margin-bottom: 14px;
}
.capacity-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--wov-text);
  margin-bottom: 5px;
}
.capacity-bar-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.capacity-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* WhatsApp Concierge Emma Desk Snippet */
.whatsapp-desk-card {
  background: var(--wov-surface);
  border: 1px solid var(--wov-border-hairline);
  border-radius: var(--wov-radius);
  padding: 20px;
  box-shadow: var(--wov-shadow-sm);
}
.whatsapp-desk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--wov-border-hairline);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.wa-status-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wa-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}
.wa-chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.wa-chat-bubble {
  padding: 10px 12px;
  border-radius: var(--wov-radius-sm);
  font-size: 0.76rem;
  line-height: 1.4;
}
.wa-chat-client {
  background: var(--wov-surface-hover);
  border: 1px solid var(--wov-border-hairline);
  color: var(--wov-text);
  align-self: flex-start;
  max-width: 90%;
}
.wa-chat-emma {
  background: #fdfbf7;
  border: 1px solid var(--wov-gold-border);
  color: var(--wov-dark);
  align-self: flex-end;
  max-width: 90%;
}
.wa-bubble-sender {
  font-weight: 700;
  font-size: 0.7rem;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wa-bubble-time {
  font-size: 0.64rem;
  color: var(--wov-text-light);
  font-weight: normal;
}

