/* ==========================================================================
   Product Costing Pro - Design System & Modern Styles
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #141e33;
  --bg-card-hover: #192640;
  --bg-input: #0a101d;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: #10b981;
  --border-glow: rgba(16, 185, 129, 0.25);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-600: #059669;
  --emerald-bg: rgba(16, 185, 129, 0.12);

  --gold-500: #f59e0b;
  --gold-bg: rgba(245, 158, 11, 0.12);

  --blue-500: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);

  --purple-500: #8b5cf6;
  --purple-bg: rgba(139, 92, 246, 0.12);

  --rose-500: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.12);

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.18);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Light Theme Design Tokens */
[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #f8fafc;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;

  --border-subtle: #cbd5e1;
  --border-focus: #059669;
  --border-glow: rgba(5, 150, 105, 0.2);

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --emerald-500: #059669;
  --emerald-400: #047857;
  --emerald-600: #065f46;
  --emerald-bg: rgba(5, 150, 105, 0.12);

  --gold-500: #d97706;
  --gold-bg: rgba(217, 119, 6, 0.12);

  --blue-500: #2563eb;
  --blue-bg: rgba(37, 99, 235, 0.12);

  --purple-500: #7c3aed;
  --purple-bg: rgba(124, 58, 237, 0.12);

  --rose-500: #e11d48;
  --rose-bg: rgba(225, 29, 72, 0.12);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.12);
}

/* Light Theme Component Readability Adaptations */
[data-theme="light"] .brand-info h1 { color: #0f172a; }
[data-theme="light"] .panel-header h2 { color: #0f172a; }
[data-theme="light"] .metric-value { color: #0f172a; }
[data-theme="light"] .input-container { background: #ffffff; border-color: #cbd5e1; }
[data-theme="light"] .input-container input { color: #0f172a; }
[data-theme="light"] .input-container input::placeholder { color: #94a3b8; }
[data-theme="light"] .input-prefix,
[data-theme="light"] .input-suffix { background: #f8fafc; color: #475569; border-color: #cbd5e1; }
[data-theme="light"] .currency-select option { background: #ffffff; color: #0f172a; }
[data-theme="light"] .results-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid rgba(5, 150, 105, 0.35);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .results-product-name { color: #0f172a; }
[data-theme="light"] .price-hero { background: #f1f5f9; border-color: #cbd5e1; }
[data-theme="light"] .price-hero-val { color: #047857; }
[data-theme="light"] .result-row strong { color: #0f172a; }
[data-theme="light"] .result-row { border-bottom-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .saved-name { color: #0f172a; }
[data-theme="light"] .saved-stat-box { background: #f1f5f9; }
[data-theme="light"] .saved-stat-val { color: #0f172a; }
[data-theme="light"] .custom-cost-row { background: #f8fafc; border-color: #cbd5e1; }
[data-theme="light"] .btn-secondary { background: #f8fafc; color: #334155; border-color: #cbd5e1; }
[data-theme="light"] .btn-secondary:hover { background: #edf2f7; color: #0f172a; }
[data-theme="light"] .chip-btn { background: #f8fafc; border-color: #cbd5e1; color: #334155; }
[data-theme="light"] .chip-btn:hover { border-color: var(--emerald-500); color: #0f172a; }
[data-theme="light"] .discount-tier-section { background: #f8fafc; border-color: #cbd5e1; }
[data-theme="light"] .discount-table th { border-bottom-color: #cbd5e1; }
[data-theme="light"] .discount-table td { border-bottom-color: rgba(0, 0, 0, 0.05); }

/* Light Theme Redesign Overrides */
[data-theme="light"] .dash-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .dash-hero-product { color: #0f172a; }
[data-theme="light"] .dashboard-section-heading { color: #0f172a; }
[data-theme="light"] .fin-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .fin-value { color: #0f172a; }
[data-theme="light"] .glance-card {
  background: #ffffff;
  border-color: #cbd5e1;
}
[data-theme="light"] .glance-title { color: #0f172a; }
[data-theme="light"] .dash-breakdown-card {
  background: #ffffff;
  border-color: #cbd5e1;
}
[data-theme="light"] .dash-stat-val { color: #0f172a; }
[data-theme="light"] .report-action-card,
[data-theme="light"] .settings-card {
  background: #ffffff;
  border-color: #cbd5e1;
}
[data-theme="light"] .report-action-card h3,
[data-theme="light"] .settings-card-title h3 {
  color: #0f172a;
}
[data-theme="light"] .btn-toggle-details {
  border-color: #cbd5e1;
  color: #334155;
}
[data-theme="light"] .app-bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  border-top-color: #cbd5e1;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

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

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 96px;
  overflow-x: hidden;
}

/* App Container */
.app-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 16px;
}

@media (max-width: 640px) {
  .app-container {
    padding: 14px 12px;
  }
}

/* Header */
.app-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.brand-info {
  min-width: 0;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
  flex-shrink: 0;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-info h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-badge {
  font-size: 10px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-500), #d97706);
  color: #000;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.brand-info p {
  font-size: 13px;
  color: var(--text-muted);
}

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

/* Cloud Sync Status Indicator Pill (Stage 3.2.3) */
.sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary, #94a3b8);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.sync-status-pill:hover {
  opacity: 0.9;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #94a3b8;
  display: inline-block;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

/* Synced State */
.sync-status-pill.sync-synced {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.28);
}
.sync-status-pill.sync-synced .sync-status-dot {
  background-color: #10b981;
}

/* Syncing in Progress State */
.sync-status-pill.sync-syncing {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.28);
}
.sync-status-pill.sync-syncing .sync-status-dot {
  background-color: #3b82f6;
  animation: pulse-sync-dot 1.2s infinite ease-in-out;
}

/* Pending Changes State */
.sync-status-pill.sync-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.28);
}
.sync-status-pill.sync-pending .sync-status-dot {
  background-color: #f59e0b;
}

/* Offline State */
.sync-status-pill.sync-offline {
  background: rgba(100, 116, 139, 0.1);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.2);
}
.sync-status-pill.sync-offline .sync-status-dot {
  background-color: #94a3b8;
}

/* Needs Attention / Error State */
.sync-status-pill.sync-error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.28);
}
.sync-status-pill.sync-error .sync-status-dot {
  background-color: #ef4444;
}

@keyframes pulse-sync-dot {
  0% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.5; }
}

.currency-select-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  gap: 8px;
}

.currency-select-wrapper label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

.currency-select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.currency-select option {
  background: var(--bg-surface);
  color: #fff;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.theme-toggle-btn:hover {
  border-color: var(--emerald-500);
  background: var(--bg-card-hover);
}

.theme-icon {
  font-size: 14px;
}

/* Quick Metrics Row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.metric-card.primary::before { background: var(--blue-500); }
.metric-card.warning::before { background: var(--gold-500); }
.metric-card.success::before { background: var(--emerald-500); }
.metric-card.purple::before { background: var(--purple-500); }

.metric-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  word-break: break-word;
}

.metric-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Main Grid Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

/* Panels */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

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

.panel-header h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--emerald-400);
  border: 1px solid var(--border-subtle);
}

/* Mode Switcher Tabs */
.calc-mode-switch-container {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.calc-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 6px;
}

.calc-mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.calc-mode-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .calc-mode-tab:hover {
  background: rgba(0, 0, 0, 0.04);
}

.calc-mode-tab.active {
  background: var(--emerald-500);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.mode-description {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

.mode-content-block {
  animation: fadeIn 0.2s ease;
}

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

/* Form Groups & Inputs */
.form-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.input-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.label-hint {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}

.input-container {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.input-container:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.input-prefix, .input-suffix {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

.input-prefix { border-right: 1px solid var(--border-subtle); }
.input-suffix { border-left: 1px solid var(--border-subtle); }

.input-container input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 11px 14px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
}

.input-container input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

/* Margin Presets & Slider */
.slider-group {
  margin-top: 10px;
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: var(--bg-card);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin-bottom: 12px;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--emerald-400);
  cursor: pointer;
  box-shadow: 0 0 10px var(--emerald-500);
}

.preset-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 5px 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  border-color: var(--emerald-500);
  color: #fff;
}

.chip-btn.active {
  background: var(--emerald-bg);
  border-color: var(--emerald-500);
  color: var(--emerald-400);
}

/* Action Buttons */
.button-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  flex: 1;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--emerald-400), var(--emerald-500));
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: #ffffff;
}

.btn-danger {
  background: var(--rose-bg);
  color: var(--rose-500);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
  background: var(--rose-500);
  color: #ffffff;
}

/* Results Card (Summary Display) */
.results-card {
  background: linear-gradient(145deg, #16243d, #0d1728);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-xl);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.results-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.results-product-name {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
  word-break: break-word;
}

.price-hero {
  margin: 18px 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.price-hero-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.price-hero-val {
  font-size: 34px;
  font-weight: 900;
  color: var(--emerald-400);
  letter-spacing: -1px;
  margin: 4px 0;
}

.price-hero-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* Result Rows */
.result-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-row strong {
  font-size: 14px;
  color: #ffffff;
  font-weight: 700;
}

/* Visual Cost Distribution Bar */
.distribution-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.distribution-title {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stacked-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
}

.bar-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.seg-purchase { background: var(--blue-500); }
.seg-packaging { background: var(--purple-500); }
.seg-labor { background: var(--emerald-500); }
.seg-transport { background: var(--gold-500); }
.seg-customs { background: #06b6d4; }
.seg-other { background: #64748b; }
.seg-advertising { background: #6366f1; }
.seg-fees { background: #f97316; }
.seg-wastage { background: var(--rose-500); }
.seg-custom { background: #ec4899; }

.bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Educational Card */
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-card strong {
  color: var(--text-main);
}

/* Saved Products List */
.saved-section {
  margin-top: 32px;
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.saved-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.saved-card:hover {
  border-color: var(--emerald-500);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.saved-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.saved-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.saved-date {
  font-size: 10px;
  color: var(--text-dim);
}

.saved-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 12px;
}

.saved-stat-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.saved-stat-label {
  font-size: 10px;
  color: var(--text-dim);
}

.saved-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.saved-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: color 0.15s ease;
}

.btn-icon:hover {
  color: var(--rose-500);
}

/* Commercial Quotation Card Delete Button */
.btn-delete-quote {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-delete-quote:hover {
  background: #f43f5e;
  border-color: #f43f5e;
  color: #ffffff;
  transform: scale(1.08);
}

.btn-delete-quote:active {
  transform: scale(0.95);
}

[data-theme="light"] .btn-delete-quote {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.3);
  color: #e11d48;
}

[data-theme="light"] .btn-delete-quote:hover {
  background: #e11d48;
  border-color: #e11d48;
  color: #ffffff;
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Print View Formatting */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .app-header, .panel, .saved-section, .button-row, .header-controls {
    display: none !important;
  }
  .results-card {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
  .price-hero-val {
    color: #000 !important;
  }
}

/* Button Sizing */
.btn-sm {
  padding: 6px 12px;
  font-size: 11px;
}

/* Portfolio Header Actions */
.portfolio-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Modals System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--rose-500);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
}

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

/* Report Styles */
.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 12px;
}

.report-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 16px 0 8px 0;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}

.report-table th,
.report-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.report-table th {
  color: var(--text-dim);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .report-table th {
  background: rgba(0, 0, 0, 0.03);
}

.report-table-total {
  font-weight: 800;
  background: rgba(255, 255, 255, 0.04);
}

.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.report-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

.report-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* Customer Quote Styles */
.quote-header-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--emerald-500);
  margin-bottom: 16px;
}

.quote-brand h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.quote-brand p {
  font-size: 12px;
  color: var(--emerald-400);
  font-weight: 600;
}

.quote-meta {
  text-align: right;
  font-size: 12px;
  color: var(--text-dim);
}

.quote-client-row {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-client-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.quote-client-input:focus {
  border-color: var(--emerald-500);
}

.quote-notes {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  font-size: 11px;
  color: var(--text-dim);
}

.quote-notes ul {
  padding-left: 18px;
  margin-top: 4px;
}

/* Light Theme Additions for Modal */
[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: #cbd5e1;
}

[data-theme="light"] .report-meta-grid,
[data-theme="light"] .report-stat-box,
[data-theme="light"] .quote-notes {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .quote-client-input {
  background: #ffffff;
  border-color: #cbd5e1;
}

/* Customer Quotation Configuration Options Bar */
.quote-options-bar {
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-options-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.quote-options-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.quote-option-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.15s ease;
}

.quote-option-toggle:hover {
  color: var(--text-main);
}

.quote-option-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.toggle-switch {
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.quote-option-toggle input[type="checkbox"]:checked + .toggle-switch {
  background: var(--emerald-500);
}

.quote-option-toggle input[type="checkbox"]:checked + .toggle-switch::after {
  transform: translateX(14px);
}

.quote-option-toggle input[type="checkbox"]:focus-visible + .toggle-switch {
  outline: 2px solid var(--emerald-400);
  outline-offset: 2px;
}

.quote-option-label {
  font-size: 12px;
  line-height: 1.2;
}

[data-theme="light"] .quote-options-bar {
  background: #f8fafc;
  border-bottom-color: #cbd5e1;
}

[data-theme="light"] .quote-options-title {
  color: #64748b;
}

[data-theme="light"] .quote-option-toggle {
  color: #334155;
}

[data-theme="light"] .quote-option-toggle:hover {
  color: #0f172a;
}

[data-theme="light"] .toggle-switch {
  background: #cbd5e1;
}

[data-theme="light"] .quote-option-toggle input[type="checkbox"]:checked + .toggle-switch {
  background: #059669;
}

/* Customer Quote & Signature On-Screen Styling */
.quote-client-print-val {
  display: none;
}

.quote-footer-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.quote-sig-col {
  width: 44%;
}

.sig-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 24px;
}

.sig-line {
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.quote-landscape-row {
  display: block;
  width: 100%;
}

/* ============================================================
   PRINT STYLES: OPTIMIZED FOR 1-PAGE A4 / LETTER OUTPUT
   Removes browser URLs, file paths, and unneeded details.
   Zero leaks of internal costs, unit costs, profits, or margins.
   Orientation & paper size controlled by browser print dialogue.
   ============================================================ */
@media print {
  @page {
    /* size: A4 portrait - default baseline; actual orientation controlled by browser print dialogue */
    size: auto;
    margin: 8mm 12mm 8mm 12mm;
  }

  /* Reset canvas */
  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Hide main application and chrome when printing any modal */
  body.printing-modal .app-container,
  body.printing-modal .toast-notice,
  body.printing-customer-quote .app-container,
  body.printing-customer-quote .toast-notice,
  body.printing-internal-report .app-container,
  body.printing-internal-report .toast-notice {
    display: none !important;
  }

  /* When printing, strictly hide the bottom navigation bar, floating calculator, and confirmation modals */
  .app-bottom-nav,
  #floatingCalcBtn,
  #floatingCalcPanel,
  #modalDeleteQuotationConfirm,
  .btn-delete-quote {
    display: none !important;
  }

  /* When printing customer quotation, strictly hide internal report */
  body.printing-customer-quote #modalInternalReport {
    display: none !important;
  }

  /* When printing internal report, hide customer quote */
  body.printing-internal-report #modalCustomerQuote {
    display: none !important;
  }

  /* Modal overlay reset */
  body.printing-modal .modal-overlay,
  body.printing-customer-quote #modalCustomerQuote,
  body.printing-internal-report #modalInternalReport {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
  }

  /* Modal card reset */
  body.printing-modal .modal-card,
  body.printing-customer-quote .modal-card,
  body.printing-internal-report .modal-card {
    max-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    border: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    animation: none !important;
    transform: none !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Hide interactive buttons & close icons */
  .modal-header,
  .modal-footer,
  .modal-close-btn,
  .btn,
  .btn-install,
  .theme-toggle-btn,
  .quote-options-bar {
    display: none !important;
  }

  .modal-body {
    padding: 0 !important;
    overflow: visible !important;
    color: #0f172a !important;
  }

  /* --- CUSTOMER QUOTATION PRINT FORMATTING --- */
  body.printing-customer-quote .quote-header-box {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
    border-bottom: 2px solid #059669 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.printing-customer-quote .quote-brand h2 {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.15 !important;
  }

  body.printing-customer-quote .quote-brand .pro-badge {
    background: #059669 !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-customer-quote .quote-brand p {
    font-size: 11px !important;
    color: #059669 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-top: 2px !important;
    margin-bottom: 0 !important;
  }

  body.printing-customer-quote .quote-meta {
    text-align: right !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    color: #334155 !important;
  }

  body.printing-customer-quote .quote-meta strong {
    color: #0f172a !important;
  }

  /* Customer Prepared For Row */
  body.printing-customer-quote .quote-client-row {
    margin-bottom: 10px !important;
    padding: 6px 10px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    display: flex !important;
    align-items: center !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-customer-quote .quote-client-input {
    display: none !important;
  }

  body.printing-customer-quote .quote-client-print-val {
    display: inline-block !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-left: 6px !important;
  }

  /* Section Titles */
  body.printing-customer-quote .report-section-title {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    margin: 10px 0 5px 0 !important;
    padding-bottom: 3px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  /* Tables */
  body.printing-customer-quote .report-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 11px !important;
    margin-bottom: 8px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.printing-customer-quote .report-table th,
  body.printing-customer-quote .report-table td {
    padding: 5px 8px !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
  }

  body.printing-customer-quote .report-table th {
    background: #f1f5f9 !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    letter-spacing: 0.3px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-customer-quote .report-table-total th {
    background: #f8fafc !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    border-top: 2px solid #0f172a !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-customer-quote #quoteItemTotal strong,
  body.printing-customer-quote #quoteGrandTotal {
    color: #059669 !important;
    font-weight: 800 !important;
    font-size: 12px !important;
  }

  /* Terms and Conditions Box */
  body.printing-customer-quote .quote-notes {
    margin-top: 8px !important;
    padding: 7px 10px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    color: #334155 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-customer-quote .quote-notes strong {
    color: #0f172a !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
  }

  body.printing-customer-quote .quote-notes ul {
    margin: 3px 0 0 0 !important;
    padding-left: 16px !important;
  }

  body.printing-customer-quote .quote-notes li {
    margin-bottom: 2px !important;
  }

  /* Signature Block */
  body.printing-customer-quote .quote-footer-signatures {
    display: flex;
    justify-content: space-between !important;
    margin-top: 14px !important;
    padding-top: 4px !important;
    border: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Configurable Quote Sections Print Visibility Override */
  body.printing-customer-quote #quoteSignaturesSection[style*="display: none"],
  body.printing-customer-quote #quoteSignaturesSection[style*="display:none"],
  body.printing-customer-quote #quoteWholesaleSection[style*="display: none"],
  body.printing-customer-quote #quoteWholesaleSection[style*="display:none"],
  body.printing-customer-quote #quoteTermsSection[style*="display: none"],
  body.printing-customer-quote #quoteTermsSection[style*="display:none"] {
    display: none !important;
  }

  body.printing-customer-quote .quote-sig-col {
    width: 44% !important;
  }

  body.printing-customer-quote .sig-label {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    display: block !important;
    margin-bottom: 24px !important;
  }

  body.printing-customer-quote .sig-line {
    border-bottom: 1px solid #94a3b8 !important;
    width: 100% !important;
  }

  /* --- CUSTOMER QUOTATION LANDSCAPE PRINT STYLES (Automatic when browser dialogue selects Landscape) --- */
  @media (orientation: landscape) {
    body.printing-customer-quote .modal-card {
      max-width: 100% !important;
      width: 100% !important;
    }

    body.printing-customer-quote .quote-header-box {
      padding-bottom: 5px !important;
      margin-bottom: 5px !important;
    }

    body.printing-customer-quote .quote-brand h2 {
      font-size: 16px !important;
    }

    body.printing-customer-quote .quote-client-row {
      margin-bottom: 5px !important;
      padding: 4px 8px !important;
      font-size: 10px !important;
    }

    body.printing-customer-quote .report-section-title {
      font-size: 10px !important;
      margin: 5px 0 3px 0 !important;
      padding-bottom: 2px !important;
    }

    body.printing-customer-quote .report-table {
      margin-bottom: 5px !important;
      font-size: 10px !important;
    }

    body.printing-customer-quote .report-table th,
    body.printing-customer-quote .report-table td {
      padding: 3.5px 6px !important;
    }

    /* Side-by-side distribution of wholesale and terms in landscape print */
    body.printing-customer-quote .quote-landscape-row {
      display: flex !important;
      flex-direction: row !important;
      gap: 12px !important;
      align-items: flex-start !important;
      width: 100% !important;
      margin-bottom: 3px !important;
      page-break-inside: avoid !important;
      break-inside: avoid !important;
    }

    body.printing-customer-quote .quote-landscape-row > #quoteWholesaleSection {
      flex: 1 1 54% !important;
      min-width: 0 !important;
      margin-bottom: 0 !important;
    }

    body.printing-customer-quote .quote-landscape-row > #quoteTermsSection {
      flex: 1 1 46% !important;
      min-width: 0 !important;
      margin-top: 0 !important;
    }

    body.printing-customer-quote .quote-notes {
      padding: 5px 8px !important;
      font-size: 9px !important;
      line-height: 1.35 !important;
      margin-top: 0 !important;
    }

    body.printing-customer-quote .quote-notes ul {
      margin: 2px 0 0 0 !important;
      padding-left: 14px !important;
    }

    body.printing-customer-quote .quote-notes li {
      margin-bottom: 1.5px !important;
    }

    body.printing-customer-quote .quote-footer-signatures {
      margin-top: 6px !important;
      padding-top: 2px !important;
    }

    body.printing-customer-quote .sig-label {
      margin-bottom: 16px !important;
      font-size: 8.5px !important;
    }
  }

  /* Internal Report Print Styles */
  body.printing-internal-report .report-meta-grid,
  body.printing-internal-report .report-stat-box,
  body.printing-internal-report .quote-notes {
    background: #fdfdfd !important;
    border: 1px solid #cbd5e1 !important;
    color: #000 !important;
  }

  body.printing-internal-report .report-table th,
  body.printing-internal-report .report-table td {
    border-color: #cbd5e1 !important;
    color: #000 !important;
    padding: 6px 8px !important;
  }

  body.printing-internal-report .stat-val {
    color: #000 !important;
  }
}

/* Mode Tabs */
.pricing-mode-tabs {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}

.mode-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.mode-tab.active {
  background: var(--emerald-500);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Custom Cost Rows */
.custom-cost-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.custom-cost-row {
  display: grid;
  grid-template-columns: 1fr 140px 36px;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.btn-add-cost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: var(--emerald-400);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s ease;
}

.btn-add-cost:hover {
  border-color: var(--emerald-500);
  background: var(--emerald-bg);
}

/* Wholesale / Discount Tiers */
.discount-tier-section {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.discount-tier-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.discount-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.discount-table th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 600;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.discount-table td {
  padding: 7px 0;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

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

.tier-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.tier-safe { background: var(--emerald-bg); color: var(--emerald-400); }
.tier-warning { background: var(--gold-bg); color: var(--gold-500); }
.tier-danger { background: var(--rose-bg); color: var(--rose-500); }

/* Copy Summary Button */
.btn-accent {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: none;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

/* Responsiveness */
@media (max-width: 1024px) {
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .main-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .metrics-row {
    grid-template-columns: 1fr;
  }
  .input-grid-2 {
    grid-template-columns: 1fr;
  }
  .custom-cost-row {
    grid-template-columns: 1fr 100px 32px;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }
  .theme-toggle-btn {
    padding: 8px 12px;
  }
  .currency-select-wrapper {
    flex: 1;
  }
  .price-hero-val {
    font-size: 28px;
  }
  .button-row {
    flex-direction: column;
  }
  .button-row .btn {
    width: 100%;
  }
}

/* ==========================================================================
   REDESIGNED MODERN LAYOUT & MOBILE-FIRST DASHBOARD
   Visual inspiration from reference: Focus Card, 'Today at a Glance' squircles,
   'Financial Overview' 2x2 grid, 'Show Details' toggle, and Fixed Bottom Nav.
   ========================================================================== */

/* Header Redesign */
.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

#headerSectionTitle {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 2px;
}

.btn-header-add {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), #d97706);
  color: #0f172a;
  border: none;
  font-size: 20px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  user-select: none;
  font-family: inherit;
}

.btn-header-add:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

.btn-header-add:active {
  transform: scale(0.95);
}

/* App View Containers */
.app-view {
  display: none;
  animation: viewFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-view.active {
  display: block;
}

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

/* Dashboard Section Headings */
.dashboard-section-heading {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin: 22px 0 12px 0;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 1. Top Highlight Focus Card (Inspired by 'Sacred Focus' in reference) */
.dash-hero-card {
  background: linear-gradient(135deg, #0e172a 0%, #131d33 100%);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dash-hero-card:hover {
  border-color: rgba(16, 185, 129, 0.38);
}

.dash-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-hero-icon-wrap {
  flex-shrink: 0;
}

.dash-hero-glow-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

.dash-hero-meta {
  flex: 1;
  min-width: 0;
}

.dash-hero-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.focus-badge {
  font-size: 10px;
  font-weight: 800;
  background: var(--gold-bg);
  color: var(--gold-500);
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.focus-mode-pill {
  font-size: 10px;
  font-weight: 700;
  background: var(--emerald-bg);
  color: var(--emerald-400);
  padding: 2px 7px;
  border-radius: 6px;
}

.dash-hero-product {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-hero-share-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.dash-hero-share-btn:hover {
  background: var(--emerald-bg);
  color: var(--emerald-400);
  border-color: var(--emerald-500);
}

.dash-hero-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.hero-sub-item strong {
  color: var(--emerald-400);
  font-weight: 700;
}

.hero-dot {
  color: var(--text-dim);
}

/* 2. 'Today at a Glance' Section (3 squircle cards) */
.glance-section {
  margin-bottom: 22px;
}

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

.glance-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.glance-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-sm);
}

.glance-card:active {
  transform: translateY(0);
}

.glance-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.squircle-emerald {
  background: var(--emerald-bg);
  color: var(--emerald-400);
}

.squircle-amber {
  background: var(--gold-bg);
  color: var(--gold-500);
}

.squircle-purple {
  background: var(--purple-bg);
  color: var(--purple-500);
}

.squircle-blue {
  background: var(--blue-bg);
  color: var(--blue-500);
}

.squircle-teal {
  background: rgba(14, 165, 233, 0.14);
  color: #38bdf8;
}

.glance-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.glance-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.2;
}

/* 3. 'Financial Overview' 2x2 Grid of Cards */
.financial-overview-section {
  margin-bottom: 24px;
}

.financial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px;
  margin-bottom: 12px;
}

.fin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.fin-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
}

.fin-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.fin-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.fin-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.fin-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 4px;
  font-family: var(--font-sans);
}

.fin-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* 4. 'Show Details ∨' Toggle Link */
.details-toggle-container {
  display: flex;
  justify-content: center;
  margin: 12px 0 16px 0;
}

.btn-toggle-details {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-toggle-details:hover {
  border-color: var(--emerald-500);
  color: var(--emerald-400);
  background: var(--emerald-bg);
}

.toggle-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
  display: inline-block;
}

/* Collapsible Breakdown Details Drawer */
.financial-details-drawer {
  transition: max-height 0.35s ease, opacity 0.3s ease;
  overflow: hidden;
  max-height: 600px;
  opacity: 1;
  margin-bottom: 20px;
}

.financial-details-drawer.collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.dash-breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.dash-breakdown-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.dash-live-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--emerald-400);
  background: var(--emerald-bg);
  padding: 2px 7px;
  border-radius: 4px;
}

.dash-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.dash-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-stat-item.dash-span-2 {
  grid-column: span 2;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.dash-stat-label {
  font-size: 11px;
  color: var(--text-dim);
}

.dash-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.dash-stat-val.text-emerald { color: var(--emerald-400); }
.dash-stat-val.text-gold { color: var(--gold-500); }

/* Quick Action Bar on Dashboard */
.dash-action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.dash-action-bar .btn {
  flex: 1;
  min-width: 130px;
}

/* 5. Reports Hub View */
.reports-hub-container {
  max-width: 900px;
  margin: 0 auto;
}

.reports-hub-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

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

.report-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.report-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-sm);
}

.report-card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.report-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.report-card-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.report-card-content p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
  flex: 1;
}

.report-card-content .btn {
  align-self: flex-start;
  font-size: 12px;
  padding: 8px 14px;
}

/* 6. Settings View */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.settings-card.highlight-card {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.settings-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.settings-card-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.settings-card-title p {
  font-size: 12px;
  color: var(--text-dim);
}

.settings-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.setting-currency-preview {
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-400);
  background: var(--emerald-bg);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  display: inline-block;
}

.pwa-status-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald-400);
  background: var(--emerald-bg);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* 7. Fixed Bottom Navigation Bar (Matching Reference Layout) */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(9, 13, 22, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
  display: flex;
  justify-content: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.bottom-nav-inner {
  width: 100%;
  max-width: 580px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2px;
}

.nav-tab {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 2px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-family: inherit;
  flex: 1;
  min-width: 0;
  max-width: 76px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-tab:hover {
  color: var(--text-muted);
}

.nav-tab-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab-pill svg {
  transition: transform 0.2s ease;
}

.nav-tab:hover .nav-tab-pill svg {
  transform: translateY(-1px);
}

.nav-tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: color 0.2s ease, font-weight 0.2s ease;
  line-height: 1.1;
}

/* Active navigation state: soft rounded rectangle/capsule pill as in reference */
.nav-tab.active {
  color: var(--emerald-400);
}

.nav-tab.active .nav-tab-pill {
  background: rgba(16, 185, 129, 0.16);
  color: var(--emerald-400);
}

.nav-tab.active .nav-tab-label {
  font-weight: 800;
  color: var(--emerald-400);
}

[data-theme="light"] .nav-tab.active {
  color: var(--emerald-600);
}

[data-theme="light"] .nav-tab.active .nav-tab-pill {
  background: rgba(5, 150, 105, 0.14);
  color: var(--emerald-600);
}

[data-theme="light"] .nav-tab.active .nav-tab-label {
  color: var(--emerald-600);
}

/* Desktop & Tablet responsiveness */
@media (min-width: 768px) {
  .app-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .header-main-row {
    width: auto;
    gap: 20px;
  }
  .header-controls {
    width: auto;
    justify-content: flex-end;
  }
  .nav-tab {
    max-width: 80px;
  }
  .nav-tab-pill {
    width: 48px;
    height: 28px;
  }
  .nav-tab-label {
    font-size: 11px;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .financial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }
  .fin-card {
    padding: 12px 10px;
  }
  .fin-title {
    font-size: 10px;
    letter-spacing: 0.3px;
    word-break: break-word;
  }
  .fin-value {
    font-size: 18px;
  }
  .glance-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .glance-card {
    padding: 10px 6px;
  }
  .glance-title {
    font-size: 12px;
  }
  .glance-subtitle {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .dash-hero-product {
    font-size: 14px;
  }
  .dash-hero-stats {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 12px 10px;
  }
  .header-main-row {
    gap: 8px;
  }
  #headerSectionTitle {
    font-size: 20px;
  }
  .btn-header-add {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .header-controls {
    gap: 6px;
    flex-wrap: wrap;
  }
  .currency-select-wrapper {
    flex: 1;
    min-width: 140px;
    padding: 5px 8px;
  }
  .currency-select {
    font-size: 11px;
  }
  .currency-select-wrapper label {
    font-size: 10px;
  }
  .theme-toggle-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  .financial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  .fin-card {
    padding: 10px 8px;
  }
  .fin-icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .fin-title {
    font-size: 9.5px;
    letter-spacing: 0.2px;
    word-break: break-word;
  }
  .fin-value {
    font-size: 16px;
  }
  .fin-subtitle {
    font-size: 9.5px;
  }
  .glance-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .glance-card {
    padding: 8px 4px;
  }
  .glance-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  .glance-title {
    font-size: 11px;
  }
  .glance-subtitle {
    font-size: 9px;
  }
  .dash-hero-card {
    padding: 12px;
  }
  .dash-hero-glow-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .dash-hero-product {
    font-size: 14px;
  }
  .dash-hero-stat-row {
    font-size: 11px;
    gap: 6px;
  }
  .nav-tab {
    padding: 3px 1px;
  }
  .nav-tab-label {
    font-size: 9px;
  }
  .nav-tab-pill {
    width: 38px;
    height: 24px;
  }
  .nav-tab-pill svg {
    width: 17px;
    height: 17px;
  }
}

/* ==============================================================================
   LICENSING GATEKEEPER & ACTIVATION MODAL (STAGE 1 LOCAL SYSTEM)
   ============================================================================== */
body.license-locked .app-container,
body.license-locked .app-bottom-nav {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

.license-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 16, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
  overflow-y: auto;
}

.license-modal-dialog {
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-xl, 18px);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 35px rgba(16, 185, 129, 0.12);
  overflow: hidden;
  animation: licenseModalSlide 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes licenseModalSlide {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.license-modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0) 100%);
}

.license-modal-body {
  padding: 24px;
}

.license-error-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 16px;
  animation: licenseShake 0.3s ease;
}

@keyframes licenseShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.badge-unactivated {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.32) !important;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--accent-emerald, #10b981) !important;
  border: 1px solid rgba(16, 185, 129, 0.32) !important;
}

/* ==========================================================================
   Device Management Self-Service Modal Styles
   ========================================================================== */

.device-mgmt-modal-dialog {
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-xl, 18px);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(16, 185, 129, 0.15);
  overflow: hidden;
  animation: licenseModalSlide 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.device-mgmt-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, rgba(15, 23, 42, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.device-mgmt-header-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.device-mgmt-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.device-mgmt-header-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  margin: 0;
  line-height: 1.2;
}

.device-mgmt-header-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
  margin: 2px 0 0 0;
}

.device-mgmt-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 1.5rem;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.device-mgmt-close-btn:hover,
.device-mgmt-close-btn:focus-visible {
  color: var(--text-primary, #f8fafc);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

/* Steps Progress Indicator */
.device-mgmt-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
  gap: 8px;
}

.device-step-pill {
  flex: 1;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.device-step-pill.active {
  color: var(--accent-emerald, #10b981);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.device-step-pill.completed {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
}

/* Modal Body & Step Panels */
.device-mgmt-body {
  padding: 22px 24px;
  overflow-y: auto;
  max-height: 70vh;
}

.device-step-panel {
  display: none;
}

.device-step-panel.active {
  display: block;
  animation: fadeInStep 0.22s ease-out;
}

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

/* Status Banners */
.device-banner {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 16px;
  display: none;
}

.device-banner.show {
  display: block;
}

.device-banner-info {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.device-banner-test {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 0.82rem;
}

.device-banner-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  animation: licenseShake 0.3s ease;
}

.device-banner-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* OTP Input Field */
.device-otp-input {
  font-family: monospace;
  font-size: 1.6rem;
  letter-spacing: 0.35em;
  text-align: center;
  font-weight: 700;
  padding: 10px 14px;
}

/* Attempts Indicator */
.device-attempts-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
  margin-top: 8px;
}

/* Device List in Step 3 */
.device-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  margin-bottom: 14px;
  font-size: 0.86rem;
}

.device-slots-badge {
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald, #10b981);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.device-slots-badge.full {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.device-item-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.device-item-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.device-item-card.is-current {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.04);
}

.device-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.device-info-left {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.device-icon {
  font-size: 1.3rem;
  line-height: 1;
  margin-top: 2px;
}

.device-label-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  margin: 0 0 4px 0;
  word-break: break-all;
}

.device-meta-text {
  font-size: 0.76rem;
  color: var(--text-secondary, #94a3b8);
  margin: 0;
  font-family: monospace;
}

.device-current-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald, #10b981);
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-left: 6px;
  vertical-align: middle;
}

.btn-remove-device-action {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-remove-device-action:hover,
.btn-remove-device-action:focus-visible {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffffff;
  outline: none;
}

.device-confirm-removal-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.35);
  font-size: 0.82rem;
}

.device-confirm-removal-box p {
  margin: 0 0 8px 0;
  color: #fca5a5;
  line-height: 1.35;
}

.device-confirm-buttons {
  display: flex;
  gap: 8px;
}

/* Modal Footer Actions */
.device-mgmt-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(0, 0, 0, 0.15);
}

.btn-link-action {
  background: transparent;
  border: none;
  color: var(--accent-emerald, #10b981);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 10px;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.btn-link-action:hover,
.btn-link-action:focus-visible {
  color: #34d399;
  outline: none;
}

/* ==========================================================================
   FLOATING QUICK CALCULATOR STYLING
   Compact, clean, responsive floating tool with green USE RESULT action
   ========================================================================== */

/* Floating Launcher Button */
.floating-calc-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  border: 1px solid rgba(20, 184, 166, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 12px rgba(13, 148, 136, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.floating-calc-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(13, 148, 136, 0.5);
  background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.floating-calc-btn:active {
  transform: translateY(0) scale(0.96);
}

/* Floating Calculator Panel */
.floating-calc-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 290px;
  background: var(--bg-surface, #0f172a);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(12px);
  animation: calcSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-calc-panel.hidden {
  display: none !important;
}

.floating-calc-panel.is-moved,
.floating-calc-panel.is-dragging {
  animation: none !important;
  transform: none !important;
  transition: none !important;
  user-select: none;
  -webkit-user-select: none;
}

@keyframes calcSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header & Drag Handle */
.calc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card, #141e33);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.calc-panel-header:active,
.floating-calc-panel.is-dragging .calc-panel-header {
  cursor: grabbing;
}

.calc-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #14b8a6;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.calc-panel-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
  touch-action: auto;
}

.calc-panel-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Display Screen */
.calc-display-wrap {
  padding: 12px 14px;
  background: var(--bg-input, #0a101d);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  text-align: right;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.calc-expression {
  font-size: 0.75rem;
  color: var(--text-dim, #64748b);
  min-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

.calc-display {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  line-height: 1.2;
}

/* Keypad Grid View */
.calc-keypad-view {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.calc-btn {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.calc-btn-num {
  background: var(--bg-card, #141e33);
  color: var(--text-main, #f8fafc);
}

.calc-btn-num:hover {
  background: var(--bg-card-hover, #192640);
  border-color: rgba(20, 184, 166, 0.35);
}

.calc-btn-fn {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 0.9rem;
}

.calc-btn-fn:hover {
  background: rgba(148, 163, 184, 0.22);
  color: #ffffff;
}

.calc-btn-op {
  background: rgba(13, 148, 136, 0.18);
  color: #2dd4bf;
  border-color: rgba(13, 148, 136, 0.3);
  font-size: 1.1rem;
}

.calc-btn-op:hover,
.calc-btn-op.active {
  background: rgba(13, 148, 136, 0.35);
  color: #ffffff;
  border-color: #14b8a6;
}

.calc-btn-equals {
  background: #0f766e;
  color: #ffffff;
  border-color: #14b8a6;
  font-size: 1.1rem;
}

.calc-btn-equals:hover {
  background: #0d9488;
}

.calc-btn:active {
  transform: scale(0.96);
}

/* Green USE RESULT Button */
.btn-calc-use-result {
  width: 100%;
  height: 42px;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.btn-calc-use-result:hover {
  background: #059669;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.btn-calc-use-result:active {
  transform: scale(0.98);
}

/* Transfer Result View */
.calc-transfer-view {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-transfer-view.hidden {
  display: none !important;
}

.calc-transfer-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main, #f8fafc);
  margin-bottom: 2px;
}

.calc-transfer-proposed-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-transfer-label {
  font-size: 0.75rem;
  color: #34d399;
}

.calc-transfer-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

.calc-transfer-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-transfer-select-label {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
}

.calc-transfer-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg-input, #0a101d);
  color: var(--text-main, #f8fafc);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  font-size: 0.82rem;
  cursor: pointer;
}

.calc-transfer-select:focus {
  outline: none;
  border-color: #10b981;
}

.calc-transfer-comparison {
  background: var(--bg-card, #141e33);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-transfer-comparison.hidden {
  display: none !important;
}

.calc-compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.calc-compare-label {
  color: var(--text-muted, #94a3b8);
}

.calc-compare-val-curr {
  color: #f87171;
  font-family: 'JetBrains Mono', monospace;
  text-decoration: line-through;
  font-size: 0.82rem;
}

.calc-compare-arrow {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim, #64748b);
  line-height: 1;
}

.calc-compare-val-new {
  color: #34d399;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
}

.calc-transfer-note {
  margin-top: 4px;
  font-size: 0.72rem;
  color: #fbbf24;
  line-height: 1.3;
}

.calc-transfer-prompt-msg {
  font-size: 0.75rem;
  color: var(--text-dim, #64748b);
  text-align: center;
  padding: 6px;
  font-style: italic;
}

.calc-transfer-prompt-msg.hidden {
  display: none !important;
}

.calc-transfer-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-calc-confirm {
  flex: 1;
  height: 38px;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-calc-confirm:hover:not(:disabled) {
  background: #059669;
}

.btn-calc-confirm:disabled {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-dim, #64748b);
  cursor: not-allowed;
}

.btn-calc-back {
  flex: 1;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-calc-back:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .floating-calc-btn {
    bottom: 74px;
    right: 14px;
    width: 44px;
    height: 44px;
  }
  .floating-calc-panel {
    bottom: 80px;
    right: 14px;
    width: calc(100vw - 28px);
    max-width: 320px;
  }
}

}
/* Light Theme Overrides */
[data-theme="light"] .floating-calc-panel {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15), 0 0 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .calc-panel-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .calc-display-wrap {
  background: #f1f5f9;
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .calc-display {
  color: #0f172a;
}

[data-theme="light"] .calc-expression {
  color: #64748b;
}

[data-theme="light"] .calc-btn-num {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="light"] .calc-btn-num:hover {
  background: #e2e8f0;
}

[data-theme="light"] .calc-btn-fn {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}

[data-theme="light"] .calc-btn-fn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .calc-transfer-select {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="light"] .calc-transfer-val {
  color: #065f46;
}

[data-theme="light"] .calc-transfer-comparison {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .btn-calc-back {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

[data-theme="light"] .btn-calc-back:hover {
  background: #e2e8f0;
  color: #0f172a;
}




