@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  color-scheme: dark;
  
  /* Luxury Premium Dark Theme Palette */
  --bg-canvas: #07080a;
  --bg-sidebar: rgba(10, 11, 14, 0.85);
  --bg-card: rgba(16, 18, 22, 0.65);
  --bg-card-hover: rgba(24, 27, 33, 0.85);
  --bg-input: rgba(4, 5, 6, 0.45);
  
  /* Brand champagne & gold tones */
  --champagne: #d7b56d;
  --champagne-light: #e6ce9e;
  --champagne-glow: rgba(215, 181, 109, 0.15);
  --gold-gradient: linear-gradient(135deg, #d7b56d 0%, #b8934b 100%);
  
  /* Text scales */
  --ink: #f4efe6;
  --muted: #a69a8b;
  --soft: rgba(244, 239, 230, 0.8);
  
  /* Subtle borders and divider lines */
  --line: rgba(215, 181, 109, 0.08);
  --line-strong: rgba(215, 181, 109, 0.18);
  --line-focus: rgba(215, 181, 109, 0.45);
  
  /* Status Indicators (Soft premium desaturated versions) */
  --status-inquiry: #b2c9e4;      /* Soft powder blue */
  --status-quote: #e6ce9e;        /* Pale gold */
  --status-deposit: #e5b3a3;      /* Soft terracotta */
  --status-confirmed: #9ac9ab;    /* Sage green */
  --status-out: #dfd79b;          /* Soft mustard yellow */
  --status-returned: #a8d5db;     /* Soft teal */
  --status-closed: #9a9ea6;       /* Neutral slate */
  --status-canceled: #e2a8a8;     /* Faded rose red */

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 24px rgba(215, 181, 109, 0.08);

  /* Font Systems */
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Outfit", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
}

body {
  min-width: 320px;
  color: var(--ink);
  font-family: var(--font-sans);
  background:
    linear-gradient(rgba(7, 8, 10, 0.82), rgba(7, 8, 10, 0.96)),
    url("https://images.unsplash.com/photo-1464366400600-7168b8af9bc3?auto=format&fit=crop&w=2200&q=82")
      center top / cover fixed,
    var(--bg-canvas);
  min-height: 100vh;
  letter-spacing: -0.01em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(7, 8, 10, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(215, 181, 109, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(215, 181, 109, 0.4);
}

/* Layout Framework */
.studio-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 32px 24px;
  border-right: 1px solid var(--line);
  background: var(--bg-sidebar);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 100;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(215, 181, 109, 0.35);
  border-radius: 12px;
  color: var(--champagne);
  background: rgba(215, 181, 109, 0.08);
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  box-shadow: inset 0 0 10px rgba(215, 181, 109, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover .brand-mark {
  border-color: var(--champagne);
  background: rgba(215, 181, 109, 0.15);
  box-shadow: 0 0 15px rgba(215, 181, 109, 0.25);
  transform: scale(1.03);
}

.brand strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 6px;
  margin: 40px 0;
}

.nav a {
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a:hover,
.nav a:focus {
  border-color: var(--line-strong);
  color: var(--champagne);
  background: rgba(215, 181, 109, 0.06);
  outline: none;
  transform: translateX(4px);
}

/* Active Nav State - matching location hash */
.nav a[href="#dashboard"]:active,
.nav a:hover {
  text-shadow: 0 0 8px rgba(215, 181, 109, 0.15);
}

.side-panel {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(215, 181, 109, 0.02);
}

.side-panel a {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.15);
}

.side-panel a:hover,
.side-panel a:focus {
  border-color: var(--champagne);
  color: var(--ink);
  background: rgba(215, 181, 109, 0.05);
  outline: none;
}

.eyebrow {
  color: var(--champagne);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
}

/* Main Dashboard Panel */
.main {
  display: grid;
  gap: 24px;
  width: min(1600px, 100%);
  padding: 32px;
  margin: 0 auto;
}

/* Sections Framework */
.hero-band,
.section-band {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

/* Custom Header Band */
.hero-band {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px);
  gap: 36px;
  align-items: end;
  min-height: 380px;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(7, 8, 10, 0.45), rgba(7, 8, 10, 0.95)),
    url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=1800&q=82")
      center / cover;
  border: 1px solid var(--line-strong);
  position: relative;
}

.hero-band::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(215, 181, 109, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-copy h1 {
  max-width: 800px;
  margin: 14px 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.5vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-copy p {
  max-width: 600px;
  color: var(--soft);
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.6;
}

/* Metric Widgets */
.metric-grid,
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.metric,
.report-card {
  min-height: 120px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 12, 16, 0.82);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric:hover,
.report-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm), var(--shadow-gold);
}

.metric span,
.report-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric strong,
.report-card strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(24px, 2.5vw, 36px);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#metricRevenue, 
#metricOrders, 
#metricItemsOut, 
#metricUnpaid {
  color: var(--champagne-light);
  text-shadow: 0 0 12px rgba(215, 181, 109, 0.12);
}

/* Dashboard Section Band */
.section-band {
  padding: 36px;
  background: var(--bg-card);
}

.section-heading {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.section-heading h2 {
  font-family: var(--font-serif);
  margin-top: 8px;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 500;
  color: var(--ink);
}

/* Splits (Layout for side-by-side forms and columns) */
.split-layout {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 28px;
  align-items: start;
}

/* Cards & Panels Grid */
.panel,
.inventory-card,
.timeline-item,
.order-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 13, 17, 0.78);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel:hover {
  border-color: var(--line-strong);
}

.form-panel,
.panel {
  padding: 24px;
}

.panel h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--champagne-light);
}

/* Forms & Fields Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
}

.search-field input {
  min-width: 250px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: var(--bg-input);
  outline: none;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-focus);
  box-shadow: 
    0 0 0 3px rgba(215, 181, 109, 0.12),
    inset 0 1px 3px rgba(0, 0, 0, 0.4);
  background: rgba(10, 12, 16, 0.95);
}

/* Select element customization - custom chevron arrow */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d7b56d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 44px;
  cursor: pointer;
}

/* Action Rows & Custom Premium Buttons */
.action-row,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.primary-button,
.ghost-button,
.card-actions button,
.quick-notes button,
.order-actions button {
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--champagne);
  color: #0b0702;
  background: var(--gold-gradient);
  box-shadow: 0 4px 15px rgba(215, 181, 109, 0.2);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(215, 181, 109, 0.35);
  filter: brightness(1.08);
}

.primary-button:active {
  transform: translateY(0);
}

.ghost-button,
.card-actions button,
.quick-notes button,
.order-actions button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.ghost-button:hover,
.card-actions button:hover,
.quick-notes button:hover,
.order-actions button:hover {
  border-color: var(--champagne);
  color: var(--champagne);
  background: rgba(215, 181, 109, 0.06);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.ghost-button:active,
.card-actions button:active,
.quick-notes button:active,
.order-actions button:active {
  transform: translateY(0);
}

/* Inventory Gallery & Cards */
.inventory-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.inventory-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.inventory-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-focus);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md), var(--shadow-gold);
}

.inventory-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0f1116;
  border-bottom: 1px solid var(--line);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.inventory-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-title-row h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}

.price {
  font-family: var(--font-serif);
  color: var(--champagne);
  font-size: 18px;
  font-weight: 600;
}

.stock-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chip,
.stock-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(215, 181, 109, 0.15);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip {
  color: var(--champagne);
  background: rgba(215, 181, 109, 0.08);
}

.stock-pill {
  color: var(--status-confirmed);
  border-color: rgba(154, 201, 171, 0.2);
  background: rgba(154, 201, 171, 0.08);
}

.stock-pill.warning {
  color: var(--status-canceled);
  border-color: rgba(226, 168, 168, 0.25);
  background: rgba(226, 168, 168, 0.08);
  animation: pulse-border 2s infinite ease-in-out;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.deposit {
  font-size: 12px;
  font-weight: 500;
}

.item-notes {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 58px;
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.inventory-card .card-actions {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* Custom mini action buttons inside cards */
.card-actions button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 11px;
}

.card-actions button[data-action="dec"],
.card-actions button[data-action="inc"] {
  min-width: 36px;
  padding: 8px 0;
  font-size: 14px;
}

/* Timeline & Active Orders list */
.timeline,
.orders-list {
  display: grid;
  gap: 16px;
}

.timeline-item,
.order-card {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.timeline-item:hover,
.order-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.timeline-date {
  font-family: var(--font-serif);
  color: var(--champagne);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-left: 2px solid var(--champagne);
  padding-left: 14px;
}

.timeline-item h3,
.order-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}

.timeline-item p,
.order-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 4px;
}

.timeline-item p:last-child,
.order-card p:last-child {
  margin-bottom: 0;
}

/* Unique Invoice styling inside order titles */
.order-card h3 .muted {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 10px;
  vertical-align: middle;
}

/* Beautiful custom status dropdowns and indicators */
.status-pill {
  display: inline-flex;
  min-width: 125px;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

/* Dynamic status backgrounds on lists based on text content (handled via script status color mapping or fallback colors in CSS) */
.timeline-item:nth-child(even) .status-pill {
  color: var(--status-confirmed);
  border-color: rgba(154, 201, 171, 0.2);
  background: rgba(154, 201, 171, 0.08);
}

.timeline-item:nth-child(odd) .status-pill {
  color: var(--status-quote);
  border-color: rgba(230, 206, 158, 0.2);
  background: rgba(230, 206, 158, 0.08);
}

.order-card select[data-action="status"] {
  min-width: 160px;
  font-weight: 600;
  border-color: rgba(215, 181, 109, 0.25);
  color: var(--champagne);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.order-card select[data-action="status"]:hover {
  border-color: var(--champagne);
  background-color: rgba(215, 181, 109, 0.05);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.order-actions button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 11px;
}

/* Invoices Template Grid */
.message-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
}

.quick-notes {
  display: grid;
  gap: 8px;
  align-content: start;
}

.quick-notes h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.quick-notes button {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  font-weight: 600;
  padding-left: 16px;
}

/* Form workflow status elements */
.form-status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--champagne);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 14px;
  background: rgba(215, 181, 109, 0.01);
}

/* Keyframes Animations */
@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(226, 168, 168, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(226, 168, 168, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(226, 168, 168, 0);
  }
}

/* Responsiveness Media Queries */
@media (max-width: 1200px) {
  .studio-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 18px 24px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 11, 14, 0.95);
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
  }

  .nav a {
    padding: 10px 14px;
    font-size: 13px;
  }

  .nav a:hover,
  .nav a:focus {
    transform: none;
  }

  .side-panel {
    display: none; /* Hide internal tools panel to save space on mobile/tablet navigation bar */
  }

  .hero-band {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 36px;
  }

  .split-layout,
  .message-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main {
    padding: 16px;
    gap: 16px;
  }

  .sidebar {
    display: none !important; /* Hide sidebar completely in mobile, replaced by bottom-nav */
  }

  body {
    padding-bottom: 80px; /* Space for bottom-nav */
  }

  .bottom-nav {
    display: flex !important; /* Show bottom navigation bar */
  }

  .brand {
    justify-content: center;
  }

  .nav {
    justify-content: center;
  }

  .hero-band {
    padding: 24px;
    text-align: center;
  }

  .hero-band::before {
    display: none;
  }

  .hero-copy h1 {
    margin-top: 8px;
  }

  .hero-copy p {
    margin: 0 auto;
  }

  .metric-grid,
  .report-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-band {
    padding: 20px;
  }

  .section-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 20px;
  }

  .section-heading div {
    text-align: left;
  }

  .search-field {
    flex-direction: column;
    align-items: stretch;
  }

  .search-field input {
    min-width: unset;
  }

  .timeline-item,
  .order-card {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
    padding: 18px;
  }

  .timeline-item:hover,
  .order-card:hover {
    transform: none;
  }

  .timeline-date {
    border-left: none;
    border-bottom: 2px solid var(--champagne);
    padding-left: 0;
    padding-bottom: 8px;
  }

  .order-card select[data-action="status"] {
    width: 100%;
  }
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--line);
  display: none; /* Hidden by default on desktop */
  justify-content: space-around;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  flex: 1;
  height: 100%;
  transition: all 0.2s ease;
}

.bottom-nav a svg {
  color: var(--muted);
  transition: all 0.2s ease;
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--champagne);
}

.bottom-nav a.active svg,
.bottom-nav a:hover svg {
  color: var(--champagne);
  transform: translateY(-2px);
  filter: drop-shadow(0 0 4px var(--champagne));
}

/* Floating AI Trigger Button */
.ai-trigger-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--gold-gradient);
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  color: #07080a;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(215, 181, 109, 0.3), var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: pulseGlow 3s infinite ease-in-out;
}

.ai-trigger-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(215, 181, 109, 0.45);
}

.ai-sparkle {
  font-size: 16px;
  animation: spinSparkle 4s infinite linear;
}

/* AI Widget Container */
.ai-widget-container {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 380px;
  height: 520px;
  max-height: calc(100vh - 180px);
  background: rgba(16, 18, 22, 0.88);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  z-index: 9997;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(215, 181, 109, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 480px) {
  .ai-widget-container {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 84px;
    height: 480px;
  }
  .ai-trigger-btn {
    bottom: 84px; /* Move above bottom-nav when chat is closed */
  }
  .ai-widget-container {
    bottom: 148px; /* Move above trigger when open on small screens */
  }
}

/* Header */
.ai-widget-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 11, 14, 0.5);
}

.ai-header-title {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 14px;
}

.ai-pulse-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ac9ab;
  box-shadow: 0 0 8px #9ac9ab;
  animation: breatheDot 2s infinite ease-in-out;
}

.ai-header-title strong {
  font-family: var(--font-serif);
  color: var(--champagne);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ai-header-title small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.ai-close-btn:hover {
  color: var(--ink);
}

/* Tabs */
.ai-widget-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 5, 6, 0.25);
}

.ai-tab-btn {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.ai-tab-btn.active {
  color: var(--champagne);
  border-bottom-color: var(--champagne);
  background: rgba(215, 181, 109, 0.02);
}

.ai-tab-btn:hover {
  color: var(--ink);
}

/* Tab Content */
.ai-tab-content {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.ai-tab-content.active {
  display: flex;
}

/* Chat Messages */
.ai-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.ai-message.assistant {
  align-self: flex-start;
  background: rgba(24, 27, 33, 0.6);
  border: 1px solid var(--line);
  color: var(--ink);
  border-top-left-radius: 2px;
}

.ai-message.user {
  align-self: flex-end;
  background: var(--gold-gradient);
  color: #07080a;
  font-weight: 500;
  border-top-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(215, 181, 109, 0.1);
}

.ai-message.system {
  align-self: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 20px;
}

.ai-message ul {
  margin-top: 6px;
  padding-left: 16px;
}

.ai-message li {
  margin-bottom: 4px;
}

/* Input Form */
.ai-input-form {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(10, 11, 14, 0.4);
  display: flex;
  gap: 8px;
}

.ai-input-form input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  transition: all 0.2s;
}

.ai-input-form input:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: 0 0 8px var(--champagne-glow);
}

.ai-send-btn {
  background: var(--gold-gradient);
  border: none;
  border-radius: 20px;
  color: #07080a;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  padding: 0 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.ai-send-btn:hover {
  transform: scale(1.03);
}

/* Translator Tab */
.ai-translator-box {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.translator-direction-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.toggle-option {
  flex: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-option input {
  display: none;
}

.toggle-option span {
  display: block;
  width: 100%;
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
}

.toggle-option input:checked + span {
  background: rgba(215, 181, 109, 0.12);
  color: var(--champagne);
}

.translator-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.translator-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.translator-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.translator-field textarea {
  background: var(--bg-input);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  resize: none;
  transition: all 0.2s;
}

.translator-field textarea:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: 0 0 8px var(--champagne-glow);
}

.trans-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.trans-actions-row button {
  flex: 1;
  padding: 8px 10px;
  font-size: 11px;
}

/* Keyframes */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(215, 181, 109, 0.3), 0 0 0 0 rgba(215, 181, 109, 0.2);
  }
  50% {
    box-shadow: 0 8px 30px rgba(215, 181, 109, 0.5), 0 0 0 8px rgba(215, 181, 109, 0);
  }
}

@keyframes spinSparkle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes breatheDot {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

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

/* Luxury Login Overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(4, 5, 7, 0.88);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  padding: 24px;
  animation: fadeIn 0.4s ease-out;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(16, 18, 22, 0.95);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 42px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card .brand-mark {
  margin: 0 auto 24px;
}

.login-card h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}

.login-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.login-card form {
  display: grid;
  gap: 16px;
}

.login-card input {
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.12em;
}

.login-error {
  margin-top: 14px;
  color: var(--status-canceled);
  font-size: 13px;
  min-height: 20px;
  font-weight: 600;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

