:root {
  --bg: #0a1929;
  --bg-elevated: #102a43;
  --bg-nav: #0e2740;
  --border: #1e3a5f;
  --text: #e3f2fd;
  --text-muted: #90caf9;
  --heading: #bbdefb;
  --accent: #2196f3;
  --accent-hover: #64b5f6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / nav */
.site-header {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.brand {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--heading);
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding-block: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Main */
main {
  flex: 1;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.hero {
  margin-bottom: 2.5rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  color: var(--heading);
  font-size: 2.2rem;
  font-weight: 700;
}

.hero-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Empty state */
.empty-state {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 0.75rem;
  color: var(--heading);
  font-size: 1.4rem;
}

.empty-state p {
  margin: 0;
  color: var(--text-muted);
}

.empty-state a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.empty-state a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Watch grid (followed watches on home) */
.watch-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.watch-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.watch-card a {
  display: block;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
}

.watch-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.watch-card-brand {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.watch-card-name {
  display: block;
  color: var(--heading);
  font-size: 1.15rem;
  font-weight: 600;
}

/* Model detail page */
.back-link {
  margin-bottom: 1.5rem;
}

.model-detail {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 2.5rem;
  margin-top: 1rem;
}

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

.model-image img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.model-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.placeholder-mark {
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
}

.placeholder-text {
  text-align: center;
  font-size: 0.95rem;
}

.model-brand-label {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.model-name {
  margin: 0 0 1.75rem;
  color: var(--heading);
  font-size: 2.2rem;
}

.model-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
  margin: 0 0 1.75rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.spec dt {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.25rem;
}

.spec dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

.model-description {
  color: var(--text);
  line-height: 1.65;
  margin: 0 0 1.75rem;
}

.follow-form {
  margin: 0;
}

.btn-following {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-following:hover {
  background: rgba(244, 67, 54, 0.12);
  color: #ff8a80;
  border-color: rgba(244, 67, 54, 0.5);
}

/* User menu (header) */
.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-name {
  color: var(--text);
  font-weight: 600;
}

.logout-form {
  margin: 0;
}

.logout-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.logout-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Auth (login) */
.auth-card {
  max-width: 380px;
  margin: 4rem auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
}

.auth-card h1 {
  margin: 0 0 0.5rem;
  color: var(--heading);
  font-size: 1.8rem;
}

.auth-sub {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-form .form-field {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-form label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-form {
  max-width: 480px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"],
.auth-form input[type="url"],
.auth-form textarea,
.auth-form select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font: inherit;
  width: 100%;
}

.auth-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2390caf9' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.auth-form select option {
  background: var(--bg);
  color: var(--text);
}

.auth-form input[type="number"] {
  -moz-appearance: textfield;
}

.auth-form input[type="number"]::-webkit-inner-spin-button,
.auth-form input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="number"]:focus,
.auth-form input[type="url"]:focus,
.auth-form textarea:focus,
.auth-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-field-checkbox label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}

.form-field-checkbox input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.field-help {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.6rem 0.85rem;
  background: rgba(244, 67, 54, 0.12);
  color: #ff8a80;
  border: 1px solid rgba(244, 67, 54, 0.4);
  border-radius: 6px;
  font-size: 0.9rem;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #0a1929;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* Actions bar */
.actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.actions-bar-split {
  justify-content: stretch;
}

.actions-bar-split > * {
  flex: 1;
  text-align: center;
}

/* Buttons */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn-danger {
  background: transparent;
  color: #ff8a80;
  border: 1px solid rgba(244, 67, 54, 0.4);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-danger:hover {
  background: rgba(244, 67, 54, 0.15);
  color: #ffab91;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

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

.data-table th {
  background: var(--bg-nav);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(33, 150, 243, 0.06);
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
  margin: 0;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-active {
  background: rgba(76, 175, 80, 0.15);
  color: #a5d6a7;
  border-color: rgba(76, 175, 80, 0.35);
}

.badge-inactive {
  background: rgba(120, 144, 156, 0.15);
  color: #b0bec5;
  border-color: rgba(120, 144, 156, 0.4);
}

.badge-admin {
  background: rgba(33, 150, 243, 0.15);
  color: var(--accent);
  border-color: rgba(33, 150, 243, 0.4);
}

.badge-user {
  background: rgba(120, 144, 156, 0.15);
  color: #cfd8dc;
  border-color: rgba(120, 144, 156, 0.3);
}

/* Catalog */
.catalog-search {
  margin-bottom: 2rem;
}

.catalog-search input[type="search"] {
  width: 100%;
  max-width: 480px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.catalog-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
}

.catalog-no-results {
  margin-top: 1rem;
  color: var(--text-muted);
}

.catalog-list {
  display: flex;
  flex-direction: column;
}

.brand-block {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.brand-block:first-child {
  padding-top: 0;
}

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

.brand-title {
  margin: 0 0 0.75rem;
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.model-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 3rem;
}

.model-item {
  margin: 0;
}

.model-item a {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.15s;
}

.model-item a:hover {
  color: var(--accent);
}

.model-name-accent {
  color: var(--accent);
}

/* Staff sub-navigation */
.staff-subnav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.staff-subnav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.staff-subnav a:hover {
  color: var(--text);
}

.staff-subnav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* --- Staff status dashboard ---------------------------------------- */
.status-json-link {
  margin-left: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85em;
}
.status-json-link:hover {
  color: var(--accent-hover);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.status-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  transition: border-color 0.2s;
}

.status-card.is-ok {
  border-left-color: #4caf50;
}

.status-card.is-fail {
  border-left-color: #cf222e;
}

.status-card.is-disabled {
  border-left-color: var(--text-muted);
  opacity: 0.75;
}

.status-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 8px transparent;
  transition: background 0.2s, box-shadow 0.2s;
}

.status-card.is-ok .status-dot {
  background: #4caf50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.status-card.is-fail .status-dot {
  background: #ff5252;
  box-shadow: 0 0 8px rgba(255, 82, 82, 0.5);
}

.status-card.is-disabled .status-dot {
  background: var(--text-muted);
}

.status-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.status-card-body {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.status-state {
  display: inline-block;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  word-break: break-word;
}

.status-state-time {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-detail {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Watches admin list */
.watches-table .watch-thumb-cell {
  width: 60px;
}

.watch-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.watch-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 700;
}

/* Watch image edit form */
.watch-edit-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 2.5rem;
  align-items: start;
}

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

.watch-edit-preview h2 {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.watch-edit-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.auth-form input[type="file"] {
  display: none;
}

.file-upload-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.file-upload-label:hover {
  border-color: var(--accent);
  color: var(--text);
}

.file-upload-icon {
  font-size: 1.4rem;
}

.file-upload-text {
  font-size: 0.9rem;
}

.file-upload-name {
  color: var(--accent);
  font-weight: 600;
}

.form-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

/* Listings section (model detail) */
.listings-section {
  margin-top: 3rem;
}

.listings-heading {
  margin: 0 0 1.25rem;
  color: var(--heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.listings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.listing-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.favorite-form {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  margin: 0;
  z-index: 2;
}

.favorite-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s, transform 0.15s;
}

.favorite-btn:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  transform: scale(1.15);
}

.favorite-btn.is-favorited {
  color: #ff6b6b;
}

.favorite-controls {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.favorite-controls .favorite-form {
  position: static;
}

.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;
}

.favorite-threshold-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.4rem 0.2rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.15s;
}

.favorite-threshold-form:hover {
  border-color: var(--accent);
}

.favorite-threshold-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.favorite-threshold-form .threshold-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.favorite-threshold-select {
  /* color-scheme: dark tells the browser to use the dark variant of its
     native widgets (including the dropdown popup), so options aren't
     rendered with the OS default white background. */
  color-scheme: dark;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.favorite-threshold-select:hover,
.favorite-threshold-select:focus {
  border-color: var(--accent);
  outline: none;
}

.favorite-threshold-select option {
  background: var(--bg-elevated);
  color: var(--text);
}

.favorite-threshold-select option:checked {
  background: var(--accent);
  color: var(--bg);
}

.favorite-threshold-form.just-saved {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.12);
}

/* Favorites cards: heart + selector on top-right, price below them
   (absolute, bottom-right). Body extends across the freed space, but the
   link's padding-right keeps title/attrs from sliding under the
   absolute overlays. */
.favorites-list .listing-card a {
  grid-template-columns: 56px 1fr;
  align-items: start;
  padding-right: 13.5rem;
  min-height: 4.75rem;
}

.favorites-list .listing-card .listing-price {
  position: absolute;
  right: 1.25rem;
  bottom: 0.85rem;
  text-align: right;
  z-index: 1;
}

@media (max-width: 720px) {
  .favorites-list .listing-card a {
    grid-template-columns: 48px 1fr;
    padding-right: 1.25rem;
    min-height: 0;
  }
  .favorites-list .listing-card .listing-price {
    position: static;
    text-align: left;
    margin-top: 0.4rem;
  }
  .favorites-list .favorite-controls {
    position: static;
    justify-content: flex-end;
    padding: 0 1.25rem 0.75rem;
  }
}

.listing-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.listing-card a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  color: inherit;
}

@media (max-width: 600px) {
  .listing-card a {
    grid-template-columns: 48px 1fr;
    gap: 0.75rem;
  }
  .listing-price {
    grid-column: 2;
  }
}

.listing-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--bg);
}

.listing-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.listing-body {
  min-width: 0;
}

.listing-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.listing-source {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.listing-type {
  font-size: 0.7rem;
}

.listing-title {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-attrs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.listing-attrs span::after {
  content: "·";
  margin-left: 0.5rem;
}

.listing-attrs span:last-child::after {
  content: "";
}

.listing-price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.deal-badge {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.5rem;
  background: rgba(76, 175, 80, 0.15);
  color: #66bb6a;
  border: 1px solid rgba(76, 175, 80, 0.4);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.deal-badge--hidden {
  display: none;
}

.deal-threshold-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.listings-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.listings-filters select,
.listings-filters input[type="number"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  appearance: none;
  min-width: 0;
}

.listings-filters select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2390caf9' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.listings-filters select:focus,
.listings-filters input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
}

.listings-search-bar {
  margin-bottom: 0.75rem;
}

.listings-search-bar input[type="search"] {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  appearance: none;
  transition: border-color 0.15s;
}

.listings-search-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
}

.listings-search-bar input[type="search"]::placeholder {
  color: var(--text-muted);
}

.price-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 180px;
  min-width: 160px;
}

.price-slider-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.price-slider-label span {
  color: var(--accent);
  font-weight: 600;
}

.price-slider-track {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.price-slider-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  pointer-events: none;
}

.price-slider-track input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  outline: none;
}

.price-slider-track input[type="range"]::-webkit-slider-runnable-track {
  height: 0;
  background: transparent;
}

.price-slider-track input[type="range"]::-moz-range-track {
  height: 0;
  background: transparent;
}

.price-slider-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 0 4px rgba(33, 150, 243, 0.4);
  position: relative;
  z-index: 1;
  margin-top: -7px;
}

.price-slider-track input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 0 4px rgba(33, 150, 243, 0.4);
}

.listings-filter-count {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: auto;
}

.listings-empty {
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

/* Model name row with stats button */
.model-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.model-name-row .model-name {
  margin: 0;
}

.btn-stats {
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.55rem 1.25rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.btn-stats:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.25rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

/* Stats filter */
.stats-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stats-filter-label {
  font-weight: 500;
}

.stats-source-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.source-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s;
  font-size: 0.85rem;
  color: var(--text);
}

.source-check:hover {
  border-color: var(--accent);
}

.source-check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.stats-filter select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2390caf9' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  cursor: pointer;
}

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

/* KPIs grid */
.kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.kpi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.kpi-value {
  display: block;
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.kpi-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Chart */
.chart-container {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.chart-container h3 {
  margin: 0 0 1rem;
  color: var(--heading);
  font-size: 1rem;
}

/* Alerts */
.alerts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.alert-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.alert-card-inactive {
  opacity: 0.6;
}

.alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.alert-title {
  margin: 0;
  color: var(--heading);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.alert-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.alert-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.alert-meta a {
  color: var(--accent);
  text-decoration: none;
}

.alert-meta a:hover {
  text-decoration: underline;
}

.alert-meta-label {
  color: var(--text-muted);
  margin-right: 0.3rem;
}

.alert-criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.alert-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.alert-chip strong {
  color: var(--text);
  font-weight: 600;
}

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

@media (max-width: 560px) {
  .alert-form .form-row {
    grid-template-columns: 1fr;
  }
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.checkbox-group label {
  color: var(--text);
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  accent-color: var(--accent);
}

/* Error pages (404, 403, 400, 500) */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  min-height: 50vh;
}

.error-code {
  margin: 0 0 0.5rem;
  font-size: 7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: 0.35;
  letter-spacing: -4px;
}

.error-title {
  margin: 0 0 0.75rem;
  color: var(--heading);
  font-size: 2rem;
  font-weight: 700;
}

.error-desc {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  line-height: 1.6;
}

.error-btn {
  display: inline-block;
  width: auto;
  padding: 0.75rem 2rem;
  text-decoration: none;
  border-radius: 6px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-block: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Préférences de notification (issue #6) */
.prefs-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.prefs-header h1 {
  margin: 0 0 0.5rem;
}

.prefs-intro {
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.prefs-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.prefs-message {
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  color: var(--text);
}

.prefs-message--success {
  border-left-color: #4caf50;
}

.prefs-section {
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.prefs-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.prefs-section-help {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
}

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

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

.prefs-channel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: var(--bg);
}

.prefs-channel--disabled {
  opacity: 0.7;
}

.prefs-channel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

.prefs-channel--disabled .prefs-channel-head {
  cursor: not-allowed;
}

.prefs-channel-name {
  font-size: 1rem;
}

.prefs-channel-badge {
  margin-left: auto;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-weight: 500;
}

.prefs-channel-body {
  margin-top: 0.7rem;
  padding-left: 1.4rem;
}

.prefs-freq-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.prefs-channel-body select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  color: var(--text);
  font: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2390caf9' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.prefs-channel-body select option {
  background: var(--bg);
  color: var(--text);
}

.prefs-page a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.prefs-page a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.prefs-channel-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.prefs-actions {
  text-align: right;
  min-height: 1.4rem;
}

.prefs-save-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: opacity 0.15s ease;
}

.prefs-save-status--saved {
  color: #4caf50;
  font-weight: 500;
}

.prefs-save-status--error {
  color: #ff8a80;
  font-weight: 500;
}

.telegram-link-section {
  /* Section positioned at the TOP of the prefs page so the user
     understands they need to link Telegram before the channel
     checkboxes (which display "À lier" badges) become usable. */
  margin-bottom: 2.5rem;
}

.telegram-link-section .btn-primary {
  width: auto;
  padding: 0.55rem 1.2rem;
}

.telegram-code {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.3rem;
}

/* Page détail d'une annonce (issue #32) */
.listing-detail-page {
  max-width: 1100px;
  margin: 0 auto;
}

.listing-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2rem;
  margin: 1.5rem 0 2.5rem;
}

@media (max-width: 760px) {
  .listing-detail {
    grid-template-columns: 1fr;
  }
}

.listing-detail-media {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.listing-detail-image,
.listing-detail-image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--bg);
}

.listing-detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.listing-detail-source-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.listing-detail-source-row .listing-source {
  font-weight: 600;
  color: var(--text);
}

.listing-inactive-badge {
  margin-left: auto;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 138, 128, 0.15);
  border: 1px solid rgba(255, 138, 128, 0.4);
  border-radius: 12px;
  color: #ff8a80;
}

.listing-detail-title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.3;
}

.listing-detail-model {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.listing-detail-model a {
  color: var(--accent);
  text-decoration: none;
}

.listing-detail-model a:hover {
  text-decoration: underline;
}

.listing-detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.4rem 0 0.6rem;
}

.listing-detail-specs {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
}

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

.listing-detail-spec {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding-bottom: 0.35rem;
}

.listing-detail-spec dt {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.listing-detail-spec dd {
  margin: 0;
  font-size: 0.9rem;
  text-align: right;
}

.listing-detail-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.listing-detail-cta {
  width: auto;
  padding: 0.75rem 1.5rem;
  flex: 1;
  text-align: center;
  text-decoration: none;
}

.listing-detail-favorite .favorite-btn {
  font-size: 1.5rem;
  padding: 0.4rem 0.85rem;
}

.listing-detail-history,
.listing-detail-similar {
  margin-bottom: 2rem;
}

.listing-detail-history h2,
.listing-detail-similar h2 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.listing-detail-history-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

#price-history-chart {
  width: 100%;
  display: block;
}

.listing-detail-similar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Comparateur 2-3 annonces côte à côte (issue #2) */
.compare-page {
  max-width: 1200px;
  margin: 0 auto;
}

.compare-header {
  margin-bottom: 1.5rem;
}

.compare-header h1 {
  margin: 0.5rem 0 0;
}

.compare-model {
  color: var(--accent);
}

.compare-grid {
  display: grid;
  gap: 1.25rem;
}

.compare-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

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

@media (max-width: 760px) {
  .compare-grid--2,
  .compare-grid--3 {
    grid-template-columns: 1fr;
  }
}

.compare-col {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.compare-col--cheapest {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.compare-thumb-link {
  display: block;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.compare-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.compare-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg);
}

.compare-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.compare-source-name {
  font-weight: 600;
  color: var(--text);
}

.compare-title {
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
  font-size: 0.95rem;
}

.compare-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.compare-price--cheapest {
  color: #4caf50;
}

.compare-best-deal {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
  border-radius: 12px;
  color: #4caf50;
  vertical-align: middle;
}

.compare-specs {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.compare-spec {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.compare-spec dt {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.compare-spec dd {
  margin: 0;
  font-size: 0.9rem;
  text-align: right;
  color: var(--text);
}

.compare-cta {
  margin-top: auto;
  text-align: center;
  text-decoration: none;
  padding: 0.6rem 1rem;
  width: auto;
}

/* Sélecteur de comparaison sur les listing-card (issue #2).
   Checkbox native masquée (-webkit-appearance: none) puis re-stylée
   pour matcher le thème dark : carré arrondi avec fond semi-opaque
   sur fond image, transition vers accent quand coché, avec un check
   blanc bien centré via pseudo-élément. */
.compare-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 26px;
  height: 26px;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(10, 25, 41, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 7px;
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-select:hover {
  border-color: var(--accent);
  background: rgba(33, 150, 243, 0.18);
}

.compare-select:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.compare-select:checked::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230a1929' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l3.5 3.5L13 5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.compare-select:active {
  transform: scale(0.92);
}

.compare-select:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.compare-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.listing-card.is-selected-for-compare {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Floating "Comparer (N)" action button (issue #2) */
.compare-floating {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(33, 150, 243, 0.35);
  transition: opacity 0.15s, transform 0.15s;
  display: none;
}

.compare-floating.is-visible {
  display: inline-block;
}

.compare-floating:hover {
  transform: translateX(-50%) translateY(-2px);
}

.compare-floating:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: translateX(-50%);
}

.compare-floating-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.85;
}

/* Lazy-load des annonces 50 par 50 (issue #12) */
.listings-load-more {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.listings-load-more-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.btn-load-more {
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.55rem 1.5rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.btn-load-more:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-load-more:disabled {
  opacity: 0.6;
  cursor: wait;
}

.site-footer-version {
  margin-left: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  opacity: 0.7;
}
