/* ═══════════════════════════════════════════════════
   SILTUMS — Galvenais stils
   Dizains: silti toņi, modernā SaaS estētika
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Accessibility ── */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 8px 16px;
  background: var(--primary, #2D6A4F);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-to-content:focus {
  left: 0;
}

/* ── Mainīgie ── */
:root {
  --primary:        #2D6A4F;
  --primary-dark:   #1B4332;
  --primary-light:  #52B788;
  --primary-pale:   #D8F3DC;
  --secondary:      #A47B3C;
  --secondary-light:#74C69D;
  --dark:           #0D2818;
  --dark-2:         #1B4332;
  --gray:           #5F7368;
  --gray-light:     #B5C4BC;
  --border:         #D4E6DC;
  --bg:             #F8FAF8;
  --bg-2:           #EEF4F0;
  --white:          #FFFFFF;
  --card-shadow:    0 2px 20px rgba(45,106,79,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 8px 40px rgba(45,106,79,0.16), 0 2px 8px rgba(0,0,0,0.06);
  --radius:         20px;
  --radius-sm:      8px;
  --radius-lg:      28px;
  --radius-xl:      32px;
  --transition:     0.2s ease;
  --font:           'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: 16px;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --neu-shadow-light: -6px -6px 14px rgba(255, 255, 255, 0.7);
  --neu-shadow-dark: 6px 6px 14px rgba(0, 0, 0, 0.08);
  --gradient-mesh-1: #2D6A4F;
  --gradient-mesh-2: #52B788;
  --gradient-mesh-3: #95D5B2;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Night tēma ── */
[data-theme="night"] {
  --primary:        #52B788;
  --primary-dark:   #2D6A4F;
  --primary-light:  #95D5B2;
  --primary-pale:   rgba(82,183,136,0.15);
  --secondary:      #C9902A;
  --secondary-light:#34D399;
  --dark:           #E2E8F0;
  --dark-2:         #CBD5E1;
  --gray:           #94A3B8;
  --gray-light:     #64748B;
  --border:         #334155;
  --bg:             #0F172A;
  --bg-2:           #1E293B;
  --white:          #1E293B;
  --card-shadow:    0 2px 20px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.5);
  --card-shadow-hover: 0 8px 40px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.6);
  --glass-bg:       rgba(30, 41, 59, 0.75);
  --glass-border:   rgba(51, 65, 85, 0.5);
  --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.4);
  --neu-shadow-light: -6px -6px 14px rgba(30, 41, 59, 0.5);
  --neu-shadow-dark:  6px 6px 14px rgba(0, 0, 0, 0.4);
  --gradient-mesh-1: #1E293B;
  --gradient-mesh-2: #334155;
  --gradient-mesh-3: #475569;
  color-scheme: dark;
}
[data-theme="night"] body { background: var(--bg); color: var(--dark); }
[data-theme="night"] .dash-topbar { background: #0F172A; border-bottom-color: var(--border); }
[data-theme="night"] .dash-sidebar { background: #0B1120; }
[data-theme="night"] .auth-card { background: var(--white); color: var(--dark); }
[data-theme="night"] .modal { background: #1E293B; color: var(--dark); }
[data-theme="night"] .modal-overlay { background: rgba(0,0,0,0.8); }
[data-theme="night"] .form-input,
[data-theme="night"] .form-select,
[data-theme="night"] .form-textarea,
[data-theme="night"] textarea { background: #0F172A; color: var(--dark); border-color: var(--border); }
[data-theme="night"] .form-input::placeholder { color: var(--gray-light); }
[data-theme="night"] .form-input:focus,
[data-theme="night"] .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(82,183,136,0.2); }
[data-theme="night"] table th { background: #0F172A; color: var(--gray); }
[data-theme="night"] table td { color: var(--dark); border-bottom-color: var(--border); }
[data-theme="night"] table tr:hover td { background: rgba(51,65,85,0.3); }
[data-theme="night"] .bento-icon-green { background: rgba(82,183,136,0.15); }
[data-theme="night"] .bento-icon-orange { background: rgba(251,191,36,0.15); }
[data-theme="night"] .bento-icon-yellow { background: rgba(250,204,21,0.15); }
[data-theme="night"] .bento-icon-blue { background: rgba(96,165,250,0.15); }
[data-theme="night"] .bento-icon-purple { background: rgba(196,181,253,0.15); }
[data-theme="night"] .bento-icon-teal { background: rgba(94,234,212,0.15); }
[data-theme="night"] .bento-accent-green { border-left-color: #52B788; }
[data-theme="night"] .bento-accent-orange { border-left-color: #FBBF24; }
[data-theme="night"] .bento-accent-yellow { border-left-color: #FBBF24; }
[data-theme="night"] .bento-accent-blue { border-left-color: #60A5FA; }
[data-theme="night"] .bento-accent-purple { border-left-color: #C4B5FD; }
[data-theme="night"] .bento-accent-teal { border-left-color: #34D399; }
[data-theme="night"] .status-pending { background: rgba(245,158,11,0.2); color: #FBBF24; }
[data-theme="night"] .status-confirmed { background: rgba(59,130,246,0.2); color: #60A5FA; }
[data-theme="night"] .status-processing { background: rgba(196,181,253,0.2); color: #C4B5FD; }
[data-theme="night"] .status-delivered { background: rgba(52,211,168,0.2); color: #34D399; }
[data-theme="night"] .status-cancelled { background: rgba(248,113,113,0.2); color: #F87171; }
[data-theme="night"] .badge { background: rgba(51,65,85,0.5); color: var(--dark); }
[data-theme="night"] .badge-orange { background: rgba(201,144,42,0.2); color: #C9902A; }
[data-theme="night"] .badge-cyan { background: rgba(8,145,178,0.2); color: #22D3EE; }
[data-theme="night"] .badge-indigo { background: rgba(79,70,229,0.2); color: #A5B4FC; }
[data-theme="night"] .badge-amber { background: rgba(217,119,6,0.2); color: #FCD34D; }
[data-theme="night"] .badge-emerald { background: rgba(5,150,105,0.2); color: #6EE7B7; }
[data-theme="night"] .badge-slate { background: rgba(71,85,105,0.2); color: #94A3B8; }
[data-theme="night"] .badge-teal { background: rgba(13,148,136,0.2); color: #5EEAD4; }
[data-theme="night"] .btn-primary { background: var(--primary); color: #0F172A; }
[data-theme="night"] .btn-outline { border-color: var(--border); color: var(--dark); }
[data-theme="night"] .btn-outline:hover { background: rgba(51,65,85,0.3); }
[data-theme="night"] .section-sub { color: var(--gray); }
[data-theme="night"] .lang-btn { color: var(--gray); }
[data-theme="night"] .lang-btn.active { color: var(--dark); background: rgba(51,65,85,0.5); }
[data-theme="night"] .topbar-bell { color: var(--gray); }
[data-theme="night"] .topbar-bell:hover { color: var(--dark); }
[data-theme="night"] .topbar-logout-btn { color: var(--gray); }
[data-theme="night"] .card, [data-theme="night"] .glass-card { background: var(--white); border-color: var(--border); }
[data-theme="night"] .agent-card { background: var(--white); border-color: var(--border); }
[data-theme="night"] .agent-card::before { background: linear-gradient(90deg, var(--primary), #34D399); }
[data-theme="night"] .agent-card-emoji { background: rgba(82,183,136,0.15); }
[data-theme="night"] .agent-card-name { color: var(--dark); }
[data-theme="night"] .agent-card-stats { border-top-color: var(--border); }
[data-theme="night"] .agent-success-bar { background: var(--border); }
[data-theme="night"] .agents-filter-bar { background: #0F172A; }
[data-theme="night"] .agents-detail-tabs { background: #0F172A; }
[data-theme="night"] .agents-detail-stat { background: #0F172A; }
[data-theme="night"] .agent-mem-category { background: rgba(82,183,136,0.15); color: var(--primary); }
[data-theme="night"] .agent-mem-item { border-bottom-color: var(--border); }
[data-theme="night"] .dash-content { background: var(--bg); }
[data-theme="night"] h1, [data-theme="night"] h2, [data-theme="night"] h3 { color: var(--dark); }
[data-theme="night"] .table-wrap { background: var(--white); border-color: var(--border); }
[data-theme="night"] .pagination-btn { background: var(--white); color: var(--dark); border-color: var(--border); }
[data-theme="night"] .pagination-btn.active { background: var(--primary); color: #0F172A; }
[data-theme="night"] .tab-btn { color: var(--gray); border-bottom-color: transparent; }
[data-theme="night"] .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
[data-theme="night"] .toast { background: #1E293B; color: var(--dark); border-color: var(--border); }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }
ul { list-style: none; }

/* ── Glassmorphism ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

.glass-card-dark {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

/* ── Neumorphism ── */
.neu {
  box-shadow: var(--neu-shadow-light), var(--neu-shadow-dark);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Glow border ── */
.glow-border {
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark), var(--gradient-mesh-3));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.glow-border:hover::before {
  opacity: 1;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* ── Tipografija ── */
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.1rem; font-weight: 600; }
h2:focus, h3:focus { outline: none; }
p { color: var(--gray); line-height: 1.7; }
.text-primary { color: var(--primary); }
.text-dark { color: var(--dark); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #74C69D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.section-header { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.section-header p { margin-top: 16px; font-size: 1.1rem; }

/* ── Pogas ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: 4px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(45,106,79,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45,106,79,0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(164,123,60,0.25);
}
.btn-secondary:hover { background: #8B6832; transform: translateY(-2px); }

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background: var(--primary-pale); }

.btn-ghost {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

.header .nav-actions .btn-outline {
  border-color: rgba(255,255,255,0.5);
  color: rgba(255,255,255,0.9);
  background: transparent;
}
.header .nav-actions .btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

.btn-dark {
  background: var(--dark);
  color: #fff;
}
.btn-dark:hover { background: var(--dark-2); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Kartes ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.card-body { padding: 28px; }
.card-header { padding: 24px 28px 0; }
.card-footer { padding: 0 28px 28px; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-orange { background: var(--primary-pale); color: var(--primary); }
.badge-green { background: #E8F5EE; color: var(--secondary); }
.badge-brown { background: #F5EBE0; color: #8B4513; }
.badge-gray { background: #F5F0EB; color: var(--gray); }
.badge-blue { background: #EBF4FF; color: #2563EB; }
.badge-purple { background: #F3E8FF; color: #7C3AED; }
.badge-teal { background: #E6FFFA; color: #0D9488; }
.badge-red { background: #FEE2E2; color: #DC2626; }
.badge-cyan { background: #E0F7FA; color: #0891B2; }
.badge-indigo { background: #EEF2FF; color: #4F46E5; }
.badge-amber { background: #FEF3C7; color: #D97706; }
.badge-emerald { background: #D1FAE5; color: #059669; }
.badge-slate { background: #F1F5F9; color: #475569; }

/* ── Inputs ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}
.form-input::placeholder { color: var(--gray-light); }

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--dark);
  background: var(--white);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F7368' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
.form-select:focus { border-color: var(--primary); }

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 0;
}
.header.scrolled {
  background: rgba(13,40,24,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.logo-icon { width: 36px; height: 36px; }
.logo svg { fill: var(--primary-light); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,0.1); }
.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.mobile-menu-btn {
  display: none;
  color: #fff;
  font-size: 1.5rem;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, #081A0F 0%, #0D2818 40%, #1B4332 70%, #236840 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}
.hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  background: radial-gradient(circle, var(--gradient-mesh-2), transparent 70%);
  top: -10%;
  right: -5%;
  animation: float-orb 15s ease-in-out infinite;
  animation-delay: -5s;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  background: radial-gradient(circle, var(--gradient-mesh-3), transparent 70%);
  bottom: -15%;
  left: -10%;
  animation: float-orb 15s ease-in-out infinite;
  animation-delay: -10s;
  pointer-events: none;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-10px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 24px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(45,106,79,0.2);
  border: 1px solid rgba(45,106,79,0.35);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 24px;
}
.hero h1 {
  color: #fff;
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, var(--gradient-mesh-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero > .container > .hero-content > p {
  color: rgba(255,255,255,0.65);
  font-size: 1.15rem;
  margin-bottom: 40px;
  max-width: 500px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats {
  display: flex;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero .stat-card,
.hero-stats .stat-card,
.hero-stats .stat {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-stats .stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.stat-number { display: block; font-size: 1.8rem; font-weight: 800; color: #fff; }
.stat-label { display: block; font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 2px; }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-flame {
  width: 320px;
  height: 420px;
  position: relative;
}
.flame-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(255,165,0,0.35) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}
.flame-svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 40px rgba(255,165,0,0.5));
  animation: flameFlicker 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ── Liesmas krāsu animācijas ── */
@keyframes flameOuter {
  0%   { stop-color: #FF8C00; }
  33%  { stop-color: #FF6600; }
  66%  { stop-color: #E85D04; }
  100% { stop-color: #FF8C00; }
}
@keyframes flameMiddle {
  0%   { stop-color: #FFD700; }
  33%  { stop-color: #FFA500; }
  66%  { stop-color: #FFB347; }
  100% { stop-color: #FFD700; }
}
@keyframes flameCore {
  0%   { stop-color: #FFFACD; }
  33%  { stop-color: #FFE4B5; }
  66%  { stop-color: #FFD700; }
  100% { stop-color: #FFFACD; }
}
@keyframes flameBase {
  0%   { stop-color: #8B2500; }
  50%  { stop-color: #A0522D; }
  100% { stop-color: #8B2500; }
}
@keyframes flameFlicker {
  0%   { transform: scaleX(1) scaleY(1); filter: drop-shadow(0 0 40px rgba(255,165,0,0.5)); }
  25%  { transform: scaleX(0.98) scaleY(1.02); filter: drop-shadow(0 0 50px rgba(255,140,0,0.6)); }
  50%  { transform: scaleX(1.01) scaleY(0.99); filter: drop-shadow(0 0 35px rgba(255,165,0,0.4)); }
  75%  { transform: scaleX(0.99) scaleY(1.01); filter: drop-shadow(0 0 55px rgba(255,200,0,0.55)); }
  100% { transform: scaleX(1) scaleY(1); filter: drop-shadow(0 0 40px rgba(255,165,0,0.5)); }
}

/* Gradient stop animācijas */
#f1s1 { animation: flameOuter 3s ease-in-out infinite; }
#f1s2 { animation: flameBase 4s ease-in-out infinite 0.3s; }
#f1s3 { animation: flameBase 4s ease-in-out infinite 0.8s; }
#f2s1 { animation: flameMiddle 3.2s ease-in-out infinite 0.2s; }
#f2s2 { animation: flameOuter 3s ease-in-out infinite 0.5s; }
#f2s3 { animation: flameBase 4s ease-in-out infinite; }
#f3s1 { animation: flameCore 2.5s ease-in-out infinite; }
#f3s2 { animation: flameMiddle 3.2s ease-in-out infinite 0.4s; }
#f3s3 { animation: flameOuter 3s ease-in-out infinite 0.6s; }

/* ── Valodu pārslēdzējs ── */
.lang-switcher { display: flex; gap: 2px; background: rgba(255,255,255,0.1); border-radius: var(--radius-sm); padding: 2px; }
.lang-btn { padding: 4px 8px; font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.5); border-radius: 6px; transition: all var(--transition); cursor: pointer; border: none; background: none; font-family: var(--font); }
.lang-btn:hover { color: rgba(255,255,255,0.8); }
.lang-btn.active { background: rgba(255,255,255,0.2); color: #fff; }

/* Valodu pārslēdzējs admin/dashboard topbar */
.dash-topbar .lang-switcher { background: var(--bg-2); }
.dash-topbar .lang-btn { color: var(--gray); }
.dash-topbar .lang-btn:hover { color: var(--dark); }
.dash-topbar .lang-btn.active { background: var(--primary); color: #fff; }

/* Valodu pārslēdzējs auth wall */
.auth-wall .lang-switcher { background: rgba(255,255,255,0.1); position: absolute; top: 24px; right: 24px; }
.auth-wall { position: relative; }

/* ── Priekšrocības ── */
.benefits { background: var(--bg-2); }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.benefit-card {
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.benefit-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.benefit-icon {
  width: 52px; height: 52px;
  background: var(--primary-pale);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.benefit-icon svg { color: var(--primary); }
.benefit-card h4 { margin-bottom: 8px; }

/* ── Produkti ── */
.products-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
  background: var(--bg-2);
  padding: 6px;
  border-radius: var(--radius);
  display: inline-flex;
  margin: 0 auto 40px;
}
.products-tabs-wrap { text-align: center; }
.tab-btn {
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray);
  transition: all var(--transition);
}
.tab-btn.active {
  background: var(--white);
  color: var(--dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.product-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid transparent;
  background-clip: padding-box;
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(45, 106, 79, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.product-card:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(45, 106, 79, 0.15);
  border-color: var(--primary);
}
.product-card:hover::before {
  opacity: 1;
}
.product-card-image {
  height: 220px;
  background: linear-gradient(135deg, #F5EBE0 0%, #EDD9C8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* Shimmer effect on product image area */
.product-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}
.product-card:hover .product-card-image::after {
  left: 100%;
}
.product-type-icon { font-size: 5rem; line-height: 1; user-select: none; }
.product-card-image::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0,0,0,0.08), transparent);
  z-index: 1;
  pointer-events: none;
}
.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.85);
  z-index: 2;
}
.product-card-body { padding: 24px; }
.product-card-body h3 { margin-bottom: 8px; font-size: 1.15rem; }
.product-short-desc { font-size: 0.85rem; color: var(--gray); margin-bottom: 16px; font-family: monospace; }
.product-desc { font-size: 0.9rem; color: var(--gray); margin-bottom: 20px; line-height: 1.6; }
.product-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.price-item {
  padding: 12px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  text-align: center;
}
.price-amount { font-size: 1.6rem; font-weight: 800; color: var(--primary); display: block; }
.price-amount.primary-price { font-size: 2rem; color: var(--primary-dark); }
.price-label { font-size: 0.75rem; color: var(--gray); }
.product-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.meta-chip {
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.72rem;
  color: var(--gray);
  font-weight: 500;
}

/* Product card CTA gradient */
.product-card .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
}
.product-card .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* ── Kalkulators ── */
.calculator-section { background: var(--bg-2); }
.calculator-wrap {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.calc-panel { padding: 48px; }
.calc-panel-left { border-right: 1px solid var(--border); }
.calc-panel-right { background: linear-gradient(135deg, var(--dark) 0%, #1a3a2a 100%); border-radius: var(--radius); color: #fff; }

.calc-header { margin-bottom: 36px; }
.calc-header h3 { font-size: 1.5rem; margin-bottom: 8px; }

.slider-group { margin-bottom: 28px; }
.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.slider-label-text { font-weight: 500; font-size: 0.9rem; color: var(--dark); }
.slider-value-display {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-pale);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}
.slider-value-input {
  width: 56px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  text-align: center;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}
.slider-value-input::-webkit-outer-spin-button,
.slider-value-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.slider-unit { font-size: 0.8rem; color: var(--primary); font-weight: 500; }

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45,106,79,0.4);
  transition: transform var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}
.range-track {
  position: relative;
  margin-bottom: 6px;
}

.insulation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.insulation-opt {
  padding: 10px 4px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray);
}
.insulation-opt .icon { font-size: 1.4rem; display: block; margin-bottom: 4px; }
.insulation-opt:hover { border-color: var(--primary-light); color: var(--primary); }
.insulation-opt.selected {
  border-color: var(--primary);
  background: var(--primary-pale);
  color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(45,106,79,0.2);
}

/* Rezultātu panelis */
.calc-result-header { margin-bottom: 32px; }
.calc-result-header h3 { color: #fff; font-size: 1.4rem; margin-bottom: 4px; }
.calc-result-header p { color: rgba(255,255,255,0.5); font-size: 0.875rem; }

.result-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.result-tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  transition: all var(--transition);
  border: 1.5px solid rgba(255,255,255,0.15);
}
.result-tab.active { color: #fff; border-color: var(--primary-light); background: rgba(45,106,79,0.25); }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.result-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  transition: background 0.3s ease;
}
.result-card:hover {
  background: rgba(255, 255, 255, 0.12);
}
.result-card-icon {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 8px;
  opacity: 0.8;
}
.result-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-light);
  display: block;
  margin-bottom: 2px;
}
.result-card-label { font-size: 0.78rem; color: rgba(255,255,255,0.5); }

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
}
.result-row:last-child { border-bottom: none; }
.result-row-label { color: rgba(255,255,255,0.6); }
.result-row-value { color: #fff; font-weight: 600; }

.calc-recommend {
  margin-top: 24px;
  padding: 16px;
  background: rgba(82,183,136,0.15);
  border-radius: var(--radius);
  border: 1px solid rgba(82,183,136,0.3);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
}
.calc-recommend strong { color: var(--primary-light); }

.calc-cta { margin-top: 24px; width: 100%; }

/* Laika indikators */
.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.weather-dot { width: 8px; height: 8px; border-radius: 50%; }
.weather-dot.info { background: var(--primary-light); }
.weather-dot.warning { background: #F59E0B; animation: pulse-dot 2s infinite; }
.weather-dot.good { background: var(--secondary-light); }
@keyframes pulse-dot { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* ── AI Padomnieks ── */
.ai-section { background: var(--bg); }
.ai-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
}
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(45,106,79,0.1), rgba(82,183,136,0.1));
  border: 1px solid rgba(45,106,79,0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}
.ai-info h2 { margin-bottom: 16px; }
.ai-features { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.ai-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.ai-feature-icon {
  width: 40px; height: 40px;
  background: var(--primary-pale);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.chat-widget {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 520px;
  display: flex;
  flex-direction: column;
}
.chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #0D2818 0%, #1B4332 100%);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name { color: #fff; font-weight: 600; font-size: 0.95rem; }
.chat-header-status { color: rgba(255,255,255,0.5); font-size: 0.75rem; display: flex; align-items: center; gap: 4px; }
.chat-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.message { display: flex; gap: 10px; align-items: flex-end; }
.message.bot { flex-direction: row; }
.message.user { flex-direction: row-reverse; }
.message-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.bot .message-bubble {
  background: var(--bg-2);
  color: var(--dark);
  border-bottom-left-radius: 4px;
}
.user .message-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.message-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.chat-input-wrap {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.chat-input-field {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.chat-input-field:focus { border-color: var(--primary); }
.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.chat-send-btn:hover { transform: scale(1.05); }
.chat-send-btn svg { width: 18px; height: 18px; }

.chat-suggestions {
  padding: 8px 20px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chat-suggestion {
  padding: 6px 14px;
  background: var(--primary-pale);
  border: 1px solid rgba(45,106,79,0.2);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: all var(--transition);
}
.chat-suggestion:hover { background: var(--primary); color: #fff; }

.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-light);
  animation: typing 1.4s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100% { transform:translateY(0);opacity:0.4; } 30% { transform:translateY(-4px);opacity:1; } }

/* ── Laika prognoze ── */
.weather-section { background: linear-gradient(160deg, #081A0F 0%, #0D2818 50%, #0D2818 100%); }
.weather-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.weather-info h2 { color: #fff; margin-bottom: 16px; }
.weather-info p { color: rgba(255,255,255,0.6); font-size: 1rem; margin-bottom: 32px; }
.weather-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.weather-main {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.weather-temp-big {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.weather-temp-unit { font-size: 1.5rem; color: rgba(255,255,255,0.5); }
.weather-meta p { color: rgba(255,255,255,0.5); font-size: 0.875rem; margin: 0; }
.weather-meta strong { color: rgba(255,255,255,0.85); }
.weather-deviation {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 4px;
}
.deviation-cold { background: rgba(239,68,68,0.2); color: #FCA5A5; border: 1px solid rgba(239,68,68,0.3); }
.deviation-warm { background: rgba(74,222,128,0.2); color: #86EFAC; border: 1px solid rgba(74,222,128,0.3); }
.deviation-normal { background: rgba(45,106,79,0.2); color: var(--primary-light); border: 1px solid rgba(45,106,79,0.3); }

.forecast-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.forecast-day {
  text-align: center;
  padding: 10px 4px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
}
.forecast-day-name { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-bottom: 4px; }
.forecast-day-temp { font-size: 0.9rem; font-weight: 700; color: #fff; }
.forecast-day-temp.cold { color: #93C5FD; }
.forecast-day-temp.warm { color: var(--primary-light); }

.weather-recommendation {
  padding: 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.6;
}
.weather-recommendation.warning { background: rgba(245,158,11,0.15); color: #FDE68A; border: 1px solid rgba(245,158,11,0.25); }
.weather-recommendation.good { background: rgba(52,211,153,0.12); color: #6EE7B7; border: 1px solid rgba(52,211,153,0.2); }
.weather-recommendation.info { background: rgba(45,106,79,0.15); color: var(--primary-light); border: 1px solid rgba(45,106,79,0.25); }

.weather-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.weather-stat {
  text-align: center;
  padding: 20px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
}
.weather-stat-value { font-size: 1.8rem; font-weight: 800; color: #fff; display: block; }
.weather-stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-top: 4px; }
.weather-stat-sub { font-size: 0.7rem; color: rgba(255,255,255,0.3); }

/* ── Abonements ── */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.plan-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: var(--transition-smooth);
  position: relative;
}
.plan-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}
.plan-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 16px 40px rgba(45, 106, 79, 0.2);
}
.plan-card.featured .plan-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }

.plan-popular {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--primary-light);
  color: #fff;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
}
.plan-header { padding: 32px; background: var(--bg-2); }
.plan-card.featured .plan-header h3,
.plan-card.featured .plan-header .plan-price,
.plan-card.featured .plan-header p { color: #fff; }
.plan-card.featured .plan-header p { color: rgba(255,255,255,0.7); }
.plan-header h3 { font-size: 1.2rem; margin-bottom: 16px; }
.plan-price { font-size: 2.4rem; font-weight: 800; color: var(--dark); }
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--gray); }
.plan-header p { margin-top: 8px; font-size: 0.875rem; }
.plan-body { padding: 28px; }
.plan-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--dark);
}
.plan-feature-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary-pale);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.plan-feature-check svg { width: 10px; height: 10px; color: var(--primary); }

/* ── Abonementa priekšrocības (peldošie logi) ── */
.sub-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: -20px;
  position: relative;
  z-index: 2;
}
.sub-benefit-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  transition: transform 0.25s, box-shadow 0.25s;
}
.sub-benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);
}
.sub-benefit-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-pale);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}
.sub-benefit-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.sub-benefit-card p {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.55;
}
@media (max-width: 768px) {
  .sub-benefits-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 0;
  }
}

/* ── Leaflet kartes etiķetes ── */
.leaflet-city-label span {
  background: rgba(255,255,255,0.92);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary);
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ── Piegāde ── */
.delivery-section { background: var(--bg-2); }
.delivery-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.delivery-map {
  background: linear-gradient(135deg, #E8F4E8 0%, #D4EAD4 100%);
  border-radius: var(--radius-xl);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid #C8E0C8;
}
.map-placeholder {
  text-align: center;
  color: var(--secondary);
}
.map-circle {
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 2px dashed rgba(45,106,79,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.map-circle::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 2px dashed rgba(45,106,79,0.3);
}
.map-pin-center {
  width: 16px; height: 16px;
  background: var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(45,106,79,0.2);
}
.map-label {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  white-space: nowrap;
}
.delivery-features { display: flex; flex-direction: column; gap: 20px; }
.delivery-feature { display: flex; gap: 16px; align-items: flex-start; }
.delivery-feature-icon {
  width: 48px; height: 48px;
  background: var(--secondary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.delivery-feature h4 { margin-bottom: 4px; }
.delivery-feature p { font-size: 0.875rem; }

/* ── Atsauksmes ── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  transition: var(--transition-smooth);
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: -10px;
  left: 16px;
  font-size: 4rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.15;
  font-family: Georgia, serif;
}
.testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.testimonial-stars { display: flex; gap: 4px; margin-bottom: 16px; }
.star { color: #F59E0B; font-size: 1rem; }
.testimonial-text { font-size: 0.9rem; color: var(--gray); line-height: 1.7; margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.author-name { font-weight: 600; font-size: 0.9rem; }
.author-location { font-size: 0.78rem; color: var(--gray-light); }

/* ── CTA Banner ── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #1B4332 100%);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82, 183, 136, 0.3), transparent 70%);
  top: -20%;
  right: -5%;
  animation: pulse-glow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.5; }
}
.cta-section h2 { color: #fff; font-size: 2.4rem; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.75); font-size: 1.1rem; margin-bottom: 40px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Pasūtījuma modālis ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}
.modal.modal-sm { max-width: 420px; }
.modal.modal-md { max-width: 640px; }
.modal.modal-lg { max-width: 900px; }
.modal.modal-xl { max-width: 1200px; }
.loc-detail-row td { border-top: none !important; }
.loc-detail-row:hover { background: var(--bg-2) !important; }
.wh-cart-popover { position:absolute; right:0; top:100%; z-index:50; background:var(--bg-2); border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 10px; box-shadow:0 4px 16px rgba(0,0,0,.3); white-space:nowrap; min-width:220px; }
.wh-cart-popover input[type="number"] { background:var(--bg-1); border:1px solid var(--border); color:var(--text); border-radius:var(--radius-sm); padding:2px 4px; font-size:0.85rem; }
.wh-cart-popover input[type="number"]::-webkit-inner-spin-button { -webkit-appearance:none; }
.batch-detail-row td { border-top:none !important; }
.batch-detail-content { background:var(--bg-2); border-left:3px solid var(--accent); }
.batch-detail-content table { background:transparent; }
.batch-detail-content thead th { font-size:0.75rem; padding:4px 8px; }
.batch-detail-content tbody td { padding:4px 8px; }
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.modal-title { font-size: 1.4rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--dark); }

.order-product-summary {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--radius);
  margin-bottom: 24px;
  align-items: center;
}
.order-product-icon {
  width: 52px; height: 52px;
  background: var(--primary-pale);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.order-product-name { font-weight: 600; margin-bottom: 4px; }
.order-product-price { color: var(--primary); font-weight: 700; }

.unit-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.unit-opt {
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.unit-opt:hover { border-color: var(--primary-light); }
.unit-opt.selected { border-color: var(--primary); background: var(--primary-pale); }
.unit-opt-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.unit-opt-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.unit-opt-sub { font-size: 0.75rem; color: var(--gray); margin-top: 2px; }

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.order-total-label { font-weight: 500; color: var(--gray); }
.order-total-amount { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

/* ── Footer ── */
.footer { background: var(--dark); padding: 72px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.45); font-size: 0.875rem; line-height: 1.7; }
.footer-col h5 { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,0.45); font-size: 0.875rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--primary-light); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact-item { display: flex; gap: 8px; align-items: center; color: rgba(255,255,255,0.45); font-size: 0.875rem; }
.footer-contact-item svg { color: var(--primary-light); flex-shrink: 0; }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.8rem; margin: 0; }

/* ── Toast paziņojumi ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  max-width: 320px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { border-left-color: var(--secondary); }
.toast.error { border-left-color: #EF4444; }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100px); opacity: 0; } }

/* ── Loading ── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Global loading bar (top of page) */
.global-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.global-loading-bar.active {
  opacity: 1;
}
.global-loading-bar::after {
  content: '';
  display: block;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light, #f39c12));
  border-radius: 0 2px 2px 0;
  animation: loading-slide 1.2s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(200%); }
  100% { transform: translateX(400%); }
}

/* Section spinner (centered in container) */
.section-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

/* Button loading state */
.btn-loading {
  opacity: 0.7;
  cursor: wait !important;
}

/* ── Button ripple ── */
.btn-primary, .btn-outline {
  position: relative;
  overflow: hidden;
}
.btn-ripple {
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .hero::after { animation: none; }
  .cta-section::before { animation: none; }
  .product-card { transition: none; transform: none !important; }
  .hero-stats .stat { transition: none; }
  .bento-card { animation: none !important; transition: none; }
  .btn-ripple { display: none; }
}

/* ── Backdrop-filter fallback ── */
@supports not (backdrop-filter: blur(1px)) {
  .glass-card { background: rgba(255, 255, 255, 0.92); }
  .glass-card-dark { background: rgba(0, 0, 0, 0.85); }
  .hero-stats .stat { background: rgba(255, 255, 255, 0.2); }
}

/* ── Mobile: reduce animation intensity ── */
@media (max-width: 768px) {
  .hero::before { width: 250px; height: 250px; }
  .hero::after { width: 200px; height: 200px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .product-card:hover { transform: translateY(-4px); }
  .reveal { transform: translateY(20px); }
}

/* ── Dashboard ── */
.dash-layout { display: flex; min-height: 100vh; background: var(--bg); }
.dash-sidebar {
  width: 208px;
  background: var(--dark);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
}
.dash-sidebar-header { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; position: relative; z-index: 2; }
.dash-sidebar-header .logo { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.dash-sidebar-header .sidebar-brand-logo { margin: 0 auto; }
.topbar-logout-btn { background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; color: var(--gray); cursor: pointer; transition: all var(--transition); display: flex; align-items: center; }
.topbar-logout-btn:hover { color: #DC2626; border-color: #DC2626; background: #FEF2F2; }
.dash-nav { padding: 16px 12px; flex: 1; }
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 4px;
}
.dash-nav-item:hover, .dash-nav-item.active { background: rgba(255,255,255,0.08); color: #fff; }
.dash-nav-item.active { color: var(--primary-light); }
.dash-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.dash-nav-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 12px 0; }

.dash-main { margin-left: 208px; flex: 1; }
.dash-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.dash-topbar h1 { font-size: 1.2rem; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-topbar { overflow: hidden; }
.dash-content { padding: 32px; }
.dash-content h2 { font-size: 1.5rem; margin-bottom: 8px; }
.dash-content > .section-sub { color: var(--gray); margin-bottom: 32px; }

/* ── Legacy stats-row (analytics, etc.) ── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}
.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--dark); display: block; margin-bottom: 4px; }
.stat-card-label { font-size: 0.8rem; color: var(--gray); }
.stat-card-trend { font-size: 0.75rem; font-weight: 600; margin-top: 8px; }
.trend-up { color: var(--secondary); }
.trend-down { color: #EF4444; }

/* ── Bento Grid Dashboard ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.bento-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}
.bento-card:nth-child(1) { animation-delay: 0.05s; }
.bento-card:nth-child(2) { animation-delay: 0.1s; }
.bento-card:nth-child(3) { animation-delay: 0.15s; }
.bento-card:nth-child(4) { animation-delay: 0.2s; }
.bento-card:nth-child(5) { animation-delay: 0.25s; }
.bento-card:nth-child(6) { animation-delay: 0.3s; }
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}
.bento-card.bento-wide { grid-column: span 2; }
.bento-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.bento-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.bento-icon-green { background: rgba(45,106,79,0.1); }
.bento-icon-orange { background: rgba(234,179,8,0.1); }
.bento-icon-yellow { background: rgba(245,158,11,0.1); }
.bento-icon-blue { background: rgba(59,130,246,0.1); }
.bento-icon-purple { background: rgba(139,92,246,0.1); }
.bento-icon-teal { background: rgba(20,184,166,0.1); }
.bento-card .bento-card-label { font-size: 0.82rem; color: var(--gray); font-weight: 500; }
.bento-card-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--dark);
  display: block;
  line-height: 1.1;
}
.bento-wide .bento-card-value { font-size: 2.6rem; }
/* Accent border colors */
.bento-accent-green { border-left-color: var(--primary); }
.bento-accent-orange { border-left-color: #EAB308; }
.bento-accent-yellow { border-left-color: #F59E0B; }
.bento-accent-blue { border-left-color: #3B82F6; }
.bento-accent-purple { border-left-color: #8B5CF6; }
.bento-accent-teal { border-left-color: #14B8A6; }

/* ── Agents Section ── */
.agents-filter-bar {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.agent-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.agent-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}
.agent-card:hover::before { opacity: 1; }
.agent-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.agent-card-emoji {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--primary-pale);
  flex-shrink: 0;
}
.agent-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  line-height: 1.2;
}
.agent-card-domain {
  font-size: 0.72rem;
  color: var(--gray);
  font-weight: 500;
  margin-top: 2px;
}
.agent-card-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.agent-card-status.active { background: #22C55E; box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.agent-card-status.idle { background: var(--gray-light); }
.agent-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.agent-card-stat { text-align: center; }
.agent-card-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
  display: block;
  line-height: 1.2;
}
.agent-card-stat-label {
  font-size: 0.68rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.agent-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--gray);
}
.agent-card-failures {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(239,68,68,0.1);
  color: #EF4444;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.agent-success-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.agent-success-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.agents-detail-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.agents-detail-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.agents-detail-stat {
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.agents-detail-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  display: block;
}
.agents-detail-stat-label {
  font-size: 0.72rem;
  color: var(--gray);
  font-weight: 500;
}
.agent-mem-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.agent-mem-item:last-child { border-bottom: none; }
.agent-mem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.agent-mem-category {
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.agent-mem-content {
  font-size: 0.85rem;
  color: var(--dark);
  line-height: 1.5;
}
.agent-mem-meta {
  font-size: 0.72rem;
  color: var(--gray);
  margin-top: 4px;
  display: flex;
  gap: 12px;
}
@media (max-width: 900px) {
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .agents-detail-info { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .agents-grid { grid-template-columns: 1fr; }
  .agents-detail-info { grid-template-columns: 1fr 1fr; }
}

.table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
}
.table-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.table-header h3 { font-size: 1rem; }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--bg-2);
  padding: 12px 20px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td { padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 0.875rem; color: var(--dark); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-2); }

.status-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}
.status-pending { background: #FEF3C7; color: #D97706; }
.status-confirmed { background: #DBEAFE; color: #2563EB; }
.status-processing { background: #F3E8FF; color: #9333EA; }
.status-delivered { background: #D1FAE5; color: #059669; }
.status-cancelled { background: #FEE2E2; color: #DC2626; }

/* ── Auth wall ── */
.auth-wall {
  min-height: 100vh;
  background: linear-gradient(160deg, #081A0F 0%, #0D2818 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.auth-logo { margin: 0 auto 28px; display: flex; justify-content: center; }
.auth-card h2 { margin-bottom: 8px; }
.auth-card p { margin-bottom: 32px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--gray-light);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.google-btn {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
  transition: all var(--transition);
  background: var(--white);
  margin-bottom: 12px;
  cursor: pointer;
}
.google-btn:hover { border-color: var(--primary-light); background: var(--bg-2); }
.apple-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: #000;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.apple-btn:hover { background: #1a1a1a; }

/* ── Responsivitāte ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .calculator-wrap { grid-template-columns: 1fr; }
  .calc-panel-left { border-right: none; border-bottom: 1px solid var(--border); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px 40px; }
  .hero-visual { display: none; }
  .hero-stats { gap: 24px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .ai-wrap { grid-template-columns: 1fr; }
  .weather-wrap { grid-template-columns: 1fr; }
  .delivery-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .mobile-menu-btn { display: flex; }
  .dash-sidebar { transform: translateX(-100%); z-index: 200; transition: transform 0.3s ease; }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card.bento-wide { grid-column: span 2; }
  .insulation-grid { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: 1fr; }
  .forecast-row { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .dash-topbar {
    padding: 0 16px;
    height: 56px;
    gap: 8px;
  }
  .dash-topbar .lang-switcher { display: none; }
  .dash-content { padding: 20px 16px; }
  .dash-content table th,
  .dash-content table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .modal { padding: 28px; max-width: calc(100vw - 32px); }
  .modal-overlay { padding: 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .stats-row { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.bento-wide { grid-column: span 1; }
  .bento-wide .bento-card-value { font-size: 2.2rem; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .modal { padding: 24px; }
  .auth-card { padding: 32px 24px; }
  .dash-content { padding: 16px 12px; }
}

/* ── Sidebar toggle (mobilais) ── */
.sidebar-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
  padding: 4px 8px;
  line-height: 1;
}
@media (max-width: 768px) {
  .sidebar-toggle-btn { display: block; }
}

/* ── Sidebar overlay ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
}
.sidebar-overlay.active { display: block; }

/* ── Sidebar nav group labels ── */
.nav-group-label {
  padding: 8px 20px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neutral-400, #9ca3af);
  margin-top: 8px;
}
.dash-nav > .nav-group-label:first-child { margin-top: 0; }

/* Collapsed sidebar hides group labels */
.sidebar-collapsed .nav-group-label { display: none; }

/* ── Tabula mobilajā ── */
@media (max-width: 768px) {
  .table-wrap { overflow-x: auto; }
}

/* Mobile card-view for admin tables */
@media (max-width: 640px) {
  .dash-content table:not(.no-card-view) thead {
    display: none;
  }
  .dash-content table:not(.no-card-view) tbody tr {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
  }
  .dash-content table:not(.no-card-view) tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.85rem;
  }
  .dash-content table:not(.no-card-view) tbody td:last-child {
    border-bottom: none;
  }
  .dash-content table:not(.no-card-view) tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--neutral-500, #6b7280);
    flex-shrink: 0;
    margin-right: 12px;
  }
  .dash-content table:not(.no-card-view) tbody td:not([data-label])::before {
    display: none;
  }
  /* Status badges in card view */
  .dash-content table:not(.no-card-view) .badge {
    font-size: 0.75rem;
  }
}

/* ── Form grid responsive ── */
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ═══════════════════════════════════
   LEADS — B2B statusa badges un stili
   ═══════════════════════════════════ */

.lead-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* Sortējami tabulas headeri */
.sortable-th:hover { background: rgba(0,0,0,0.06); }
.sortable-th { transition: background 0.15s; }

/* Lead detail aktivitāšu žurnāls */
#leadDetailContent .admin-table {
  font-size: 0.82rem;
}
#leadDetailContent .admin-table td {
  padding: 8px 12px;
}
#leadDetailContent .admin-table th {
  padding: 8px 12px;
  font-size: 0.75rem;
}

/* ══════════════════════════════════════════ */
/* KANBAN BOARD                               */
/* ══════════════════════════════════════════ */

.kanban-board { display: flex; gap: 12px; overflow-x: auto; min-height: 400px; padding-bottom: 8px; }
.kanban-col { flex: 0 0 200px; background: var(--bg-card); border-radius: 12px; padding: 12px; min-height: 200px; }
.kanban-col-header { font-weight: 600; margin-bottom: 12px; text-align: center; }
.kanban-card { background: #fff; border-radius: 8px; padding: 10px; margin-bottom: 8px;
  cursor: grab; border-left: 3px solid var(--primary); box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s; }
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.5; }
.kanban-col.drag-over { background: rgba(82,183,136,0.1); }

/* View toggle buttons */
.view-toggle-btn { background: transparent; border: none; padding: 5px 12px; font-size: 0.8rem; border-radius: 6px; cursor: pointer; color: var(--gray); transition: all 0.2s; }
.view-toggle-btn.active { background: var(--primary); color: #fff; }

/* ══════════════════════════════════════════ */
/* KALENDĀRS                                  */
/* ══════════════════════════════════════════ */

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.calendar-header { text-align: center; font-weight: 600; padding: 8px; font-size: 0.82rem; color: var(--gray); background: var(--bg); border-bottom: 1px solid var(--border); }
.calendar-day { min-height: 80px; background: var(--bg-card); padding: 6px; position: relative; border: 1px solid var(--border); }
.calendar-day.today { outline: 2px solid var(--primary); outline-offset: -2px; z-index: 1; }
.calendar-day.other-month { opacity: 0.4; background: var(--bg); }
.calendar-day-num { font-size: 0.78rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 4px; }
.calendar-item { font-size: 0.72rem; padding: 2px 6px; border-radius: 4px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-item.task-high { background: #fee2e2; color: #991b1b; }
.calendar-item.task-medium { background: #fef3c7; color: #92400e; }
.calendar-item.task-low { background: #dcfce7; color: #166534; }
.calendar-item.task-urgent { background: #fecaca; color: #7f1d1d; font-weight: 600; }
.calendar-item.task-pending { background: #f3f4f6; color: #374151; }
.calendar-item.activity { background: #dbeafe; color: #1e40af; }

/* ══════════════════════════════════════════ */
/* KPI PROGRESS BARS                          */
/* ══════════════════════════════════════════ */

.kpi-bar-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kpi-bar-label { width: 80px; font-size: 0.78rem; color: var(--gray); }
.kpi-bar { flex: 1; height: 12px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.kpi-bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s; }
.kpi-bar-fill.red { background: #ef4444; }
.kpi-bar-fill.yellow { background: #f59e0b; }
.kpi-bar-fill.green { background: #22c55e; }
.kpi-bar-value { font-size: 0.75rem; width: 80px; text-align: right; color: var(--gray); }

/* ══════════════════════════════════════════ */
/* RESPONSIVE — Kanban & Calendar             */
/* ══════════════════════════════════════════ */

@media (max-width: 768px) {
  .kanban-board { flex-direction: column; }
  .kanban-col { flex: 0 0 auto; }
  .calendar-grid { gap: 1px; }
  .calendar-day { min-height: 60px; padding: 4px; }
  .calendar-item { font-size: 0.65rem; padding: 1px 4px; }
  .kpi-bar-label { width: 60px; font-size: 0.72rem; }
  .kpi-bar-value { width: 65px; font-size: 0.7rem; }
}

/* ══════════════════════════════════════════ */
/* Topbar — Notification Bell                 */
/* ══════════════════════════════════════════ */

.topbar-bell {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  color: var(--gray);
  transition: all var(--transition);
}
.topbar-bell:hover { background: var(--bg-2); color: var(--primary); }
.bell-badge {
  position: absolute;
  top: 0; right: -2px;
  background: #EF4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 0 4px;
}

/* ══════════════════════════════════════════ */
/* Sidebar Collapse                           */
/* ══════════════════════════════════════════ */

.sidebar-collapse-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition);
  flex-shrink: 0;
  min-width: 30px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-collapse-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.dash-sidebar-header .logo { min-width: 0; overflow: visible; flex: 1; }
.sidebar-brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dash-sidebar { transition: width 0.3s ease; }
.dash-main { transition: margin-left 0.3s ease; }

.dash-layout.sidebar-collapsed .dash-sidebar { width: 60px; }
.dash-layout.sidebar-collapsed .dash-main { margin-left: 60px; }
.dash-layout.sidebar-collapsed .sidebar-brand-text { display: none; }
.dash-layout.sidebar-collapsed .sidebar-brand-logo { display: none !important; }
.sidebar-brand-initials { display: none; }
.dash-layout.sidebar-collapsed .sidebar-brand-initials {
  display: flex !important; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff; font-weight: 600; font-size: 0.85rem;
  align-items: center; justify-content: center; margin: 0 auto;
}
.dash-layout.sidebar-collapsed .dash-nav-item span { display: none; }
.dash-layout.sidebar-collapsed .dash-nav-item { justify-content: center; padding: 10px 0; }
.dash-layout.sidebar-collapsed .dash-nav-item svg { width: 20px; height: 20px; }
.dash-layout.sidebar-collapsed .dash-sidebar-header { padding: 24px 10px; justify-content: center; flex-direction: column; gap: 4px; }
.dash-layout.sidebar-collapsed .dash-sidebar-header .logo { justify-content: center; flex: none; }
.dash-layout.sidebar-collapsed .sidebar-collapse-btn { padding: 6px; margin: 0 auto; }
.dash-layout.sidebar-collapsed .dash-nav-divider { margin: 8px 4px; }
.dash-layout.sidebar-collapsed .dash-nav-item[data-section] { position: relative; }
.dash-layout.sidebar-collapsed .dash-nav-item[data-section]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 64px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--dark);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
  z-index: 300;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  pointer-events: none;
}

/* ══════════════════════════════════════════ */
/* Warehouse Cards Redesign                    */
/* ══════════════════════════════════════════ */

.wh-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.wh-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.wh-card-header h4 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.wh-stock-bar {
  height: 8px;
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}
.wh-stock-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s;
}
.wh-stock-bar-fill.green { background: #22c55e; }
.wh-stock-bar-fill.yellow { background: #f59e0b; }
.wh-stock-bar-fill.red { background: #ef4444; }
.wh-stat { font-size: 0.82rem; color: var(--gray); }
.wh-stat strong { color: var(--dark); }
.wh-inline-edit input {
  width: 80px;
  padding: 4px 8px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.wh-transfer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(45,106,79,0.08), rgba(82,183,136,0.12));
  border: 1px dashed var(--primary);
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.wh-transfer-btn:hover { background: rgba(45,106,79,0.15); }

/* ══════════════════════════════════════════ */
/* Finance Module                              */
/* ══════════════════════════════════════════ */

.finance-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: var(--radius-sm);
  width: fit-content;
}
.finance-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
  transition: all var(--transition);
}
.finance-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.quote-items-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.quote-items-table th, .quote-items-table td { padding: 8px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.quote-items-table th { text-align: left; color: var(--gray); font-weight: 500; }
.quote-totals { text-align: right; margin-top: 16px; }
.quote-totals .total-line { display: flex; justify-content: flex-end; gap: 24px; padding: 4px 0; font-size: 0.9rem; }
.quote-totals .total-line.grand { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--dark); padding-top: 8px; }

/* ══════════════════════════════════════════ */
/* Finance Quote Form Responsive               */
/* ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .qf-item-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
  }
  .qf-item-row .qf-line-total { grid-column: 1/2; }
  .qf-item-row button:last-child { grid-column: 2/3; justify-self: end; }
}

/* ══════════════════════════════════════════ */
/* Analytics Period Toggle + Grid              */
/* ══════════════════════════════════════════ */

.analytics-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.analytics-period-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.analytics-period-btn {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--white);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  color: var(--gray);
  transition: all 0.15s;
}
.analytics-period-btn:last-child { border-right: none; }
.analytics-period-btn:hover { background: var(--bg-2); color: var(--dark); }
.analytics-period-btn.active { background: var(--primary); color: #fff; }

.analytics-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 1024px) {
  .analytics-charts-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════ */
/* Tracking Bar (Dashboard)                    */
/* ══════════════════════════════════════════ */
.tracking-bar { display:flex; align-items:center; gap:0; margin:12px 0 8px; }
.tracking-step { display:flex; flex-direction:column; align-items:center; flex:1; position:relative; }
.tracking-dot { width:16px; height:16px; border-radius:50%; border:2px solid var(--border); background:#fff; z-index:1; }
.tracking-dot.active { background:var(--primary); border-color:var(--primary); }
.tracking-dot.completed { background:var(--primary); border-color:var(--primary); }
.tracking-line { height:2px; flex:1; background:var(--border); }
.tracking-line.active { background:var(--primary); }
.tracking-label { font-size:0.68rem; color:var(--gray); margin-top:4px; text-align:center; }
.tracking-label.active { color:var(--primary); font-weight:600; }

/* ══════════════════════════════════════════ */
/* AI Chat FAB + Panel                         */
/* ══════════════════════════════════════════ */
.ai-chat-fab { position:fixed; bottom:24px; right:24px; width:56px; height:56px; border-radius:50%;
  background:var(--primary); color:#fff; border:none; cursor:pointer; box-shadow:0 4px 12px rgba(0,0,0,0.2);
  font-size:1.5rem; z-index:1000; display:flex; align-items:center; justify-content:center; transition:transform 0.2s; }
.ai-chat-fab:hover { transform:scale(1.1); }
.ai-chat-panel { position:fixed; bottom:90px; right:24px; width:380px; max-height:500px;
  background:#fff; border-radius:16px; box-shadow:0 8px 32px rgba(0,0,0,0.15); z-index:999;
  display:none; flex-direction:column; overflow:hidden; }
.ai-chat-panel.open { display:flex; }
.ai-chat-panel.drag-over { outline:2px dashed #38a169; outline-offset:-4px; }
.ai-chat-msg { max-width:85%; padding:8px 12px; border-radius:12px; font-size:0.85rem; line-height:1.4; white-space:pre-wrap; word-break:break-word; }
.ai-chat-msg-user { align-self:flex-end; background:var(--primary); color:#fff; border-bottom-right-radius:4px; }
.ai-chat-msg-assistant { align-self:flex-start; background:var(--bg-2); color:var(--dark); border-bottom-left-radius:4px; }
@media (max-width:480px) {
  .ai-chat-panel { left:8px; right:8px; width:auto; bottom:80px; max-height:400px; }
}

/* ══════════════════════════════════════════ */
/* Loyalty Tiers                               */
/* ══════════════════════════════════════════ */
.loyalty-tier-card { padding:20px; background:var(--bg-2); border-radius:var(--radius); text-align:center; }
.loyalty-progress { height:8px; background:var(--border); border-radius:4px; overflow:hidden; margin-top:8px; }
.loyalty-progress-fill { height:100%; background:var(--primary); border-radius:4px; transition:width 0.5s; }

/* ══════════════════════════════════════════ */
/* Feedback Stars                              */
/* ══════════════════════════════════════════ */
#feedbackStars span { transition:color 0.15s; }
#feedbackStars span.active { color:#F59E0B; }
#feedbackStars span:hover { color:#F59E0B; }

/* ══════════════════════════════════════════ */
/* Projects Section                           */
/* ══════════════════════════════════════════ */
#asec-projects .section-sub { font-size:0.85rem; color:var(--gray); margin-top:2px; }
.proj-tab { border-radius:var(--radius-sm) var(--radius-sm) 0 0 !important; font-size:0.8rem !important; padding:6px 14px !important; }
.proj-tab.btn-outline { border-bottom-color:transparent; }
.proj-tab.btn-primary { box-shadow:none; }

/* Project detail finance cards */
#projectDetailContent .stat-card {
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--white);
}
#projectDetailContent .admin-table { margin-top:0; }
#projectDetailContent .admin-table td { font-size:0.82rem; }

/* Project form grid-2 */
#projectFormContent .grid-2 { display:grid; grid-template-columns:1fr 1fr; }
@media (max-width:600px) {
  #projectFormContent .grid-2 { grid-template-columns:1fr; }
  #projectDetailContent > div:first-child { grid-template-columns:1fr 1fr !important; }
}

/* Cost/profit rows in quote form */
.qf-cost-summary { display:flex; justify-content:flex-end; gap:24px; padding:4px 0; font-size:0.85rem; color:var(--gray); }
.qf-cost-summary .cost-val { font-weight:600; color:#EF4444; }
.qf-cost-summary .profit-val { font-weight:600; color:#10B981; }

/* Responsive project detail finance panel */
@media (max-width:640px) {
  #projectDetailContent > div:nth-child(1) { grid-template-columns:1fr 1fr !important; }
}

/* ══════════════════════════════════════════ */
/* Autocomplete dropdown                       */
/* ══════════════════════════════════════════ */
.autocomplete-dropdown { position:absolute; top:100%; left:0; right:0; z-index:1050; background:var(--white);
  border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:0 8px 24px rgba(0,0,0,0.15);
  max-height:280px; overflow-y:auto; margin-top:2px; }
.ac-item { display:flex; gap:8px; align-items:center; padding:8px 12px; cursor:pointer; transition:background 0.1s; }
.ac-item:hover, .ac-item.ac-active { background:var(--bg-2); }
.ac-icon { font-size:1.1rem; flex-shrink:0; }
.ac-text { flex:1; min-width:0; }
.ac-label { font-size:0.85rem; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ac-sub { font-size:0.72rem; color:var(--gray); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ══════════════════════════════════════════ */
/* Warehouse — Location Tabs + Stock Table     */
/* ══════════════════════════════════════════ */
.wh-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.wh-location-tabs { display:flex; gap:0; }
.wh-loc-tab { padding:8px 20px; border:1px solid var(--border); background:var(--white); color:var(--dark);
  cursor:pointer; font-size:0.85rem; font-weight:600; transition:all 0.15s; }
.wh-loc-tab:first-child { border-radius:var(--radius-sm) 0 0 var(--radius-sm); }
.wh-loc-tab:last-child { border-radius:0 var(--radius-sm) var(--radius-sm) 0; border-left:none; }
.wh-loc-tab.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.wh-loc-tab:hover:not(.active) { background:var(--bg-2); }
.wh-toolbar-actions { display:flex; gap:8px; align-items:center; }
.wh-stock-table th { font-size:0.78rem; white-space:nowrap; text-align:center; }
.wh-stock-table td { font-size:0.82rem; vertical-align:middle; text-align:center; }
.wh-stock-table td:nth-child(2) { text-align:left; }
.wh-filter-bar { display:flex; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.wh-filter-bar select { padding:6px 12px; border:1px solid var(--border); border-radius:var(--radius-sm);
  background:var(--white); font-size:0.82rem; min-width:180px; }
.wh-filter-bar .wh-filter-label { font-size:0.78rem; color:var(--gray); font-weight:600; white-space:nowrap; }
.wh-sheet-table td.wh-dims { font-family:'SF Mono',Monaco,Consolas,monospace; font-size:0.78rem; white-space:nowrap; }
.wh-sheet-table .wh-m2-tip { cursor:help; border-bottom:1px dotted var(--gray); }
.wh-stock-ok { color:#10B981; }
.wh-stock-low { color:#EF4444; font-weight:600; }
.wh-row-empty { opacity:0.5; }
.wh-row-empty td { color:var(--gray); }
.wh-cart-add { display:flex; gap:4px; align-items:center; }
.wh-pm-btn { padding:2px 6px !important; font-size:0.72rem !important; min-width:32px; font-weight:600; }
#whCartBtn { background:var(--white); border-color:var(--border); color:var(--dark); }
#whCartBtn:hover { background:var(--primary-pale); border-color:var(--primary); color:var(--primary); }
.dash-layout input[type="number"]::-webkit-outer-spin-button,
.dash-layout input[type="number"]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.dash-layout input[type="number"] { -moz-appearance:textfield; }
.btn-icon-sm { background:none; border:none; cursor:pointer; font-size:1rem; padding:2px 6px; color:var(--gray); }
.btn-icon-sm:hover { color:var(--primary); }

/* ══════════════════════════════════════════ */
/* Cart Slide-in Panel                         */
/* ══════════════════════════════════════════ */
.cart-panel { position:fixed; top:0; right:-400px; width:380px; height:100vh; background:var(--white);
  box-shadow:-4px 0 24px rgba(0,0,0,0.12); z-index:1001; display:flex; flex-direction:column;
  transition:right 0.3s ease; }
.cart-panel.open { right:0; }
.cart-panel-header { display:flex; justify-content:space-between; align-items:center;
  padding:16px 20px; border-bottom:1px solid var(--border); }
.cart-panel-header h3 { margin:0; font-size:1rem; }
.cart-panel-body { flex:1; overflow-y:auto; padding:12px 20px; }
.cart-panel-footer { display:flex; gap:8px; padding:16px 20px; border-top:1px solid var(--border); }
.cart-item { padding:12px 0; border-bottom:1px solid var(--border); }
.cart-item:last-child { border-bottom:none; }
.cart-item-header { font-size:0.85rem; margin-bottom:4px; }
.cart-item-details { font-size:0.8rem; color:var(--gray); margin-bottom:6px; }
.cart-item-footer { display:flex; justify-content:space-between; align-items:center; font-size:0.75rem; }
.cart-countdown { color:var(--gray); }
.cart-total { text-align:right; padding:12px 0; font-size:0.95rem; border-top:2px solid var(--border); margin-top:8px; }
@media (max-width:480px) {
  .cart-panel { width:100%; right:-100%; }
}

/* ══════════════════════════════════════════ */
/* Warehouse Search + Pallet Calc + Product   */
/* ══════════════════════════════════════════ */
.wh-search-wrapper { display:flex; align-items:center; gap:4px; }
.wh-search-input { width:180px; padding:6px 10px; font-size:0.85rem; border:1px solid var(--border); border-radius:var(--radius-sm); }
.wh-product-link { color:var(--dark); text-decoration:none; cursor:pointer; }
.wh-product-link:hover { text-decoration:underline; color:var(--primary); }
.wh-pallet-calc { font-size:0.72rem; color:var(--gray); }

/* ══════════════════════════════════════════ */
/* Cart Qty Controls + Edit                    */
/* ══════════════════════════════════════════ */
.cart-qty-row { display:flex; align-items:center; gap:4px; margin:3px 0; font-size:0.82rem; }
.cart-qty-label { font-weight:500; min-width:44px; }
.cart-qty-input { text-align:center; border:1px solid var(--border); border-radius:4px; }
.cart-item-edit { padding:8px 0; border-top:1px dashed var(--border); margin-top:6px; }

/* ══════════════════════════════════════════ */
/* Project Expenses — Upload Zone              */
/* ══════════════════════════════════════════ */
.proj-upload-zone { border:2px dashed var(--border); border-radius:var(--radius-sm); }
.proj-upload-zone.drag-over { border-color:var(--primary); background:rgba(45,106,79,0.05); }

/* ══════════════════════════════════════════ */
/* Onboarding Overlay                         */
/* ══════════════════════════════════════════ */
.onboarding-overlay {
  position:fixed; inset:0; z-index:10000;
  background:rgba(0,0,0,0.6); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity 0.3s;
  padding:24px;
}
.onboarding-overlay.active { opacity:1; }
.onboarding-card {
  background:#fff; border-radius:16px; padding:40px; max-width:480px; width:100%;
  text-align:center; box-shadow:0 8px 32px rgba(0,0,0,0.15);
  transform:scale(0.9); transition:transform 0.3s;
}
.onboarding-overlay.active .onboarding-card { transform:scale(1); }
.onboarding-icon { margin-bottom:8px; }
.onboarding-sections { display:flex; flex-direction:column; gap:12px; text-align:left; }
.onboarding-section-item {
  padding:12px 16px; border:1px solid var(--border); border-radius:10px;
  background:var(--bg);
}

/* ══════════════════════════════════════════ */
/* Onboarding Hints                           */
/* ══════════════════════════════════════════ */
.onboarding-hint {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; margin-bottom:16px;
  background:linear-gradient(135deg, #FFF7ED, #FEF3C7);
  border:1px solid #FBBF24; border-radius:10px;
}
.onboarding-hint-content { display:flex; align-items:center; gap:10px; color:#92400E; font-size:0.9rem; }
.onboarding-hint-close {
  background:none; border:none; font-size:1.3rem; cursor:pointer;
  color:#92400E; padding:0 4px; line-height:1;
}

/* ══════════════════════════════════════════ */
/* Profile Form                               */
/* ══════════════════════════════════════════ */
.profile-form { max-width:560px; }
.profile-sections .card { border:1px solid var(--border); border-radius:12px; }

/* ══════════════════════════════════════════ */
/* Settings Sub-Tabs                          */
/* ══════════════════════════════════════════ */
.settings-tabs { display:flex; gap:6px; margin-bottom:20px; padding:0; }
.settings-tab {
  padding:8px 18px; cursor:pointer; font-size:0.88rem; font-weight:500;
  border:1px solid var(--border); border-radius:var(--radius-sm) var(--radius-sm) 0 0;
  background:var(--bg); color:var(--gray); transition:all 0.2s;
}
.settings-tab:hover { color:var(--dark); background:#fff; }
.settings-tab.active { color:var(--primary); background:#fff; border-bottom-color:#fff; font-weight:600; }
.settings-tab-content { display:none; }
.settings-tab-content.active { display:block; }

/* ══════════════════════════════════════════ */
/* Roadmap Kanban                             */
/* ══════════════════════════════════════════ */
.roadmap-kanban { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; min-height:300px; }
.roadmap-column {
  background:var(--bg); border:1px solid var(--border); border-radius:10px;
  padding:12px; display:flex; flex-direction:column;
}
.roadmap-column.drag-over { border-color:var(--primary); background:rgba(45,106,79,0.04); }
.roadmap-column-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; font-size:0.9rem; }
.roadmap-column-body { flex:1; display:flex; flex-direction:column; gap:8px; min-height:60px; }
.roadmap-card {
  background:#fff; border:1px solid var(--border); border-radius:8px;
  padding:10px 12px; cursor:grab; transition:box-shadow 0.2s, opacity 0.2s;
}
.roadmap-card:hover { box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.roadmap-card.dragging { opacity:0.5; }
.roadmap-card-title { font-size:0.85rem; font-weight:500; margin-bottom:4px; }
.roadmap-card-desc { font-size:0.78rem; color:var(--gray); margin-bottom:6px; }
.roadmap-card-footer { display:flex; align-items:center; justify-content:space-between; }
.roadmap-add-btn {
  margin-top:8px; padding:6px; width:100%; border:1px dashed var(--border);
  border-radius:6px; background:none; cursor:pointer; font-size:0.82rem; color:var(--gray);
  transition:all 0.2s;
}
.roadmap-add-btn:hover { border-color:var(--primary); color:var(--primary); }
/* ══════════════════════════════════════════ */
/* Vacation Calendar                          */
/* ══════════════════════════════════════════ */
.vcal-bar {
  font-size:0.68rem; color:#fff; padding:1px 5px; margin-bottom:1px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  line-height:1.4;
}
.vcal-birthday {
  font-size:0.68rem; padding:1px 4px; margin-bottom:1px;
  background:#FEF3C7; color:#92400E; border-radius:3px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.calendar-day.weekend { background:var(--bg); }
.calendar-day.holiday { background:rgba(239,68,68,0.08); border-left:3px solid #EF4444; }
.calendar-day.weekend.holiday { background:rgba(239,68,68,0.08); border-left:3px solid #EF4444; }
.calendar-day.transfer-free { background:rgba(59,130,246,0.08); border-left:3px solid #3B82F6; }
.calendar-day.transfer-work { background:rgba(245,158,11,0.08); border-left:3px solid #F59E0B; }
[data-theme="night"] .calendar-day.holiday { background:rgba(239,68,68,0.15); }
[data-theme="night"] .calendar-day.weekend.holiday { background:rgba(239,68,68,0.15); }
[data-theme="night"] .calendar-day.transfer-free { background:rgba(59,130,246,0.15); }
[data-theme="night"] .calendar-day.transfer-work { background:rgba(245,158,11,0.15); }
.vcal-month-stats {
  display:flex; gap:16px; padding:8px 12px; margin-bottom:8px;
  background:var(--bg); border-radius:8px; font-size:0.85rem; color:var(--dark-2);
  flex-wrap:wrap; align-items:center;
}
.vcal-month-stats b { color:var(--dark); }
.vcal-transfer-badge {
  background:#DBEAFE; color:#1E40AF; padding:2px 8px; border-radius:4px; font-size:0.75rem;
}
.vcal-chip {
  font-size:0.55rem; padding:1px 4px; margin-bottom:1px;
  border-radius:3px; line-height:1.3;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font-weight:500; opacity:0.9;
}
.vcal-chip-holiday { background:rgba(239,68,68,0.2); color:#FCA5A5; }
.vcal-chip-transfer { background:rgba(59,130,246,0.2); color:#93C5FD; }
.vcal-chip-work { background:rgba(245,158,11,0.2); color:#FCD34D; }
[data-theme="corporate"] .vcal-chip-holiday { color:#991B1B; background:rgba(239,68,68,0.15); }
[data-theme="corporate"] .vcal-chip-transfer { color:#1E40AF; background:rgba(59,130,246,0.15); }
[data-theme="corporate"] .vcal-chip-work { color:#92400E; background:rgba(245,158,11,0.15); }
.vcal-legend-sep {
  display:inline-block; width:1px; height:14px; background:var(--border); margin:0 4px; vertical-align:middle;
}
.vcal-note {
  font-size:0.6rem; padding:1px 3px; margin-bottom:1px;
  background:#E0E7FF; color:#3730A3; border-radius:3px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  line-height:1.3;
}
.vcal-note-item {
  padding:8px; margin-bottom:6px; background:var(--bg-2); border-radius:6px; border:1px solid var(--border);
}
.vcal-stats-legend { margin-bottom:8px; }

@media (max-width:768px) {
  .roadmap-kanban { grid-template-columns:1fr; }
  .settings-tabs { flex-wrap:wrap; }
}

/* ── User dropdown menu ── */
.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 160px;
  z-index: 1000;
  overflow: hidden;
}
.user-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.user-dropdown-menu a:hover {
  background: var(--bg-2);
}

/* ── Inventory mode toggle ── */
.inventory-mode-btn {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
}
.inventory-mode-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
