/* ═══════════════════════════════════════════════════════════════
   Rugs Trade Program TRADE PORTAL — Luxury Editorial Design System
   Inspired by LUXE RUG TRADE reference design
   Fonts: Noto Serif (headline) + Inter (body)
   Palette: Stone / Ivory / Charcoal / Gold
═══════════════════════════════════════════════════════════════ */

/* ─── Material Symbols ────────────────────────────────────────── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* ─── Custom Properties ───────────────────────────────────────── */
:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --stone-950: #0c0a09;

  --white: #ffffff;
  --ivory: #FDFAF5;

  --gold: #B8914A;
  --gold-light: #D4AC6A;
  --gold-muted: #9E7B3D;

  --error-red: #C0392B;
  --emerald: #059669;

  --font-display: 'Noto Serif', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --sidebar-width: 256px;
  --topbar-height: 80px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);

  --bg-main: #f9f9f7;
  --border-light: #e7e5e4;
  --border: #d6d3d1;
}

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--stone-800);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  font-family: var(--font-body);
}

input,
select,
textarea {
  font-family: var(--font-body);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
}

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

/* ═══════════════════════════════════════════════════════════════
   TOP NAVIGATION BAR
═══════════════════════════════════════════════════════════════ */
.topbar {
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stone-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.topbar-brand {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--stone-900);
  text-transform: uppercase;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-nav-link {
  font-size: 13px;
  color: var(--stone-500);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.topbar-nav-link:hover {
  color: var(--stone-900);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.topbar-icon-btn {
  color: var(--stone-500);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-icon-btn:hover {
  color: var(--stone-900);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 24px;
  border-left: 1px solid var(--stone-200);
}

.topbar-user-info {
  text-align: right;
}

.topbar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--stone-900);
  line-height: 1.2;
}

.topbar-user-role {
  font-size: 10px;
  color: var(--stone-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.topbar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--stone-800);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.u-initials {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ivory);
  font-weight: 400;
}

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--stone-200);
  background: var(--white);
  color: var(--stone-600);
  cursor: pointer;
  border-radius: 0;
}

/* ─── Flash Messages ──────────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  max-width: 320px;
  transition: opacity 0.4s;
}

.flash button {
  border: none;
  background: none;
  font-size: 14px;
  cursor: pointer;
  margin-left: 4px;
  opacity: 0.6;
}

.flash-success {
  background: #EDF7EE;
  color: #276028;
  border: 1px solid #C3E6C4;
}

.flash-error {
  background: #FDF2F1;
  color: #8B1A14;
  border: 1px solid #F5C6C3;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--stone-50);
  border-right: 1px solid var(--stone-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 99;
  transition: transform var(--transition);
  overflow-y: auto;
  padding: var(--topbar-height) 0 0;
}

.sidebar-logo-section {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--stone-200);
}

.sidebar-tier-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--stone-600);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.sidebar-tier-sub {
  font-size: 10px;
  color: var(--stone-400);
  font-style: italic;
  text-transform: lowercase;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-icon {
  font-size: 18px !important;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 500;
  color: var(--stone-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--stone-100);
  color: var(--stone-900);
}

.nav-item.active {
  background: var(--stone-200);
  color: var(--stone-900);
  font-weight: 700;
  transform: translateX(4px);
}

.sidebar-bottom {
  padding: 24px;
  border-top: 1px solid var(--stone-200);
  margin-top: auto;
}

.sidebar-cta-btn {
  display: block;
  width: 100%;
  background: var(--stone-800);
  color: var(--white);
  text-align: center;
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 20px;
  transition: background var(--transition);
  border: none;
  cursor: pointer;
}

.sidebar-cta-btn:hover {
  background: var(--stone-700);
}

.sidebar-footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-400);
  transition: color var(--transition);
}

.sidebar-footer-link:hover {
  color: var(--stone-900);
}

.sidebar-footer-link .material-symbols-outlined {
  font-size: 14px !important;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT CANVAS
═══════════════════════════════════════════════════════════════ */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  padding-top: 100px;
  padding-left: 10px;
  flex: 1;
}

.content-inner {
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
  animation: fade-in 0.25s ease;
}

/* ─── Page Header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.page-header-left h1 {
  font-size: 36px;
  color: var(--stone-900);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--stone-500);
}

.page-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--stone-300);
  background: var(--white);
  color: var(--stone-700);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border-radius: 0;
  font-family: var(--font-body);
}

.btn:hover {
  background: var(--stone-100);
}

.btn-primary {
  background: var(--stone-800);
  color: var(--white);
  border-color: var(--stone-800);
  box-shadow: 0 4px 16px rgba(28, 25, 23, 0.15);
}

.btn-primary:hover {
  background: var(--stone-700);
  border-color: var(--stone-700);
}

.btn-gold {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-muted);
}

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

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN DASHBOARD STAT CARDS — Bento Grid
═══════════════════════════════════════════════════════════════ */
.stats-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--white);
  border: 1px solid rgba(214, 211, 208, 0.4);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

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

.stat-card-dark {
  background: var(--stone-800);
  border: none;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(28, 25, 23, 0.2);
}

.stat-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--stone-400);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-family: var(--font-body);
}

.stat-card-dark .stat-label {
  color: rgba(255, 255, 255, 0.55);
}

.stat-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--stone-900);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.stat-card-dark .stat-value {
  color: var(--white);
}

.stat-delta {
  font-size: 11px;
  font-weight: 500;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 2px;
}

.stat-delta .material-symbols-outlined {
  font-size: 14px !important;
}

.stat-badge-urgent {
  background: var(--stone-200);
  color: var(--stone-700);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  text-transform: uppercase;
}

.stat-meta {
  font-size: 11px;
  color: var(--stone-400);
}

.stat-card-dark .stat-meta {
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN GRID
═══════════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  margin-bottom: 60px;
}

/* ─── Activity Table ──────────────────────────────────────────── */
.section-panel {
  background: var(--white);
  border: 1px solid rgba(214, 211, 208, 0.4);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.section-panel-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--stone-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-panel-header h2 {
  font-size: 20px;
  color: var(--stone-900);
}

.section-link {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-800);
  transition: all var(--transition);
}

.section-link:hover {
  text-decoration: underline;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead tr {
  background: var(--stone-50);
}

.data-table th {
  text-align: left;
  padding: 14px 32px;
  font-size: 9px;
  font-weight: 700;
  color: var(--stone-400);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.data-table td {
  padding: 20px 32px;
  font-size: 13px;
  border-bottom: 1px solid var(--stone-100);
  vertical-align: middle;
}

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

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(245, 245, 244, 0.5);
}

.td-primary {
  font-size: 13px;
  font-weight: 500;
  color: var(--stone-900);
}

.td-secondary {
  font-size: 11px;
  color: var(--stone-400);
  margin-top: 2px;
}

/* Status dot + label */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.status-dot-amber {
  background: #F59E0B;
}

.status-dot-blue {
  background: #3B82F6;
}

.status-dot-emerald {
  background: #10B981;
}

.status-dot-red {
  background: #EF4444;
}

.status-dot-purple {
  background: #8B5CF6;
}

.status-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.td-time {
  font-size: 11px;
  color: var(--stone-400);
  font-style: italic;
}

.td-action-btn {
  background: none;
  border: none;
  color: var(--stone-300);
  cursor: pointer;
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.td-action-btn:hover {
  color: var(--stone-900);
}

/* ─── Sidebar Content ─────────────────────────────────────────── */
.sidebar-widgets {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Featured card */
.featured-card {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--stone-900);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  color: white;
}

.featured-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.7s ease;
}

.featured-card:hover img {
  transform: scale(1.05);
}

.featured-card-content {
  position: relative;
  z-index: 1;
}

.featured-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.featured-title {
  font-size: 22px;
  font-family: var(--font-display);
  margin-bottom: 16px;
  line-height: 1.2;
}

.featured-btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: white;
  transition: all var(--transition);
  cursor: pointer;
  background: none;
  font-family: var(--font-body);
}

.featured-btn:hover {
  background: white;
  color: var(--stone-900);
}

/* Quick controls */
.quick-controls {
  background: var(--stone-100);
  border: 1px solid rgba(214, 211, 208, 0.4);
  padding: 32px;
}

.quick-controls-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone-700);
  margin-bottom: 20px;
  font-family: var(--font-body);
}

.quick-controls-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-control-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid rgba(214, 211, 208, 0.4);
  font-size: 11px;
  font-weight: 500;
  color: var(--stone-700);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.quick-control-btn:hover {
  transform: translateX(4px);
}

.quick-control-btn .material-symbols-outlined {
  font-size: 16px !important;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCTION CAPACITY SECTION
═══════════════════════════════════════════════════════════════ */
.production-section {
  padding-top: 32px;
  border-top: 1px solid var(--stone-200);
  margin-bottom: 40px;
}

.production-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.production-header h2 {
  font-size: 24px;
  color: var(--stone-900);
  letter-spacing: -0.01em;
}

.production-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--stone-500);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.production-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.production-card {
  background: var(--stone-100);
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-left: 4px solid var(--stone-800);
}

.production-card.secondary {
  border-left-color: var(--stone-300);
}

.production-card-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone-400);
  font-family: var(--font-body);
}

.production-card-bottom {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.production-pct {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--stone-900);
  line-height: 1;
}

.production-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--stone-200);
  border-radius: 2px;
  margin-bottom: 6px;
}

.production-bar-fill {
  height: 100%;
  background: var(--stone-800);
  border-radius: 2px;
}

.production-card.secondary .production-bar-fill {
  background: var(--stone-300);
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN TABS
═══════════════════════════════════════════════════════════════ */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--stone-200);
  flex-wrap: wrap;
}

.admin-tab-btn {
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-400);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1px;
  white-space: nowrap;
  font-family: var(--font-body);
}

.admin-tab-btn:hover {
  color: var(--stone-700);
}

.admin-tab-btn.active {
  color: var(--stone-900);
  border-bottom-color: var(--stone-800);
}

.hidden {
  display: none;
}

/* ─── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid rgba(214, 211, 208, 0.4);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

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

/* ─── Forms ───────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--stone-500);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid var(--stone-300);
  border-radius: 0;
  background: var(--white);
  color: var(--stone-800);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  font-family: var(--font-body);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--stone-600);
  box-shadow: 0 0 0 3px rgba(44, 40, 38, 0.08);
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.filter-select {
  padding: 6px 10px;
  border: 1px solid var(--stone-200);
  background: var(--white);
  font-size: 11px;
  color: var(--stone-700);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  height: 32px;
  border-radius: 0;
  font-family: var(--font-body);
}

.filter-select:focus {
  border-color: var(--stone-600);
}

/* ─── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: var(--font-body);
}

.badge-active,
.badge-approved {
  background: #ECFDF5;
  color: #065F46;
}

.badge-pending {
  background: #FFFBEB;
  color: #92400E;
}

.badge-production,
.badge-in-production,
.badge-weaving {
  background: #EFF6FF;
  color: #1E40AF;
}

.badge-sampling {
  background: #F5F3FF;
  color: #5B21B6;
}

.badge-shipped,
.badge-dispatched {
  background: #ECFEFF;
  color: #164E63;
}

.badge-completed,
.badge-delivered {
  background: var(--stone-100);
  color: var(--stone-500);
}

.badge-cancelled,
.badge-rejected {
  background: #FEF2F2;
  color: #991B1B;
}

.badge-new {
  background: var(--stone-100);
  color: var(--stone-600);
}

.badge-customizable {
  background: #FFFBEB;
  color: var(--gold-muted);
}

.badge-draft {
  background: var(--stone-100);
  color: var(--stone-400);
}

.badge-published {
  background: #ECFDF5;
  color: #065F46;
}

.badge-reviewed {
  background: #EFF6FF;
  color: #1E40AF;
}

.badge-ordered {
  background: #ECFEFF;
  color: #164E63;
}

.badge-finishing {
  background: #FFF7ED;
  color: #C2410C;
}

.badge-confirmed {
  background: #ECFDF5;
  color: #065F46;
}

.badge-member {
  background: var(--stone-100);
  color: var(--stone-500);
}

/* ─── Grid Layouts ────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.grid-auto {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ─── Sections ────────────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--stone-900);
}

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGES
═══════════════════════════════════════════════════════════════ */
.auth-wrap {
  display: flex;
  min-height: 100vh;
}

.auth-left {
  width: 460px;
  background: var(--stone-900);
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.auth-logo {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ivory);
  letter-spacing: 0.04em;
  margin-bottom: 48px;
}

.auth-headline h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
  color: var(--ivory);
  line-height: 1.3;
  margin-bottom: 16px;
}

.auth-headline p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
}

.auth-stats {
  display: flex;
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-stat-n {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold-light);
}

.auth-stat-l {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--stone-50);
}

.auth-form-box {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.auth-tab-bar {
  display: flex;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--stone-200);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-400);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.auth-tab.active {
  color: var(--stone-900);
  border-bottom-color: var(--stone-900);
}

.alert {
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid currentColor;
}

.alert-error {
  background: #FEF2F2;
  color: #991B1B;
}

.alert-success {
  background: #ECFDF5;
  color: #065F46;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — Welcome Banner (Designer View)
═══════════════════════════════════════════════════════════════ */
.welcome-banner {
  background: var(--stone-900);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(184, 145, 74, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.greeting {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.welcome-banner .name {
  font-family: var(--font-display);
  font-size: 28px;
  color: white;
  margin-top: 4px;
  font-weight: 400;
}

.welcome-banner .tier {
  font-size: 12px;
  color: var(--gold-light);
  margin-top: 4px;
}

.welcome-discount {
  text-align: right;
  flex-shrink: 0;
}

.disc-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.disc-value {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--gold-light);
  line-height: 1;
  font-weight: 400;
}

.disc-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* Older stat card (designer dashboard) */
.stat-card-simple {
  background: var(--white);
  border: 1px solid rgba(214, 211, 208, 0.4);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.stat-card-simple .stat-label {
  margin-bottom: 6px;
}

.stat-card-simple .stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--stone-900);
  font-weight: 400;
}

.stat-card-simple .stat-delta {
  font-size: 11px;
  color: var(--stone-400);
  margin-top: 4px;
}

/* ─── Quick Actions ───────────────────────────────────────────── */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--stone-700);
  min-width: 190px;
}

.qa-btn:hover {
  border-color: var(--stone-800);
  transform: translateY(-1px);
}

.qa-icon {
  font-size: 22px;
}

.qa-label {
  font-size: 10px;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ─── Project Cards ───────────────────────────────────────────── */
.project-card {
  background: var(--white);
  border: 1px solid rgba(214, 211, 208, 0.4);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

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

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  color: var(--stone-900);
}

.project-client {
  font-size: 12px;
  color: var(--stone-400);
  margin-top: 2px;
}

.project-progress {
  margin-top: 14px;
}

.progress-bar {
  height: 3px;
  background: var(--stone-200);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--stone-800);
  transition: width 0.5s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--stone-400);
  margin-top: 5px;
}

/* ─── Product Cards ───────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid rgba(214, 211, 208, 0.4);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-img {
  aspect-ratio: 4/3;
  background: var(--stone-100);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card:hover .product-img img {
  transform: scale(1.04);
}

.product-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--stone-500);
  font-size: 9px;
  padding: 3px 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--stone-200);
  font-weight: 600;
}

.product-save {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--stone-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
  color: var(--stone-400);
}

.product-save:hover,
.product-save.saved {
  color: var(--gold);
  border-color: var(--gold);
}

.product-info {
  padding: 14px;
}

.product-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  color: var(--stone-900);
  margin-bottom: 3px;
}

.product-meta {
  font-size: 11px;
  color: var(--stone-400);
  margin-bottom: 10px;
}

.product-pricing {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.trade-price {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--stone-900);
  font-weight: 400;
}

.retail-price {
  font-size: 12px;
  color: var(--stone-400);
  text-decoration: line-through;
}

.discount-badge {
  font-size: 9px;
  background: var(--stone-100);
  color: var(--stone-600);
  padding: 2px 6px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.product-actions {
  display: flex;
  gap: 6px;
}

/* Product detail */
.product-detail-image {
  aspect-ratio: 1;
  background: var(--stone-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-detail-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  color: var(--stone-900);
  margin-bottom: 4px;
  line-height: 1.2;
}

.product-detail-meta {
  font-size: 13px;
  color: var(--stone-400);
  margin-bottom: 20px;
}

.price-block {
  margin-bottom: 20px;
}

.price-trade {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--stone-900);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-label {
  font-size: 12px;
  color: var(--stone-400);
  font-family: var(--font-body);
}

.price-retail {
  font-size: 12px;
  color: var(--stone-400);
  margin-top: 4px;
}

/* ─── Spec Grid ───────────────────────────────────────────────── */
.spec-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.spec-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stone-100);
}

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

.spec-label {
  font-size: 10px;
  color: var(--stone-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 110px;
  flex-shrink: 0;
  font-weight: 600;
}

.spec-value {
  font-size: 13px;
  color: var(--stone-700);
}

/* ─── Filter Bar ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--stone-200);
  background: var(--white);
  color: var(--stone-400);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border-radius: 0;
  font-family: var(--font-body);
}

.filter-chip:hover {
  border-color: var(--stone-500);
  color: var(--stone-700);
}

.filter-chip.active {
  background: var(--stone-900);
  color: var(--white);
  border-color: var(--stone-900);
}

/* ─── Modals ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--white);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;
  border-radius: 0;
}

@keyframes modal-in {
  from {
    transform: scale(0.96) translateY(8px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--stone-900);
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stone-200);
  background: var(--white);
  font-size: 16px;
  color: var(--stone-400);
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--stone-100);
  color: var(--stone-900);
}

/* ─── Chat / Messaging ────────────────────────────────────────── */
.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--stone-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--stone-50);
}

.msg-wrap {
  display: flex;
}

.msg-mine {
  justify-content: flex-end;
}

.msg-theirs {
  justify-content: flex-start;
}

.msg {
  max-width: 72%;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.msg-mine .msg {
  background: var(--stone-900);
  color: white;
}

.msg-theirs .msg {
  background: var(--white);
  color: var(--stone-800);
  border: 1px solid var(--stone-200);
}

.msg-body {
  margin-bottom: 4px;
}

.msg-time {
  font-size: 10px;
  opacity: 0.5;
  text-align: right;
}

.chat-input-area {
  padding: 16px 20px;
  background: var(--white);
  border-top: 1px solid var(--stone-200);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--stone-200);
  border-radius: 0;
  font-size: 13px;
  outline: none;
  background: var(--stone-50);
  transition: border-color var(--transition);
  font-family: var(--font-body);
}

.chat-input:focus {
  border-color: var(--stone-600);
}

/* ─── Order Timeline ──────────────────────────────────────────── */
.order-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 28px;
  width: 2px;
  height: 100%;
  background: var(--stone-200);
}

.timeline-step.done::after {
  background: var(--stone-800);
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--stone-200);
  background: var(--white);
  flex-shrink: 0;
  transition: all var(--transition);
}

.timeline-step.done .timeline-dot {
  border-color: var(--stone-800);
  background: var(--stone-800);
}

.timeline-label {
  font-size: 13px;
  color: var(--stone-400);
}

.timeline-step.done .timeline-label {
  color: var(--stone-700);
  font-weight: 500;
}

/* ─── Rug Placeholders ────────────────────────────────────────── */
.rug-placeholder {
  background: var(--stone-100);
  position: relative;
  width: 80%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  opacity: 0.4;
}

/* ─── Misc ────────────────────────────────────────────────────── */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* ─── FAB ─────────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--stone-900);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition), box-shadow var(--transition);
  z-index: 50;
}

.fab:hover {
  transform: scale(1.1);
}

.fab:active {
  transform: scale(0.95);
}

/* ─── Scrollbar Styling ───────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--stone-200);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--stone-400);
}

/* ─── Animations ──────────────────────────────────────────────── */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .production-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .topbar-nav {
    display: none;
  }

  .content-inner {
    padding: 24px 16px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .production-grid {
    grid-template-columns: 1fr;
  }

  .auth-left {
    display: none;
  }

  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .disc-value {
    font-size: 36px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .stats-bento {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 16px;
  }
}