/* ============================================================
   polish.css — premium "candy" visual layer
   Loaded last. Enhances tokens, background, buttons, forms,
   cards and the queue / admin / detail pages without touching
   the existing layout structure.
   ============================================================ */

:root {
  /* Richer accent palette */
  --grad-ocean: linear-gradient(135deg, #0c4a6e 0%, #0369a1 42%, #0ea5e9 100%);
  --grad-aqua: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 50%, #2563eb 100%);
  --grad-mint: linear-gradient(135deg, #34d399 0%, #10b981 55%, #059669 100%);
  --grad-amber: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ea580c 100%);
  --grad-violet: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 55%, #7c3aed 100%);
  --glow-primary: 0 8px 24px rgba(2, 132, 199, 0.35), 0 2px 6px rgba(2, 132, 199, 0.25);
  --glow-success: 0 8px 24px rgba(5, 150, 105, 0.32), 0 2px 6px rgba(5, 150, 105, 0.22);
  --ring: 0 0 0 4px rgba(14, 165, 233, 0.18);
  --ring-success: 0 0 0 4px rgba(16, 185, 129, 0.18);
  --radius-lg: 26px;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Refined typography rendering ─────────────────────────── */
body {
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { letter-spacing: -0.02em; }

::selection { background: rgba(14, 165, 233, 0.22); color: inherit; }

/* ── Custom scrollbar ─────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: #bae6fd transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #38bdf8, #0ea5e9); background-clip: padding-box; }

/* ── Animated premium background ──────────────────────────── */
body.has-deco {
  background:
    radial-gradient(1200px 600px at 8% -5%, rgba(186, 230, 253, 0.55), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(199, 210, 254, 0.4), transparent 55%),
    radial-gradient(1000px 700px at 50% 120%, rgba(167, 243, 208, 0.4), transparent 60%),
    linear-gradient(180deg, #f3f9ff 0%, #eef6fd 45%, #f4fbff 100%);
  background-attachment: fixed;
}

.page-deco__blob {
  filter: blur(90px);
  opacity: 0.5;
  animation: blobFloat 22s ease-in-out infinite;
  will-change: transform;
}
.page-deco__blob--1 { background: radial-gradient(circle at 30% 30%, #7dd3fc, #38bdf8); animation-delay: 0s; }
.page-deco__blob--2 { background: radial-gradient(circle at 30% 30%, #6ee7b7, #34d399); animation-delay: -7s; }
.page-deco__blob--3 { background: radial-gradient(circle at 30% 30%, #c4b5fd, #a78bfa); animation-delay: -14s; opacity: 0.32; }
@keyframes blobFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(40px, -30px, 0) scale(1.08); }
  66% { transform: translate3d(-30px, 25px, 0) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) {
  .page-deco__blob { animation: none; }
}

/* Subtle dotted texture overlay on top of page */
body.has-deco::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(14, 165, 233, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
}

/* ── Header glassy upgrade ────────────────────────────────── */
.site-header {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(186, 230, 253, 0.6) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6), 0 8px 30px rgba(15, 23, 42, 0.04);
}
.brand__name {
  background: var(--grad-ocean);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand__tag { letter-spacing: 0.01em; }

/* ── Buttons: gradients, glow, shimmer sweep ──────────────── */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s ease, filter 0.2s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,0.45) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn-primary {
  background: var(--grad-aqua);
  box-shadow: var(--glow-primary);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(2, 132, 199, 0.42); filter: saturate(1.08); }
.btn-success {
  background: var(--grad-mint);
  box-shadow: var(--glow-success);
}
.btn-success:hover { box-shadow: 0 12px 30px rgba(5, 150, 105, 0.42); filter: saturate(1.08); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.btn-ghost:hover { border-color: #7dd3fc; color: var(--primary-dark); background: #fff; }
.btn-owner {
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.12);
}
.btn-owner:hover { box-shadow: 0 8px 22px rgba(2, 132, 199, 0.22); }

/* ── Form inputs: focus glow + smooth borders ─────────────── */
input[type="text"],
input[type="tel"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea,
.auth-card input,
.claim-form input,
.queue-dialog input,
.admin-promo-form__field input {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  background: #fff;
}
input:focus,
select:focus,
textarea:focus,
.auth-card input:focus,
.claim-form input:focus,
.queue-dialog input:focus,
.admin-promo-form__field input:focus {
  outline: none;
  border-color: #38bdf8 !important;
  box-shadow: var(--ring);
}
input::placeholder { color: #94a3b8; }

/* ── Card hover polish (homepage / detail) ────────────────── */
.audience-card,
.wash-card,
.faq-item,
.explain-box,
.what-is__inner,
.guide-aside,
.howto-box {
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s ease, border-color 0.2s ease;
}
.audience-card:hover,
.what-is__inner:hover,
.explain-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
  border-color: rgba(125, 211, 252, 0.7);
}
.wash-card:hover { box-shadow: 0 22px 50px rgba(2, 132, 199, 0.16); border-color: rgba(125, 211, 252, 0.7); }
.audience-card__icon {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  transition: transform 0.3s var(--ease-spring);
}
.audience-card:hover .audience-card__icon { transform: scale(1.08) rotate(-4deg); }

/* Gradient accent bar on top of feature cards */
.audience-card { position: relative; overflow: hidden; }
.audience-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-aqua);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.audience-card#card-owners::before { background: var(--grad-mint); }
.audience-card:hover::before { opacity: 1; }

/* ── Hero polish ──────────────────────────────────────────── */
.hero-usp {
  background: var(--grad-ocean) !important;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
}
.hero-usp::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.12) 0, transparent 35%),
    radial-gradient(circle at 82% 78%, rgba(56, 189, 248, 0.25) 0, transparent 40%);
  pointer-events: none;
}
.hero-usp__badge { backdrop-filter: blur(6px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.hero-usp__highlight {
  position: relative;
  background: linear-gradient(120deg, #fde68a, #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.feature-pill { transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease; }
.feature-pill:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1); }
.stat-pill { backdrop-filter: blur(6px); }

/* ── Section headings flourish ────────────────────────────── */
.section-head h2,
.faq-section h2,
.guide-section__head h2 { position: relative; }
.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: var(--grad-aqua);
}

/* ── Live status badge richer ─────────────────────────────── */
.live-status--free {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 2px 8px rgba(5, 150, 105, 0.18);
}
.live-status--busy {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 2px 8px rgba(234, 88, 12, 0.16);
}

/* ── Map frame premium ────────────────────────────────────── */
.map-wrap {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(2, 132, 199, 0.14), 0 2px 0 rgba(255,255,255,0.6) inset;
  border-color: rgba(186, 230, 253, 0.8);
}

/* ── Footer polish ────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(180deg, #ffffff, #f0f7fe);
  border-top: 1px solid rgba(186, 230, 253, 0.7);
}

/* ── Cookie banner refinement ─────────────────────────────── */
.cookie-banner {
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.95), rgba(15, 23, 42, 0.95));
  border-top: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.2);
}

/* ── Auth cards premium ───────────────────────────────────── */
.auth-card, .auth-side {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(14px);
  border-color: rgba(186, 230, 253, 0.8);
}
.auth-card { box-shadow: 0 24px 60px rgba(2, 132, 199, 0.16); }
.auth-card h1 {
  background: var(--grad-ocean);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ============================================================
   QUEUE PAGE — public showcase
   ============================================================ */
.queue-screen-body {
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(ellipse 70% 45% at 100% 105%, rgba(16, 185, 129, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 45% at 0% 100%, rgba(139, 92, 246, 0.1), transparent 55%),
    linear-gradient(180deg, #eef9ff 0%, #e0f2fe 50%, #eef9ff 100%) !important;
}
.queue-screen-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.queue-screen { position: relative; z-index: 1; }

.queue-screen__header {
  border-bottom: none;
  position: relative;
}
.queue-screen__title {
  background: var(--grad-ocean);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.queue-screen__summary {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(186, 230, 253, 0.8);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
}

/* Plate rows: glassy lift */
.queue-list--screen .queue-list__row {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-color: rgba(186, 230, 253, 0.7);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease;
}
.queue-list--screen .queue-list__row:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1); }

/* Realistic plate gets a soft hover */
.ru-plate { transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease; }
.queue-stage__hero .ru-plate:hover { transform: translateY(-3px) scale(1.015); }

/* "Next" plate glow accent */
.ru-plate-slot--next .ru-plate {
  animation: nextGlow 2.6s ease-in-out infinite;
}
@keyframes nextGlow {
  0%, 100% { box-shadow: 0 6px 0 #0f172a, 0 0 0 4px rgba(16, 185, 129, 0.35), 0 20px 48px rgba(5, 150, 105, 0.2), inset 0 1px 0 rgba(255,255,255,0.95); }
  50% { box-shadow: 0 6px 0 #0f172a, 0 0 0 6px rgba(16, 185, 129, 0.5), 0 24px 56px rgba(5, 150, 105, 0.3), inset 0 1px 0 rgba(255,255,255,0.95); }
}
@media (prefers-reduced-motion: reduce) {
  .ru-plate-slot--next .ru-plate { animation: none; }
}

/* Free display sparkle ring */
.queue-free-display__icon { position: relative; }
.queue-free-display__icon::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed rgba(5, 150, 105, 0.35);
  animation: spinSlow 12s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .queue-free-display__icon::after { animation: none; } }

/* Footer join button extra pop */
.queue-screen__footer .btn-lg {
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.4);
}

/* ============================================================
   WASH ADMIN PANEL
   ============================================================ */
.admin-bar {
  background: var(--grad-ocean) !important;
  box-shadow: 0 6px 24px rgba(12, 74, 110, 0.3);
}
.admin-bar__badge {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
}

.admin-promo-panel {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-color: rgba(186, 230, 253, 0.9);
  box-shadow: 0 16px 44px rgba(14, 165, 233, 0.12);
  position: relative;
  overflow: hidden;
}
.admin-promo-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-amber);
}
.admin-promo-form__title {
  background: var(--grad-amber);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Floating action buttons */
.admin-fab--add {
  background: var(--grad-aqua) !important;
  box-shadow: 0 12px 32px rgba(2, 132, 199, 0.45);
}
.admin-fab--add::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45);
  animation: fabPulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes fabPulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
  70% { box-shadow: 0 0 0 16px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}
@media (prefers-reduced-motion: reduce) { .admin-fab--add::after { animation: none; } }

/* QR dialog premium */
.admin-qr-dialog__stage {
  background: linear-gradient(165deg, #ffffff 0%, #e0f2fe 100%);
  box-shadow: 0 32px 80px rgba(12, 74, 110, 0.35);
}
.admin-qr-dialog__title {
  background: var(--grad-ocean);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ============================================================
   CARWASH DETAIL PAGE
   ============================================================ */
.wash-hero {
  background: var(--grad-ocean);
  box-shadow: 0 20px 50px rgba(2, 132, 199, 0.2);
}
.wash-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 85% 15%, rgba(56,189,248,0.3), transparent 45%);
}
.detail-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-color: rgba(186, 230, 253, 0.8);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}
.detail-content h1 {
  background: var(--grad-ocean);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.detail-facts > div {
  padding: 0.6rem 0.75rem;
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
  border: 1px solid rgba(186, 230, 253, 0.6);
  border-radius: 12px;
}
.badge-vip {
  background: var(--grad-amber);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}
.badge-queue {
  background: var(--grad-aqua);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* Queue panel on detail = hero block */
.queue-panel {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(125, 211, 252, 0.7) !important;
  box-shadow: 0 18px 50px rgba(2, 132, 199, 0.14);
  position: relative;
  overflow: hidden;
}
.queue-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-aqua);
}
.queue-list li {
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
  border: 1px solid rgba(186, 230, 253, 0.6);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}
.queue-list li:hover { transform: translateX(3px); box-shadow: 0 6px 18px rgba(2, 132, 199, 0.1); }

/* Wash tools sidebar */
.wash-tools__card {
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(186, 230, 253, 0.7);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.tool-btn { transition: transform 0.18s var(--ease-spring), background 0.18s ease, border-color 0.18s ease; }
.tool-btn:hover { transform: translateY(-1px); }

/* ── Dialogs: smooth entrance + premium backdrop ──────────── */
dialog[open] { animation: dialogIn 0.28s var(--ease-spring); }
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
dialog::backdrop {
  background: rgba(8, 47, 73, 0.45);
  backdrop-filter: blur(4px);
}
.queue-dialog {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(12, 74, 110, 0.3);
}
.queue-dialog h3 {
  background: var(--grad-ocean);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Driver rules card warmer */
.driver-rules {
  background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
  border-color: #fcd34d !important;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.12);
}

/* ── Reveal-on-scroll friendly (no JS needed) micro-anim ──── */
@media (prefers-reduced-motion: no-preference) {
  .audience-card, .wash-card, .faq-item {
    animation: fadeUp 0.5s ease both;
  }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
