:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(19, 28, 47, 0.7);
  --bg-card-hover: rgba(28, 41, 68, 0.85);
  --border-color: rgba(255, 255, 255, 0.09);
  --border-active: rgba(59, 130, 246, 0.5);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.25);
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.15);
  --accent-red: #f43f5e;
  --accent-red-bg: rgba(244, 63, 94, 0.15);
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px -5px var(--accent-blue-glow);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Glassmorphic card base */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.logo-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.logo-title span {
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

.settings-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.settings-nav-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.settings-nav-btn svg {
  color: #60a5fa;
  transition: transform 0.4s ease;
}

.settings-nav-btn:hover svg {
  transform: rotate(60deg);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Control Panel */
.control-panel {
  padding: 24px;
  margin-bottom: 28px;
}

.search-row {
  display: grid;
  grid-template-columns: 1.3fr 1.2fr;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 20px;
}

@media (max-width: 1050px) {
  .search-row {
    grid-template-columns: 1fr;
  }
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.city-input-combo {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.styled-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 16px 11px 40px;
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.styled-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.styled-select option, .styled-select optgroup {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.custom-search-city-group {
  display: flex;
  gap: 6px;
  flex: 1;
}

.custom-search-city-group input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

.custom-search-city-group input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* Benchmark Options */
.benchmark-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bm-btn {
  flex: 1;
  min-width: 130px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.bm-btn span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bm-btn strong {
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-top: 2px;
}

.bm-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.bm-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

.bm-btn.active strong {
  color: #60a5fa;
}

.custom-bm-input-group {
  display: flex;
  gap: 6px;
}

.custom-bm-input-group input {
  width: 120px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
}

.custom-bm-input-group input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.bm-action-btn {
  background: var(--accent-blue);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  padding: 0 14px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.bm-action-btn:hover {
  opacity: 0.9;
}

/* Quick city pills */
.quick-city-pills-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.quick-city-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.pill-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.pill-edit-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(96, 165, 250, 0.5);
  border-style: solid;
  color: #60a5fa;
}

.pill-edit-btn svg {
  color: #94a3b8;
  transition: transform 0.3s ease;
}

.pill-edit-btn:hover svg {
  color: #60a5fa;
  transform: rotate(45deg);
}

.pills-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.city-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.city-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.city-pill.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.city-pill.special-pill {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.city-pill.special-pill.active {
  background: #a855f7;
  color: white;
}

.city-pill.highlight-pill {
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.city-pill.highlight-pill.active {
  background: #10b981;
  color: white;
}

/* Metrics Grid - 4 symetrické karty */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.metric-card:hover::before {
  opacity: 1;
}

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

.metric-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.metric-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon-circle.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.metric-icon-circle.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.metric-icon-circle.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.metric-icon-circle.orange { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.metric-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.metric-main-value {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.trend-up {
  background: var(--accent-green-bg);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.trend-down {
  background: var(--accent-red-bg);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.trend-stagnant {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.benchmark-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.source-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.metric-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Charts Section */
.charts-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

@media (max-width: 960px) {
  .charts-section {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

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

.chart-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.chart-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-tag {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.chart-tag-green {
  background: var(--accent-green-bg);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.canvas-container {
  height: 240px;
  position: relative;
}

/* Listings Section */
.listings-section {
  margin-bottom: 40px;
}

.listings-header-card {
  padding: 24px;
  margin-bottom: 14px;
}

.listings-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.listings-heading {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.listings-heading span {
  color: #60a5fa;
}

.listings-subheading {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.filter-item label {
  font-weight: 600;
  color: var(--text-muted);
}

.filter-toggle-group {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
}

.filter-pill {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.filter-pill.active {
  background: var(--accent-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.filter-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  font-size: 0.82rem;
  font-family: inherit;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.filter-item-right {
  margin-left: auto;
}

@media (max-width: 900px) {
  .filter-item-right {
    margin-left: 0;
  }
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 0.84rem;
  color: #94a3b8;
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pg-btn,
.page-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  line-height: 1;
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pg-btn:hover:not(:disabled),
.page-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.pg-btn.active,
.page-btn.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #3b82f6;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.45);
}

.pg-btn:disabled,
.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pg-ellipsis {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0 4px;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
}

/* Custom checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 18px;
  width: 18px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin-right: 8px;
  display: inline-block;
  position: relative;
  transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--accent-blue);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-text {
  font-weight: 600;
  color: #34d399;
}

/* Listings Grid - striktně 3 nabídky na řádku na desktopu */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1200px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}

/* Listing Card */
.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.listing-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 35px -10px rgba(0, 0, 0, 0.6);
}

/* Obrázek s kompaktním 16:9 poměrem stran */
.listing-image-wrapper,
.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 fallback */
  background-color: #0f172a;
  overflow: hidden;
}

@supports (aspect-ratio: 16 / 9) {
  .listing-image-wrapper,
  .card-image-wrapper {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: 16 / 9;
  }
}

.listing-img,
.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.listing-card:hover .listing-img,
.listing-card:hover .card-image {
  transform: scale(1.05);
}

.listing-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.portal-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.portal-sreality {
  background: rgba(225, 29, 72, 0.85);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.portal-bezrealitky {
  background: rgba(16, 185, 129, 0.85);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.freshness-tag {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: #e2e8f0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.listing-content,
.card-content {
  padding: 16px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.card-disp {
  font-weight: 600;
  color: #94a3b8;
}

.card-dom {
  font-size: 0.78rem;
  color: #64748b;
}

.listing-title,
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-locality,
.card-locality {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.card-main-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.card-m2-price {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.listing-locality svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* Benchmark Comparison Badge Banner */
.comparison-banner {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deal-bargain {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.deal-bargain .diff-label {
  color: #34d399;
  font-weight: 800;
  font-size: 0.85rem;
}

.deal-bargain .diff-czk {
  color: #a7f3d0;
  font-size: 0.75rem;
}

.deal-fair {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.deal-fair .diff-label {
  color: #60a5fa;
  font-weight: 700;
  font-size: 0.85rem;
}

.deal-fair .diff-czk {
  color: #bfdbfe;
  font-size: 0.75rem;
}

.deal-high {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.deal-high .diff-label {
  color: #fb7185;
  font-weight: 700;
  font-size: 0.85rem;
}

.deal-high .diff-czk {
  color: #fecdd3;
  font-size: 0.75rem;
}

.deal-unknown {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

.deal-unknown .diff-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Pricing Row */
.listing-pricing {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.total-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.price-per-m2-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}

.listing-card-footer {
  margin-top: 14px;
}

.listing-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 9px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.listing-link-btn:hover {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

/* Loader & Empty states */
.listings-loader, .listings-empty {
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-secondary);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Footer */
.app-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-footer strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   ROZŠÍŘENÉ STYLY PRO VLASTNICTVÍ (OV/DV), SPREAD STAVŮ A HISTORII CEN
   ========================================================================== */

/* Field label row with growth filter */
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.growth-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #34d399;
  font-weight: 600;
  user-select: none;
}

.growth-filter-toggle input[type="checkbox"] {
  accent-color: #10b981;
  cursor: pointer;
}

/* Dynamism pills in KPI cards */
.dynamism-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.new-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.delisted-pill {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.dyn-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Ownership chips */
.ownership-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
}

.ov-chip {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.dv-chip {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #d8b4fe;
}

.stat-highlight-pill {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   CENOVÝ SPREAD MEZI STAVY NEMOVITOSTÍ
   ========================================================================== */
.spread-section {
  padding: 26px;
  margin-bottom: 32px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.section-subheading {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.dom-badge-summary {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: #a5b4fc;
}

.dom-badge-summary strong {
  color: #ffffff;
  margin-left: 4px;
}

/* ==========================================================================
   SEKCE STATISTIKY DLE DISPOZIC (1+kk, 1+1, 2+kk, 2+1 atd.)
   ========================================================================== */
.dispositions-section {
  margin-bottom: 32px;
  padding: 24px;
}

.disposition-active-filter-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.disposition-active-filter-indicator strong {
  color: #60a5fa;
}

.btn-clear-filter {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-clear-filter:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #ffffff;
}

.dispositions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

@media (max-width: 768px) {
  .dispositions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .dispositions-grid {
    grid-template-columns: 1fr;
  }
}

.disp-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.disp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.disp-card.active {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.14);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
}

.disp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.disp-pill {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.disp-count-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.disp-main-val {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.disp-sub-val {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: -4px;
}

.disp-extra-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--text-secondary);
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.disp-extra-row strong {
  color: #f1f5f9;
}

.disp-dom-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Barevné rozlišení pro dispozice */
.disp-1kk { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.4); }
.disp-11 { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.disp-2kk { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.disp-21 { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.4); }
.disp-3kk { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.disp-31 { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.4); }
.disp-4kk { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.disp-41 { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.4); }
.disp-5kk { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.disp-51 { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.4); }
.disp-6plus { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.4); }
.disp-atyp { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }
.disp-all { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.16); }

.spread-cards-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

@media (max-width: 1080px) {
  .spread-cards-grid {
    grid-template-columns: 1fr;
  }
}

.spread-group-card {
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.spread-group-card:hover {
  transform: translateY(-2px);
}

.group-poor-border {
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.05);
}

.group-good-border {
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.05);
}

.group-new-border {
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.05);
}

.spread-card-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-poor {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-good {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag-new {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.spread-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.spread-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 24px;
}

.spread-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.spread-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

.spread-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.share-val {
  color: #93c5fd;
}

.spread-sub-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.spread-sub-stats strong {
  color: #ffffff;
}

.spread-arrow-card {
  display: flex;
  justify-content: center;
  align-items: center;
}

.spread-diff-badge {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  text-align: center;
}

.spread-diff-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.spread-diff-val {
  font-size: 0.85rem;
  color: #34d399;
  font-weight: 700;
}

/* ==========================================================================
   INTERAKTIVNÍ SROVNÁVAČ STAVŮ
   ========================================================================== */
.custom-condition-comparator {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.comp-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
}

.comp-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comp-selection-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

@media (max-width: 800px) {
  .comp-selection-row {
    grid-template-columns: 1fr;
  }
}

.comp-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
}

.comp-box-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  display: block;
  margin-bottom: 8px;
}

.checkbox-tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.tag-chk input {
  accent-color: #3b82f6;
}

.comp-vs-badge {
  font-weight: 900;
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}

.comp-result-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  animation: fadeIn 0.3s ease;
}

.comp-res-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.comp-res-col strong {
  color: #ffffff;
}

.comp-res-diff {
  text-align: center;
}

.diff-tag {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

#res-diff-val {
  font-size: 1.05rem;
  color: #34d399;
}

/* ==========================================================================
   KARTY INZERÁTŮ: BADGES A HISTORIE CEN
   ========================================================================== */
.card-floating-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.badge-ownership {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.badge-ov {
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.badge-dv {
  background: rgba(168, 85, 247, 0.9);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

/* Stav stavby - vysoce kontrastní badge na jakémkoliv podkladu */
.badge-condition {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.badge-condition::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-condition.tag-poor {
  color: #fef08a !important;
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1px solid rgba(234, 179, 8, 0.6) !important;
}
.badge-condition.tag-poor::before {
  background-color: #eab308;
  box-shadow: 0 0 6px #eab308;
}

.badge-condition.tag-good {
  color: #bfdbfe !important;
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1px solid rgba(96, 165, 250, 0.6) !important;
}
.badge-condition.tag-good::before {
  background-color: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
}

.badge-condition.tag-new {
  color: #a7f3d0 !important;
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1px solid rgba(52, 211, 153, 0.6) !important;
}
.badge-condition.tag-new::before {
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.badge-delisted {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(244, 63, 94, 0.92);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.card-delisted {
  opacity: 0.65;
  filter: grayscale(0.2);
}

.card-delisted:hover {
  opacity: 0.95;
  filter: none;
}

.card-badges-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.badge-price-drop {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}

.badge-spread-discount {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}

.badge-benchmark-discount {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}

.badge-price-up {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}

/* ==========================================================================
   POSUVNÍK ROZPĚTÍ CENY (DUAL RANGE SLIDER)
   ========================================================================== */
.filter-price-widget {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 230px;
  max-width: 280px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.price-widget-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.dual-range-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.range-slider-track-wrap {
  position: relative;
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
}

.range-track-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: #94a3b8;
  border-radius: 9999px;
  z-index: 1;
}

.range-track-fill {
  position: absolute;
  height: 4px;
  background: #3b82f6;
  border-radius: 9999px;
  z-index: 2;
  left: 0%;
  width: 100%;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.range-slider-track-wrap input[type="range"] {
  position: absolute;
  width: 100%;
  height: 20px;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  z-index: 3;
}

/* Chrome, Edge, Safari Thumb */
.range-slider-track-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f172a;
  border: 3px solid #3b82f6;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.range-slider-track-wrap input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  border-color: #60a5fa;
  background: #1e293b;
}

.range-slider-track-wrap input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.25);
  background: #2563eb;
  border-color: #ffffff;
}

/* Firefox Thumb */
.range-slider-track-wrap input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f172a;
  border: 3px solid #3b82f6;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
}

.range-slider-track-wrap input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.18);
  border-color: #60a5fa;
}

/* Vstupní rámečky pod posuvníkem (přesně dle screenshotu uživatele) */
.price-inputs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.price-input-box {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.price-input-box:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.price-input-box input {
  width: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  font-family: inherit;
}

.price-dash {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.btn-price-history {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 7px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-price-history:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-sreality-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 7px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

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

/* Modal pro historii cen */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 580px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  background: #0f172a;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-close,
.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-family: inherit;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.modal-close:hover,
.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.modal-close:active,
.modal-close-btn:active {
  transform: scale(0.96);
}

.modal-summary-box {
  background: rgba(30, 41, 59, 0.6);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.modal-summary-box strong {
  color: #ffffff;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.history-table th, .history-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.history-table th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.75rem;
}

.history-table td {
  color: #e2e8f0;
}

.text-green { color: #34d399 !important; }
.text-red { color: #fb7185 !important; }

/* ==========================================================================
   Live Sync Status Banner & Progress Bar
   ========================================================================== */
.sync-banner {
  margin-bottom: 20px;
  padding: 16px 22px;
  border-radius: var(--radius-lg, 16px);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.sync-banner.running {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.2);
}

.sync-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sync-status-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pulse-dot.idle {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.pulse-dot.running {
  background: #3b82f6;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.9);
  animation: pulseGlow 1.2s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 1; }
}

.sync-text-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sync-primary-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
}

.sync-type-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.sync-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
}

.sync-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: 1px solid transparent;
}

.sync-btn-subtle {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.12);
}

.sync-btn-subtle:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.sync-btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.sync-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.sync-btn-log {
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.08);
}

.sync-btn-log:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #f1f5f9;
}

.sync-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Progress bar container */
.sync-progress-container {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sync-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.sync-active-city {
  font-weight: 700;
  color: #60a5fa;
}

.sync-stats-live {
  color: #94a3b8;
  font-size: 0.78rem;
}

.sync-pct-number {
  font-weight: 800;
  color: #38bdf8;
  font-size: 0.9rem;
}

.sync-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.sync-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
  border-radius: 999px;
  transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.sync-progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}

.sync-btn-cancel {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sync-btn-cancel:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.6);
}

/* Modal sync log table & scrolling container */
.sync-log-modal {
  width: 94vw;
  max-width: 920px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.sync-log-modal .modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: rgba(30, 41, 59, 0.4);
}

.sync-log-modal .modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sync-log-summary {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.84rem;
  color: #cbd5e1;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sync-log-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.sync-log-search-input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  width: 250px;
  outline: none;
  transition: all 0.2s ease;
}

.sync-log-search-input:focus {
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 1);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.sync-log-counter {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.modal-table-wrapper {
  flex: 1;
  min-height: 220px;
  max-height: 54vh;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  scroll-behavior: smooth;
}

/* Custom modern scrollbars */
.modal-table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.modal-table-wrapper::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 4px;
}

.modal-table-wrapper::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.modal-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.sync-log-table {
  width: 100%;
  border-collapse: collapse;
}

.sync-log-table th {
  background: #1e293b !important;
  color: #94a3b8;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.sync-log-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.84rem;
}

.sync-log-table tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* ==========================================================================
   BANNER FILTRU VLASTNICTVÍ (OV / DV / OBOJE)
   ========================================================================== */
.ownership-filter-banner {
  margin-top: 16px;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.ownership-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ownership-banner-icon {
  font-size: 1.4rem;
}

.ownership-banner-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.ownership-banner-sub {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.ownership-toggle-group {
  display: flex;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

.ownership-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.ownership-pill-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.ownership-pill-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.45);
}

.own-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.ov-dot { background: #10b981; }
.dv-dot { background: #c084fc; }
.all-dot { background: #60a5fa; }

/* ==========================================================================
   SETTINGS MODAL & PRESET CITIES SELECTION
   ========================================================================== */
.settings-modal {
  width: 95vw;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #0d1527;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.settings-modal-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.settings-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-section {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 18px 20px;
}

.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.settings-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

.settings-counter-badge {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.settings-counter-badge.ready {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.settings-counter-badge strong {
  font-size: 1rem;
  color: #ffffff;
}

/* Selected Chips Panel */
.settings-selected-cities-wrap {
  margin-bottom: 14px;
}

.selected-cities-label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 8px;
}

.settings-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  align-items: center;
}

.settings-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #e0f2fe;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  animation: fadeIn 0.2s ease;
}

.chip-idx {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chip-remove-btn {
  background: transparent;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.15s;
}

.chip-remove-btn:hover {
  color: #ef4444;
}

.chips-placeholder {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 6px;
}

/* Toolbar */
.settings-city-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.settings-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 6px 12px;
  flex: 1;
  min-width: 220px;
}

.settings-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.settings-search-input {
  background: transparent;
  border: none;
  color: #ffffff;
  outline: none;
  font-size: 0.85rem;
  font-family: inherit;
  width: 100%;
}

.settings-search-input::placeholder {
  color: #64748b;
}

.settings-actions-group {
  display: flex;
  gap: 8px;
}

.settings-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.settings-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.settings-action-btn.btn-danger-subtle:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Cities Grid in Modal */
.settings-cities-grid-scroll {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(10, 14, 23, 0.6);
  padding: 10px;
}

.settings-cities-grid-scroll::-webkit-scrollbar {
  width: 6px;
}
.settings-cities-grid-scroll::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.settings-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.settings-city-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.settings-city-item:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

.settings-city-item.selected {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.settings-city-chk {
  width: 17px;
  height: 17px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.settings-city-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.settings-city-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-city-region {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-city-tag {
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Upcoming features section */
.settings-section-upcoming {
  opacity: 0.85;
}

.future-badge {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.future-settings-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.future-setting-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: 10px;
}

.future-icon {
  font-size: 1.2rem;
  margin-top: 2px;
}

.future-setting-item strong {
  display: block;
  font-size: 0.84rem;
  color: #e2e8f0;
}

.future-setting-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

/* Modal Footer */
.settings-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
}

.settings-feedback-msg {
  font-size: 0.84rem;
  font-weight: 600;
  color: #34d399;
}

.btn-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.55);
  transform: translateY(-1px);
}

/* ==========================================================================
   VÝBĚR HORIZONTU PRO VYHODNOCENÍ RŮSTU (3, 5, 10 LET)
   ========================================================================== */
.growth-horizon-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .growth-horizon-selector {
    grid-template-columns: 1fr;
  }
}

.horizon-btn {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.horizon-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.horizon-btn.active {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(30, 41, 59, 0.85));
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6, 0 8px 24px rgba(37, 99, 235, 0.25);
}

.horizon-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #64748b;
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.horizon-btn.active .horizon-radio-circle {
  border-color: #3b82f6;
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.horizon-radio-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  display: none;
}

.horizon-btn.active .horizon-radio-circle::after {
  display: block;
}

.horizon-btn-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.horizon-title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.horizon-years-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 7px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.02em;
}

.horizon-btn.active .horizon-years-badge {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #93c5fd;
}

.horizon-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 2px;
}

/* ==========================================================================
   PŘIHLAŠOVACÍ OBRAZOVKA (LOGIN SCREEN) & AUTENTIZACE
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d16;
  overflow: hidden;
  padding: 20px;
}

.login-overlay.hidden {
  display: none !important;
}

.login-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.25;
  pointer-events: none;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #3b82f6 0%, #1d4ed8 70%);
  top: -100px;
  left: -80px;
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #8b5cf6 0%, #4338ca 70%);
  bottom: -100px;
  right: -80px;
}

.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 430px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 38px 34px 36px 34px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 45px rgba(59, 130, 246, 0.16);
  animation: loginCardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.login-card.shake {
  animation: loginShake 0.4s ease-in-out;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
  color: white;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0 0 5px 0;
}

.login-title span {
  color: #60a5fa;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-field-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s;
}

.login-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 11px 40px 11px 40px;
  color: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.login-input-wrap:focus-within .login-input-icon {
  color: #60a5fa;
}

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-toggle-pwd:hover {
  color: #cbd5e1;
}

.login-error-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 9px;
  color: #fca5a5;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 14px;
  animation: fadeIn 0.2s ease;
}

.btn-login-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 10px;
  padding: 12px;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  margin-top: 4px;
  font-family: inherit;
}

.btn-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55);
  filter: brightness(1.08);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0 14px;
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.login-divider span {
  padding: 0 12px;
}

.login-test-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-autofill-hints {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hint-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.hint-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 5px 10px;
  color: #94a3b8;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.hint-chip:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.hint-chip strong {
  color: #ffffff;
}

.btn-bypass-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 9px;
  color: #94a3b8;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-bypass-auth:hover {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.45);
  color: #facc15;
}

/* User Badge in Header */
.header-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 10px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
}

.user-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 10px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Settings Modal Auth Toggle */
.settings-auth-toggle-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 18px;
}

.toggle-switch-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  background: #334155;
  border-radius: 9999px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-checkbox:checked + .toggle-track {
  background: #3b82f6;
}

.toggle-checkbox:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
}

.toggle-text {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f1f5f9;
}

.settings-auth-note {
  font-size: 0.8rem;
  color: #94a3b8;
}






