:root {
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  --teal-dark: #0f766e;
  --bg: #f4f7f7;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #d1e7e5;
  --danger: #e11d48;
  --phone-bg: #fff1f2;
  --phone-border: #fecdd3;
  --sidebar-width: 260px;
  --sidebar-bg: #0f172a;
  --sidebar-border: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #f8fafc;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(13, 148, 136, 0.18);
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 118, 110, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

.layout {
  display: flex;
  min-height: 100vh;
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0.875rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding: 0 0.5rem 1.25rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.brand-mark .icon-brand {
  width: 1.35rem;
  height: 1.35rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--sidebar-text-active);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--sidebar-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 0.1rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  padding: 0 0.25rem;
}

.nav-section {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #475569;
  padding: 0.25rem 0.75rem 0.6rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--teal);
  border-radius: 0 3px 3px 0;
}

.nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: inherit;
  opacity: 0.85;
}

.nav-item.active .nav-icon-wrap {
  color: var(--teal-light);
  opacity: 1;
}

.nav-label {
  flex: 1;
  min-width: 0;
}

.badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
  line-height: 1.2;
}

.count-pill {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-item.active .count-pill {
  background: rgba(13, 148, 136, 0.25);
  color: #99f6e4;
  border-color: rgba(13, 148, 136, 0.3);
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-lang {
  margin-top: 1.25rem;
  padding: 0 0.35rem;
}

.sidebar-lang .lang-select-wrap {
  width: 100%;
}

.sidebar-lang .lang-select {
  width: 100%;
  height: 2.35rem;
  padding: 0 2rem 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23c2d0cc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--sidebar-text-active);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-lang .lang-select:hover,
.sidebar-lang .lang-select:focus {
  border-color: rgba(223, 255, 88, 0.35);
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
}

.mobile-header .lang-select-wrap.header-lang {
  flex-shrink: 0;
}

.mobile-header .lang-select {
  height: 2rem;
  min-width: 6.5rem;
  padding: 0 1.75rem 0 0.65rem;
  border: 1px solid rgba(16, 32, 29, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2340504c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.mobile-header .lang-select:hover,
.mobile-header .lang-select:focus {
  border-color: rgba(8, 125, 105, 0.25);
  color: var(--teal);
  outline: none;
}

.sidebar-divider {
  flex-shrink: 0;
  height: 1px;
  margin: 0.65rem 0 0.5rem;
  background: var(--sidebar-border);
}

.sidebar-plan-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.65rem;
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 8px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--sidebar-text-active);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sidebar-plan-btn.active,
.sidebar-plan-btn.active.sidebar-plan-btn--pro,
.sidebar-plan-btn.active.sidebar-plan-btn--expired {
  background: rgba(223, 255, 88, 0.12);
  border-color: var(--lime, #dfff58);
}

.sidebar-plan-btn.active:hover,
.sidebar-plan-btn.active.sidebar-plan-btn--pro:hover,
.sidebar-plan-btn.active.sidebar-plan-btn--expired:hover {
  background: rgba(223, 255, 88, 0.18);
  border-color: var(--lime, #dfff58);
}

.sidebar-plan-btn:hover {
  background: rgba(13, 148, 136, 0.18);
  border-color: rgba(13, 148, 136, 0.4);
}

.sidebar-plan-btn--pro {
  background: rgba(13, 148, 136, 0.14);
  border-color: rgba(45, 212, 191, 0.35);
}

.sidebar-plan-btn--expired {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.sidebar-plan-btn--expired .sidebar-plan-name {
  color: #fca5a5;
}

.sidebar-plan-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: var(--teal-light);
}

.sidebar-plan-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-plan-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-text);
}

.sidebar-plan-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sidebar-text-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-plan-chevron {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--sidebar-text);
  opacity: 0.7;
}

.sidebar-plan-chevron svg {
  width: 1rem;
  height: 1rem;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}


.billing-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.mobile-plan-btn {
  display: none;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sidebar-text-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.68rem;
  color: var(--teal-light);
  font-weight: 500;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: var(--sidebar-text);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

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

.main {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-x: hidden;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-select-wrap {
  display: flex;
  align-items: center;
}

.toolbar-select {
  min-width: 11rem;
  max-width: 16rem;
  padding: 0.48rem 2rem 0.48rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
  appearance: none;
  font-size: 0.9rem;
  color: #0f172a;
  cursor: pointer;
}

.toolbar-select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  border-color: var(--accent, #0f766e);
}

.listings-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 0.5rem;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  text-align: center;
}

.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.filter-pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
}

.filter-active-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.35rem;
  border-radius: 50%;
  background: #fff;
  vertical-align: middle;
}

.segmented {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.segment {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.segment.active {
  background: var(--teal);
  color: white;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover { border-color: var(--teal); }

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.btn-primary:hover { background: var(--teal-dark); }

.btn-block { width: 100%; }

.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }

.btn-danger {
  color: var(--danger);
  border-color: #fecdd3;
}

.btn-phone {
  background: var(--phone-bg);
  border-color: var(--phone-border);
  color: #be123c;
}

.select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 0.88rem;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.alert-card {
  display: flex;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--shadow);
  position: relative;
}

.alert-card-new {
  animation: listing-card-enter 0.55s ease-out;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12), var(--shadow);
}

@keyframes listing-card-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.favorite-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.favorite-btn:hover {
  transform: scale(1.08);
  background: #fff;
}

.favorite-btn .icon-star {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.75;
  stroke-linejoin: round;
}

.favorite-btn.is-favorite .icon-star {
  fill: #f59e0b;
  stroke: #f59e0b;
}

.favorite-btn.is-favorite:hover .icon-star {
  fill: #d97706;
  stroke: #d97706;
}

.alert-image {
  width: 140px;
  min-width: 140px;
  height: 105px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.alert-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.alert-body { flex: 1; min-width: 0; }

.listing-summary {
  margin: 0.45rem 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted, #64748b);
}

.listing-summary-text {
  margin: 0;
  white-space: pre-line;
}

.listing-summary-loading {
  margin: 0;
  color: #94a3b8;
  font-style: italic;
}

.listing-summary-loading::after {
  content: "";
  display: inline-block;
  width: 0.9rem;
  animation: listing-summary-pulse 1.2s ease-in-out infinite;
}

@keyframes listing-summary-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.listing-summary-error {
  margin: 0;
  color: #dc2626;
  font-size: 0.82rem;
}

.alert-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--teal-dark);
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
}

.alert-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tag-visits {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #e0f2fe;
  color: #0369a1;
}

.tag-visits .icon-eye {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}

.tag-buy { background: #fef3c7; color: #b45309; }

.alert-title {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alert-meta {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.alert-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

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

.search-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.search-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.search-card-header h3 { margin: 0; font-size: 1rem; flex: 1; min-width: 0; }

.alert-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.toggle-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toggle-label-off {
  color: var(--muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.4rem;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  left: 0.15rem;
  top: 0.15rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--teal);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(1.1rem);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-card.is-disabled {
  opacity: 0.72;
}

.search-card.is-disabled .search-card-header h3 {
  color: var(--muted);
}

.criteria-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.search-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.unread-label {
  margin-right: auto;
  font-size: 0.78rem;
  color: var(--muted);
}

.settings-panel {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.settings-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.lang-switch { display: flex; gap: 0.5rem; }

.lang-btn {
  padding: 0.55rem 1.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-weight: 500;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.lang-btn:hover {
  border-color: #cbd5e1;
  background: #fafbfc;
}

.lang-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.api-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.api-list li { margin-bottom: 0.35rem; }

.api-list code {
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
}

.info-section p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.channels-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.channels-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.channel-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--teal-light);
  color: var(--teal-dark);
}

.form-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.form-hint a {
  color: var(--teal-dark);
  font-weight: 500;
}

.channel-status {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 0.35rem;
}

.channel-status-warn {
  color: #b45309;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.settings-field .field-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="url"],
.settings-form input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.settings-form input:hover {
  border-color: #cbd5e1;
}

.settings-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.settings-form input::placeholder {
  color: #94a3b8;
}

.setup-steps {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.setup-steps li + li {
  margin-top: 0.35rem;
}

.telegram-start-command {
  display: block;
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  background: #f1f5f9;
  border-radius: 0.35rem;
  font-size: 0.9em;
  word-break: break-all;
}

.settings-form .field-hint {
  margin: -0.15rem 0 0;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  user-select: none;
}

.settings-toggle input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}

.settings-toggle input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.save-status {
  font-size: 0.85rem;
  color: var(--teal-dark);
  font-weight: 500;
}

.form-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #fafbfc;
}

.form-section legend {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--teal-dark);
  padding: 0 0.35rem;
}

.dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.dialog:not([open]) {
  display: none;
}

.dialog::backdrop { background: rgba(15, 23, 42, 0.4); }

.dialog-wide {
  max-width: 560px;
}

.dialog-brands {
  max-width: 720px;
}

.dialog-summary {
  width: min(96vw, 1280px);
  max-width: none;
  max-height: calc(100vh - 1.5rem);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.dialog-summary[open] {
  display: flex;
  flex-direction: column;
}

.dialog-summary-header {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.dialog-summary-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.summary-modal-body {
  overflow-y: auto;
  padding: 1.1rem;
  background: #f8fafc;
}

.summary-gallery {
  position: relative;
  margin: -1.1rem -1.1rem 1rem;
  background: #0f172a;
  user-select: none;
}

.summary-gallery.is-empty .summary-gallery-stage {
  background: #e2e8f0;
}

.summary-gallery-stage {
  position: relative;
  height: min(480px, 58vh);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.summary-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f172a;
}

.summary-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.summary-gallery-nav:hover {
  transform: translateY(-50%) scale(1.05);
  background: #fff;
}

.summary-gallery-nav svg {
  width: 1.35rem;
  height: 1.35rem;
}

.summary-gallery-prev { left: 0.85rem; }
.summary-gallery-next { right: 0.85rem; }

.summary-gallery-counter {
  position: absolute;
  right: 0.85rem;
  bottom: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}

.summary-intro {
  margin-bottom: 1rem;
}

.summary-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent, #0f766e);
  margin-bottom: 0.35rem;
}

.summary-headline {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.summary-highlights {
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.45;
}

.summary-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.summary-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.summary-columns-main {
  display: grid;
  gap: 0.75rem;
}

.summary-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.summary-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.summary-spec-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

.summary-spec-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
}

.summary-description {
  margin: 0;
  white-space: pre-line;
  line-height: 1.55;
  color: #334155;
  font-size: 0.94rem;
}

.summary-equipment {
  margin-top: 0.85rem;
}

.summary-equipment-heading {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  color: #0f172a;
}

.summary-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.summary-equipment-group h4 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: #0f766e;
}

.summary-equipment-group ul {
  margin: 0;
  padding-left: 1rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
}

.summary-equipment-group li::marker {
  color: #22c55e;
}

.summary-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f766e;
}

.summary-footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.summary-loading-block {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
  font-style: italic;
}

@media (max-width: 768px) {
  .summary-gallery-stage {
    height: min(280px, 42vh);
  }

  .summary-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-equipment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .summary-gallery-nav {
    width: 2.25rem;
    height: 2.25rem;
  }

  .summary-spec-grid {
    grid-template-columns: 1fr;
  }
}

.dialog-preview {
  width: min(96vw, 1200px);
  height: min(92vh, 900px);
  max-width: none;
  overflow: hidden;
}

.dialog-preview[open] {
  display: flex;
  flex-direction: column;
}

.dialog-preview-header {
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.dialog-preview-header h2 {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
}

.dialog-preview-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dialog-preview-toolbar {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #fafcfc;
}

.dialog-preview-toolbar .form-hint {
  margin: 0 0 0.5rem;
}

.dialog-preview-phone-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.listing-preview-phone-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.dialog-preview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--bg);
}

.listing-preview-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

.brand-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.brand-picker-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.brand-picker-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.brand-search {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.brand-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.25rem;
}

.brand-picker-summary {
  font-size: 0.85rem;
  color: var(--muted);
}

.btn-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--teal-dark);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--teal);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.15rem 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafcfc;
}

.brand-option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0.15rem 0;
  line-height: 1.3;
}

.brand-option input {
  flex-shrink: 0;
  margin: 0;
}

.brand-option-name {
  flex: 1;
  min-width: 0;
}

.brand-option-count {
  color: var(--teal-dark);
  font-size: 0.82rem;
  white-space: nowrap;
}

.brand-option:has(input:checked) .brand-option-name {
  font-weight: 600;
  color: var(--teal-dark);
}

.brand-picker--combobox {
  gap: 0.45rem;
}

.brand-picker--combobox .brand-picker-label {
  margin: 0;
}

.brand-combobox-wrap {
  position: relative;
}

.brand-combobox-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brand-combobox-wrap.is-open .brand-combobox-control,
.brand-combobox-control:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.brand-combobox-tags {
  display: contents;
}

.brand-combobox-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.2rem 0.35rem 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.85rem;
  line-height: 1.2;
}

.brand-combobox-tag-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-combobox-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.brand-combobox-tag-remove:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.brand-combobox-input {
  flex: 1 1 6rem;
  min-width: 5rem;
  padding: 0.2rem 0.15rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.brand-combobox-clear-all {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.brand-combobox-clear-all svg {
  width: 1rem;
  height: 1rem;
}

.brand-combobox-clear-all:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.brand-combobox-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.brand-combobox-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.brand-combobox-option:last-child {
  border-bottom: none;
}

.brand-combobox-option:hover,
.brand-combobox-option:focus-visible {
  background: #eff6ff;
  outline: none;
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.brand-combobox-option.is-selected {
  background: #eff6ff;
}

.brand-combobox-option.is-selected .brand-option-name {
  font-weight: 600;
  color: #1e40af;
}

.brand-picker--combobox .brand-option-count {
  flex-shrink: 0;
  min-width: 1.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted, #64748b);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
}

.brand-combobox-option.is-selected .brand-option-count {
  background: #dbeafe;
  color: #1d4ed8;
}

@media (max-width: 700px) {
  .brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dialog form {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.dialog h2 { margin: 0; font-size: 1.1rem; }

.dialog-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.dialog-close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.dialog-close:hover {
  background: #f1f5f9;
  color: var(--text);
}

.channels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}

.channel-option {
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fafbfc;
}

.channel-option:hover {
  border-color: #cbd5e1;
}

.dialog label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.dialog input[type="text"],
.dialog input[type="number"],
.dialog select,
.form-select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: #0f172a;
  background: #fff;
}

.dialog select,
.form-select {
  padding-right: 2rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  cursor: pointer;
}

.dialog select:focus,
.form-select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  border-color: var(--accent, #0f766e);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  font-weight: 400 !important;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0fdfa 0%, var(--bg) 50%, #ecfeff 100%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(15, 118, 110, 0.1);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.login-brand .brand-name {
  color: var(--text);
}

.login-brand .brand-sub {
  color: var(--muted);
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.login-subtitle {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.login-form input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
}

.login-lang {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.lang-link { color: var(--muted); }
.lang-link.active { color: var(--teal-dark); font-weight: 600; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  z-index: 1000;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text-active);
  font-size: 0.85rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.flash-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.flash-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.admin-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.admin-section h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.admin-tab.active {
  color: var(--text);
  border-bottom-color: var(--teal);
}

.admin-stats-dashboard {
  margin-top: 0;
}

.admin-stats-period {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.admin-stats-period-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-stats-period-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-scan-summary {
  display: grid;
  gap: 0.55rem;
}

.admin-scan-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.admin-scan-row span {
  color: var(--muted);
}

.admin-scan-error strong {
  color: #be123c;
}

.admin-scan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

.insights-channel-badges {
  display: flex;
  gap: 0.25rem;
}

.insights-channel-badges .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(49, 76, 71, 0.08);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
}

.insights-error-detail {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.admin-form input[type="text"],
.admin-form input[type="password"] {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.users-table-wrap { overflow-x: auto; }

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.users-table th,
.users-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.users-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.muted-cell { color: var(--muted); font-size: 0.82rem; }

.role-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: var(--muted);
}

.role-admin {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.status-label {
  font-size: 0.78rem;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge-active {
  color: #0f5c4a;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.status-badge-active::before {
  background: #22c55e;
}

.status-badge-inactive {
  color: #64748b;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.status-badge-inactive::before {
  background: #94a3b8;
}

.status-badge-expired {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.32);
}

.status-badge-expired::before {
  background: #f97316;
}

.plan-badge {
  color: #0f5c4a;
  background: rgba(8, 125, 105, 0.1);
  border: 1px solid rgba(8, 125, 105, 0.18);
}

.status-on { color: var(--teal-dark); }
.status-off { color: var(--muted); }

.presence-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.presence-label::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.presence-online { color: var(--teal-dark); }
.presence-online::before { background: #22c55e; }

.presence-offline { color: var(--muted); }
.presence-offline::before { background: #94a3b8; }

.tag-you {
  background: #e0f2fe;
  color: #0369a1;
  margin-left: 0.35rem;
}

.user-row-expired {
  background: #fff1f2;
}

.user-email-dialog-content {
  margin: 0;
  padding: 0 1.25rem 1rem;
  font-size: 1rem;
  word-break: break-word;
}

.user-actions-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.user-actions-cell form {
  margin: 0;
}

.user-alerts-content {
  max-height: min(70vh, 640px);
  overflow-y: auto;
  padding: 0.25rem 0;
}

.user-alerts-list {
  display: grid;
  gap: 0.75rem;
}

.user-alerts-btn {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.password-field-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.password-field-row input {
  flex: 1;
}

.dialog label .form-hint {
  margin-top: 0.25rem;
}

.form-hint-inline {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

.duration-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.duration-field .field-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.duration-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.duration-option {
  position: relative;
  cursor: pointer;
}

.duration-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.duration-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.duration-option:hover span {
  border-color: #cbd5e1;
  background: #fff;
}

.duration-option input:checked + span {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal-dark);
  box-shadow: 0 0 0 1px var(--teal);
}

.duration-option input:disabled + span {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-form select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--card);
}

.mobile-header {
  display: none;
}

/* ── Tablet: stack sidebar above content ── */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
  }
  .alert-card { flex-direction: column; }
  .alert-image {
    width: 100%;
    min-width: 0;
    height: 180px;
  }
  .main { padding: 1.25rem 1.25rem; }
  .page-header h1 { font-size: 1.45rem; }
}

/* ── Smartphone: bottom nav + compact layout ── */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 0.65rem 1rem;
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--sidebar-border);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
  }

  .mobile-brand .brand-name {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-brand .brand-mark {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
  }

  .mobile-header .header-lang {
    display: flex;
    gap: 0.2rem;
    padding: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
  }

  .mobile-header .lang-pill {
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-header .lang-pill:hover,
  .mobile-header .lang-pill.active {
    color: var(--lime);
  }

  .mobile-header .lang-pill.active {
    background: rgba(223, 255, 88, 0.12);
  }

  .mobile-brand .brand-mark .icon-brand {
    width: 1.1rem;
    height: 1.1rem;
  }

  .mobile-user {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .mobile-user .user-avatar {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.72rem;
  }

  .layout {
    flex-direction: column;
    min-height: calc(100vh - 3.25rem);
    padding-bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px));
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: auto;
    z-index: 100;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--sidebar-border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .sidebar .brand,
  .sidebar .nav-section,
  .sidebar .sidebar-bottom,
  .sidebar .sidebar-lang {
    display: none;
  }

  .nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding: 0.35rem 0.25rem 0.45rem;
  }

  .nav-item {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.35rem 0.15rem;
    font-size: 0.62rem;
    border-radius: 8px;
    min-width: 0;
    min-height: 2.75rem;
  }

  .nav-item.active::before {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    border-radius: 0 0 3px 3px;
  }

  .nav-icon-wrap {
    width: 1.5rem;
    height: 1.5rem;
  }

  .nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    line-height: 1.15;
  }

  .count-pill,
  .nav-item .badge {
    position: absolute;
    top: 0.1rem;
    right: 0.15rem;
    margin-left: 0;
    font-size: 0.55rem;
    padding: 0.05rem 0.35rem;
    min-width: 0.95rem;
  }

  .nav-item {
    position: relative;
  }

  .main {
    flex: 1;
    padding: 1rem;
    padding-bottom: 0.5rem;
    overflow-x: hidden;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .subtitle {
    font-size: 0.88rem;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar .btn,
  .page-header > .btn {
    flex: 1;
    min-width: 0;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
  }

  .alert-card {
    flex-direction: column;
    padding: 0.75rem;
  }

  .alert-image {
    width: 100%;
    min-width: 0;
    height: 160px;
  }

  .favorite-btn {
    top: 0.5rem;
    right: 0.5rem;
  }

  .price {
    font-size: 1.2rem;
  }

  .alert-actions .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .search-card-header {
    flex-wrap: wrap;
  }

  .search-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-card-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .searches-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .channels-grid {
    grid-template-columns: 1fr;
  }

  .duration-picker {
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .dialog-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .password-field-row {
    flex-direction: column;
  }

  .password-field-row .btn {
    width: 100%;
    justify-content: center;
  }

  .dialog-preview-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .dialog-preview-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .dialog-preview-actions .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .dialog-preview-phone-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(0.5rem);
    white-space: normal;
    text-align: center;
    max-width: calc(100% - 2rem);
  }

  .toast.is-visible {
    transform: translateX(0) translateY(0);
  }

  .login-page {
    padding: 1rem;
    align-items: flex-start;
    padding-top: max(1.5rem, env(safe-area-inset-top, 0px));
  }

  .login-card {
    padding: 1.5rem;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}

/* Statistics */
.listing-score {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  width: min(100%, 430px);
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fafc;
}

.score-ring {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #38bdf8;
  background: #fff;
  color: #075985;
  font-weight: 800;
  font-size: 0.95rem;
}

.listing-score-excellent .score-ring { border-color: #22c55e; color: #166534; }
.listing-score-good .score-ring { border-color: #38bdf8; color: #075985; }
.listing-score-fair .score-ring { border-color: #f59e0b; color: #92400e; }
.listing-score-weak .score-ring { border-color: #f43f5e; color: #9f1239; }
.listing-score-unknown .score-ring { border-color: #cbd5e1; color: #64748b; }

.score-lines {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.score-line {
  display: grid;
  grid-template-columns: minmax(4rem, 1fr) 2.25rem minmax(4.5rem, auto);
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.score-line strong {
  color: #0f172a;
  font-size: 0.82rem;
  text-align: right;
}

.score-line small {
  color: #64748b;
  text-align: right;
  white-space: nowrap;
}

.score-market {
  font-size: 0.72rem;
  color: #64748b;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.metric-card,
.stats-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-card strong {
  font-size: 1.45rem;
  line-height: 1.15;
  color: #0f172a;
}

.metric-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.stats-panel {
  padding: 1rem;
  min-width: 0;
}

.stats-panel-wide {
  grid-column: 1 / -1;
}

.stats-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.stats-panel-header h2 {
  margin: 0;
  font-size: 1rem;
}

.stats-panel-header span {
  color: var(--muted);
  font-size: 0.82rem;
}

.monthly-chart {
  display: grid;
  gap: 0.65rem;
}

.monthly-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.monthly-label {
  font-size: 0.82rem;
  color: #334155;
  font-weight: 600;
}

.monthly-bar-wrap,
.progress-track,
.rank-meter {
  height: 0.65rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.monthly-bar {
  min-width: 2rem;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #2563eb);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 0.65rem;
  text-align: right;
  padding-right: 0.35rem;
}

.monthly-fuel {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.76rem;
  min-width: 4rem;
  justify-content: flex-end;
}

.fuel-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.18rem;
  vertical-align: middle;
  background: #94a3b8;
}

.fuel-petrol, .fuel-fill-petrol { background: #2563eb; }
.fuel-diesel, .fuel-fill-diesel { background: #475569; }
.fuel-electric, .fuel-fill-electric { background: #16a34a; }
.fuel-unknown, .fuel-fill-unknown { background: #94a3b8; }

.fuel-breakdown {
  display: grid;
  gap: 0.75rem;
}

.fuel-item {
  display: grid;
  gap: 0.35rem;
}

.fuel-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.fuel-item small {
  color: var(--muted);
  font-size: 0.76rem;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
}

.stats-table-list,
.rank-list {
  display: grid;
  gap: 0.55rem;
}

.stats-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: baseline;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e2e8f0;
}

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

.stats-table-row span,
.rank-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-table-row strong {
  color: #0f172a;
  white-space: nowrap;
}

.stats-table-row small {
  color: var(--muted);
  white-space: nowrap;
}

.rank-row {
  display: grid;
  grid-template-columns: minmax(5rem, 1fr) minmax(5rem, 1.2fr) 2.5rem;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.88rem;
}

.rank-meter div {
  height: 100%;
  border-radius: inherit;
  background: #0d9488;
}

.rank-row strong {
  text-align: right;
}

.empty-state-compact {
  padding: 1.5rem 1rem;
}

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

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

  .monthly-row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .monthly-fuel {
    grid-column: 2;
    justify-content: flex-start;
  }

  .stats-table-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .stats-table-row small {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .listing-score {
    grid-template-columns: 2.7rem minmax(0, 1fr);
  }

  .score-line {
    grid-template-columns: minmax(3.5rem, 1fr) 2rem;
  }

  .score-line small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .rank-row {
    grid-template-columns: minmax(0, 1fr) 2rem;
  }

  .rank-meter {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.trend-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.75rem 0;
  margin-bottom: 0.75rem;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.trend-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.trend-stat span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trend-stat strong {
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.2;
}

.trend-stat small,
.trend-delta {
  color: var(--muted);
  font-size: 0.78rem;
}

.trend-up { color: #047857; }
.trend-down { color: #be123c; }

.evolution-chart {
  display: grid;
  gap: 0.55rem;
}

.evolution-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(8rem, 1fr) 6rem 7rem 3.5rem;
  gap: 0.75rem;
  align-items: center;
  min-height: 1.6rem;
}

.evolution-label {
  font-size: 0.82rem;
  color: #334155;
  font-weight: 600;
}

.evolution-bar-wrap {
  height: 0.75rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.evolution-bar {
  min-width: 2rem;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #2563eb);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 0.75rem;
  text-align: right;
  padding-right: 0.35rem;
}

.evolution-price,
.evolution-delta {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.evolution-fuel-stack {
  display: flex;
  height: 0.75rem;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.evolution-fuel-stack span {
  min-width: 0;
  height: 100%;
}

@media (max-width: 1100px) {
  .trend-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evolution-row {
    grid-template-columns: 6rem minmax(8rem, 1fr) 5.5rem;
  }

  .evolution-fuel-stack,
  .evolution-delta {
    grid-column: 2 / -1;
  }
}

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

  .evolution-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #e2e8f0;
  }

  .evolution-price,
  .evolution-delta {
    text-align: left;
  }

  .evolution-fuel-stack {
    grid-column: auto;
  }
}

.monthly-graph {
  display: grid;
  gap: 0.45rem;
}

.monthly-graph-head,
.monthly-graph-row {
  display: grid;
  grid-template-columns: 6rem minmax(10rem, 1fr) 6.5rem 9rem 4.5rem;
  gap: 0.75rem;
  align-items: center;
}

.monthly-graph-head {
  padding: 0 0 0.4rem;
  border-bottom: 1px solid #e2e8f0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.monthly-graph-row {
  min-height: 2rem;
}

.monthly-graph-period {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.monthly-graph-period strong {
  font-size: 0.85rem;
  color: #0f172a;
}

.monthly-graph-period small,
.monthly-graph-fuel small,
.monthly-graph-change small {
  color: var(--muted);
  font-size: 0.72rem;
}

.monthly-graph-bar-wrap {
  height: 0.9rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.monthly-graph-bar {
  min-width: 2.25rem;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #2563eb);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 0.9rem;
  text-align: right;
  padding-right: 0.4rem;
}

.monthly-graph-price,
.monthly-graph-change {
  font-size: 0.84rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.monthly-graph-fuel {
  display: grid;
  gap: 0.25rem;
}

@media (max-width: 1100px) {
  .monthly-graph-head {
    display: none;
  }

  .monthly-graph-row {
    grid-template-columns: 5.5rem minmax(9rem, 1fr) 6rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #e2e8f0;
  }

  .monthly-graph-fuel,
  .monthly-graph-change {
    grid-column: 2 / -1;
  }
}

@media (max-width: 640px) {
  .monthly-graph-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .monthly-graph-price,
  .monthly-graph-change {
    text-align: left;
  }

  .monthly-graph-fuel,
  .monthly-graph-change {
    grid-column: auto;
  }
}

/* ── Car alert visual system: shared with the public landing ───────────── */
:root {
  --teal: #087d69;
  --teal-light: #e1f6ed;
  --teal-dark: #075f51;
  --bg: #f5f7f2;
  --card: #ffffff;
  --text: #10201d;
  --muted: #66736f;
  --border: rgba(16, 32, 29, 0.13);
  --danger: #d84c62;
  --phone-bg: #fff2f3;
  --phone-border: #f3cdd2;
  --sidebar-bg: #0c2521;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-text: #9eb0ab;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-active: rgba(223, 255, 88, 0.12);
  --lime: #dfff58;
  --mint: #a5f4d7;
  --radius: 18px;
  --shadow: 0 12px 35px rgba(12, 37, 33, 0.055);
}

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 92% 4%, rgba(165, 244, 215, 0.22), transparent 24rem),
    var(--bg);
  color: var(--text);
}

h1, h2, h3, .brand-name, .price, .metric-card strong {
  font-family: "Manrope", system-ui, sans-serif;
}

.sidebar {
  padding: 1.35rem 0.85rem;
  background:
    radial-gradient(circle at 30% 0%, rgba(165, 244, 215, 0.09), transparent 15rem),
    var(--sidebar-bg);
}

.brand {
  margin-bottom: 1.5rem;
  padding-bottom: 1.15rem;
}

.brand-mark {
  border-radius: 50%;
  color: var(--text);
  background: var(--lime);
  box-shadow: 0 8px 24px rgba(223, 255, 88, 0.16), inset 0 0 0 1px rgba(16, 32, 29, 0.1);
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.035em;
}

.nav-section { color: #6e817c; }

.nav-item {
  padding: 0.68rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover {
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--sidebar-text-active);
  background: var(--sidebar-active);
}

.nav-item.active::before { background: var(--lime); }
.nav-item.active .nav-icon-wrap { color: var(--lime); }
.nav-item.active .count-pill {
  color: var(--lime);
  background: rgba(223, 255, 88, 0.1);
  border-color: rgba(223, 255, 88, 0.18);
}

.user-box {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-bottom .user-box {
  border: none;
  border-radius: 0;
  background: transparent;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.user-avatar {
  border-radius: 50%;
  color: var(--text);
  background: var(--lime);
}

.user-role { color: var(--mint); }

.main {
  padding: 2rem clamp(1.25rem, 3vw, 3rem);
}

.page-header {
  align-items: center;
  margin-bottom: 1.55rem;
}

.page-header h1 {
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.subtitle {
  margin-top: 0.42rem;
  font-size: 0.93rem;
}

.btn {
  min-height: 2.55rem;
  padding: 0.58rem 1rem;
  border-color: var(--border);
  border-radius: 999px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  border-color: rgba(8, 125, 105, 0.45);
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  border-color: var(--text);
  background: var(--text);
  box-shadow: 0 10px 24px rgba(16, 32, 29, 0.16);
}

.btn-primary:hover {
  color: var(--text);
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 12px 28px rgba(16, 32, 29, 0.2);
}

.btn-sm {
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
}

.btn-danger {
  color: #b82f48;
  border-color: rgba(216, 76, 98, 0.24);
  background: #fff7f8;
}

.toolbar-select,
.select,
.form-select {
  min-height: 2.55rem;
  border-color: var(--border);
  border-radius: 999px;
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.82);
}

.toolbar-select:focus,
.select:focus,
.form-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 125, 105, 0.1);
}

.filter-pill,
.channel-pill {
  padding: 0.32rem 0.68rem;
  border: 1px solid rgba(8, 125, 105, 0.12);
  border-radius: 999px;
  background: var(--teal-light);
}

.alerts-list { gap: 1rem; }

.alert-card,
.search-card,
.settings-section,
.admin-section,
.metric-card,
.stats-panel {
  border-color: var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.alert-card {
  gap: 1.15rem;
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.alert-card:hover {
  z-index: 1;
  border-color: rgba(8, 125, 105, 0.24);
  box-shadow: 0 18px 45px rgba(12, 37, 33, 0.09);
  transform: translateY(-2px);
}

.alert-card-new {
  border-color: rgba(8, 125, 105, 0.42);
  box-shadow: 0 0 0 3px rgba(165, 244, 215, 0.2), var(--shadow);
}

.alert-image {
  width: 156px;
  min-width: 156px;
  height: 116px;
  border-radius: 13px;
  background: #e9eeea;
}

.favorite-btn {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(12, 37, 33, 0.1);
}

.favorite-btn.is-favorite .icon-star {
  fill: var(--lime);
  stroke: var(--text);
}

.price {
  color: var(--teal);
  font-size: 1.45rem;
  letter-spacing: -0.045em;
}

.alert-title {
  color: var(--text);
  font-size: 1rem;
}

.tag { border-radius: 999px; }
.tag-visits { color: #056252; background: #dff4eb; }
.tag-buy { color: #8a5b00; background: #fff3c4; }

.search-card {
  padding: 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(12, 37, 33, 0.09);
}

.empty-state {
  border-color: rgba(8, 125, 105, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
}

.settings-panel { max-width: 800px; }
.settings-section { padding: 1.4rem; }
.settings-section h2,
.admin-section h2,
.stats-panel-header h2 { letter-spacing: -0.025em; }

.form-section {
  border-color: var(--border);
  border-radius: 16px;
  background: rgba(245, 247, 242, 0.7);
}

.form-section legend {
  color: var(--teal);
  letter-spacing: 0.1em;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="url"],
.settings-form input[type="number"],
.dialog input[type="text"],
.dialog input[type="number"],
.dialog input[type="password"],
.dialog input[type="email"],
.dialog input[type="url"],
.dialog select,
.login-form input {
  min-height: 2.75rem;
  border-color: var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.settings-form input:focus,
.dialog input:focus,
.dialog select:focus,
.login-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 125, 105, 0.1);
}

.lang-btn {
  border-color: var(--border);
  border-radius: 999px;
  font-weight: 700;
}

.lang-btn.active {
  color: var(--text);
  border-color: var(--lime);
  background: var(--lime);
}

.dialog {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  color: var(--text);
  background: var(--bg);
  box-shadow: 0 30px 90px rgba(12, 37, 33, 0.24);
}

.dialog::backdrop {
  background: rgba(7, 24, 21, 0.58);
  backdrop-filter: blur(5px);
}

.dialog-close {
  border-radius: 50%;
  background: rgba(16, 32, 29, 0.06);
}

.toast {
  color: var(--text);
  background: var(--lime);
  box-shadow: 0 14px 35px rgba(12, 37, 33, 0.2);
  font-weight: 700;
}

.metric-card {
  position: relative;
  padding: 1.2rem;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -2rem;
  bottom: -2.5rem;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgba(165, 244, 215, 0.25);
}

.metric-label { color: var(--teal); letter-spacing: 0.08em; }
.metric-card strong { color: var(--text); letter-spacing: -0.04em; }
.progress-track,
.rank-meter,
.monthly-bar-wrap { background: #e5ebe7; }
.rank-meter div { background: var(--teal); }
.monthly-bar { background: linear-gradient(90deg, var(--teal), #45b89d); }

.users-table th { color: var(--teal); letter-spacing: 0.08em; }
.users-table td { border-color: var(--border); }
.role-badge { border-radius: 999px; }
.role-admin { color: var(--text); background: var(--lime); }
.status-on,
.presence-online { color: var(--teal); }

.login-page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 18%, rgba(165, 244, 215, 0.58), transparent 25rem),
    radial-gradient(circle at 15% 80%, rgba(223, 255, 88, 0.18), transparent 22rem),
    var(--bg);
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 32, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 29, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(#000, transparent 90%);
}

.login-card {
  position: relative;
  z-index: 1;
  max-width: 430px;
  padding: 2.25rem;
  border-color: rgba(16, 32, 29, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 30px 90px rgba(12, 37, 33, 0.14);
  backdrop-filter: blur(18px);
}

.login-card h1 {
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.login-form { gap: 1rem; }
.login-form label { color: #40504c; font-weight: 700; }
.login-forgot-link { margin: -0.35rem 0 0; text-align: right; font-size: 0.82rem; }
.login-forgot-link a { color: var(--teal); font-weight: 700; }
.login-back-home { display: inline-flex; align-items: center; margin-bottom: 1rem; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.login-back-home:hover { color: var(--teal); }
.login-footer-link { margin-top: 1rem; text-align: center; color: var(--muted); font-size: 0.88rem; }
.login-footer-link a { color: var(--teal); font-weight: 700; }
.login-lang { padding-top: 1rem; border-top: 1px solid var(--border); }
.lang-link.active { color: var(--teal); }

@media (max-width: 900px) {
  .alert-card:hover,
  .search-card:hover { transform: none; }
}

@media (max-width: 768px) {
  .mobile-header {
    color: var(--text);
    background: rgba(245, 247, 242, 0.9);
    border-bottom-color: var(--border);
    backdrop-filter: blur(18px);
  }

  .mobile-header .brand-name { color: var(--text); }
  .mobile-header .logout-btn { color: var(--muted); }

  .mobile-header .header-lang {
    border-color: rgba(16, 32, 29, 0.1);
    background: rgba(255, 255, 255, 0.72);
  }

  .mobile-header .lang-pill { color: var(--muted); }
  .mobile-header .lang-pill:hover,
  .mobile-header .lang-pill.active { color: var(--teal); }
  .mobile-header .lang-pill.active { background: rgba(8, 125, 105, 0.1); }

  .sidebar {
    background: rgba(12, 37, 33, 0.96);
    backdrop-filter: blur(18px);
  }

  .nav { padding: 0.45rem 0.25rem calc(0.5rem + env(safe-area-inset-bottom, 0px)); }
  .nav-item { border-radius: 12px; }
  .nav-item:hover { transform: none; }
  .nav-item.active::before { background: var(--lime); }

  .main { padding: 1.15rem 1rem 0.75rem; }
  .page-header h1 { font-size: 1.55rem; }

  .alert-card { padding: 0.75rem; border-radius: 17px; }
  .alert-image { width: 100%; min-width: 0; height: 210px; border-radius: 13px; }

  .toolbar-select { width: 100%; max-width: none; }
  .toolbar-select-wrap { flex: 1 1 100%; }

  .settings-section,
  .admin-section,
  .stats-panel,
  .metric-card { border-radius: 17px; }
}

@media (max-width: 520px) {
  .login-page { padding: 0.85rem; }
  .login-card { padding: 1.5rem; border-radius: 22px; }
  .btn { min-height: 2.65rem; }
}

/* Read-only product demo */
.subscription-banner{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.35rem;padding:.85rem 1rem;border:1px solid rgba(189,62,84,.18);border-radius:16px;background:linear-gradient(110deg,rgba(255,240,242,.95),rgba(255,255,255,.82));box-shadow:0 10px 30px rgba(12,37,33,.05)}.subscription-banner p{margin:0;color:var(--text);font-size:.82rem;line-height:1.45}
.demo-banner{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.35rem;padding:.85rem .9rem .85rem 1rem;border:1px solid rgba(8,125,105,.16);border-radius:16px;background:linear-gradient(110deg,rgba(225,246,237,.92),rgba(255,255,255,.78));box-shadow:0 10px 30px rgba(12,37,33,.05)}.demo-banner-copy{display:flex;align-items:center;gap:.75rem;min-width:0}.demo-banner-copy div{display:flex;flex-direction:column;gap:.1rem}.demo-banner-copy strong{font:800 .84rem "Manrope",sans-serif;color:var(--text)}.demo-banner-copy span:not(.demo-frozen-dot){color:var(--muted);font-size:.75rem}.demo-frozen-dot{position:relative;width:.6rem;height:.6rem;flex:0 0 auto;border-radius:50%;background:#d4a017;box-shadow:0 0 0 5px rgba(212,160,23,.12)}.demo-banner-cta{min-height:2.25rem;padding:.45rem .8rem .45rem 1rem;color:var(--text);border-color:var(--lime);background:var(--lime);white-space:nowrap}.demo-banner-cta:hover{color:white;border-color:var(--text);background:var(--text)}.demo-settings-note{margin:0 0 1rem;padding:.75rem .9rem;border:1px solid rgba(212,160,23,.22);border-radius:12px;color:var(--muted);background:rgba(255,248,232,.72)}
.settings-panel--readonly .settings-form [disabled],
.settings-panel--readonly .settings-form [readonly]{opacity:.92;cursor:not-allowed}
.billing-layout--readonly .btn[disabled]{cursor:not-allowed}
@media(max-width:768px){.demo-banner{align-items:stretch;flex-direction:column;padding:.9rem}.demo-banner-cta{width:100%}.demo-banner-copy span:not(.demo-frozen-dot){font-size:.72rem}}

/* ── Market intelligence dashboard ───────────────────────────────────── */
.stats-dashboard{display:grid;gap:1.15rem}.stats-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:2rem;margin-bottom:.25rem;padding:.45rem 0 1rem}.stats-hero h1{margin:.5rem 0 .35rem;font-size:clamp(2rem,4vw,3.2rem);line-height:1;letter-spacing:-.065em}.stats-hero p{max-width:650px;margin:0;color:var(--muted);font-size:.95rem;line-height:1.6}.stats-eyebrow,.panel-kicker{display:flex;align-items:center;gap:.5rem;color:var(--teal);font-size:.67rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.stats-eyebrow>span{width:.48rem;height:.48rem;border-radius:50%;background:#20b486;box-shadow:0 0 0 5px rgba(32,180,134,.12)}.stats-period-chip{display:flex;flex-direction:column;gap:.15rem;min-width:130px;padding:.75rem 1rem;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.65)}.stats-period-chip span{color:var(--muted);font-size:.68rem}.stats-period-chip strong{font:800 1rem "Manrope",sans-serif}.dashboard-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.85rem}.dashboard-kpi{position:relative;display:flex;flex-direction:column;min-width:0;min-height:175px;padding:1.1rem;border:1px solid var(--border);border-radius:20px;background:rgba(255,255,255,.84);box-shadow:var(--shadow);overflow:hidden}.dashboard-kpi:after{content:"";position:absolute;right:-2.5rem;bottom:-3rem;width:8rem;height:8rem;border-radius:50%;background:rgba(165,244,215,.2)}.dashboard-kpi.kpi-price:after{background:rgba(223,255,88,.18)}.dashboard-kpi.kpi-mileage:after{background:rgba(84,169,217,.12)}.dashboard-kpi.kpi-coverage:after{background:rgba(8,125,105,.1)}.kpi-top{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem}.kpi-icon{display:grid;place-items:center;width:2.35rem;height:2.35rem;border-radius:12px;color:var(--teal);background:var(--teal-light)}.kpi-icon svg{width:1.15rem;height:1.15rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.kpi-change{padding:.25rem .48rem;border-radius:999px;font-size:.65rem;font-weight:800}.kpi-change.is-up{color:#08745f;background:#dcf5eb}.kpi-change.is-down{color:#bd3e54;background:#fff0f2}.kpi-label{position:relative;z-index:1;color:var(--muted);font-size:.7rem;font-weight:800;letter-spacing:.075em;text-transform:uppercase}.dashboard-kpi>strong{position:relative;z-index:1;margin:.35rem 0 .28rem;font:800 clamp(1.45rem,2.3vw,2rem) "Manrope",sans-serif;letter-spacing:-.055em;white-space:nowrap}.dashboard-kpi>small{position:relative;z-index:1;color:var(--muted);font-size:.72rem}.market-insights{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--border);border-radius:18px;background:rgba(255,255,255,.52);overflow:hidden}.market-insights article{display:grid;grid-template-columns:2rem 1fr;gap:.65rem;padding:1rem;border-left:1px solid var(--border)}.market-insights article:first-child{border-left:0}.insight-index{color:#a1aca8;font:700 .62rem "Manrope",sans-serif;letter-spacing:.1em}.market-insights small,.market-insights strong,.market-insights p{display:block}.market-insights small{color:var(--teal);font-size:.62rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.market-insights strong{margin:.3rem 0 .18rem;font:800 .96rem "Manrope",sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.market-insights p{margin:0;color:var(--muted);font-size:.68rem}.dashboard-panel{min-width:0;padding:1.3rem;border:1px solid var(--border);border-radius:22px;background:rgba(255,255,255,.82);box-shadow:var(--shadow);backdrop-filter:blur(12px)}.dashboard-panel-header{display:flex;justify-content:space-between;align-items:flex-end;gap:1.5rem;margin-bottom:1.2rem}.dashboard-panel-header h2{margin:.35rem 0 0;font-size:1.25rem;letter-spacing:-.04em}.dashboard-panel-header.compact{margin-bottom:1.4rem}.chart-legend{display:flex;align-items:center;gap:1rem;color:var(--muted);font-size:.7rem;font-weight:700}.chart-legend span{display:flex;align-items:center;gap:.4rem}.chart-legend i{display:block}.legend-volume{width:.7rem;height:.7rem;border-radius:3px;background:#a5f4d7}.legend-price{width:1.25rem;height:2px;background:var(--teal);position:relative}.legend-price:after{content:"";position:absolute;right:0;top:-2px;width:6px;height:6px;border-radius:50%;background:var(--lime);border:1px solid var(--teal)}.market-chart-wrap{width:100%;overflow:hidden}.market-trend-chart{display:block;width:100%;min-height:290px;overflow:visible}.chart-grid-line{stroke:rgba(16,32,29,.09);stroke-width:1}.chart-axis-label,.chart-period-label{fill:#82908c;font:10px "DM Sans",sans-serif}.chart-volume-bar{fill:#bcefdc;transition:fill .2s}.chart-volume-bar:hover{fill:#8ee2c5}.chart-price-line{fill:none;stroke:#087d69;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 4px 6px rgba(8,125,105,.15))}.chart-price-dot{fill:#dfff58;stroke:#087d69;stroke-width:2;transition:r .2s}.chart-price-dot:hover{r:7}.chart-price-label{fill:#087d69;font:800 11px "Manrope",sans-serif}.chart-caption{display:flex;justify-content:space-between;gap:1rem;padding-top:.6rem;border-top:1px solid var(--border);color:var(--muted);font-size:.7rem}.partial-note{color:#8b6200}.dashboard-analysis-grid,.dashboard-rank-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.fuel-visual{display:grid;grid-template-columns:180px 1fr;gap:1.5rem;align-items:center}.fuel-donut{position:relative;width:170px;height:170px;border-radius:50%;background:#e7ebe8}.fuel-donut:after{content:"";position:absolute;inset:25px;border-radius:50%;background:#fff}.fuel-donut>div{position:absolute;z-index:1;inset:0;display:grid;place-content:center;text-align:center}.fuel-donut strong,.fuel-donut span{display:block}.fuel-donut strong{font:800 1.45rem "Manrope",sans-serif;letter-spacing:-.05em}.fuel-donut span{color:var(--muted);font-size:.65rem}.fuel-legend-list{display:grid;gap:.7rem}.fuel-legend-row{display:grid;grid-template-columns:minmax(0,1fr) auto 3rem;gap:.6rem;align-items:center;padding-bottom:.62rem;border-bottom:1px solid var(--border);font-size:.75rem}.fuel-legend-row:last-child{border-bottom:0}.fuel-legend-row>span{display:flex;align-items:center;gap:.35rem;font-weight:700}.fuel-legend-row strong{text-align:right}.fuel-legend-row small{color:var(--muted);text-align:right}.fuel-dot{width:.62rem;height:.62rem}.fuel-petrol,.fuel-fill-petrol{background:#54a9d9}.fuel-diesel,.fuel-fill-diesel{background:#314c47}.fuel-electric,.fuel-fill-electric{background:#badd2f}.fuel-unknown,.fuel-fill-unknown{background:#d8dfdb}.fuel-price-list{display:grid;gap:1rem}.fuel-price-row{display:grid;gap:.5rem}.fuel-price-head{display:flex;justify-content:space-between;align-items:center;font-size:.78rem}.fuel-price-head>span{display:flex;align-items:center;gap:.4rem;font-weight:700}.fuel-price-head strong{font:800 .9rem "Manrope",sans-serif}.fuel-price-track{height:.58rem;border-radius:999px;background:#e8ede9;overflow:hidden}.fuel-price-track span{display:block;height:100%;min-width:3px;border-radius:inherit}.fuel-price-row small{color:var(--muted);font-size:.66rem}.modern-rank-list{display:grid}.modern-rank-row{display:grid;grid-template-columns:2rem minmax(0,1fr) 2.8rem;gap:.65rem;align-items:center;padding:.67rem 0;border-bottom:1px solid var(--border)}.modern-rank-row:last-child{border-bottom:0}.rank-number{color:#9aa5a1;font:700 .62rem "Manrope",sans-serif}.rank-main{min-width:0}.rank-main>div:first-child{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.35rem}.rank-main strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.77rem}.rank-main span{color:var(--muted);font-size:.63rem}.rank-track{height:.3rem;border-radius:999px;background:#e8ede9;overflow:hidden}.rank-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--teal),#70d1b6)}.modern-rank-row>b{text-align:right;font:800 .78rem "Manrope",sans-serif}
@media(max-width:1100px){.dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.market-insights{grid-template-columns:repeat(2,minmax(0,1fr))}.market-insights article:nth-child(3){border-left:0;border-top:1px solid var(--border)}.market-insights article:nth-child(4){border-top:1px solid var(--border)}}
@media(max-width:820px){.stats-hero{align-items:flex-start;flex-direction:column;gap:1rem}.stats-period-chip{flex-direction:row;justify-content:space-between;width:100%}.dashboard-analysis-grid,.dashboard-rank-grid{grid-template-columns:1fr}.market-trend-chart{min-width:700px}.market-chart-wrap{overflow-x:auto;padding-bottom:.35rem}.fuel-visual{grid-template-columns:150px 1fr}.fuel-donut{width:145px;height:145px}.fuel-donut:after{inset:22px}}
@media(max-width:560px){.stats-dashboard{gap:.85rem}.stats-hero{padding-top:0}.stats-hero h1{font-size:2.15rem}.dashboard-kpis{grid-template-columns:1fr 1fr;gap:.65rem}.dashboard-kpi{min-height:150px;padding:.85rem}.dashboard-kpi>strong{font-size:1.28rem;white-space:normal}.kpi-icon{width:2rem;height:2rem}.market-insights{grid-template-columns:1fr}.market-insights article{border-left:0;border-top:1px solid var(--border)}.market-insights article:first-child{border-top:0}.dashboard-panel{padding:1rem;border-radius:18px}.dashboard-panel-header{align-items:flex-start;flex-direction:column;gap:.75rem}.chart-legend{width:100%;justify-content:flex-start}.fuel-visual{grid-template-columns:1fr;justify-items:center;width:100%}.fuel-legend-list{width:100%}.chart-caption{align-items:flex-start;flex-direction:column}.market-trend-chart{min-width:650px}}

/* ── Listing market position card ────────────────────────────────────── */
.alert-card{display:grid;grid-template-columns:156px minmax(280px,1fr) minmax(270px,310px);align-items:start}.alert-card:not(.has-market-card) .alert-body{grid-column:2/-1}.listing-market-card{align-self:stretch;min-width:0;margin-right:2.2rem;padding:.9rem;border:1px solid rgba(8,125,105,.14);border-radius:16px;background:linear-gradient(145deg,rgba(245,250,247,.96),rgba(234,246,240,.72));box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}.market-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem}.market-card-head span,.market-card-head strong{display:block}.market-card-head span{color:var(--teal);font-size:.58rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.market-card-head strong{margin-top:.18rem;font:800 .82rem "Manrope",sans-serif;letter-spacing:-.02em}.market-score-badge{display:grid;place-items:center;width:2.4rem;height:2.4rem;flex:0 0 auto;border:3px solid #38bdf8;border-radius:50%;color:#075985;background:#fff;font:800 .82rem "Manrope",sans-serif}.listing-market-excellent .market-score-badge{color:#08745f;border-color:#20b486}.listing-market-good .market-score-badge{color:#087d69;border-color:#70d1b6}.listing-market-fair .market-score-badge{color:#996300;border-color:#f5aa22}.listing-market-weak .market-score-badge{color:#b82f48;border-color:#e66b7e}.market-position-chart{margin-top:.8rem}.market-axis-labels{display:flex;justify-content:space-between;margin-bottom:.35rem;color:#83908c;font-size:.52rem}.market-axis{position:relative;height:.48rem;border-radius:999px;background:linear-gradient(90deg,#7bd8ba 0%,#d7efe6 42%,#e8ece9 50%,#f5d3b3 75%,#ef9d91 100%)}.market-axis:after{content:"";position:absolute;left:50%;top:-.18rem;width:1px;height:.84rem;background:rgba(16,32,29,.35)}.market-axis i{position:absolute;z-index:2;left:clamp(4%,var(--market-position),96%);top:50%;width:.85rem;height:.85rem;border:3px solid #fff;border-radius:50%;background:var(--text);box-shadow:0 2px 8px rgba(12,37,33,.22);transform:translate(-50%,-50%)}.market-axis b{display:none}.market-delta{margin-top:.4rem;color:var(--muted);font-size:.58rem;font-weight:700;text-align:center}.market-delta.is-good{color:#08745f}.market-delta.is-high{color:#bd4a31}.market-comparison-values{display:grid;grid-template-columns:1fr 1fr;gap:.55rem;margin-top:.75rem}.market-comparison-values>div{padding:.55rem .6rem;border:1px solid rgba(16,32,29,.08);border-radius:10px;background:rgba(255,255,255,.66)}.market-comparison-values span,.market-comparison-values strong{display:block}.market-comparison-values span{color:var(--muted);font-size:.55rem}.market-comparison-values strong{margin-top:.15rem;font:800 .76rem "Manrope",sans-serif;white-space:nowrap}.market-score-bars{display:grid;gap:.42rem;margin-top:.7rem}.market-score-row{display:grid;grid-template-columns:4.2rem minmax(0,1fr) 1.6rem;gap:.4rem;align-items:center;font-size:.58rem}.market-score-row>span{color:var(--muted)}.market-score-row>div{height:.28rem;border-radius:999px;background:#dde6e1;overflow:hidden}.market-score-row i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--teal),#70d1b6)}.market-score-row strong{text-align:right;font-size:.62rem}.market-card-foot{display:flex;justify-content:space-between;gap:.5rem;margin-top:.7rem;padding-top:.55rem;border-top:1px solid rgba(16,32,29,.09);color:var(--muted);font-size:.52rem}
.listing-market-simple .market-card-head span{font-size:.68rem}
.listing-market-simple .market-card-head strong{font-size:.95rem}
.listing-market-simple .market-comparison-values{margin-top:.85rem}
.listing-market-simple .market-comparison-values>div{padding:.65rem .7rem}
.listing-market-simple .market-comparison-values span{font-size:.68rem}
.listing-market-simple .market-comparison-values strong{font-size:.92rem}
.listing-market-simple .market-card-foot{font-size:.68rem}
@media(max-width:1250px){.alert-card{grid-template-columns:140px minmax(260px,1fr) minmax(240px,270px)}.alert-image{width:140px;min-width:140px;height:105px}.listing-market-card{margin-right:1.8rem}}
@media(max-width:1050px){.alert-card{grid-template-columns:140px minmax(0,1fr)}.alert-card .listing-market-card{grid-column:2;margin:.2rem 2.3rem 0 0}.alert-card:not(.has-market-card) .alert-body{grid-column:2}.listing-market-card{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(190px,1.2fr);gap:.4rem 1rem}.market-card-head{grid-row:1/3}.market-position-chart{margin-top:0}.market-comparison-values{margin-top:.35rem}.market-score-bars,.market-card-foot{grid-column:1/-1}}
@media(max-width:900px){.alert-card{grid-template-columns:1fr}.alert-card .alert-image,.alert-card .alert-body,.alert-card .listing-market-card,.alert-card:not(.has-market-card) .alert-body{grid-column:1}.alert-card .listing-market-card{margin:.2rem 0 0}.alert-image{width:100%;min-width:0;height:210px}.listing-market-card{display:block}.market-card-head{display:flex}.market-position-chart{margin-top:.8rem}.market-comparison-values{margin-top:.75rem}}
@media(max-width:520px){.listing-market-card{padding:.8rem}.market-comparison-values strong{font-size:.7rem}.market-card-foot{font-size:.5rem}.listing-market-simple .market-comparison-values strong{font-size:.85rem}.listing-market-simple .market-card-foot{font-size:.64rem}}

/* Expanded market analysis */
.alert-card{grid-template-columns:156px minmax(280px,1fr) minmax(300px,360px)}.listing-market-card{display:flex;flex-direction:column}.market-expand-btn{display:flex;justify-content:space-between;align-items:center;gap:.75rem;width:100%;margin-top:.7rem;padding:.55rem .7rem;border:1px solid rgba(8,125,105,.16);border-radius:10px;color:var(--teal);background:rgba(255,255,255,.72);font-size:.62rem;font-weight:800;cursor:pointer;transition:.18s}.market-expand-btn:hover{color:white;border-color:var(--teal);background:var(--teal);transform:translateY(-1px)}.market-expand-btn svg{width:.9rem;height:.9rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.market-comparison-dialog{width:min(96vw,1180px);max-width:none;max-height:calc(100vh - 2rem);overflow:hidden}.market-comparison-header{padding:1rem 1.2rem;border-bottom:1px solid var(--border);background:rgba(255,255,255,.78)}.market-comparison-header h2{margin:.2rem 0 0;font-size:1.15rem}.dialog-kicker{color:var(--teal);font-size:.58rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.market-comparison-content{max-height:calc(100vh - 6.5rem);padding:1.1rem;overflow:auto}.market-analysis-loading{display:flex;justify-content:center;align-items:center;gap:.7rem;min-height:280px;color:var(--muted);font-size:.8rem}.market-analysis-loading span{width:1.1rem;height:1.1rem;border:2px solid #dce7e2;border-top-color:var(--teal);border-radius:50%;animation:market-spin .75s linear infinite}@keyframes market-spin{to{transform:rotate(360deg)}}.market-analysis-overview{display:grid;grid-template-columns:minmax(260px,1.5fr) repeat(3,minmax(110px,.65fr)) 90px;gap:.75rem;padding:1rem;border:1px solid rgba(8,125,105,.14);border-radius:18px;background:linear-gradient(125deg,#edf9f4,#fff)}.market-analysis-car{display:grid;grid-template-columns:72px minmax(0,1fr);gap:.75rem;align-items:center}.analysis-car-image{display:grid;place-items:center;width:72px;height:58px;border-radius:10px;background:#e3ebe7;overflow:hidden}.analysis-car-image img{width:100%;height:100%;object-fit:cover}.market-analysis-car span,.market-analysis-car strong,.market-analysis-car small{display:block}.market-analysis-car span,.analysis-metric span,.analysis-score span{color:var(--muted);font-size:.58rem}.market-analysis-car strong{margin:.2rem 0;font:800 .76rem "Manrope",sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.market-analysis-car small{color:var(--muted);font-size:.58rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.analysis-metric{display:flex;justify-content:center;flex-direction:column;padding-left:.75rem;border-left:1px solid var(--border)}.analysis-metric strong{margin-top:.25rem;font:800 .95rem "Manrope",sans-serif;white-space:nowrap}.analysis-metric strong.is-good,.comparable-diff.is-good{color:#08745f}.analysis-metric strong.is-high,.comparable-diff.is-high{color:#bd4a31}.analysis-score{display:grid;place-items:center;text-align:center}.analysis-score strong{display:grid;place-items:center;width:3.1rem;height:3.1rem;margin-top:.25rem;border:4px solid var(--teal);border-radius:50%;background:white;font:800 1rem "Manrope",sans-serif}.market-analysis-note{display:flex;justify-content:space-between;gap:1rem;margin:.85rem 0;padding:0 .2rem;color:var(--muted);font-size:.65rem}.market-analysis-note p{margin:0}.market-analysis-note span{text-align:right}.comparable-section{margin-top:.8rem}.comparable-section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:.65rem}.comparable-section-head h3{margin:0;font-size:.92rem}.comparable-section-head span{padding:.28rem .55rem;border-radius:999px;color:var(--teal);background:var(--teal-light);font-size:.62rem;font-weight:800}.comparable-list{display:grid;gap:.45rem}.comparable-car-row{display:grid;grid-template-columns:64px minmax(180px,1fr) 110px 110px 58px 32px;gap:.7rem;align-items:center;padding:.55rem .65rem;border:1px solid var(--border);border-radius:13px;background:rgba(255,255,255,.8);transition:.16s}.comparable-car-row:hover{border-color:rgba(8,125,105,.28);box-shadow:0 8px 22px rgba(12,37,33,.06);transform:translateY(-1px)}.comparable-thumb{display:grid;place-items:center;width:64px;height:48px;border-radius:8px;background:#e6ece8;overflow:hidden}.comparable-thumb img{width:100%;height:100%;object-fit:cover}.comparable-main{min-width:0}.comparable-main strong,.comparable-main span{display:block}.comparable-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 .7rem "Manrope",sans-serif}.comparable-main span{margin-top:.2rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.58rem}.comparable-price span,.comparable-price strong{display:block;text-align:right}.comparable-price span{color:var(--muted);font-size:.52rem}.comparable-price strong{margin-top:.15rem;font:800 .68rem "Manrope",sans-serif;white-space:nowrap}.comparable-price.adjusted strong{color:var(--teal)}.comparable-diff{text-align:right;color:var(--muted);font-size:.65rem;font-weight:800}.comparable-link{display:grid;place-items:center;width:1.8rem;height:1.8rem;border:1px solid var(--border);border-radius:50%;color:var(--text);background:white;font-size:.75rem}.comparable-link:hover{color:white;border-color:var(--text);background:var(--text)}
@media(max-width:1250px){.alert-card{grid-template-columns:140px minmax(260px,1fr) minmax(270px,310px)}}
@media(max-width:1050px){.alert-card{grid-template-columns:140px minmax(0,1fr)}.listing-market-card{display:grid}.market-expand-btn{grid-column:1/-1}.market-analysis-overview{grid-template-columns:minmax(240px,1.5fr) repeat(2,minmax(110px,.7fr)) 80px}.market-analysis-overview .analysis-metric:nth-of-type(3){display:none}.comparable-car-row{grid-template-columns:58px minmax(160px,1fr) 100px 100px 48px 30px}}
@media(max-width:760px){.market-comparison-dialog{width:calc(100vw - 1rem);max-height:calc(100vh - 1rem)}.market-comparison-content{padding:.75rem}.market-analysis-overview{grid-template-columns:1fr 1fr}.market-analysis-car{grid-column:1/-1}.analysis-metric{padding:.55rem 0;border-left:0;border-top:1px solid var(--border)}.analysis-score{grid-column:2;grid-row:2/4}.market-analysis-note{align-items:flex-start;flex-direction:column}.market-analysis-note span{text-align:left}.comparable-car-row{grid-template-columns:58px minmax(0,1fr) 34px;padding:.55rem}.comparable-main{grid-column:2}.comparable-price{grid-row:2}.comparable-price.original{grid-column:1/3}.comparable-price.adjusted{grid-column:2/3}.comparable-price span,.comparable-price strong{text-align:left}.comparable-diff{grid-column:3;grid-row:2}.comparable-link{grid-column:3;grid-row:1}.comparable-section-head{align-items:flex-start;gap:.5rem}}

/* Market position unavailable: computed but not enough comparables */
.listing-market-unavailable{background:linear-gradient(145deg,rgba(250,248,247,.96),rgba(242,240,238,.72));border-color:rgba(120,113,108,.14)}.listing-market-unavailable .market-card-head strong{color:var(--muted)}.listing-market-unavailable p{margin:.75rem 0 0;color:var(--muted);font-size:.58rem;line-height:1.45}.market-unavailable-icon{display:grid;place-items:center;width:2.4rem;height:2.4rem;flex:0 0 auto;border:2px dashed rgba(120,113,108,.28);border-radius:50%;color:var(--muted);font:700 1rem "Manrope",sans-serif}

/* Progressive market-score loading: listing first, analysis second */
.listing-market-loading{position:relative;overflow:hidden;background:linear-gradient(145deg,rgba(247,250,248,.98),rgba(236,244,240,.86))}.listing-market-loading:after{content:"";position:absolute;inset:0;z-index:0;background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.75) 48%,transparent 66%);transform:translateX(-100%);animation:market-loading-shimmer 1.65s ease-in-out infinite}.listing-market-loading>*{position:relative;z-index:1}.market-loading-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.market-loading-head span,.market-loading-head strong{display:block}.market-loading-head span{color:var(--teal);font-size:.58rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.market-loading-head strong{margin-top:.2rem;font:800 .8rem "Manrope",sans-serif}.market-loading-spinner{width:2rem;height:2rem;flex:0 0 auto;border:3px solid #dce9e3;border-top-color:var(--teal);border-radius:50%;animation:market-spin .8s linear infinite}.market-loading-chart{display:grid;grid-template-columns:1fr 1.3fr .75fr;gap:.3rem;align-items:end;height:3.1rem;margin-top:1rem;padding:.5rem .65rem;border-radius:11px;background:rgba(255,255,255,.58)}.market-loading-chart span{display:block;border-radius:5px 5px 2px 2px;background:#d9e8e1}.market-loading-chart span:nth-child(1){height:42%}.market-loading-chart span:nth-child(2){height:82%;background:#c4e6d8}.market-loading-chart span:nth-child(3){height:58%}.market-loading-values{display:grid;grid-template-columns:1fr 1fr;gap:.55rem;margin-top:.65rem}.market-loading-values span{height:2.7rem;border:1px solid rgba(16,32,29,.06);border-radius:10px;background:rgba(255,255,255,.66)}.market-loading-bars{display:grid;gap:.42rem;margin-top:.65rem}.market-loading-bars span{height:.36rem;border-radius:999px;background:#dce7e2}.market-loading-bars span:first-child{width:92%}.market-loading-bars span:last-child{width:68%}.listing-market-loading p{margin:.7rem 0 0;color:var(--muted);font-size:.54rem;line-height:1.45}.market-score-ready{animation:market-score-reveal .55s ease-out}.market-score-ready .listing-market-card{animation:market-panel-reveal .65s ease-out}@keyframes market-loading-shimmer{to{transform:translateX(100%)}}@keyframes market-score-reveal{from{border-color:rgba(8,125,105,.55)}to{border-color:var(--border)}}@keyframes market-panel-reveal{from{opacity:0;transform:translateY(7px) scale(.985)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.listing-market-loading:after,.market-loading-spinner,.market-score-ready,.market-score-ready .listing-market-card{animation:none!important}}

/* Market analysis modal: larger reading scale and isolated scrolling */
body.market-modal-open{position:fixed;left:0;right:0;width:100%;overflow:hidden}.market-comparison-dialog{width:min(97vw,1420px);max-height:calc(100dvh - 2rem);overscroll-behavior:contain}.market-comparison-content{max-height:calc(100dvh - 7.25rem);padding:1.5rem;overscroll-behavior:contain;scrollbar-gutter:stable}.market-comparison-header{padding:1.2rem 1.5rem}.market-comparison-header h2{font-size:1.5rem}.market-comparison-header .dialog-kicker{font-size:.72rem}.market-comparison-header .dialog-close{width:2.6rem;height:2.6rem}.market-analysis-overview{grid-template-columns:minmax(330px,1.55fr) repeat(3,minmax(145px,.7fr)) 115px;gap:1rem;padding:1.3rem;border-radius:20px}.market-analysis-car{grid-template-columns:96px minmax(0,1fr);gap:1rem}.analysis-car-image{width:96px;height:74px;border-radius:12px}.market-analysis-car span,.analysis-metric span,.analysis-score span{font-size:.72rem}.market-analysis-car strong{margin:.3rem 0;font-size:1rem}.market-analysis-car small{font-size:.72rem}.analysis-metric{padding-left:1rem}.analysis-metric strong{margin-top:.35rem;font-size:1.2rem}.analysis-score strong{width:4.2rem;height:4.2rem;border-width:5px;font-size:1.35rem}.market-analysis-note{margin:1rem 0;padding:0 .3rem;font-size:.82rem;line-height:1.5}.comparable-section{margin-top:1rem}.comparable-section-head{margin-bottom:.85rem}.comparable-section-head h3{font-size:1.15rem}.comparable-section-head span{padding:.38rem .7rem;font-size:.76rem}.comparable-list{gap:.65rem}.comparable-car-row{grid-template-columns:88px minmax(240px,1fr) 145px 145px 70px 40px;gap:1rem;min-height:82px;padding:.75rem .85rem;border-radius:15px}.comparable-thumb{width:88px;height:66px;border-radius:10px}.comparable-main strong{font-size:.9rem}.comparable-main span{margin-top:.3rem;font-size:.72rem}.comparable-price span{font-size:.66rem}.comparable-price strong{margin-top:.22rem;font-size:.88rem}.comparable-diff{font-size:.82rem}.comparable-link{width:2.25rem;height:2.25rem;font-size:1rem}.market-analysis-loading{min-height:360px;font-size:1rem}.market-analysis-loading span{width:1.5rem;height:1.5rem}
@media(max-width:1150px){.market-analysis-overview{grid-template-columns:minmax(280px,1.4fr) repeat(2,minmax(130px,.7fr)) 100px}.market-analysis-overview .analysis-metric:nth-of-type(3){display:none}.comparable-car-row{grid-template-columns:76px minmax(190px,1fr) 125px 125px 60px 36px}.comparable-thumb{width:76px;height:58px}}
@media(max-width:760px){.market-comparison-dialog{width:calc(100vw - .75rem);max-height:calc(100dvh - .75rem)}.market-comparison-header{padding:1rem}.market-comparison-header h2{font-size:1.2rem}.market-comparison-content{max-height:calc(100dvh - 5.75rem);padding:.85rem}.market-analysis-overview{grid-template-columns:1fr 1fr;padding:1rem}.market-analysis-car{grid-template-columns:78px minmax(0,1fr)}.analysis-car-image{width:78px;height:60px}.market-analysis-car strong{font-size:.88rem}.analysis-metric strong{font-size:1rem}.analysis-score strong{width:3.7rem;height:3.7rem;font-size:1.15rem}.market-analysis-note{font-size:.75rem}.comparable-car-row{grid-template-columns:72px minmax(0,1fr) 38px;min-height:unset;padding:.7rem}.comparable-thumb{width:72px;height:56px}.comparable-main strong{font-size:.82rem}.comparable-main span{font-size:.68rem}.comparable-price strong{font-size:.82rem}.comparable-section-head h3{font-size:1rem}}

/* Final smartphone listing layout: keep this after market-analysis overrides. */
@media(max-width:900px){
  .alert-card,
  .alert-card.has-market-card{
    grid-template-columns:minmax(0,1fr);
    gap:.85rem;
    width:100%;
    min-width:0;
    overflow:hidden;
  }
  .alert-card .alert-image,
  .alert-card .alert-body,
  .alert-card .listing-market-card,
  .alert-card:not(.has-market-card) .alert-body{
    grid-column:1;
    width:100%;
    min-width:0;
  }
  .alert-card .alert-image{
    height:auto;
    aspect-ratio:16/10;
    border-radius:14px;
  }
  .alert-card .listing-market-card{
    display:flex;
    flex-direction:column;
    margin:.1rem 0 0;
  }
}
@media(max-width:520px){
  .alerts-list{gap:.75rem}
  .alert-card,
  .alert-card.has-market-card{
    gap:.75rem;
    padding:.65rem;
    border-radius:18px;
  }
  .alert-card .alert-image{
    aspect-ratio:16/10;
    max-height:none;
  }
  .alert-card .alert-body{padding:0 .15rem}
  .favorite-btn{top:.95rem;right:.95rem}
  .alert-top{align-items:flex-start;justify-content:space-between}
  .price{font-size:1.35rem}
  .alert-title{margin:.45rem 0 .25rem;font-size:1rem;line-height:1.35}
  .alert-meta{margin-bottom:.75rem;font-size:.78rem;line-height:1.5}
  .alert-actions{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:.5rem;
    width:100%;
    margin-bottom:.55rem;
  }
  .alert-actions .btn{
    width:100%;
    min-width:0;
    min-height:2.75rem;
    padding:.55rem .5rem;
    border-radius:12px;
    font-size:.76rem;
    line-height:1.2;
    white-space:normal;
  }
  .alert-time{display:block;font-size:.7rem}
  .alert-card .listing-market-card{
    width:100%;
    margin:.1rem 0 0;
    padding:.85rem;
    border-radius:14px;
  }
  .market-card-head{align-items:center}
  .market-card-head strong{font-size:.8rem}
  .listing-market-simple .market-card-head strong{font-size:.92rem}
  .listing-market-simple .market-comparison-values strong{font-size:.86rem}
  .market-score-badge{width:2.55rem;height:2.55rem}
  .market-position-chart{margin-top:.85rem}
  .market-axis-labels{font-size:.5rem}
  .market-comparison-values{grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}
  .market-comparison-values>div{min-width:0;padding:.55rem}
  .market-comparison-values strong{overflow:hidden;font-size:.72rem;text-overflow:ellipsis}
  .market-score-row{grid-template-columns:3.8rem minmax(0,1fr) 1.5rem}
  .market-card-foot{flex-wrap:wrap;line-height:1.4}
  .market-expand-btn{min-height:2.65rem;font-size:.67rem}
}

/* Refined smartphone navigation */
@media(max-width:768px){
  .mobile-user{gap:.3rem}
  .mobile-header-action,
  .mobile-header .logout-btn{
    display:grid;
    place-items:center;
    width:2.15rem;
    height:2.15rem;
    border:1px solid rgba(16,32,29,.08);
    border-radius:50%;
    color:var(--muted);
    background:rgba(255,255,255,.68);
    transition:color .16s ease,background .16s ease,transform .16s ease;
  }
  .mobile-header-action .icon,
  .mobile-header .logout-btn .icon{width:1.05rem;height:1.05rem}
  .mobile-header-action:active,
  .mobile-header .logout-btn:active{transform:scale(.94)}
  .mobile-settings-btn.active{color:var(--text);border-color:rgba(8,125,105,.2);background:var(--lime)}
  .mobile-plan-btn.active{color:var(--text);border-color:var(--lime,#dfff58);background:rgba(223,255,88,.22)}
  .nav-settings{display:none}
  .demo-mode .nav-settings{display:flex}
  .sidebar{
    border-radius:22px 22px 0 0;
    box-shadow:0 -12px 34px rgba(7,24,21,.16);
    overflow:visible;
  }
  .nav{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:.25rem;
    padding:.3rem .45rem calc(.35rem + env(safe-area-inset-bottom,0px));
  }
  .demo-mode .nav{
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:.15rem;
    padding:.3rem .35rem calc(.35rem + env(safe-area-inset-bottom,0px));
  }
  .nav-item{
    min-height:3.15rem;
    gap:.12rem;
    padding:.25rem .2rem;
    border-radius:15px;
    color:#91aaa4;
    font-size:.64rem;
  }
  .nav-item.active{color:#fff;background:rgba(223,255,88,.12)}
  .nav-item.active::before{display:none}
  .nav-icon-wrap{width:1.45rem;height:1.45rem}
  .nav-icon-wrap .icon{width:1.08rem;height:1.08rem}
  .nav-item.active .nav-icon-wrap{color:var(--lime)}
  .nav-label{overflow:visible;text-overflow:clip;font-weight:650}
  .count-pill,
  .nav-item .badge{top:.18rem;right:calc(50% - 1.25rem);border-color:rgba(255,255,255,.1);background:#29443e;color:#c2d0cc}
  .nav-item.active .count-pill{color:#17352f;background:var(--lime);border-color:var(--lime)}
  .demo-mode .nav-item{
    min-height:2.95rem;
    padding:.2rem .1rem;
    font-size:.58rem;
  }
  .demo-mode .nav-label{
    font-size:.58rem;
    line-height:1.1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .demo-mode .nav-icon-wrap{width:1.35rem;height:1.35rem}
  .demo-mode .count-pill{
    top:.12rem;
    right:calc(50% - 1rem);
    font-size:.5rem;
    padding:.02rem .28rem;
    min-width:.8rem;
  }
  .layout{padding-bottom:calc(4.15rem + env(safe-area-inset-bottom,0px))}
}

@media (max-width: 768px) {
  html:not(.is-android) .mobile-install-btn {
    display: none !important;
  }
}
.pwa-install-section{display:none;justify-content:space-between;align-items:center;gap:1.25rem;background:linear-gradient(125deg,#0c2521,#143e36);color:white;overflow:hidden}.pwa-install-section:after{content:"";position:absolute;width:10rem;height:10rem;right:-4rem;bottom:-6rem;border-radius:50%;background:rgba(223,255,88,.12)}.pwa-install-section{position:relative}.pwa-install-copy{position:relative;z-index:1;display:flex;align-items:center;gap:1rem}.pwa-install-copy h2{color:white}.pwa-install-copy .form-hint{max-width:490px;margin:0;color:#a9bbb6;line-height:1.55}.pwa-install-icon{display:grid;place-items:center;width:3.4rem;height:3.4rem;flex:0 0 auto;border-radius:18px;color:var(--text);background:var(--lime)}.pwa-install-icon .icon{width:1.65rem;height:1.65rem}.pwa-install-section>[data-pwa-install]{position:relative;z-index:1;flex:0 0 auto;color:var(--text);border-color:var(--lime);background:var(--lime)}.pwa-installed-label{position:relative;z-index:1;padding:.5rem .8rem;border:1px solid rgba(165,244,215,.22);border-radius:999px;color:var(--mint);font-size:.75rem;font-weight:800;white-space:nowrap}@media(max-width:620px){.pwa-install-section{align-items:stretch;flex-direction:column}.pwa-install-section>[data-pwa-install]{width:100%}.pwa-installed-label{text-align:center}}

/* Always-accessible PWA install affordance */
.mobile-install-btn{display:none}.pwa-install-status{position:relative;z-index:1;flex-basis:100%;margin:.15rem 0 0;padding:.7rem .8rem;border:1px solid rgba(223,255,88,.2);border-radius:11px;color:#d7e2de;background:rgba(255,255,255,.06);font-size:.72rem;line-height:1.5}.pwa-install-guidance{position:fixed;z-index:2000;left:50%;bottom:calc(1rem + env(safe-area-inset-bottom,0px));display:flex;align-items:flex-start;gap:1rem;width:min(calc(100% - 2rem),480px);padding:1rem 1rem 1rem 1.1rem;border:1px solid rgba(223,255,88,.25);border-radius:16px;color:white;background:#0c2521;box-shadow:0 20px 60px rgba(12,37,33,.3);transform:translate(-50%,1rem);opacity:0;transition:.2s}.pwa-install-guidance.is-visible{transform:translate(-50%,0);opacity:1}.pwa-install-guidance span{font-size:.78rem;line-height:1.5}.pwa-install-guidance button{display:grid;place-items:center;width:1.8rem;height:1.8rem;flex:0 0 auto;border:0;border-radius:50%;color:var(--text);background:var(--lime);font-size:1.1rem;cursor:pointer}@media(max-width:768px){.mobile-install-btn{position:fixed;right:1rem;bottom:calc(4.8rem + env(safe-area-inset-bottom,0px));z-index:120;display:inline-flex;align-items:center;gap:.65rem;min-height:3.35rem;padding:.42rem 1rem .42rem .45rem;border:1px solid rgba(223,255,88,.38);border-radius:999px;color:#fff;background:linear-gradient(135deg,#0c2521 0%,#126658 100%);box-shadow:0 14px 32px rgba(12,37,33,.28),0 4px 10px rgba(12,37,33,.18),inset 0 1px rgba(255,255,255,.14);font-family:inherit;font-size:.78rem;font-weight:800;letter-spacing:.01em;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}.mobile-install-btn:hover{filter:brightness(1.06);box-shadow:0 16px 36px rgba(12,37,33,.32),0 5px 12px rgba(12,37,33,.2),inset 0 1px rgba(255,255,255,.16)}.mobile-install-btn:active{transform:translateY(2px) scale(.98);box-shadow:0 8px 20px rgba(12,37,33,.25)}.mobile-install-btn:focus-visible{outline:3px solid rgba(13,148,136,.28);outline-offset:3px}.mobile-install-btn[hidden]{display:none}.mobile-install-icon{display:grid;place-items:center;width:2.45rem;height:2.45rem;flex:0 0 auto;border-radius:50%;color:#12372f;background:var(--lime);box-shadow:inset 0 1px rgba(255,255,255,.7),0 4px 12px rgba(223,255,88,.18)}.mobile-install-icon svg{width:1.2rem;height:1.2rem}.mobile-install-label{white-space:nowrap}.pwa-install-section>[data-pwa-install]{display:flex}.pwa-install-guidance{bottom:calc(4.8rem + env(safe-area-inset-bottom,0px))}}@media(max-width:380px){.mobile-install-btn{right:.7rem;padding-right:.8rem}.mobile-install-label{font-size:.72rem}}

/* Billing */
.billing-page-header,
.billing-layout {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}
.billing-page-header { align-items: flex-end; }
.billing-layout { display: grid; gap: 1.25rem; width: 100%; }
.billing-page-header ~ .demo-settings-note { max-width: 1080px; margin-left: auto; margin-right: auto; }

/* Settings */
.settings-page-header,
.settings-page-header + .settings-panel {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.billing-overview-card { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.65rem; border: 1px solid var(--border); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.billing-overview-card--pro { border-color: rgba(13, 148, 136, .3); background: linear-gradient(135deg, rgba(13, 148, 136, .08), var(--card) 58%); }
.billing-eyebrow, .billing-plan-type { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.billing-plan-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.billing-plan-heading h2, .billing-section h2 { margin: 0; }
.billing-overview-main p, .billing-section-head p { margin: .55rem 0 0; color: var(--muted); font-size: .88rem; }
.billing-access-until { font-size: .95rem; color: var(--text); }
.billing-access-until strong { font-size: 1.05rem; color: var(--text); }
.billing-status-pill { display: inline-flex; align-items: center; padding: .3rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.billing-status-pill--success { color: #087466; background: rgba(13, 148, 136, .12); }
.billing-status-pill--warning { color: #b54708; background: #fef0c7; }
.billing-status-pill--danger { color: #b42318; background: #fee4e2; }
.billing-usage { min-width: 170px; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(13, 148, 136, .08); }
.billing-usage span, .billing-usage small { display: block; color: var(--muted); font-size: .72rem; }
.billing-usage strong { display: block; margin: .18rem 0; color: var(--teal-dark); font: 800 1.45rem Manrope, sans-serif; }
.billing-section { padding: 1.5rem; border: 1px solid var(--border); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.billing-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.billing-plan-notice { margin: 1rem 0 0; padding: .85rem 1rem; border: 1px solid #cfe8dc; border-radius: 12px; background: #f3faf7; color: var(--text); font-size: .88rem; line-height: 1.55; }
.billing-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.billing-plan-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 1.25rem; min-height: 225px; padding: 1.25rem; border: 1px solid var(--border); border-radius: 15px; background: var(--bg); }
.billing-plan-card.is-current { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.billing-plan-card--featured { color: #fff; border-color: #0c5147; background: linear-gradient(145deg, #0c2521, #126658); }
.billing-plan-card h3 { margin: 0 0 .45rem; font: 800 1.3rem Manrope, sans-serif; }
.billing-plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem; margin: 0 0 .75rem; }
.billing-plan-price strong { font: 800 1.55rem Manrope, sans-serif; letter-spacing: -.04em; color: var(--teal-dark); }
.billing-plan-price small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.billing-plan-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.billing-plan-card--featured .billing-plan-type { color: rgba(255, 255, 255, .85); }
.billing-plan-card--featured .billing-plan-price strong { color: #fff; }
.billing-plan-card--featured .billing-plan-price small { color: rgba(255, 255, 255, .65); }
.billing-plan-card--featured p,
.billing-plan-card--featured .form-hint { color: #fff; }
.billing-plan-card .btn { width: 100%; }
.billing-plan-badge { position: absolute; top: 1rem; right: 1rem; padding: .25rem .5rem; border-radius: 999px; color: #12372f; background: var(--lime); font-size: .65rem; font-weight: 800; }
.billing-invoices { margin-top: 1rem; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.billing-invoice-row { display: grid; grid-template-columns: minmax(150px, 1.4fr) minmax(90px, .7fr) minmax(90px, .7fr) minmax(150px, auto); align-items: center; gap: 1rem; min-height: 74px; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.billing-invoice-row:last-child { border-bottom: 0; }
.billing-invoice-identity { display: flex; flex-direction: column; gap: .2rem; }
.billing-invoice-identity span { color: var(--muted); font-size: .75rem; }
.billing-invoice-amount { font-size: .88rem; }
.billing-invoice-status { width: max-content; padding: .28rem .55rem; border-radius: 999px; color: var(--muted); background: var(--bg); font-size: .7rem; font-weight: 800; }
.billing-invoice-status--paid { color: #087466; background: rgba(13, 148, 136, .12); }
.billing-invoice-status--open { color: #b54708; background: #fef0c7; }
.billing-invoice-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; }
.billing-invoice-download { color: var(--teal-dark); font-size: .78rem; font-weight: 700; }
.billing-invoice-message { margin: 0; padding: 1.4rem; color: var(--muted); text-align: center; }
.billing-invoice-message.is-error, .billing-global-status.is-error { color: #b42318; }
.billing-load-more { margin-top: 1rem; }
.billing-global-status:empty { display: none; }
.btn.is-loading { opacity: .65; cursor: wait; }

@media (max-width: 850px) {
  .billing-plan-grid { grid-template-columns: 1fr; }
  .billing-plan-card { min-height: 0; }
  .billing-invoice-row { grid-template-columns: 1fr auto; }
  .billing-invoice-status { grid-column: 1; }
  .billing-invoice-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; }
}

@media (max-width: 600px) {
  .billing-page-header, .billing-overview-card, .billing-section-head { align-items: stretch; flex-direction: column; }
  .billing-overview-card, .billing-section { padding: 1.15rem; }
  .billing-usage { min-width: 0; }
  .billing-invoice-row { gap: .65rem; padding: .85rem; }
}

html.is-android .pwa-install-section:not([hidden]) { display: flex; }
html:not(.is-android) .pwa-install-section,
html:not(.is-android) [data-pwa-install] { display: none !important; }

/* Registration plan recap */
.register-card { max-width: 520px; }
.register-card .login-brand { margin-bottom: 1.25rem; }
.register-card .login-subtitle { margin-bottom: 1.15rem; }
.register-plan-summary { position: relative; margin: 0 0 1.35rem; padding: 1.15rem; overflow: hidden; border: 1px solid rgba(8, 125, 105, .2); border-radius: 17px; background: linear-gradient(135deg, rgba(225, 246, 237, .9), rgba(255, 255, 255, .9)); }
.register-plan-summary::after { content: ""; position: absolute; right: -2.5rem; bottom: -4rem; width: 9rem; height: 9rem; border-radius: 50%; background: rgba(165, 244, 215, .3); pointer-events: none; }
.register-plan-summary--pro { color: #fff; border-color: #174d43; background: linear-gradient(140deg, #0c2521, #126658); }
.register-plan-summary--pro::after { background: rgba(223, 255, 88, .1); }
.register-plan-topline, .register-plan-heading { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 1rem; }
.register-plan-topline { align-items: center; margin-bottom: .8rem; }
.register-plan-kicker { color: var(--teal-dark); font-size: .67rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.register-plan-summary--pro .register-plan-kicker { color: var(--lime); }
.register-plan-badge { padding: .25rem .5rem; border-radius: 999px; color: #12372f; background: var(--lime); font-size: .65rem; font-weight: 800; }
.register-plan-heading { align-items: flex-start; }
.register-plan-heading h2 { margin: 0 0 .2rem; font: 800 1.25rem "Manrope", sans-serif; letter-spacing: -.035em; }
.register-plan-heading > div:first-child > span { display: block; max-width: 275px; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.register-plan-summary--pro .register-plan-heading > div:first-child > span { color: rgba(255, 255, 255, .67); }
.register-plan-price { flex: 0 0 auto; text-align: right; }
.register-plan-price strong, .register-plan-price small { display: block; }
.register-plan-price strong { font: 800 1.35rem "Manrope", sans-serif; letter-spacing: -.04em; }
.register-plan-price small { color: var(--muted); font-size: .65rem; white-space: nowrap; }
.register-plan-summary--pro .register-plan-price small { color: rgba(255, 255, 255, .65); }
.register-plan-features { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin: 1rem 0 .8rem; padding: 0; list-style: none; }
.register-plan-features li { position: relative; padding: .55rem .55rem .55rem 1.35rem; border-radius: 10px; color: #40504c; background: rgba(255, 255, 255, .62); font-size: .68rem; font-weight: 700; line-height: 1.35; }
.register-plan-features li::before { content: "✓"; position: absolute; left: .5rem; color: var(--teal); font-weight: 900; }
.register-plan-summary--pro .register-plan-features li { color: rgba(255, 255, 255, .88); background: rgba(255, 255, 255, .08); }
.register-plan-summary--pro .register-plan-features li::before { color: var(--lime); }
.register-change-plan { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .35rem; color: var(--teal-dark); font-size: .72rem; font-weight: 800; }
.register-change-plan:hover span { transform: translateX(3px); }
.register-change-plan span { transition: transform .18s ease; }
.register-plan-summary--pro .register-change-plan { color: var(--lime); }

@media (max-width: 520px) {
  .register-plan-heading { align-items: flex-end; }
  .register-plan-heading > div:first-child > span { display: none; }
  .register-plan-features { grid-template-columns: 1fr; }
  .register-plan-features li { padding-block: .45rem; }
}

/* Authentication card navigation */
.auth-card-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.auth-card-top .login-brand { margin: 0; min-width: 0; }
.login-back-home { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.35rem; margin: 0; padding: .45rem .75rem .45rem .55rem; border: 1px solid rgba(8, 125, 105, .14); border-radius: 999px; color: #40504c; background: rgba(255, 255, 255, .62); font-size: .75rem; font-weight: 800; line-height: 1; transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease; }
.login-back-home svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.login-back-home:hover { color: var(--teal-dark); border-color: rgba(8, 125, 105, .32); background: rgba(225, 246, 237, .8); transform: translateY(-1px); }
.login-back-home:hover svg { transform: translateX(-2px); }
.login-back-home:focus-visible { outline: 3px solid rgba(13, 148, 136, .18); outline-offset: 2px; }

@media (max-width: 420px) {
  .auth-card-top { margin-bottom: 1.5rem; }
  .login-back-home span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .login-back-home { width: 2.35rem; padding: 0; justify-content: center; }
}

/* Market comparison modal — comparable rows */
.market-comparison-dialog {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.market-comparison-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 2rem;
  scroll-padding-bottom: 1.5rem;
}

.comparable-list {
  padding-bottom: 1.25rem;
}

a.comparable-car-row,
.comparable-car-row.is-static {
  display: grid;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  grid-template-columns: 64px minmax(0, 1fr) 110px 110px 58px;
  gap: 0.7rem;
  align-items: center;
}

a.comparable-car-row:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.comparable-car-row.is-static {
  cursor: default;
}

.comparable-thumb {
  width: 64px;
  height: 48px;
  flex-shrink: 0;
  grid-column: 1;
  grid-row: 1;
}

.comparable-main {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
}

.comparable-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparable-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.72rem;
}

.comparable-date {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.comparable-price.original {
  grid-column: 3;
}

.comparable-price.adjusted {
  grid-column: 4;
}

.comparable-diff {
  grid-column: 5;
}

.comparable-link {
  display: none;
}

@media (max-width: 1150px) {
  .comparable-car-row {
    grid-template-columns: 76px minmax(0, 1fr) 125px 125px 60px;
  }

  .comparable-thumb {
    width: 76px;
    height: 58px;
  }
}

@media (max-width: 1050px) {
  .comparable-car-row {
    grid-template-columns: 58px minmax(0, 1fr) 100px 100px 48px;
  }

  .comparable-thumb {
    width: 58px;
    height: 44px;
  }
}

@media (max-width: 760px) {
  .comparable-car-row {
    grid-template-columns: 72px minmax(0, 1fr) minmax(72px, auto);
    align-items: start;
  }

  .comparable-thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 72px;
    height: 56px;
  }

  .comparable-main {
    grid-column: 2;
    grid-row: 1;
  }

  .comparable-diff {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
  }

  .comparable-price.original {
    grid-column: 2;
    grid-row: 2;
  }

  .comparable-price.adjusted {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
  }
}
