/* Ostaosa.ee */

:root,
[data-theme="dark"] {
  --brand: #2a6fd6;
  --brand-hover: #4a85e8;
  --brand-dim: rgba(42, 111, 214, 0.2);
  --brand-glow: rgba(42, 111, 214, 0.4);
  --bg: #0e1016;
  --bg-elevated: #151a24;
  --bg-card: #1a2130;
  --surface: #1a2130;
  --surface-elevated: #222a3c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f0f2f7;
  --text-muted: #9aa3b5;
  --accent: var(--brand);
  --accent-hover: var(--brand-hover);
  --accent-dim: var(--brand-dim);
  --trade: #fbbf24;
  --trade-dim: rgba(251, 191, 36, 0.15);
  --success: #34d399;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 8px 32px var(--brand-glow);
  --gradient-brand: linear-gradient(135deg, #2a6fd6 0%, #5eb8ff 100%);
  --gradient-card: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, transparent 55%);
  --header-bg: rgba(14, 16, 22, 0.82);
  --hero-glow-a: rgba(42, 111, 214, 0.2);
  --hero-glow-b: rgba(94, 184, 255, 0.1);
  --code-bg: rgba(255, 255, 255, 0.06);
  --overlay-bg: rgba(14, 16, 22, 0.92);
  --toolbar-bg: rgba(14, 16, 22, 0.94);
  --glass: rgba(26, 33, 48, 0.72);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="light"] {
  --brand: #2a6fd6;
  --brand-hover: #1e56b8;
  --brand-dim: rgba(42, 111, 214, 0.14);
  --brand-glow: rgba(42, 111, 214, 0.22);
  --bg: #f4f6fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --surface: #ffffff;
  --surface-elevated: #f8fafc;
  --border: rgba(45, 49, 54, 0.1);
  --border-strong: rgba(45, 49, 54, 0.16);
  --text: #1e2433;
  --text-muted: #5e6a82;
  --accent: var(--brand);
  --accent-hover: var(--brand-hover);
  --accent-dim: var(--brand-dim);
  --trade: #d97706;
  --trade-dim: rgba(217, 119, 6, 0.12);
  --success: #059669;
  --shadow: 0 12px 36px rgba(30, 36, 51, 0.1);
  --shadow-sm: 0 4px 14px rgba(30, 36, 51, 0.06);
  --shadow-glow: 0 8px 28px var(--brand-glow);
  --gradient-brand: linear-gradient(135deg, #2a6fd6 0%, #4a85e8 100%);
  --gradient-card: linear-gradient(160deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 60%);
  --header-bg: rgba(255, 255, 255, 0.88);
  --hero-glow-a: rgba(42, 111, 214, 0.14);
  --hero-glow-b: rgba(94, 184, 255, 0.08);
  --code-bg: rgba(30, 36, 51, 0.06);
  --overlay-bg: rgba(255, 255, 255, 0.94);
  --toolbar-bg: rgba(255, 255, 255, 0.96);
  --glass: rgba(255, 255, 255, 0.85);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 0% -20%, var(--hero-glow-a), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, var(--hero-glow-b), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(42, 111, 214, 0.05), transparent);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

[data-theme="light"] body::after {
  background-image:
    linear-gradient(rgba(30, 36, 51, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 36, 51, 0.04) 1px, transparent 1px);
}

img { max-width: 100%; display: block; }

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

/* .btn / .user-menu display overrides HTML [hidden] without this */
[hidden] {
  display: none !important;
}

.container {
  width: min(1140px, 100% - 2rem);
  margin-inline: auto;
}

/* App shell + külgmenüü */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar {
  flex-shrink: 0;
  width: 21rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 1.25rem 0.75rem;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, rgba(21, 26, 36, 0.98) 100%);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.logo-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.logo-block--sidebar {
  margin-bottom: 0.75rem;
}

.logo--sidebar {
  display: block;
  padding: 0;
}

.logo--sidebar .logo__img {
  width: 100%;
  max-width: none;
  height: auto;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar__link {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.7rem 1rem 0.7rem 1rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s, transform 0.15s;
}

.sidebar__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.9;
}

.sidebar__icon svg {
  display: block;
}

.sidebar__label {
  line-height: 1.25;
}

.sidebar__badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  flex-shrink: 0;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 42rem;
}

.messages-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  max-width: 42rem;
}

.seller-tasks {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  max-width: 42rem;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
}

.seller-tasks__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.seller-tasks__lead {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.seller-tasks__list {
  display: grid;
  gap: 0.75rem;
}

.seller-task-card {
  padding: 0.85rem 0.95rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.seller-task-card__title {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.seller-task-card__meta {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.seller-task-card__details {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.seller-task-card__body {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.seller-task-card__payout {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--success, #2d8a4e);
  line-height: 1.45;
}

.seller-task-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.seller-task-card__ship {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.seller-task-card__tracking-label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.seller-task-card__tracking-label span {
  display: block;
  margin-bottom: 0.35rem;
}

.seller-task-card__tracking {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.875rem;
}

.seller-task-card__tracking:focus {
  outline: none;
  border-color: var(--accent);
}

.seller-task-card__ship-btn {
  width: 100%;
}

.inbox-item {
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.inbox-item[data-msg-id] {
  cursor: pointer;
}

.inbox-item[data-msg-id]:hover {
  border-color: rgba(42, 111, 214, 0.35);
}

.inbox-item__row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.inbox-item__dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: transparent;
}

.inbox-item__dot--unread {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

.inbox-item__main {
  flex: 1;
  min-width: 0;
}

.inbox-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.inbox-item__who {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.inbox-item__listing {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.inbox-item__listing-btn {
  font-weight: 500;
  text-align: left;
  padding: 0;
  border: none;
  background: none;
  color: var(--brand-hover);
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}

.inbox-item__preview {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inbox-item__preview .message-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inbox-item__preview .message-link--track {
  display: inline-block;
  margin-top: 0.2rem;
}

.inbox-item--read .inbox-item__who {
  font-weight: 500;
  color: var(--text-muted);
}

.inbox-item--read .inbox-item__preview {
  color: var(--text-muted);
  opacity: 0.9;
}

.sidebar__link--active .sidebar__icon {
  opacity: 1;
}

.sidebar__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.sidebar__link--active {
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 600;
}

.sidebar__link--active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 55%;
  border-radius: 0 3px 3px 0;
  background: var(--gradient-brand);
}

.sidebar-backdrop {
  display: none;
}

/* Mobiilile mõeldud – desktop vaates peidetud (täpsemalt mobile.css) */
.header__logo-mobile,
.bottom-nav {
  display: none;
}

.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 0.5rem;
}

.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.875rem 0;
}

.logo {
  display: block;
  line-height: 0;
}

.logo__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
}

.logo__slogan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0 0.15rem;
  font-size: 0.5625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-muted);
}

.logo__slogan::before,
.logo__slogan::after {
  content: "";
  flex: 0 1 1.25rem;
  height: 1px;
  background: var(--brand);
  opacity: 0.85;
}

[data-theme="light"] .logo__slogan {
  color: var(--charcoal, #2b2f36);
  opacity: 0.75;
}

[data-theme="dark"] .logo__img {
  background: #fff;
  padding: 0.4rem 0.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.header__end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

.header__prefs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-switch {
  display: flex;
  padding: 0.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.45rem;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang-switch__flag {
  width: 16px;
  height: 11px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--border);
}

.lang-switch__code {
  line-height: 1;
}

.lang-switch__btn--active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(42, 111, 214, 0.25);
}

.lang-switch__btn:hover:not(.lang-switch__btn--active) {
  color: var(--text);
}

.theme-toggle {
  min-width: 2.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 1rem;
  line-height: 1;
}

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

.btn--header-add .btn--header-add__icon {
  display: none;
}

.btn--header-add .btn--header-add__label {
  display: inline;
}

.header-user {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.header-user:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.header-user__avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  overflow: visible;
}

.header-user__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-user__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

.header-user--notify .header-user__avatar {
  box-shadow: 0 0 0 2px var(--brand-dim);
}

.sidebar__link--notify .sidebar__icon {
  position: relative;
}

.sidebar__link--notify .sidebar__icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  border: 1.5px solid var(--bg-elevated);
}

.messages-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.messages-tabs__btn {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.messages-tabs__btn:hover {
  color: var(--text);
  border-color: var(--brand);
}

.messages-tabs__btn--active {
  background: var(--brand-dim);
  border-color: var(--brand);
  color: var(--brand-hover);
}

.messages-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.messages-subtabs__btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.messages-subtabs__btn--active {
  background: var(--surface);
  border-color: var(--brand);
  color: var(--text);
}

.seller-task-card--shipped {
  border-color: rgba(45, 138, 78, 0.35);
}

.seller-task-card--purchase {
  border-color: rgba(42, 111, 214, 0.25);
}

.inbox-item--unread {
  border-color: rgba(42, 111, 214, 0.5);
  background: linear-gradient(
    135deg,
    rgba(42, 111, 214, 0.08) 0%,
    var(--surface) 55%
  );
  box-shadow: var(--shadow-sm), inset 3px 0 0 var(--brand);
}

.inbox-item--read {
  opacity: 0.92;
}

.inbox-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn--sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  min-height: auto;
}

.header-user__initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.9375rem;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent);
}

.modal--profile .modal__content {
  max-width: 24rem;
}

.profile-bank {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.profile-bank h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--text);
}

.profile-bank__lead {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.profile-bank-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.profile-bank-form label span {
  display: block;
}

.profile-bank-form input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.profile-bank-form input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.profile-bank-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

.profile-bank-form input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.profile-bank-form input:-webkit-autofill,
.profile-bank-form input:-webkit-autofill:hover,
.profile-bank-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-card) inset;
  box-shadow: 0 0 0 1000px var(--bg-card) inset;
  border: 1px solid var(--border);
  caret-color: var(--text);
}

.profile-bank-form .btn {
  margin-top: 0.25rem;
}

.profile-bank-status {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
}

.profile-bank-status--ok {
  color: var(--success, #2d8a4e);
}

.profile-bank-status--error {
  color: var(--danger, #c0392b);
}

.admin-actions {
  min-width: 14rem;
}

.admin-action-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  align-items: center;
}

.admin-table .admin-actions .btn--sm {
  white-space: nowrap;
}

.admin-action--danger {
  color: var(--danger, #c0392b);
}

.admin-dropdown {
  position: relative;
}

.admin-dropdown__toggle {
  list-style: none;
  cursor: pointer;
}

.admin-dropdown__toggle::-webkit-details-marker {
  display: none;
}

.admin-dropdown[open] .admin-dropdown__toggle {
  background: var(--bg-elevated);
}

.admin-dropdown__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 10.5rem;
  padding: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-dropdown__menu button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.modal--admin-tool .modal__content {
  max-width: 24rem;
}

.admin-modal-user {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-modal-user strong {
  color: var(--text);
}

.admin-modal-lead {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.admin-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.profile-avatar {
  position: relative;
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-dim);
}

.profile-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar__initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-card__name {
  margin: 0;
  font-weight: 700;
  font-size: 1.0625rem;
}

.profile-card__username {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.profile-hint {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px var(--brand-glow);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}

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

.btn--light {
  background: rgba(255, 255, 255, 0.95);
  color: #0c0f14;
}

.btn--light:hover { background: #fff; }

.btn--search {
  padding-inline: 1.5rem;
  min-height: 2.75rem;
}

.btn--header-cta {
  min-height: 2.75rem;
  white-space: nowrap;
}

.btn--full { width: 100%; margin-top: 0.5rem; }

/* Hero */
.hero {
  padding: 3rem 0 4rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.search-modes {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.search-modes__btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.search-modes__btn:hover { color: var(--text); }

.search-modes__btn--active {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 2px 10px var(--brand-glow);
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.search-bar input[type="search"],
.search-bar input[type="text"] {
  min-height: 2.75rem;
  font-size: 1rem;
}

.search-bar--vehicle {
  flex-direction: column;
  align-items: stretch;
}

.search-bar--vehicle .search-bar__field {
  min-width: 100%;
}

.search-bar--vehicle .search-bar__field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.search-bar--vehicle .search-bar__field input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.search-bar--vehicle .search-bar__field input:focus,
.search-bar--vehicle .search-bar__field select:focus {
  outline: none;
  border-color: var(--accent);
}

.search-bar--vehicle .search-bar__field select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.search-bar--vehicle .search-bar__field select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.vehicle-search-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1rem;
  width: 100%;
}

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

.vehicle-search-form .search-bar__hint {
  margin-bottom: 0.5rem;
}

.search-bar__field--vin input {
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-bar__hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

.search-bar__hint--warn {
  color: #f59e0b;
}

.search-bar--vehicle .btn--search {
  align-self: flex-start;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.search-bar__field--plate .plate-input {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem !important;
}

.plate-input--loading {
  border-color: var(--accent) !important;
  animation: plate-pulse 1s ease-in-out infinite;
}

@keyframes plate-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 111, 214, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(42, 111, 214, 0.15); }
}

.vehicle-vin-toggle {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.vehicle-vin-toggle summary {
  cursor: pointer;
  padding: 0.35rem 0.5rem;
}

.vehicle-vin-toggle .search-bar__field--vin {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-top: 0.5rem;
}

.vehicle-vin-toggle .search-bar__field--vin input {
  flex: 1;
  min-width: 200px;
}

.btn--sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
}

/* Sõiduki tulemus + kuulutused */
.vehicle-result {
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(42, 111, 214, 0.06), transparent);
}

.vehicle-card {
  background: var(--bg-card);
  border: 1px solid rgba(42, 111, 214, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.vehicle-card--loading,
.vehicle-card--error {
  text-align: center;
  padding: 2rem;
}

.vehicle-card--error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

.vehicle-card__plate {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem;
}

.vehicle-card__status {
  color: var(--text-muted);
  margin: 0;
}

.vehicle-card__skeleton {
  height: 4px;
  margin-top: 1.5rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--bg-elevated), var(--accent), var(--bg-elevated));
  background-size: 200% 100%;
  animation: skeleton-slide 1.2s linear infinite;
}

@keyframes skeleton-slide {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

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

.vehicle-card__plate-badge {
  font-family: var(--mono);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}

.vehicle-card__name {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.vehicle-card__subtitle {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.vehicle-card__specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0 0 1.5rem;
}

.vehicle-card__spec dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.vehicle-card__spec dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  word-break: break-all;
}

.vehicle-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.vehicle-card__listings {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.vehicle-card__count-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.vehicle-card__count-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.vehicle-card__source {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.vehicle-card__mnt {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
}

.vehicle-card__mnt a {
  color: var(--accent);
  text-decoration: none;
}

.vehicle-card__mnt a:hover {
  text-decoration: underline;
}

.listings:has(+ .vehicle-result),
.vehicle-result + .listings {
  padding-top: 1.5rem;
}

.vehicle-banner {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--accent-dim);
  border: 1px solid rgba(42, 111, 214, 0.35);
  border-radius: var(--radius);
}

.vehicle-banner__main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.vehicle-banner__icon {
  font-size: 2rem;
  line-height: 1;
}

.vehicle-banner__info { flex: 1; min-width: 200px; }

.vehicle-banner__title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.vehicle-banner__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.vehicle-banner__meta span {
  font-family: var(--mono);
}

.vehicle-banner__source {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.vehicle-banner__clear { flex-shrink: 0; }

.hero .search-bar:last-of-type {
  margin-bottom: 2rem;
}

.search-bar__field { flex: 1; min-width: 180px; }

.search-bar__field input,
.search-bar__field select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  outline: none;
}

.search-bar__field--select {
  flex: 0 0 auto;
  min-width: 160px;
  border-left: 1px solid var(--border);
}

.hero__stats {
  display: flex;
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat strong {
  font-family: var(--mono);
  font-size: 1.5rem;
  color: var(--text);
}

.stat span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Hero cards */
.hero__visual {
  position: relative;
  height: 320px;
}

.hero-card {
  position: absolute;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
}

.hero-card--1 { top: 0; right: 10%; animation: float 6s ease-in-out infinite; }
.hero-card--2 { top: 45%; left: 0; animation: float 7s ease-in-out infinite 0.5s; }
.hero-card--3 { bottom: 0; right: 0; animation: float 5.5s ease-in-out infinite 1s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  background: var(--success);
  color: #000;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.hero-card__tag--trade {
  background: var(--trade);
}

.hero-card__title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

.hero-card__price {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--accent);
}

/* Filters */
.filters-bar {
  position: sticky;
  top: 57px;
  z-index: 50;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  border-block: 1px solid var(--border);
}

.filters-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.filters-bar__tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-card);
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 100px;
}

.tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

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

.tab--active {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 2px 10px var(--brand-glow);
}

.filters-bar__controls {
  display: flex;
  gap: 0.5rem;
}

.filters-bar__controls select {
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

/* Listings */
.listings { padding: 2.5rem 0 4rem; }

.listings__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-title--center { text-align: center; margin-bottom: 2rem; }

.listings__count {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

.listings-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
}

body.is-booting #home-recent-grid:empty::after,
body.is-booting #listings-grid:empty::after {
  content: "Laadin kuulutusi…";
  display: block;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

/* Listing card */
.card {
  background: var(--bg-card);
  background-image: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(42, 111, 214, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(42, 111, 214, 0.12);
}

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

.card__image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #1a2235 0%, #252f45 50%, #1e2838 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__placeholder,
.detail__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
}

.listing-placeholder__icon {
  width: 3rem;
  height: 3rem;
  opacity: 0.45;
}

.detail__placeholder .listing-placeholder__icon {
  width: 4rem;
  height: 4rem;
}

.card__photo-count {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 1;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.card__badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  line-height: 1.2;
}

.card__badge--overlay {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.card__badge--inline {
  display: none;
}

.card__summary {
  display: none;
}

.card__subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.card__code {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card__code-value {
  font-family: var(--mono);
  color: var(--text);
}

.card__badge--sale { background: var(--accent); color: #fff; }
.card__badge--trade { background: var(--trade); color: #000; }

.card__badge--wanted {
  background: var(--success);
  color: #fff;
}

.card__badge--sold {
  top: auto;
  bottom: 0.5rem;
  left: 0.5rem;
  background: var(--text-muted);
  color: #fff;
}

.card--sold .card__photo,
.card--sold .card__placeholder {
  opacity: 0.55;
}

.card__body { padding: 1rem 1.25rem 1.25rem; }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

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

.card__category {
  color: var(--text-muted);
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card__price {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--accent);
}

.card__price--trade {
  font-size: 0.8125rem;
  color: var(--trade);
  font-family: var(--font);
}

.card__price--wanted {
  font-size: 0.8125rem;
  color: var(--success);
  font-weight: 600;
}

.card__location {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* CTA */
.cta-section { padding: 2rem 0 4rem; }

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

.cta-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.cta-card--sell {
  background: linear-gradient(135deg, rgba(42, 111, 214, 0.2), rgba(42, 111, 214, 0.05));
}

.cta-card--trade {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
}

.cta-card__icon { font-size: 2rem; margin-bottom: 1rem; }

.cta-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
}

.cta-card p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

/* Categories */
.categories {
  padding: 3rem 0 4.5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(42, 111, 214, 0.03) 100%);
}

.categories__title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.categories__hint {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.45;
}

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

.category-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.35rem 0.85rem;
  background: var(--bg-card);
  background-image: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.category-chip:hover,
.category-chip:focus {
  border-color: rgba(42, 111, 214, 0.45);
  background: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm), 0 0 20px rgba(42, 111, 214, 0.12);
  outline: none;
}

.category-chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
}

.category-chip__icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.95;
}

.categories-grid .category-chip__icon-img {
  object-fit: contain;
}

.category-chip__label {
  font-size: 0.8125rem;
  font-weight: 500;
}

.category-chip__count {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
  margin-top: auto;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer__brand .footer__note {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: 0.65rem 0 0;
  max-width: 32rem;
}

.footer__links h3 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.footer__links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.25rem 0;
  transition: color 0.15s;
}

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

.footer__bottom {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.footer__bottom p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Modal */
.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(520px, 95vw);
  width: 100%;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: var(--bg-elevated);
  background-image: var(--gradient-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  max-height: 90vh;
  overflow-y: auto;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
}

.modal__close:hover { background: rgba(255,255,255,0.12); }

.modal--form .modal__content h2 {
  margin: 0 0 1.25rem;
  font-size: 1.375rem;
}

/* Detail view */
.detail__image {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1e2838, #2a3548);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

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

.detail__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail__gallery {
  margin-bottom: 1.25rem;
}

.detail__gallery-main {
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: 0.5rem;
}

.detail__gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail__gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail__gallery-thumb {
  width: 4.5rem;
  height: 3.25rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
}

.detail__gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail__gallery-thumb--active {
  border-color: var(--accent);
}

.detail__price {
  font-family: var(--mono);
  font-size: 1.75rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.card__code,
.detail__code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  letter-spacing: 0.02em;
}

.card__code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--code-bg);
}

.detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.detail__desc {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.6;
}

.detail__wanted-contact {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail__wanted-contact-title {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
}

.detail__contact-link {
  display: block;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.detail__contact-link:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.detail__price--wanted {
  color: var(--success);
  font-weight: 700;
}

.detail__trade-box {
  background: var(--trade-dim);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.detail__trade-box p { margin: 0.25rem 0; font-size: 0.9375rem; }

.detail__seller {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.detail__seller-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent-dim);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
}

/* Form */
.form-intro {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.listing-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.listing-picker__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.listing-picker__option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.listing-picker__option:hover,
.listing-picker__option:focus {
  border-color: var(--accent);
  background: var(--accent-dim);
  outline: none;
}

.listing-picker__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  font-size: 1.125rem;
  font-weight: 700;
}

.listing-picker__icon--sale {
  background: var(--accent-dim);
  color: var(--accent);
}

.listing-picker__icon--wanted {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.listing-picker__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.listing-picker__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.35;
}

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

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

.listing-form input,
.listing-form textarea,
.listing-form select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.listing-form input:focus,
.listing-form textarea:focus,
.listing-form select:focus {
  outline: none;
  border-color: var(--accent);
}

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

.bank-details {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.bank-details > legend {
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.bank-details label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.bank-details label:last-child {
  margin-bottom: 0;
}

.detail__bank {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.detail__bank h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.detail__bank-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.875rem;
}

.detail__bank-list dt {
  color: var(--text-muted);
  font-weight: 500;
}

.messages-bank-panel {
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.messages-bank-panel__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.detail__bank-list dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

.listing-images-field {
  margin-bottom: 1rem;
}

.listing-images-field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.listing-images-field__hint {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

#listing-images-input {
  display: block;
  width: 100%;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.listing-images-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.listing-images-preview__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.listing-images-preview__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-images-preview__remove {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.listing-images-preview__remove:hover {
  background: #c62828;
}

/* Auth */
.user-menu {
  position: relative;
  max-width: 11rem;
}

.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.user-menu__trigger:hover {
  border-color: var(--accent);
}

.user-menu__initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent);
}

.user-menu__name {
  font-size: 0.8125rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 10rem;
  padding: 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 120;
}

.user-menu__item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 0.875rem;
}

.user-menu__item:hover {
  background: var(--accent-dim);
}

.modal--auth .modal__content {
  max-width: 22rem;
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: var(--bg-card);
  border-radius: 10px;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.auth-tab--active {
  background: var(--bg-elevated);
  color: var(--text);
}

.auth-error {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #fca5a5;
  font-size: 0.8125rem;
}

.auth-form label {
  margin-bottom: 0.75rem;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--text);
  background: var(--bg-elevated);
  outline: none;
}

.password-toggle__eye {
  display: block;
}

.auth-verify-lead {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0.75rem 0 0;
}

.checkout-summary {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-subtle, rgba(0, 0, 0, 0.03));
}

.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9375rem;
}

.checkout-summary__row--total {
  font-weight: 700;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.checkout-listing-title {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.checkout-form {
  margin-top: 0.25rem;
}

.checkout-form__bank {
  margin-bottom: 1rem;
}

.checkout-parcel-fields {
  display: grid;
  gap: 0;
}

.checkout-form__field {
  margin-bottom: 1rem;
}

.checkout-locker-filter {
  margin-bottom: 0.5rem;
}

.checkout-form__hint {
  margin: 0.75rem 0 0;
  text-align: center;
}

.modal--checkout .listing-form select {
  appearance: none;
  cursor: pointer;
  color: var(--text);
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b95a8' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.modal--checkout .listing-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  z-index: 200;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}

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

dialog[open] > .toast {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0));
  bottom: auto;
  left: 50%;
  right: auto;
  width: max-content;
  max-width: min(92vw, 28rem);
  transform: translateX(-50%) translateY(-120%);
}

dialog[open] > .toast.toast--visible {
  transform: translateX(-50%) translateY(0);
}

/* Views: avaleht vs kuulutused */
.main-views {
  flex: 1;
  min-height: calc(100vh - 120px);
}

.view[hidden] { display: none !important; }

.hero--home {
  position: relative;
  padding: 3.5rem 0 2rem;
  max-width: 44rem;
}

.hero--home::before {
  content: "";
  position: absolute;
  inset: -2rem -12vw 0;
  z-index: -1;
  background: radial-gradient(ellipse 80% 70% at 20% 0%, var(--hero-glow-a), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 20%, var(--hero-glow-b), transparent 50%);
  pointer-events: none;
}

#view-home .categories {
  padding: 2rem 0 2.5rem;
  border-top: none;
}

.hero--home .hero__title {
  font-size: clamp(2rem, 5vw, 2.85rem);
  margin-bottom: 0.85rem;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.hero--home .hero__title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 4px;
  margin-top: 1.1rem;
  border-radius: 4px;
  background: var(--gradient-brand);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.btn--secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

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

.search-bar__field--grow { flex: 1 1 12rem; min-width: 0; }

.vehicle-search-grid--core {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.vehicle-search-extra {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.vehicle-search-extra summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  padding: 0.35rem 0;
}

.vehicle-search-extra[open] summary { margin-bottom: 0.5rem; }

/* Kuulutuste vaade */
.browse__head {
  padding: 1.25rem 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.browse__back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  padding: 0.35rem 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: color 0.15s;
}

.browse__back-icon {
  display: flex;
  flex-shrink: 0;
  opacity: 0.9;
}

.browse__back-icon svg {
  display: block;
}

.browse__back:hover {
  color: var(--accent);
}

.browse__back:hover .browse__back-icon {
  opacity: 1;
}

.browse__titles .section-title { font-size: 1.375rem; }

.browse__titles .listings__count { margin-top: 0.25rem; }

.browse-toolbar__extra > summary {
  list-style: none;
}

.browse-toolbar__extra > summary::-webkit-details-marker {
  display: none;
}

@media (min-width: 769px) {
  .browse-toolbar__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "tabs filters"
      "search search"
      "code code"
      "chips chips";
    align-items: center;
  }

  .browse-toolbar__row--types {
    grid-area: tabs;
  }

  .browse-toolbar__filters {
    grid-area: filters;
    justify-self: end;
  }

  .browse-toolbar__row--search {
    grid-area: search;
  }

  .browse-toolbar__row--code {
    grid-area: code;
  }

  .browse-toolbar .active-filters {
    grid-area: chips;
  }

  .browse-toolbar__extra,
  .browse-toolbar__extra-body {
    display: contents;
  }

  .browse-toolbar__extra-toggle {
    display: none !important;
  }
}

.browse-toolbar {
  position: sticky;
  top: 57px;
  z-index: 50;
  background: var(--toolbar-bg);
  backdrop-filter: blur(8px);
  border-block: 1px solid var(--border);
}

.browse-toolbar__inner {
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.browse-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.browse-toolbar__row--search {
  gap: 0.5rem;
}

.browse-toolbar__row--code {
  gap: 0.5rem;
}

.browse-code-search {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}

.browse-code-search .browse-search-input--code {
  flex: 1 1 10rem;
  min-width: 0;
}

.browse-code-search .btn {
  flex-shrink: 0;
}

.browse-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.browse-toolbar__filters select,
.browse-search-input {
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.browse-search-input {
  flex: 1 1 12rem;
  min-width: 0;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.filter-chip:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.filter-chip--clear {
  color: var(--text-muted);
  border-style: dashed;
}

.browse__categories {
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border);
}

.browse__categories-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.browse__categories-hint {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.categories-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-chip--strip {
  flex-direction: row;
  padding: 0.45rem 0.75rem;
  gap: 0.35rem;
}

.category-chip--strip .category-chip__icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.category-chip--strip .category-chip__icon-img {
  width: 100%;
  height: 100%;
  min-width: 2rem;
  min-height: 2rem;
}

.category-chip--strip .category-chip__label {
  font-size: 0.8125rem;
  white-space: nowrap;
}

.listings--browse { padding: 1.5rem 0 3rem; }

.listings--browse .listings__header { display: none; }

.browse__footer-cta {
  padding: 0 0 3rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.link-btn {
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* Mobile */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .vehicle-search-grid--core { grid-template-columns: 1fr; }

  .browse-toolbar__row { flex-direction: column; align-items: stretch; }

  .browse-toolbar__filters { flex-direction: column; }

  .browse-toolbar__filters select,
  .browse-search-input { width: 100%; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    width: min(92vw, 22rem);
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .sidebar-toggle {
    display: flex;
    margin-right: auto;
  }

  .header__inner {
    justify-content: flex-start;
  }

  .header__end {
    margin-left: auto;
  }

  .header__actions .btn--primary {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.8125rem;
  }

  .header__actions .btn--ghost {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.8125rem;
    min-height: 2.75rem;
  }

  .header__actions .btn--header-cta {
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
  }

  .hero--home {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }

  .search-modes {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-lg);
    padding: 0.35rem;
  }

  .search-modes__btn {
    flex: 1 1 8.5rem;
    min-height: 2.75rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 10px;
  }

  #search-form.search-bar,
  #search-code-form.search-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
  }

  #search-form .search-bar__field--grow,
  #search-code-form .search-bar__field--grow {
    flex: 1 1 auto;
    width: 100%;
  }

  #search-form .btn--search,
  #search-code-form .btn--search {
    width: 100%;
    min-height: 3rem;
    font-size: 1rem;
  }

  .listings-grid--home {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .search-bar__field--select {
    border-left: none;
    border-top: 1px solid var(--border);
    flex: 1 1 100%;
  }

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

/* Statistika */
.stats-page {
  padding: 2rem 0 3rem;
  max-width: 56rem;
}

.stats-page__title {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stats-page__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.75rem;
  border-radius: 3px;
  background: var(--gradient-brand);
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stats-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem 1.5rem 1.35rem;
  background: var(--bg-card);
  background-image: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stats-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0.85;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm), 0 0 24px rgba(42, 111, 214, 0.08);
}

.stats-card__value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stats-card--listings .stats-card__value {
  color: var(--brand-hover);
}

.stats-card--visitors .stats-card__value {
  color: var(--success);
}

.stats-card__label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stats-card__hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.stats-info h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.stats-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.detail__sold-notice {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--surface-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

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

/* Minu kuulutused */
.my-listings-page {
  padding: 2rem 0 3rem;
}

.my-listings-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.my-listings-page__title {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}

.my-listings-page__lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.my-listings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.my-listings-tabs__btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.my-listings-tabs__btn:hover {
  color: var(--text);
}

.my-listings-tabs__btn--active {
  background: var(--accent-dim);
  color: var(--accent);
}

.my-listings-count {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Kontakt */
.contact-page {
  padding: 2.5rem 0 4rem;
  max-width: 40rem;
}

.contact-page__title {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.contact-page__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.75rem;
  border-radius: 3px;
  background: var(--gradient-brand);
}

.contact-page__lead {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 36rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  background-image: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

button.contact-card {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.contact-card:hover {
  border-color: rgba(42, 111, 214, 0.45);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm), 0 0 20px rgba(42, 111, 214, 0.1);
}

.contact-card__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.contact-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.contact-card__value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  word-break: break-all;
}

.contact-form-panel {
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.contact-form-panel__title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.contact-form-panel__hint {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.contact-form textarea {
  resize: vertical;
  min-height: 7rem;
}

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

/* Avaleht – viimased kuulutused */
.home-recent {
  padding: 2.5rem 0 3.5rem;
  border-top: 1px solid var(--border);
}

.home-recent__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.home-recent__head .section-title {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.listings-grid--home {
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 1.25rem;
}

.listings-grid--home .card {
  min-height: 0;
}

.listings-grid--home .card__image {
  aspect-ratio: 4 / 3;
}

.listings-grid--home .card__body {
  padding: 1.1rem 1.2rem 1.2rem;
}

.listings-grid--home .card__title {
  font-size: 1.0625rem;
  margin-bottom: 0.65rem;
}

.listings-grid--home .card__price {
  font-size: 1.2rem;
  font-weight: 600;
}

.listings-empty__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Staatilised lehed */
.static-page {
  padding: 2.5rem 0 4rem;
  max-width: 48rem;
}

.static-page__title {
  margin: 0 0 0.5rem;
}

.static-page__lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.static-page--legal p {
  margin: 0 0 1rem;
  line-height: 1.6;
}

.static-page__meta {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-body {
  max-width: 42rem;
}

.legal-section__title {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.legal-section__title:first-child {
  margin-top: 0;
}

.legal-body p {
  margin: 0 0 0.85rem;
  line-height: 1.65;
  color: var(--text);
}

.legal-section__list {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
  line-height: 1.65;
}

.legal-section__list li {
  margin-bottom: 0.35rem;
}

.auth-consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.25rem 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
}

.auth-consent input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.auth-consent__text a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom, 0px));
  background: var(--glass-bg);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.cookie-banner__title {
  margin: 0;
  font-weight: 600;
  width: 100%;
}

@media (min-width: 640px) {
  .cookie-banner__title {
    width: auto;
    margin-right: 0.5rem;
  }
}

.cookie-banner__text {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
}

.user-profile-page__back {
  margin-bottom: 1rem;
}

.user-profile-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.user-profile-header__avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-profile-header__avatar .profile-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-header__avatar .profile-avatar__initial {
  font-size: 1.5rem;
  font-weight: 700;
}

.user-profile-header__name {
  margin: 0;
  font-size: 1.5rem;
}

.user-profile-header__username {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.user-profile-header__stats {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.location-fields {
  margin: 0;
  padding: 0;
  border: none;
}

.location-fields legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

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

.user-profile-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 0.75rem;
  width: auto;
  max-width: 100%;
}

.user-profile-tabs__btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.user-profile-tabs__btn:hover {
  color: var(--text);
  border-color: var(--brand);
}

.user-profile-tabs__btn--active {
  background: var(--brand-dim);
  border-color: var(--brand);
  color: var(--brand-hover);
}

.detail__seller-meta {
  flex: 1;
}

.detail__seller-profile {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
}

/* Jalus */
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: flex-end;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

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

/* Detail – tööriistariba */
.detail__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.detail__offers {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.detail__offers-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.detail__owner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.card__mine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem 0.75rem;
  border-top: 1px solid var(--border);
}

.card__mine-actions--danger {
  color: #e85d4c;
}

.modal--confirm .modal__content {
  max-width: 22rem;
  padding: 1.5rem 1.5rem 1.25rem;
}

.modal-confirm__message {
  margin: 0.5rem 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.modal-confirm__actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.modal-confirm__actions .btn {
  min-width: 6rem;
}

#modal-confirm-ok {
  background: #e85d4c;
  border-color: #e85d4c;
}

#modal-confirm-ok:hover {
  background: #cf4a3a;
  border-color: #cf4a3a;
}

@media (max-width: 768px) {
  .modal--confirm[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    background: transparent;
  }

  .modal--confirm .modal__content {
    width: calc(100% - 2rem);
    max-width: 22rem;
    height: auto;
    min-height: 0;
    max-height: 85dvh;
    border-radius: var(--radius-xl);
    margin: auto;
  }

  .modal-confirm__actions {
    flex-direction: row;
  }

  .modal-confirm__actions .btn {
    flex: 1;
    min-height: 2.75rem;
  }
}

.listing-picker__icon--trade {
  background: linear-gradient(135deg, #6b8cff 0%, #4a6fd9 100%);
}

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

  .footer__links {
    justify-content: flex-start;
  }
}

/* Admin */
.admin-page {
  padding: 2.5rem 0 4rem;
  max-width: 56rem;
}

.admin-page__title {
  margin: 0 0 0.35rem;
}

.admin-page__lead {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.admin-login-form {
  max-width: 22rem;
}

.admin-dashboard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.admin-tab {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.admin-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}

.admin-tab--active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent);
}

.admin-panel {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-stat {
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  text-align: center;
}

.admin-stat__n {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.admin-stat__l {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.admin-note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

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

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.admin-subtitle {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

.admin-inbox-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-inbox-item p {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.admin-inbox-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-settings-form {
  max-width: 24rem;
}

.sidebar__link--admin {
  color: var(--accent);
}

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