/* AvaliCar crest: deep black, rich gold and restrained brand red. */
:root {
  --bg: #eef0f3;
  --surface: #ffffff;
  --ink: #17181c;
  --muted: #5d626c;
  --line: #dce0e6;
  --gold: #d8a52f;
  --gold-2: #ffe29a;
  --black: #090a0c;
  --brand-red: #c8202c;
  --gold-ink: #79530b;
  --radius-card: 22px;
  --radius-control: 14px;
  --shadow: 0 8px 26px #0b0d1310;
}

body, .main { background: var(--bg); }
.sidebar { background: var(--black); border-right: 1px solid #d8a52f45; }
.sidebar .brand { border-bottom-color: #d8a52f40; }
.sidebar .brand img { border-radius: 16px; }
.sidebar-footer { border-top-color: #d8a52f40; }
.sidebar select { background: #191a1e; border-color: #54504a; border-radius: 12px; color: #fff; }
.sidebar .profile small { color: #b5b7bf; }
.nav-item { border-radius: var(--radius-control); color: #c5c6cd; }
.nav-item:hover { background: #25262b; color: #fff; }
.nav-item.active {
  background: linear-gradient(115deg, #ffe298, #d8a52f);
  color: #191309;
  box-shadow: inset 4px 0 0 var(--brand-red), 0 4px 16px #d8a52f18;
}
.nav-count { background: #151619; color: #ffe29a; }
.topbar, .dealer-mode .topbar {
  background: #090a0c;
  border-bottom: 1px solid #d8a52f55;
}
.topbar .secondary, .topbar .icon-btn {
  background: #202126;
  border-color: #d8a52f70;
  color: #ffe29a;
}
.topbar .secondary:hover, .topbar .icon-btn:hover { background: #303138; }
.mobile-brand { color: #ffe29a; }
.dealer-nav { background: #111216; border-bottom: 3px solid var(--gold); gap: 8px; }
.dealer-nav a { border-radius: var(--radius-control); color: #dddfe4; }
.dealer-nav a span { color: #f0c666; }
.dealer-nav a:hover { background: #292a30; color: #fff; }
.dealer-nav a.active, .dealer-nav a[aria-current=page] {
  background: linear-gradient(120deg, #ffe29a, #d8a52f);
  color: #181208;
  box-shadow: inset 0 -3px 0 var(--brand-red);
}
.dealer-nav a.active span, .dealer-nav a[aria-current=page] span { color: inherit; }

.page-head h1, .vehicle-body h3, .detail-header h2 { color: var(--ink); }
.page-head p, .vehicle-body > p { color: var(--muted); }
.eyebrow.gold { color: var(--gold-ink); font-size: 12px; }
.primary, .secondary, .icon-btn, .chip, .filter-clear,
.seller-decision-buttons button, .logo-edit, .catalog-filter-toggle {
  border-radius: var(--radius-control);
}
.primary {
  background: linear-gradient(115deg, #ffe29a 0%, #e7b846 55%, #d49b25 100%);
  border-color: #bd881c;
  color: #201706;
  min-height: 44px;
  box-shadow: 0 4px 12px #b37c1426;
}
.primary:hover { filter: brightness(1.04); transform: none; box-shadow: 0 6px 18px #b37c1433; }
.secondary { border-color: #b9bec8; color: #272b33; min-height: 44px; }
.secondary:hover { background: #f4f5f7; border-color: #9d741b; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #9c6b0b;
  outline-offset: 3px;
}
.sidebar button:focus-visible, .dealer-nav a:focus-visible, .topbar button:focus-visible {
  outline-color: #ffe29a;
}
input:not([type=checkbox]):not([type=radio]), select, textarea {
  border-radius: 12px;
  accent-color: var(--gold);
}
input[type=checkbox], input[type=radio] { accent-color: #a67815; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #9c6b0b;
  outline-offset: 2px;
}
.text-button, .auth-back, .filter-clear, .link-btn { color: var(--gold-ink); }
.filters-card, .vehicle-card, .advertiser-card, .advertiser-stock,
.dealer-mode .catalog-filter-rail, .auction-panel, .auction-list-card,
.table-card, .form-card, .chart-card, .ranking-card, .activity-card,
.publish-card, .company-card, .approval-card, .approval-summary article,
.stats-row article, .unavailable-favorite {
  border-radius: var(--radius-card);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.filters-card { padding: 16px; }
.form-card, .publish-card, .company-card { border-top: 3px solid var(--gold); }
.stock-pill { background: #121318; border-radius: 18px; border: 1px solid #a37820; }
.stock-pill span { color: #ffe29a; }
.stock-pill small { color: #d4d5dc; }
.section-title > span { border-radius: 12px; background: #111216; color: #ffe29a; }
.stats-row article > strong { color: #17181c; }
.table-toolbar, .card-head { background: #f8f9fb; }
th { background: #f1f3f6; color: #505662; }
.company-identity { background: #f7f8fa; }
.company-monogram { background: #17181c; border-color: #bb8723; color: #ffe29a; }
.advertiser-card:hover, .vehicle-card:hover {
  border-color: #bc8825;
  box-shadow: 0 10px 28px #11131b1c;
  transform: none;
}
.advertiser-card { border-bottom: 3px solid var(--gold); }
.advertiser-card .favorite-button, .vehicle-card .favorite-button {
  border-radius: 12px;
  color: #805611;
  background: #ffffffed;
}
.advertiser-card .favorite-button.is-saved, .vehicle-card .favorite-button.is-saved {
  background: #ffe29a;
  border-color: #9d6e13;
  color: #4f3306;
}
.favorite-tabs .active { background: #15161b; color: #ffe29a; border-color: #b58521; }

/* Keep every card action on its own row, even with long model names. */
.vehicle-card { min-width: 0; }
.vehicle-card .vehicle-visual { border-radius: 21px 21px 0 0; }
.vehicle-card .vehicle-visual > img { border-radius: 21px 21px 0 0; }
.vehicle-card .vehicle-body { padding: 14px; gap: 6px; min-width: 0; }
.vehicle-card .vehicle-body h3 { font-size: 17px; line-height: 1.4; }
.vehicle-card .vehicle-body > p, .vehicle-card .vehicle-body > small,
.vehicle-card .vehicle-body .inspection { font-size: 13px; }
.vehicle-card .specs span { background: #f0f2f5; color: #4d535e; border-radius: 8px; }
.vehicle-card .auction-card-status {
  background: #15161b;
  border: 1px solid #b181244d;
  border-radius: 14px;
  padding: 11px;
  grid-template-columns: minmax(0, 1fr);
}
.vehicle-card .auction-card-status > span { color: #ffe29a; }
.vehicle-card .auction-card-status > strong { color: #fff; font-size: 19px; white-space: normal; overflow-wrap: anywhere; }
.vehicle-card .auction-card-status > small, .vehicle-card [data-auction-clock] { color: #ffe29a; }
.vehicle-card .price-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.vehicle-card .price-row > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.vehicle-card .price-row small { font-size: 13px; color: #5d626c; }
.vehicle-card .price-row strong { font-size: 20px; color: #17181c; white-space: normal; overflow-wrap: anywhere; }
.vehicle-card .detail-btn {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 12px;
  margin: 0;
  border: 1px solid #bd881c;
  border-radius: var(--radius-control);
  background: linear-gradient(115deg, #ffe29a, #d8a52f);
  color: #201706;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.vehicle-card .listing-card-actions { flex-wrap: wrap; }

.auction-panel-head { background: #101115; border: 1px solid #aa7b21; border-radius: 16px; }
.auction-panel-head small { color: #f7d38a; font-size: 12px; }
.auction-panel-head strong { color: #ffe29a; white-space: normal; overflow-wrap: anywhere; }
.auction-clock-box strong { color: #865906; }
.auction-panel p, .auction-panel label, .auction-panel small { font-size: 14px; }
.bid-steps { flex-wrap: wrap; }
.bid-steps button { min-height: 42px; border-radius: 12px; background: #fff3cf; border-color: #b98928; color: #624108; font-size: 14px; }
.auction-step-choice .bid-steps span { border-radius: 12px; }
.auction-step-choice .bid-steps input:checked + span { background: #d8a52f; color: #201706; }
.auction-step-choice .bid-steps input:focus-visible + span { outline: 3px solid #9c6b0b; outline-offset: 2px; }
.auction-permission, .seller-box, .shared-note { border-radius: 14px; }
.buy-now-box .secondary {
  background: #11693e;
  color: #fff;
  border-color: #0b5a33;
  font-size: 16px;
  font-weight: 800;
}
.buy-now-box .secondary:hover { background: #0d5833; }
.buy-now-box .secondary:disabled { opacity: .5; }
.offer-panel { border-radius: 24px; }
#vehicleModal .modal-panel { border-radius: 24px 0 0 24px; }
.hero-photo { border-radius: 18px; }
.detail-facts .detail-list > div { background: #f2f4f7; padding: 12px; border-radius: 12px; }
.detail-facts .detail-list > div.fipe-highlight { background: #fff0c2; border-color: #b17a13; border-radius: 14px; padding: 12px; gap: 5px; }
/* Keep the complete FIPE amount aligned with the other vehicle facts. */
.detail-facts .fipe-highlight > strong {
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  font-variant-numeric: tabular-nums;
}
.detail-list span, .seller-box small { font-size: 12px; }
.detail-notes p, .detail-conditions p { color: #545b66; font-size: 14px; }

/* Preserve semantic green/yellow/red for reports and decisions. */
.status.green { background: #e4f4ea; color: #155c36; }
.status.amber { background: #ffedba; color: #734707; }
.status.offer-rejected-alert, #auctionPosition.offer-rejected-alert { background: #b81e2c; color: #fff; border-color: #b81e2c; }
.seller-decision-buttons .seller-reject { background: var(--brand-red); color: #fff; }
.toast { border-color: #aa7b21; border-radius: 18px; }

.auth-gate > .auth-card {
  background: #111216;
  border: 1px solid #d8a52f;
  border-top: 4px solid #f1c861;
  border-radius: 28px;
  box-shadow: 0 24px 70px #0009;
  color: #f7f7fa;
}
.auth-card h1 { color: #fff; }
.auth-card > p, .auth-card label, .auth-card .pending-labels { color: #d4d6dd; }
.auth-card .eyebrow.gold, .auth-card .text-button, .auth-card .auth-back { color: #ffe29a; }
.auth-card input, .auth-card select { background: #212228; border-color: #5a5c66; color: #fff; border-radius: 14px; }
.auth-card input::placeholder { color: #b1b4bf; }
.auth-card input:focus, .auth-card select:focus { border-color: #f1c861; outline: 2px solid #f1c861; }
.auth-card .security-note, .auth-card .auth-divider { color: #bfc2cc; }
.auth-card .auth-divider::before, .auth-card .auth-divider::after { background: #555761; }
.auth-card .secondary { background: #292a31; color: #ffe29a; border-color: #997627; }
.auth-card .secondary:hover { background: #35363e; }
.auth-card .password-toggle { color: #ffe29a; border-radius: 12px; }
.auth-card .password-toggle:hover { background: #ffe29a18; }
.auth-card button:focus-visible, .auth-card a:focus-visible { outline-color: #ffe29a; }

@media (max-width: 820px) {
  .sidebar { border-top: 2px solid var(--gold); border-right: 0; }
  .sidebar .nav-item { border-radius: 12px; }
  .auth-gate > .auth-card { padding: 28px 22px; border-radius: 24px; }
  .dealer-nav { gap: 6px; }
}
@media (max-width: 600px) {
  .vehicle-card, .advertiser-card, .form-card, .auction-panel { border-radius: 20px; }
  .auth-options { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
  .auth-options .text-button { text-align: left; }
  #vehicleModal .modal-panel { border-radius: 20px 0 0 20px; }
}
