/* ============================================================
   DATAcube — Štatistiky SR
   TECH INFO Labs dark dashboard system
   ============================================================ */

:root {
  /* Colors */
  --bg: #070a12;
  --bg-2: #0b1020;
  --surface: #0f1528;
  --surface-2: #141c33;
  --surface-3: #1a2340;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  --text: #e7ecf5;
  --text-muted: #9aa3b5;
  --text-faint: #6b7388;

  --accent: #3b82f6;
  --accent-2: #7c3aed;
  --accent-3: #a855f7;

  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace;

  /* Spacing */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 44px -10px rgba(99, 102, 241, 0.38);
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

@supports (font-variation-settings: normal) {
  body { font-family: 'Inter var', var(--font-body); }
}

/* Background atmospheric glow */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 800px 500px at 15% -5%, rgba(37, 99, 235, 0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 20%, rgba(124, 58, 237, 0.13), transparent 60%),
    radial-gradient(ellipse 600px 400px at 50% 100%, rgba(168, 85, 247, 0.09), transparent 60%);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 28px);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-weight: 600;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }

p { margin: 0; }

/* ============================================================
   Header
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 6, 12, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}
.brand-mark { flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.brand-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.header-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 0.93rem;
}
.header-nav a {
  color: var(--text-muted);
  transition: color .15s ease;
  font-weight: 500;
}
.header-nav a:hover { color: var(--text); }

@media (max-width: 600px) {
  .header-nav { gap: 16px; font-size: 0.85rem; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 7vw, 80px);
}
.hero-inner {
  max-width: 860px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  margin-bottom: 24px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  box-shadow: 0 0 8px var(--accent);
}
.pulse::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.3; }
  100% { transform: scale(2.4); opacity: 0; }
}

.hero-title {
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 32px);
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 680px;
}
.stat-value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: var(--text);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 28px -12px rgba(99, 102, 241, 0.9);
}
.btn-primary:hover {
  background: linear-gradient(120deg, #4f8cf7, #8b5cf6);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.02);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: var(--border-strong);
}

.btn [data-lucide], .icon-btn [data-lucide] {
  width: 16px;
  height: 16px;
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: clamp(40px, 6vw, 72px) 0;
}
.section.hidden { display: none; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-sub {
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 600px;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Catalog toolbar & Search box */
.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: rgba(15, 21, 40, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
@media (min-width: 992px) {
  .catalog-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
@media (min-width: 992px) {
  .search-box {
    max-width: 380px;
  }
}
.search-box input {
  width: 100%;
  padding: 10px 40px 10px 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.04);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.1);
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-faint);
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
}
.clear-search-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}
.clear-search-btn.hidden {
  display: none;
}

/* Catalog filters */
.catalog-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.catalog-filters button {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.catalog-filters button:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}
.catalog-filters button.active {
  background: var(--accent);
  color: #052b32;
  border-color: var(--accent);
}

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

.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s ease;
  overflow: hidden;
}
.catalog-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(130deg, transparent, var(--card-accent, var(--accent)) 50%, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.catalog-card:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.catalog-card:hover::before { opacity: 1; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-accent, var(--accent)) 18%, transparent);
  color: var(--card-accent, var(--accent));
}
.card-icon [data-lucide] { width: 20px; height: 20px; }

.catalog-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.catalog-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
}
.card-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 3px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.card-tag.code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ============================================================
   Configurator
   ============================================================ */
.configurator {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 24px;
  align-items: start;
}

/* Configurator controls wrapper and toggle header */
.conf-controls-toggle {
  display: none; /* Hidden on desktop */
}

@media (max-width: 900px) {
  .configurator {
    display: flex;
    flex-direction: column;
  }
  .conf-preview {
    order: -1;
    min-width: 0;
  }
  .conf-controls-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    min-width: 0;
  }
  .conf-controls-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid transparent;
  }
  .conf-controls-toggle:hover {
    background: rgba(255, 255, 255, 0.02);
  }
  .conf-controls-toggle .toggle-title {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .conf-controls-toggle .toggle-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
  }
  .conf-controls-toggle .toggle-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
  }
  
  .conf-controls {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 16px 16px 16px !important;
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
    display: none !important; /* Hidden when collapsed */
    gap: 12px !important; /* Smaller gaps on mobile */
  }
  
  .conf-controls-wrapper.expanded .conf-controls-toggle {
    border-bottom-color: var(--border);
  }
  .conf-controls-wrapper.expanded .toggle-icon {
    transform: rotate(180deg);
  }
  .conf-controls-wrapper.expanded .conf-controls {
    display: flex !important; /* Shown when expanded */
  }

  /* Hide table code on mobile to save vertical space */
  .conf-controls .control-group:last-child {
    display: none !important;
  }
}

.conf-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.control-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.control-label .control-hint {
  font-size: 0.7rem;
  color: var(--text-faint);
  font-weight: 400;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.81rem;
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.2;
}
.chip:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}
.chip.active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}

.select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Year slider */
.year-slider {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 4px 2px;
}
.year-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  outline: none;
  cursor: pointer;
}
.year-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
}
.year-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
}
.year-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.year-slider-labels strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Municipality picker
   ============================================================ */
.mun-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.mun-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 28px;
  align-items: center;
}
.mun-empty {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-style: italic;
}

.mun-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--text);
  max-width: 100%;
}
.mun-chip-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.mun-chip-district {
  color: var(--text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}
.mun-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all .15s ease;
}
.mun-chip-remove:hover {
  background: var(--error);
  color: white;
}

.mun-search-row {
  position: relative;
  display: flex;
  align-items: center;
}
.mun-search {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 38px 9px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
}
.mun-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.mun-search::placeholder {
  color: var(--text-faint);
}
.mun-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all .15s ease;
}
.mun-toggle:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}
.mun-toggle [data-lucide] {
  width: 16px;
  height: 16px;
  transition: transform .2s ease;
}
.mun-toggle.open [data-lucide] {
  transform: rotate(180deg);
}

.mun-tree {
  display: none;
  max-height: 360px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 4px;
}
.mun-tree.open { display: block; }

.mun-district {
  border-radius: 6px;
}
.mun-district + .mun-district {
  margin-top: 2px;
}
.mun-district summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  cursor: pointer;
  border-radius: 6px;
  user-select: none;
  list-style: none;
  transition: background .15s ease;
}
.mun-district summary::-webkit-details-marker { display: none; }
.mun-district summary::before {
  content: '›';
  display: inline-block;
  margin-right: 6px;
  color: var(--text-faint);
  transition: transform .15s ease;
  font-size: 0.85rem;
}
.mun-district[open] summary::before {
  transform: rotate(90deg);
}
.mun-district summary:hover {
  background: rgba(255,255,255,0.04);
}
.mun-district-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.mun-district-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 1px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.mun-list {
  display: flex;
  flex-direction: column;
  padding: 2px 4px 6px 26px;
  gap: 1px;
}
.mun-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  text-align: left;
  border-radius: 5px;
  cursor: pointer;
  transition: all .12s ease;
}
.mun-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.mun-item.selected {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 500;
}
.mun-item [data-lucide] {
  width: 14px;
  height: 14px;
}

.mun-more {
  padding: 10px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-faint);
  font-style: italic;
}

.conf-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.conf-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.conf-preview-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chart-type-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 3px;
}
.chart-type-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 7px;
  transition: all .15s ease;
}
.chart-type-switch button [data-lucide] { width: 16px; height: 16px; }
.chart-type-switch button:hover { color: var(--text); }
.chart-type-switch button.active {
  background: var(--accent);
  color: #052b32;
}

.chart-scroll-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.chart-scroll-container::-webkit-scrollbar {
  height: 4px;
}
.chart-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}
.chart-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}

.chart-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 300px;
}
.chart-wrap canvas {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}
.chart-wrap-sm {
  aspect-ratio: 16 / 10;
  min-height: 180px;
}

.chart-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 21, 40, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: opacity .2s ease;
}
.chart-overlay.hidden { display: none; }
.chart-overlay.error {
  color: var(--error);
  flex-direction: column;
  padding: 20px;
  text-align: center;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.chart-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.chart-meta strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.dashboard-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .15s ease;
}
.dashboard-card:hover {
  border-color: var(--border-strong);
}

.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.dashboard-card-head .card-title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.dashboard-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.card-latest strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.empty-state h3 {
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p {
  max-width: 380px;
  margin: 0 auto 20px;
  font-size: 0.92rem;
}
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  margin-bottom: 16px;
}

/* ============================================================
   Footer
   ============================================================ */
.app-footer {
  margin-top: 60px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-note a { color: var(--accent); }
.footer-note a:hover { text-decoration: underline; }
.footer-sub { font-size: 0.78rem; color: var(--text-faint); margin-top: 4px; }
.footer-build { font-size: 0.8rem; color: var(--text-faint); }

/* ============================================================
   Skeleton
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-block {
  height: 60px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   Fade in
   ============================================================ */
.fade-in {
  animation: fadeIn .4s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scrollbars (webkit) */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   Responsive Mobile Overrides (DATAcube premium tweaks)
   ============================================================ */
@media (max-width: 600px) {
  /* Horizontal scroll for chips to save space and prevent vertical scroll-hijacking */
  .chip-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 4px 2px 8px 2px;
    width: 100%;
    max-height: none !important;
    scrollbar-width: none; /* Firefox */
  }
  .chip-group::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
  }
  .chip {
    flex-shrink: 0;
  }
  
  /* Configurator actions full-width & vertical stacking */
  .conf-preview-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .conf-preview-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  
  .conf-preview-actions .chart-type-switch {
    display: flex;
    width: 100%;
    margin-right: 0;
  }
  
  .conf-preview-actions .chart-type-switch button {
    flex: 1;
    height: 36px;
  }
  
  .conf-preview-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }

  /* Horizontally scrolling category chips on mobile */
  .catalog-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    margin-bottom: -6px;
    width: 100%;
    scrollbar-width: none; /* Firefox */
  }
  .catalog-filters::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
  }
  .catalog-filters button {
    flex-shrink: 0;
  }

  /* Stacking hero stats on mobile */
  .hero-stats {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding-top: 24px !important;
  }

  /* Compact layout for configurator panels on mobile */
  .conf-preview {
    padding: 16px !important;
  }
  .conf-controls {
    padding: 0 16px 16px 16px !important;
  }

  /* Limit municipality tree height on mobile */
  .mun-tree {
    max-height: 240px !important;
  }

  /* Full-width cards for single column layout on mobile */
  .catalog-grid, .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Ensure charts fit container exactly without clipping or horizontal overflow */
  .chart-wrap {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 220px !important;
  }
  .chart-wrap-sm {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 180px !important;
  }
}

@media (max-width: 480px) {
  /* Stack brand logo and powered-by byline to prevent header overflow */
  .brand-wrapper {
    flex-direction: column;
    gap: 6px;
    align-items: center;
  }
  .labs-affiliation {
    margin-top: 0;
  }
}

@media (max-width: 400px) {
  /* Ultra-compact spacing for very small viewports */
  .conf-preview {
    padding: 12px !important;
  }
  .conf-controls {
    padding: 0 12px 12px 12px !important;
  }
}

/* ============================================================
   DATAcube product shell refresh
   ============================================================ */
.app-header {
  background: rgba(7, 10, 18, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.header-row {
  min-height: 76px;
  height: auto;
  gap: 28px;
}

.brand {
  gap: 13px;
  min-width: max-content;
}

.brand-logo-img {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
}

.brand-text {
  display: grid;
  gap: 4px;
  line-height: 1;
}

.brand-title {
  color: #f7f9ff;
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.brand-sub {
  color: #7e889c;
  font-size: 0.69rem;
  font-weight: 550;
  letter-spacing: 0.015em;
}

.header-right-side {
  min-width: 0;
  margin-left: auto;
}

.header-nav {
  gap: 5px;
  flex-wrap: nowrap;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  color: #9ca6b9;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.header-nav a:hover {
  color: #f5f7fb;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

.header-nav a > [data-lucide] {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.header-nav .labs-nav-link {
  gap: 9px;
  margin-left: 7px;
  padding-left: 8px;
  padding-right: 13px;
  color: #eef2ff;
  border-color: rgba(129, 140, 248, 0.23);
  background: rgba(99, 102, 241, 0.09);
}

.header-nav .labs-nav-link:hover {
  border-color: rgba(129, 140, 248, 0.42);
  background: rgba(99, 102, 241, 0.15);
}

.labs-nav-link img {
  display: block;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 7px;
  object-fit: cover;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 9vw, 124px) 0 clamp(70px, 8vw, 108px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.68), transparent 88%);
}

.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 620px;
  height: 620px;
  right: -210px;
  top: -260px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.13);
  filter: blur(105px);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.72fr);
  align-items: center;
  gap: clamp(48px, 8vw, 108px);
}

.hero-copy {
  min-width: 0;
}

.hero-source {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  color: #8792a7;
  font-size: 0.76rem;
  font-weight: 550;
}

.hero-source [data-lucide] {
  width: 16px;
  height: 16px;
  color: #7dd3fc;
  stroke-width: 1.8;
}

.hero-source strong {
  padding-left: 9px;
  color: #c7d0df;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
  font-weight: 650;
}

.hero-title {
  display: grid;
  gap: 6px;
  max-width: 780px;
  margin: 0 0 24px;
  color: #f7f9fc;
  font-size: clamp(3rem, 6.2vw, 5.35rem);
  font-weight: 760;
  line-height: 0.97;
  letter-spacing: -0.057em;
}

.gradient-text {
  width: fit-content;
  padding-right: 0.08em;
  background: linear-gradient(100deg, #60a5fa 0%, #818cf8 52%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  max-width: 680px;
  margin-bottom: 34px;
  color: #aab3c3;
  font-size: clamp(1rem, 1.45vw, 1.13rem);
  line-height: 1.72;
}

.hero-actions {
  margin-bottom: 0;
}

.hero-actions .btn {
  min-height: 48px;
  padding: 0 18px;
}

.hero-overview {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 22px;
  background: rgba(12, 17, 31, 0.78);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-overview-head,
.hero-overview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
}

.hero-overview-head {
  color: #aab4c5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-overview-head [data-lucide] {
  width: 17px;
  height: 17px;
  color: #70809b;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: none;
  padding: 0;
  border: 0;
}

.hero-stat {
  display: grid;
  grid-template-columns: 34px 92px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 96px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.stat-index {
  color: #526079;
  font: 600 0.64rem/1 var(--font-mono);
}

.stat-value {
  color: #f4f7ff;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 720;
  letter-spacing: -0.05em;
}

.stat-label {
  max-width: 145px;
  color: #8e99ac;
  font-size: 0.78rem;
  line-height: 1.35;
}

.hero-overview-foot {
  justify-content: flex-start;
  color: #727e93;
  font-size: 0.71rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.09);
}

.catalog-section {
  background: linear-gradient(180deg, rgba(11, 16, 30, 0.45), transparent 420px);
}

.catalog-header {
  align-items: flex-end;
  margin-bottom: 28px;
}

.catalog-header h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.65rem);
  letter-spacing: -0.04em;
}

.catalog-result-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 3px;
  color: #7e899c;
  font-size: 0.78rem;
}

.catalog-result-summary strong {
  color: #e9eef8;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 34px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 22px;
  background: #0c1221;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.catalog-search-block > label,
.catalog-filter-heading strong {
  display: block;
  margin-bottom: 10px;
  color: #cbd3e1;
  font-size: 0.78rem;
  font-weight: 700;
}

.catalog-search-block,
.search-box,
.search-box input {
  min-width: 0;
}

.catalog-search-block {
  width: 100%;
}

.catalog-search-block > p {
  margin-top: 9px;
  color: #657188;
  font-size: 0.72rem;
}

.search-box {
  max-width: none;
}

.search-box input {
  height: 60px;
  padding: 0 52px 0 50px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #090e1a;
  font-size: 1rem;
  backdrop-filter: none;
}

.search-box input::placeholder {
  color: #59657b;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-box input:focus {
  border-color: rgba(96, 165, 250, 0.62);
  background: #0a101e;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.09);
}

.search-icon {
  left: 18px;
  width: 19px;
  height: 19px;
  color: #70809a;
}

.clear-search-btn {
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.catalog-filter-block {
  padding-top: 2px;
}

.catalog-filter-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.catalog-filter-heading strong {
  margin: 0;
}

.catalog-filter-heading span {
  color: #657188;
  font-size: 0.7rem;
}

.catalog-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 8px;
}

.catalog-filters button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 11px;
  color: #98a3b6;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
}

.catalog-filters button:hover {
  color: #edf2fb;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.catalog-filters button.active {
  color: #f4f7ff;
  border-color: color-mix(in srgb, var(--filter-accent, #60a5fa) 48%, transparent);
  background: color-mix(in srgb, var(--filter-accent, #60a5fa) 10%, transparent);
  box-shadow: inset 3px 0 0 var(--filter-accent, #60a5fa);
}

.filter-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--filter-accent, #60a5fa) 9%, transparent);
  color: var(--filter-accent, #60a5fa);
}

.catalog-filters button.active .filter-icon {
  color: var(--filter-accent, #60a5fa);
  background: color-mix(in srgb, var(--filter-accent, #60a5fa) 16%, transparent);
}

.filter-icon [data-lucide] {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.filter-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.filter-copy strong {
  overflow: hidden;
  color: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-copy small {
  color: #5f6c82;
  font-size: 0.62rem;
  font-weight: 500;
}

.catalog-filters button.active .filter-copy small {
  color: #7f9dc4;
}

@media (max-width: 1040px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 44px;
  }

  .header-nav a {
    padding-left: 10px;
    padding-right: 10px;
  }

  .header-nav a:not(.labs-nav-link) [data-lucide] {
    display: none;
  }
}

@media (max-width: 820px) {
  .header-row {
    flex-wrap: wrap;
    gap: 10px 20px;
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .header-right-side {
    width: 100%;
    margin-left: 0;
  }

  .header-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }

  .header-nav a {
    flex: 1 0 auto;
  }

  .header-nav .labs-nav-link {
    margin-left: auto;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-overview {
    max-width: 680px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-stat {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 10px;
    min-height: 166px;
    border-right: 1px solid rgba(255, 255, 255, 0.065);
    border-bottom: 0;
  }

  .hero-stat:last-child {
    border-right: 0;
  }
}

@media (max-width: 600px) {
  .brand-logo-img {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .header-nav a {
    min-height: 38px;
    padding: 0 11px;
    font-size: 0.79rem;
  }

  .header-nav .labs-nav-link span {
    display: none;
  }

  .header-nav .labs-nav-link {
    flex: 0 0 44px;
    padding: 0;
  }

  .hero {
    padding: 62px 0 70px;
  }

  .hero-title {
    font-size: clamp(2.65rem, 13vw, 4rem);
  }

  .hero-source {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .hero-stats {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding-top: 0 !important;
  }

  .hero-stat {
    grid-template-columns: 30px 82px minmax(0, 1fr);
    min-height: 88px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  }

  .catalog-header {
    align-items: flex-start;
  }

  .catalog-result-summary {
    padding-bottom: 0;
  }

  .catalog-toolbar {
    padding: 18px;
    border-radius: 17px;
  }

  .search-box input {
    width: 100%;
    max-width: 100%;
    height: 54px;
    padding-right: 44px;
    padding-left: 43px;
    font-size: 16px;
  }

  .search-icon {
    left: 14px;
    width: 18px;
    height: 18px;
  }

  .clear-search-btn {
    right: 10px;
  }

  .catalog-filter-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .catalog-filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
    overflow: visible !important;
  }

  .catalog-filters button {
    min-height: 56px;
  }

  .filter-copy strong {
    font-size: 0.71rem;
  }
}

@media (max-width: 410px) {
  .brand-sub {
    display: none;
  }

  .catalog-filters {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar {
    margin-right: 0;
    margin-left: 0;
    padding: 15px;
  }

  .catalog-search-block > p {
    line-height: 1.45;
  }
}

/* ============================================================
   TECH INFO account access
   ============================================================ */
.top-user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.catalog-card-locked {
  border-color: color-mix(in srgb, var(--card-accent, #60a5fa) 22%, rgba(255,255,255,.06));
}

.catalog-card-locked:hover {
  border-color: color-mix(in srgb, var(--card-accent, #60a5fa) 42%, rgba(255,255,255,.08));
}

.card-account-access {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 2px -4px -4px;
  padding: 7px 9px;
  color: #9da8bb;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.68rem;
  font-weight: 600;
}

.card-account-access [data-lucide] {
  width: 13px;
  height: 13px;
  color: var(--card-accent, #60a5fa);
}

.card-account-access strong {
  margin-left: auto;
  color: #86efac;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-card-locked .card-export {
  color: #647087;
}

.dashboard-account-access {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--card-accent, #60a5fa) 12%, transparent), transparent 52%),
    #0c1220;
}

.dashboard-lock-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 3px;
  place-items: center;
  color: var(--card-accent, #60a5fa);
  border: 1px solid color-mix(in srgb, var(--card-accent, #60a5fa) 28%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card-accent, #60a5fa) 9%, transparent);
}

.dashboard-lock-icon [data-lucide] {
  width: 18px;
  height: 18px;
}

.dashboard-account-access strong {
  color: #e8edf6;
  font-size: 0.93rem;
}

.dashboard-account-access p {
  max-width: 310px;
  color: #78859a;
  font-size: 0.75rem;
  line-height: 1.5;
}

body.account-access-open {
  overflow: hidden;
}

.account-access-modal {
  position: fixed;
  z-index: 450;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 22px;
  background: rgba(3, 5, 10, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.account-access-modal.hidden {
  display: none;
}

.account-access-card {
  position: relative;
  width: min(100%, 540px);
  overflow: hidden;
  padding: clamp(27px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  background: #0d1322;
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.52);
}

.account-access-card::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  top: -190px;
  right: -100px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.18);
  filter: blur(70px);
  pointer-events: none;
}

.account-access-close {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: #7d899d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.account-access-close:hover {
  color: #eef2f8;
  background: rgba(255, 255, 255, 0.06);
}

.account-access-close [data-lucide] {
  width: 16px;
  height: 16px;
}

.account-access-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 30px;
  color: #aab5c7;
  font-size: 0.7rem;
  font-weight: 700;
}

.account-access-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.account-access-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  place-items: center;
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.23);
  border-radius: 15px;
  background: rgba(59, 130, 246, 0.09);
}

.account-access-icon [data-lucide] {
  width: 22px;
  height: 22px;
}

.account-access-kicker {
  margin-bottom: 8px;
  color: #7c8ba3;
  font: 650 0.64rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-access-card h2 {
  max-width: 420px;
  margin-bottom: 14px;
  color: #f4f7fc;
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.account-access-copy {
  color: #929db0;
  font-size: 0.88rem;
  line-height: 1.65;
}

.account-access-copy strong {
  color: #c8d3e5;
}

.account-access-benefits {
  display: grid;
  gap: 10px;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}

.account-access-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b7c1d1;
  font-size: 0.78rem;
}

.account-access-benefits [data-lucide] {
  width: 16px;
  height: 16px;
  padding: 3px;
  color: #86efac;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.09);
}

.account-access-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.account-access-actions .btn {
  min-height: 46px;
  justify-content: center;
}

.account-access-note {
  margin-top: 16px;
  color: #626f84;
  font-size: 0.68rem;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .account-access-modal {
    align-items: end;
    padding: 12px;
  }

  .account-access-card {
    padding: 27px 21px 24px;
    border-radius: 20px;
  }

  .account-access-brand {
    margin-bottom: 22px;
  }

  .account-access-actions {
    display: grid;
  }

  .account-access-actions .btn {
    width: 100%;
  }

  .card-account-access span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
