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

:root {
  --bg-deep: #080d1a;
  --bg-panel: #0d1629;
  --bg-surface: #121f38;
  --bg-card: #152442;
  --border-subtle: #1c3054;
  --border-active: #2563eb;
  --border-cyan: #0284c7;
  --cyan-glow: #38bdf8;
  --accent-cyan: #00f2fe;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.blueprint-grid {
  background-color: var(--bg-deep);
  background-image: 
    linear-gradient(rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: -1px -1px;
}

.blueprint-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.blueprint-card::before {
  content: '+';
  position: absolute;
  top: -6px;
  left: -6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #38bdf8;
  line-height: 1;
  opacity: 0.6;
}

.blueprint-card::after {
  content: '+';
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #38bdf8;
  line-height: 1;
  opacity: 0.6;
}

.font-mono {
  font-family: var(--font-mono);
}

.tag-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-free {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.tag-reserved {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.tag-contract {
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.tag-sold {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.tag-overdue {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.tag-paid {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.cad-ruler-h {
  background-image: repeating-linear-gradient(90deg, #1e345b 0, #1e345b 1px, transparent 1px, transparent 20px);
  height: 6px;
  opacity: 0.7;
}

.blueprint-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  background: rgba(13, 22, 41, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 14px;
}

.blueprint-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(28, 48, 84, 0.6);
  font-size: 13px;
}

.blueprint-table tr:hover td {
  background: rgba(37, 99, 235, 0.06);
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #080d1a;
}
::-webkit-scrollbar-thumb {
  background: #1c3054;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

/* ==========================================================================
   LIGHT THEME: ARCHITECTURAL PAPER BLUEPRINT
   Clean engineering off-white surfaces, crisp slate typography, high contrast
   ========================================================================== */

html.theme-light,
body.theme-light {
  --bg-deep: #f4f6fa;
  --bg-panel: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --border-subtle: #cbd5e1;
  --border-active: #2563eb;
  --border-cyan: #0284c7;
  --cyan-glow: #0284c7;
  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-green: #059669;
  --accent-amber: #d97706;
  --accent-red: #dc2626;
  --accent-purple: #7c3aed;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  background-color: #f4f6fa !important;
  color: #0f172a !important;
}

body.theme-light.blueprint-grid,
body.theme-light .blueprint-grid {
  background-color: #f8fafc !important;
  background-image: 
    linear-gradient(rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px) !important;
}

/* Base Surfaces & Header Overrides */
body.theme-light header,
body.theme-light footer,
body.theme-light .bg-\[\#050914\],
body.theme-light .bg-\[\#070d1c\],
body.theme-light .bg-\[\#070e1c\],
body.theme-light .bg-\[\#081021\],
body.theme-light .bg-\[\#091021\],
body.theme-light .bg-\[\#091122\],
body.theme-light .bg-\[\#0a1224\],
body.theme-light .bg-\[\#0a1224\]\/90,
body.theme-light .bg-\[\#0b1329\],
body.theme-light .bg-\[\#0b1426\],
body.theme-light .bg-\[\#0c162b\],
body.theme-light .bg-\[\#0d1629\],
body.theme-light .bg-\[\#0d172e\],
body.theme-light .bg-\[\#0d1830\],
body.theme-light .bg-\[\#0e172e\],
body.theme-light .bg-\[\#0f1b34\],
body.theme-light .bg-\[\#111e3b\],
body.theme-light .bg-\[\#111f3d\],
body.theme-light .bg-\[\#121e36\],
body.theme-light .bg-\[\#121f38\],
body.theme-light .bg-\[\#12203d\],
body.theme-light .bg-\[\#13223f\],
body.theme-light .bg-\[\#142340\],
body.theme-light .bg-\[\#142342\],
body.theme-light .bg-\[\#142442\],
body.theme-light .bg-\[\#17284a\],
body.theme-light .bg-\[\#1a2d52\],
body.theme-light .bg-\[\#1a2e57\],
body.theme-light .bg-\[\#1c3258\],
body.theme-light .blueprint-card {
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
}

/* Secondary Panels & Subheaders in Light Mode */
body.theme-light .bg-\[\#0e172e\],
body.theme-light .bg-\[\#0f1b34\],
body.theme-light .bg-\[\#121f38\] {
  background-color: #f8fafc !important;
}

body.theme-light footer {
  background-color: #f1f5f9 !important;
  border-top-color: #cbd5e1 !important;
}

/* Hairline Blueprint Borders */
body.theme-light .border-\[\#091122\],
body.theme-light .border-\[\#172b4d\],
body.theme-light .border-\[\#192b4a\],
body.theme-light .border-\[\#192b4c\],
body.theme-light .border-\[\#1a2b4c\],
body.theme-light .border-\[\#1a2d50\],
body.theme-light .border-\[\#1a2d52\],
body.theme-light .border-\[\#1b2f52\],
body.theme-light .border-\[\#1c3054\],
body.theme-light .border-\[\#1c3258\],
body.theme-light .border-\[\#1e345e\],
body.theme-light .border-\[\#1f3763\],
body.theme-light .border-\[\#1f3868\],
body.theme-light .border-\[\#20365e\],
body.theme-light .border-\[\#203966\],
body.theme-light .border-\[\#223961\],
body.theme-light .border-\[\#23385e\],
body.theme-light .border-\[\#243a63\],
body.theme-light .border-\[\#243d6e\],
body.theme-light .border-\[\#253e6b\],
body.theme-light .border-\[\#27447a\],
body.theme-light .border-slate-800,
body.theme-light .border-slate-700 {
  border-color: #cbd5e1 !important;
}

/* High Contrast Typography */
body.theme-light .text-white,
body.theme-light .text-slate-100,
body.theme-light .text-slate-200 {
  color: #0f172a !important;
}

body.theme-light .text-slate-300,
body.theme-light .text-slate-400 {
  color: #334155 !important;
}

body.theme-light .text-slate-500,
body.theme-light .text-slate-600 {
  color: #64748b !important;
}

body.theme-light .text-cyan-400,
body.theme-light .text-cyan-300 {
  color: #0284c7 !important;
}

body.theme-light .text-cyan-500 {
  color: #0369a1 !important;
}

body.theme-light .text-amber-400,
body.theme-light .text-amber-300 {
  color: #b45309 !important;
}

body.theme-light .text-emerald-400,
body.theme-light .text-emerald-300,
body.theme-light .text-green-400 {
  color: #047857 !important;
}

body.theme-light .text-purple-400,
body.theme-light .text-purple-300 {
  color: #6b21a8 !important;
}

body.theme-light .text-blue-300 {
  color: #1d4ed8 !important;
}

body.theme-light .text-red-400,
body.theme-light .text-red-300 {
  color: #b91c1c !important;
}

/* Badges & Chips */
body.theme-light .tag-free {
  background: #e0f2fe !important;
  border: 1px solid #7dd3fc !important;
  color: #0369a1 !important;
}

body.theme-light .tag-reserved {
  background: #fef3c7 !important;
  border: 1px solid #fcd34d !important;
  color: #92400e !important;
}

body.theme-light .tag-contract {
  background: #dbeafe !important;
  border: 1px solid #93c5fd !important;
  color: #1e40af !important;
}

body.theme-light .tag-sold {
  background: #d1fae5 !important;
  border: 1px solid #6ee7b7 !important;
  color: #065f46 !important;
}

body.theme-light .tag-overdue {
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  color: #991b1b !important;
}

body.theme-light .tag-paid {
  background: #d1fae5 !important;
  border: 1px solid #6ee7b7 !important;
  color: #065f46 !important;
}

body.theme-light .bg-cyan-950,
body.theme-light .bg-cyan-950\/60,
body.theme-light .bg-cyan-950\/80,
body.theme-light .bg-cyan-900\/60 {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #7dd3fc !important;
}

body.theme-light .bg-blue-950,
body.theme-light .bg-blue-950\/60,
body.theme-light .bg-blue-950\/80,
body.theme-light .bg-blue-950\/20,
body.theme-light .bg-blue-950\/30,
body.theme-light .bg-blue-900\/60,
body.theme-light .bg-blue-900\/30 {
  background-color: #dbeafe !important;
  color: #1e40af !important;
  border-color: #93c5fd !important;
}

body.theme-light .bg-emerald-950,
body.theme-light .bg-emerald-950\/60,
body.theme-light .bg-emerald-950\/80,
body.theme-light .bg-emerald-900\/60 {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
  border-color: #6ee7b7 !important;
}

body.theme-light .bg-amber-950,
body.theme-light .bg-amber-900\/60 {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fcd34d !important;
}

body.theme-light .bg-red-950,
body.theme-light .bg-red-950\/10,
body.theme-light .bg-red-950\/20,
body.theme-light .bg-red-950\/40,
body.theme-light .bg-red-950\/60,
body.theme-light .bg-red-900\/60,
body.theme-light .bg-red-900\/20 {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fca5a5 !important;
}

body.theme-light .bg-purple-950,
body.theme-light .bg-purple-950\/80 {
  background-color: #f3e8ff !important;
  color: #6b21a8 !important;
  border-color: #d8b4fe !important;
}

body.theme-light .bg-slate-800,
body.theme-light .bg-slate-800\/60,
body.theme-light .bg-slate-800\/40,
body.theme-light .bg-slate-800\/30,
body.theme-light .bg-slate-900 {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

/* Blueprint Tables */
body.theme-light .blueprint-table th {
  background: #f8fafc !important;
  color: #334155 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

body.theme-light .blueprint-table td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

body.theme-light .blueprint-table tr:hover td {
  background: #f1f5f9 !important;
}

/* Blueprint Corner Crosses */
body.theme-light .blueprint-card::before,
body.theme-light .blueprint-card::after {
  color: #0284c7 !important;
  opacity: 0.9 !important;
}

/* Custom Scrollbars in Light Mode */
body.theme-light ::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}

body.theme-light ::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
}

body.theme-light ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Architectural CAD Blueprint SVG in Light Mode */
body.theme-light svg rect[fill="#0b1730"] { fill: #f8fafc !important; stroke: #0284c7 !important; }
body.theme-light svg rect[fill="#08142b"] { fill: #f0fdf4 !important; stroke: #059669 !important; }
body.theme-light svg rect[fill="#08152e"] { fill: #eff6ff !important; }
body.theme-light svg rect[fill="#091834"] { fill: #f1f5f9 !important; }
body.theme-light svg rect[fill="#38bdf8"] { fill: #0284c7 !important; }
body.theme-light svg line { stroke: #0284c7 !important; }
body.theme-light svg text[fill="#ffffff"] { fill: #0f172a !important; }
body.theme-light svg text[fill="#38bdf8"] { fill: #0284c7 !important; }
body.theme-light svg text[fill="#94a3b8"] { fill: #475569 !important; }
body.theme-light svg text[fill="#64748b"] { fill: #64748b !important; }
body.theme-light svg text[fill="#93c5fd"] { fill: #1d4ed8 !important; }

/* SmartSales AI Bot Light Mode Refinements */
body.theme-light #sales-bot-panel {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16) !important;
}

body.theme-light #sales-bot-panel .bg-gradient-to-r {
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

body.theme-light #sales-bot-panel .bg-gradient-to-r h4 {
  color: #0f172a !important;
}

body.theme-light #sales-bot-panel .bg-gradient-to-r p {
  color: #0284c7 !important;
}

body.theme-light #sales-bot-panel .bg-gradient-to-r button {
  color: #64748b !important;
}

body.theme-light #sales-bot-panel .bg-gradient-to-r button:hover {
  color: #0f172a !important;
  background-color: #e2e8f0 !important;
}

body.theme-light #sales-bot-trigger > div {
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.25) !important;
}

