

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
  align-self: start;
}

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

.sidebar-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.reset-link {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.reset-link:hover {
  text-decoration: underline;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.filter-label svg {
  width: 15px;
  height: 15px;
  color: var(--text-secondary);
}

.filter-group select {
  width: 100%;
  height: 40px;
  padding: 0 30px 0 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-group select:disabled {
  background-color: var(--surface-hover);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.7;
}

.filter-group input[type="text"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent);
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-to {
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.range-group {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  height: 40px;
  overflow: hidden;
}

.filter-group .range-group input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
}

.range-group .range-prefix {
  padding-left: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.range-group .range-sep {
  width: 2px;
  height: 60%;
  background: var(--border-light);
  flex-shrink: 0;
}

.range-group .range-to {
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
  padding: 0 10px;
}

.range-group:has(input:focus) {
  border-color: var(--accent);
}

.year-inputs,
.mileage-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-prefix,
.input-suffix {
  position: relative;
}

.input-prefix span,
.input-suffix span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 13px;
  pointer-events: none;
}

.input-prefix span {
  left: 10px;
}

.input-prefix input {
  padding-left: 22px !important;
}

.input-suffix span {
  right: 10px;
  font-size: 11px;
}

.input-suffix input {
  padding-right: 52px !important;
}

.apply-btn {
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

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

.apply-btn svg {
  width: 16px;
  height: 16px;
}

.content-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.results-count {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mobile-results-header {
  display: none;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-toggle-pill {
  display: none;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: 0.2s;
}

.filter-toggle-pill:hover {
  border-color: var(--text-secondary);
}

.filter-toggle-pill svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--accent);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: 0.2s;
}

.filter-chip:hover {
  border-color: var(--text-secondary);
}

.filter-chip svg {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transition: 0.2s;
}

.filter-chip:hover svg {
  opacity: 1;
}

.filter-chip button {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  opacity: 0.5;
  transition: 0.2s;
}

.filter-chip button:hover {
  opacity: 1;
}

.clear-all {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: 0.2s;
}

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

.toolbar-results {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sidebar-section {
  margin-bottom: 20px;
}

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

.sidebar-section-header h3,
.sidebar-section-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.show-more-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: 0.2s;
}

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

.filter-label:has(svg) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-label svg {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.location-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.location-row input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: 0.2s;
}

.location-row input:focus {
  border-color: var(--accent);
}

.filter-group .radius-select {
  width: auto;
  min-width: 58px;
  height: 40px;
  padding: 0 18px 0 8px;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  outline: none;
  appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

.radius-select:focus {
  border-color: var(--accent);
}

.more-filters {
  margin: 20px 0;
}

.more-filters-toggle,
.more-filters .sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
  transition: 0.2s;
}

.more-filters-toggle svg,
.more-filters .sidebar-section-header svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.more-filters-toggle.is-open svg,
.more-filters .sidebar-section-header.is-open svg {
  transform: rotate(180deg);
}

.more-filters-body {
  display: none;
}

.more-filters-body.is-open {
  display: block;
}

.more-filters-body .filter-group {
  margin-bottom: 16px;
}

.sort-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.sort-dropdown select {
  height: 36px;
  padding: 0 28px 0 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.view-toggle {
  display: flex;
  gap: 4px;
}

.view-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--input-bg);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: 0.2s;
}

.view-toggle-btn.active {
  background: #3a3a3a;
  color: var(--text);
  border-color: #444;
}

[data-theme="light"] .view-toggle-btn.active {
  background: #e5e5e5;
  border-color: #ccc;
  color: #111;
}

.view-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.listings-grid,
.saved-grid,
.seller-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.admin-listings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-media .status-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.badge-new {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 6px;
  z-index: 2;
  pointer-events: none;
}

.badge-demo {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #f4d03f;
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 6px;
  z-index: 2;
  pointer-events: none;
}

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  z-index: 2;
}

.favorite-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.favorite-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.2s;
}

.favorite-btn.is-active {
  color: var(--high);
  border-color: rgba(184, 106, 99, 0.4);
  background: rgba(184, 106, 99, 0.15);
}

.favorite-btn.is-active svg {
  fill: currentColor;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

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

.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-price {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-location {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
}

.chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 6px;
}

.view-btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

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

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  background: var(--high);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-danger:hover {
  background: rgba(201, 122, 114, 0.85);
}

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.profile-listing-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.profile-listing-actions .profile-btn-row > a,
.profile-listing-actions .profile-btn-row > form {
  flex: 0 0 auto;
}

.profile-btn-primary {
  width: 100%;
  justify-content: center;
}

.profile-btn-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
}

.profile-btn-row > a,
.profile-btn-row > form {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

.profile-btn-row > form > button {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  font-size: 13px;
  padding: 0 12px;
  white-space: nowrap;
}

.profile-btn-sold {
  background: rgba(192, 57, 43, 0.08) !important;
  color: #c0392b !important;
  border: 1px solid rgba(192, 57, 43, 0.25) !important;
}

.profile-card-time {
  align-self: center;
}

.card-time {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 64px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.empty-state-icon svg {
  width: 100%;
  height: 100%;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.empty-state-text {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.empty-state-actions {
  margin-top: 20px;
  margin-bottom: 24px;
}

.empty-state-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}

.empty-state-actions .btn:hover {
  background: var(--accent-hover);
}

.empty-state-suggestions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state-suggestions-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.empty-state-suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.empty-state-suggestions-chips .chip {
  text-decoration: none;
}

main.content.has-empty-state .sort-dropdown {
  display: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
}

.pagination-nav,
.page-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}

.pagination-nav:hover,
.page-pill.pagination-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.page-pill.active-page {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  cursor: default;
}

.page-pill.ellipsis {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: default;
  min-width: 24px;
  padding: 0;
}

@media (max-width: 767px) {
  .pagination {
    display: none;
  }
}

.range-slider {
  position: relative;
  height: 24px;
  margin-top: 12px;
}

.range-track {
  position: absolute;
  top: 50%;
  left: 9px;
  right: 9px;
  transform: translateY(-50%);
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  z-index: 1;
}

.range-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  z-index: 2;
  pointer-events: none;
}

.range-input {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0;
  z-index: 3;
}

.range-input::-webkit-slider-runnable-track {
  background: transparent;
  height: 4px;
  border: none;
}

.range-input::-moz-range-track {
  background: transparent;
  height: 4px;
  border: none;
}

.range-input::-webkit-slider-thumb {
  pointer-events: all;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s;
  margin-top: -7px;
}

.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-input::-moz-range-thumb {
  pointer-events: all;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: 6px;
  align-self: stretch;
  height: auto;
  padding: 0 14px;
  border-radius: 0 10px 10px 0;
  border: none;
  border-left: 1px solid var(--border-light);
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s;
}

.filter-toggle-btn:hover {
  background: rgba(255,255,255,0.04);
}

.mobile-filters {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.mobile-filters.is-open {
  display: block;
}

.mobile-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.mobile-filters-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.mobile-filters-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.hide-filters-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.mobile-filters-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mobile-filters-body .filter-group {
  margin-bottom: 0;
}

.mobile-filters-body .more-filters {
  margin: 16px 0 8px;
}

.mobile-filters-body .more-filters-toggle {
  grid-column: 1 / -1;
  margin-top: 0;
}

.mobile-filters-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.auth-overlay.is-open {
  display: flex;
}

.auth-verify-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 16px;
}

.auth-verify-overlay.is-open {
  display: flex;
}

.auth-verify-modal {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  animation: auth-modal-in 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.auth-modal {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  animation: auth-modal-in 0.3s ease;
}

@keyframes auth-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.app-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}
.app-modal-overlay.active {
  display: flex;
}
.app-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  animation: auth-modal-in 0.2s ease;
}
.app-modal-type-info   { border-left: 4px solid var(--accent); }
.app-modal-type-success { border-left: 4px solid #2ecc71; }
.app-modal-type-error  { border-left: 4px solid #e74c3c; }
.app-modal-type-warning { border-left: 4px solid #f39c12; }
.app-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
}
.app-modal-close:hover {
  color: var(--text);
}
.app-modal h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  padding-right: 24px;
}
.app-modal p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.app-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.app-modal-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.app-modal-btn:hover {
  background: var(--surface-hover);
}
.app-modal-btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.app-modal-btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.app-modal-btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-light);
}
.app-modal-btn-secondary:hover {
  background: var(--surface-hover);
}
.app-modal-btn-danger {
  background: rgba(184, 106, 99, 0.15);
  color: #b86a63;
  border-color: rgba(184, 106, 99, 0.3);
}
.app-modal-btn-danger:hover {
  background: rgba(184, 106, 99, 0.25);
  border-color: rgba(184, 106, 99, 0.5);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.auth-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

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

.auth-logo {
  font-size: 24px;
  font-weight: 800;
}

.auth-tabs {
  display: flex;
  position: relative;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

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

.auth-tab.active {
  color: var(--accent);
}

.auth-tab-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transition: left 0.3s ease, width 0.3s ease;
}

.auth-panels {
  position: relative;
  overflow: hidden;
}

.auth-panel {
  display: none;
  animation: auth-panel-in 0.3s ease;
}

.auth-panel.active {
  display: block;
}

@keyframes auth-panel-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
  height: 48px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: var(--accent);
}

.auth-field input::placeholder {
  color: var(--text-secondary);
}

.auth-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.auth-radio-group {
  display: flex;
  gap: 20px;
}

.auth-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.auth-radio input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-forgot {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  align-self: flex-start;
  transition: color 0.2s;
}

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

.auth-submit-btn {
  height: 48px;
  width: 100%;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

.auth-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-switch-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}

.auth-switch-btn:hover {
  text-decoration: underline;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.custom-select-trigger {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

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

.custom-select.open .custom-select-trigger {
  border-color: var(--accent);
}

.custom-select.disabled .custom-select-trigger {
  background-color: var(--surface-hover);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.7;
}

.custom-select:has(.has-error) .custom-select-trigger,
.custom-select.has-error .custom-select-trigger {
  border-color: var(--accent);
}

.custom-select-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-text.placeholder {
  color: var(--text-secondary);
}

.custom-select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.custom-select-chevron svg {
  width: 100%;
  height: 100%;
}

.custom-select.open .custom-select-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}

.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.custom-select-option {
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  transition: background 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.custom-select-option.disabled {
  color: var(--text-secondary);
  cursor: default;
  opacity: 0.6;
}

.custom-select-option:hover:not(.disabled),
.custom-select-option.highlighted {
  background: var(--surface-hover);
}

.custom-select-option.selected {
  background: rgba(192, 57, 43, 0.15);
  font-weight: 500;
}

.custom-select-option.selected:hover:not(.disabled),
.custom-select-option.selected.highlighted {
  background: rgba(192, 57, 43, 0.25);
}

.custom-select-option.selected.disabled {
  background: var(--surface-hover);
  font-weight: normal;
}

[data-theme="light"] .custom-select-option.selected {
  background: rgba(176, 48, 48, 0.08);
}

[data-theme="light"] .custom-select-option.selected:hover:not(.disabled),
[data-theme="light"] .custom-select-option.selected.highlighted {
  background: rgba(176, 48, 48, 0.15);
}

.filter-group .custom-select-trigger {
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  padding: 0 36px 0 12px;
}

.filter-group .custom-select-chevron {
  right: 10px;
  width: 14px;
  height: 14px;
}

.filter-group .custom-select-dropdown {
  border-radius: var(--radius-sm);
}

.filter-group .custom-select-option {
  font-size: 13px;
  padding: 8px 12px;
}

.sort-dropdown .custom-select {
  width: auto;
}

.sort-dropdown .custom-select-trigger {
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  padding: 0 32px 0 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
}

.sort-dropdown .custom-select-chevron {
  right: 10px;
  width: 14px;
  height: 14px;
}

.sort-dropdown .custom-select-dropdown {
  border-radius: var(--radius-sm);
  min-width: 180px;
  left: auto;
  right: 0;
}

.location-row .custom-select {
  width: auto;
  flex-shrink: 0;
}

.location-row .custom-select-trigger {
  width: auto;
  min-width: 58px;
  height: 40px;
  padding: 0 26px 0 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  border: 1px solid var(--border-light);
}

.location-row .custom-select-chevron {
  right: 8px;
  width: 12px;
  height: 12px;
}

.location-row .custom-select-dropdown {
  border-radius: var(--radius-sm);
  min-width: 80px;
}

.custom-select-native {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: none !important;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.settings-form {
  width: 100%;
}

.settings-group {
  margin-bottom: 28px;
}

.settings-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.settings-col {
  flex: 1 1 0;
  min-width: 0;
}

.settings-col.full {
  flex: 1 1 100%;
}

.settings-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.settings-input,
.settings-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

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

.settings-input.is-invalid {
  border-color: var(--high);
}

.phone-error {
  color: var(--high);
  font-size: 13px;
  margin: 6px 0 0;
}

.settings-textarea {
  resize: vertical;
  min-height: 120px;
}

.settings-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.logo-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.logo-upload-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  border-radius: 50%;
}

.profile-rating {
  color: var(--accent);
  font-weight: 600;
}

select option {
  background: var(--surface);
  color: var(--text);
}
select option:checked,
select option:hover,
select option:focus {
  background: var(--accent);
  color: var(--accent-text);
}

.cookie-notice {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 380px;
}

.cookie-notice.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-notice-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-notice-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  flex: 1;
}

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

.cookie-notice-text a:hover {
  text-decoration: underline;
}

.cookie-notice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.cookie-notice-btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.cookie-notice-btn-primary:hover {
  opacity: 0.9;
}

@media (max-width: 767px) {
  .cookie-notice {
    left: 16px;
    right: 16px;
    bottom: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    max-width: none;
  }
}