/* ============================================================
   VIP Doors – Bright High-Contrast Modern Industrial Theme
   Clean White / Slate Canvas with Vibrant Accents
   (No Dark Blue / Black backgrounds - Crisp & High Sunlight Visibility)
   ============================================================ */

:root {
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #10b981;
  
  --primary: #059669;          /* Energetic Emerald */
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  
  --accent: #ea580c;           /* Vibrant Amber/Orange */
  --accent-hover: #c2410c;
  --accent-light: #fff7ed;
  --accent-border: #fed7aa;
  
  --indigo: #4f46e5;           /* Royal Indigo for Analytics & Badges */
  --indigo-light: #eef2ff;
  --indigo-border: #c7d2fe;

  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --info: #0284c7;
  --info-light: #f0f9ff;
  
  --text: #0f172a;             /* Deep Slate 900 for razor-sharp readability */
  --text-muted: #475569;       /* Slate 600 */
  --text-dim: #64748b;         /* Slate 500 */
  
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 80px; /* Room for mobile bottom navbar */
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-subtle); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ------------------------------------------------------------
   Header & Top Navigation
   ------------------------------------------------------------ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.brand-info h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.1;
  color: #0f172a;
}

.brand-info span {
  font-size: 11px;
  color: #059669;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* User status badge */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   Desktop Nav Tabs (Hidden on mobile)
   ------------------------------------------------------------ */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 6px;
}

@media (min-width: 960px) {
  body { padding-bottom: 20px; }
  .desktop-nav { display: flex; }
  .mobile-nav { display: none !important; }
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.nav-tab.active {
  color: #065f46;
  background: var(--primary-light);
  border-color: var(--primary-border);
}

/* ------------------------------------------------------------
   Mobile Bottom Navigation Bar
   ------------------------------------------------------------ */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 99;
  padding: 0 4px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
}

.m-nav-item {
  background: none;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease;
}

.m-nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.m-nav-item.active {
  color: var(--primary);
}

/* ------------------------------------------------------------
   Floating Action Dock & Scroll Navigation Controls
   ------------------------------------------------------------ */
.fab-dock-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 95;
  pointer-events: none;
}

@media (min-width: 960px) {
  .fab-dock-container {
    bottom: 28px;
    right: 28px;
    gap: 12px;
  }
}

.fab-btn {
  position: static;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.fab-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.55);
}

.fab-btn:active {
  transform: scale(0.92);
}

.fab-scroll-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.85);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.22s ease, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.fab-scroll-btn.visible {
  opacity: 0.94;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.fab-scroll-btn:hover {
  opacity: 1;
  background: #059669;
  color: #ffffff;
  border-color: #34d399;
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.45);
  transform: scale(1.08);
}

.fab-scroll-btn:active {
  transform: scale(0.92);
}

/* ------------------------------------------------------------
   Main Container
   ------------------------------------------------------------ */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ------------------------------------------------------------
   UI Cards & Grids
   ------------------------------------------------------------ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

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

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Metric / KPI Bar */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

@media (min-width: 768px) {
  .metrics-row { grid-template-columns: repeat(4, 1fr); }
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.metric-card.primary {
  border-top: 4px solid var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-light) 150%);
}
.metric-card.accent {
  border-top: 4px solid var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-light) 150%);
}
.metric-card.indigo {
  border-top: 4px solid var(--indigo);
  background: linear-gradient(180deg, #ffffff 0%, var(--indigo-light) 150%);
}
.metric-card.success {
  border-top: 4px solid var(--success);
  background: linear-gradient(180deg, #ffffff 0%, var(--success-light) 150%);
}
.metric-card.warning {
  border-top: 4px solid var(--warning);
  background: linear-gradient(180deg, #ffffff 0%, var(--warning-light) 150%);
}

.metric-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.6px;
}

.metric-value {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  font-family: var(--font-mono);
  line-height: 1.1;
}

.metric-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* ------------------------------------------------------------
   Buttons & Inputs
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: #94a3b8;
}

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

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

input, select, textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: #0f172a;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Search bar */
.search-wrapper {
  position: relative;
  margin-bottom: 14px;
}
.search-wrapper input {
  padding-left: 40px;
  padding-right: 40px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #e2e8f0;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.search-clear-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

/* Status Filter Badges */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-pill {
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* ------------------------------------------------------------
   Settings Navigation Tabs - Responsive 2x2 Grid for Mobile
   ------------------------------------------------------------ */
.settings-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.settings-nav-tabs .settings-nav-pill {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 700;
  background: #ffffff;
  color: var(--text-dim);
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.settings-nav-tabs .settings-nav-pill:hover {
  border-color: #059669;
  color: #059669;
  background: #f0fdf4;
}

.settings-nav-tabs .settings-nav-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.settings-nav-tabs .settings-nav-pill.active b {
  color: #34d399;
}

@media (max-width: 680px) {
  .settings-nav-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    overflow-x: visible !important;
  }
  .settings-nav-tabs .settings-nav-pill {
    width: 100% !important;
    padding: 11px 8px !important;
    font-size: 11.5px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.25 !important;
    box-sizing: border-box !important;
    white-space: normal !important;
  }
  .settings-nav-tabs .settings-nav-pill .pill-icon {
    font-size: 14px !important;
  }
  .settings-nav-tabs .settings-nav-pill .pill-text {
    display: inline-block !important;
    font-size: 11.5px !important;
  }
}

@media (max-width: 380px) {
  .settings-nav-tabs .settings-nav-pill {
    padding: 9px 5px !important;
    font-size: 10.5px !important;
  }
  .settings-nav-tabs .settings-nav-pill .pill-text {
    font-size: 10.5px !important;
  }
}

/* Status Tag Badges */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-confirmed {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.status-in_production {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.status-ready {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-on_hold {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.status-delivered {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* ------------------------------------------------------------
   Order Cards (Mobile First)
   ------------------------------------------------------------ */
.order-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.order-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow);
}

.order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.order-no {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 14px;
  color: #059669;
}

.party-name {
  font-weight: 800;
  font-size: 16px;
  color: #0f172a;
  margin-bottom: 4px;
}

.order-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.door-items-summary {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.door-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #e2e8f0;
}
.door-item-row:last-child { border-bottom: none; }

.door-spec {
  font-weight: 700;
  color: #1e293b;
}

.order-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   Modal Dialogs
   ------------------------------------------------------------ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 20px; }
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 640px) {
  .modal-content { border-radius: var(--radius-lg); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
  background: #ffffff;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-subtle);
}

/* ------------------------------------------------------------
   Dynamic Door Line Items Form
   ------------------------------------------------------------ */
.door-line-item {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.door-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.preset-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.preset-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: #334155;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-pill:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

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

@media (max-width: 600px) {
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}

/* Leaderboard & Progress Bars (Analytics) */
.analytics-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.analytics-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  transition: width 0.3s ease;
}

.analytics-bar-fill.accent {
  background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
}

.analytics-bar-fill.indigo {
  background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #0f172a;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

/* ------------------------------------------------------------
   In-App Supportive Dialog System (Replaces Native Popups)
   ------------------------------------------------------------ */
.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: dialogFadeIn 0.15s ease-out;
}

.app-dialog-backdrop.fade-out {
  opacity: 0;
  transition: opacity 0.12s ease-out;
}

.app-dialog-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.08);
  padding: 24px;
  position: relative;
  animation: dialogPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.app-dialog-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.app-dialog-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.app-dialog-icon-badge.info { background: #eff6ff; border: 1px solid #bfdbfe; }
.app-dialog-icon-badge.success { background: #ecfdf5; border: 1px solid #a7f3d0; }
.app-dialog-icon-badge.warning, .app-dialog-icon-badge.confirm { background: #fffbeb; border: 1px solid #fde68a; }
.app-dialog-icon-badge.error, .app-dialog-icon-badge.danger { background: #fef2f2; border: 1px solid #fecaca; }
.app-dialog-icon-badge.prompt { background: #f0fdf4; border: 1px solid #bbf7d0; }

.app-dialog-text-content {
  flex: 1;
  min-width: 0;
}

.app-dialog-title {
  margin: 0 0 6px 0;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.app-dialog-message {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  word-break: break-word;
}

.app-dialog-input-wrapper {
  margin-top: 14px;
  width: 100%;
}

.app-dialog-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.app-dialog-input:focus {
  background: #ffffff;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.app-dialog-input.shake {
  border-color: #ef4444;
  animation: dialogShake 0.35s ease-in-out;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.app-dialog-actions.single-action {
  justify-content: flex-end;
}

.app-dialog-btn-cancel {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.app-dialog-btn-cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.app-dialog-btn-ok {
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

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

@keyframes dialogPopIn {
  from { opacity: 0; transform: scale(0.93) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes dialogShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ============================================================
   Dedicated Print Containers - Strictly Hidden on Screen
   Never visible in screen layout under any circumstance
   ============================================================ */
#thermalPrintContainer,
#a4PrintContainer,
#a5PrintContainer {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

@media print {
  body.print-mode-stickers #thermalPrintContainer {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.print-mode-a4 #a4PrintContainer {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.print-mode-a5 #a5PrintContainer {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}
