/* ========== RESET ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== ZMIENNE KOLORÓW ========== */
:root {
  /* Light */
  --color-bg: #ffffff;
  --color-bg-alt: #f3f4f6;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;

  --color-primary: #1d4ed8;
  --color-primary-soft: #eff6ff;
  --color-accent: #22d3ee;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);

  --radius-card: 1rem;
  --radius-full: 999px;

  --transition-fast: 0.18s ease-out;
  --transition-normal: 0.25s ease-out;
}

/* Dark theme overrides */
body.theme-dark {
  --color-bg: #020617;
  --color-bg-alt: #020617;
  --color-surface: #030712;
  --color-text: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-border: #1f2937;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.75);
}

/* ========== GLOBALNE ========== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* Kontener */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Sekcje */
section {
  padding: 4rem 0;
}

.alt-section {
  background-color: var(--color-bg-alt);
}

/* ========== PRZYCISKI ========== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.primary-button {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.primary-button:hover {
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.secondary-button {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.secondary-button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.full-width {
  width: 100%;
}

/* „Lekki” przycisk tekstowy pod logowaniem */
.ghost-button {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
  box-shadow: none;
  font-weight: 500;
}

.ghost-button:hover {
  color: var(--color-primary);
  text-decoration: underline;
  transform: translateY(0);          /* brak skoku w górę */
  box-shadow: none;
}

/* w dark mode trochę jaśniejszy tekst */
body.theme-dark .ghost-button {
  color: #e5e7eb;
}
body.theme-dark .ghost-button:hover {
  color: var(--color-accent);
}

/* Ukrywa brzydki natywny input pliku */
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Rząd: przycisk + nazwa pliku */
.file-upload-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.file-input-label {
  cursor: pointer;
  white-space: nowrap;
  padding-inline: 0.9rem;
  font-size: 0.87rem;
}

/* Tekst z nazwą pliku */
.file-name {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Kontener na podgląd */
.image-preview-wrapper {
  margin-top: 0.5rem;
}

/* Wspólny styl podglądu */
.image-preview {
  display: block;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

/* Avatar – małe kółko */
.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 999px;
}

/* Auto – prostokąt */
.car-preview {
  width: 120px;
  height: 80px;
  border-radius: 14px;
}

/* ========== HEADER ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

body.theme-dark .header {
  background-color: rgba(2, 6, 23, 0.92);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

/* Logo */

.logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Nawigacja desktop */
.nav-menu {
  display: none;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

.nav-menu a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-text-muted);
  position: relative;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width var(--transition-fast);
}

.nav-menu a:hover::after {
  width: 100%;
}

/* Przełącznik motywu */
.theme-toggle {
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Hamburger */
.menu-toggle {
  border: none;
  background: none;
  font-size: 1.35rem;
  cursor: pointer;
  margin-left: 0.75rem;
}

/* Mobilne menu */
.nav-menu-mobile {
  display: none;
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-bg);
}

.nav-menu-mobile ul {
  list-style: none;
}

.nav-menu-mobile li {
  border-top: 1px solid var(--color-border);
}

.nav-menu-mobile a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
}

.nav-menu-mobile a:hover {
  background-color: rgba(148, 163, 184, 0.15);
}

/* === HERO === /*

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  color: #ffffff;
  overflow: hidden;

  /* Tło hero */
  background-color: #000000;
  background-image: url("../images/divu-hero-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Delikatne przyciemnienie tła */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.45),
    rgba(0,0,0,0)
  );
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.75),
      rgba(0,0,0,0.4) 40%,
      rgba(0,0,0,0.85)
    ),
    radial-gradient(circle at 50% 35%,
      rgba(0,0,0,0.5),
      transparent 60%
    );
}

/* Layout hero */
.hero-container {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 4rem;
  z-index: 1;
}

/* Teksty */
.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 2.2rem;
  line-height: 1.18;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.hero-content h1 span {
  background: linear-gradient(90deg, #38bdf8, #22d3ee, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 1.02rem;
  color: #e5e7eb;
  margin-bottom: 1.5rem;
}

/* Tło za tekstem (dla lepszej czytelności) */
.hero-content::before {
  content: "";
  position: absolute;
  inset: -12px -24px -20px -12px;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(0,0,0,0.9) 0,
    rgba(0,0,0,0.6) 40%,
    transparent 75%
  );
  pointer-events: none;
  z-index: -1;
}

/* Przyciski */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero .secondary-button {
  color: #e5e7eb;
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(4px);
}

.hero .secondary-button:hover {
  border-color: #3b82f6;
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* === URUCHOM DIVU — PREMIUM GLOW BUTTON === */

.hero-buttons .primary-button,
.hero-buttons .hero-cta-primary,
.hero-buttons .button.primary-button {
  padding: 0.85rem 2.2rem;
  border-radius: 999px;

  /* ciemne szkło */
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);

  /* delikatna niebieska obwódka */
  border: 1px solid rgba(56, 189, 248, 0.35);

  /* tekst w kolorze Move Divu */
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(90deg, #38bdf8, #22d3ee, #6366f1);

  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;

  /* Poświata */  
  box-shadow:
    0 0 12px rgba(56,189,248,0.28),
    0 0 26px rgba(56,189,248,0.20);
  transition: 0.25s ease;
  animation: divuGlowPulse 3s ease-in-out infinite;

}

.hero-buttons .primary-button:hover,
.hero-buttons .hero-cta-primary:hover,
.hero-buttons .button.primary-button:hover {
  animation: none;
  box-shadow:
    0 0 22px rgba(56,189,248,0.55),
    0 0 45px rgba(56,189,248,0.35);
  border-color: rgba(56, 189, 248, 0.55);
  transform: translateY(-1px);
}


/* Tagi */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #d1d5db;
}

.hero-badges span {
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.35rem 0.7rem;
  backdrop-filter: blur(8px);
  background-color: rgba(15, 23, 42, 0.5);
}

/* --- HERO CARD nowy styl --- */

.hero-card {
  position: relative;
  padding: 1.6rem 1.8rem;
  border-radius: 1.2rem;

  /* Soft blur jak pod lewym tekstem */
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);

  /* Subtelny cień + glow */
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.45),          /* główny cień */
    0 0 22px rgba(59, 130, 246, 0.20);         /* NIEBIESKI GLOW 20% */

  border: none;

  opacity: 0;
  transform: translateY(14px) scale(0.98);
  animation: heroCardIn 0.7s ease-out 0.4s forwards;
}

/* zero gradientów, zero bajerów */
.hero-card::before {
  content: none;
}

/* Label "Przykładowy kurs" też trochę rozświetlimy */
.hero-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #cbd5e1;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.hero-card h2 {
  font-size: 1.22rem;
  margin: 0 0 0.4rem;
  color: #fff;
}

.hero-card-meta {
  color: #d1d5db;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.hero-card-driver {
  color: #9ca3af;
  font-size: 0.92rem;
}

.hero-card-driver span,
.hero-card-rating {
  color: #fbbf24;
}

/* ========== SEKCJE TEKSTOWE ========== */
.about-container,
.how-container,
.features-container,
.cta-container {
  text-align: center;
}

.about-container h2,
.how-container h2,
.features-container h2,
.cta-container h2 {
  font-size: 1.7rem;
  margin-bottom: 1.2rem;
}

.about-container p,
.cta-container p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--color-text-muted);
}

.about-container p {
  max-width: 720px;
  margin: 0 auto 1.2rem;
  line-height: 1.7;
  opacity: 0.85;
}

.about-lead {
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 1;
}

.about-strong {
  margin-top: 1.6rem;
  font-weight: 600;
  opacity: 1;
}

/* Jak działa */
.steps {
  list-style: none;
  text-align: left;
  margin-top: 1.75rem;
  display: grid;
  gap: 1.5rem;
}

.steps li {
  padding: 1.1rem 1rem;
  border-radius: 0.9rem;
  background-color: var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.steps h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.steps p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Zalety */
.features-list {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.feature {
  text-align: left;
  padding: 1.3rem 1.2rem;
  border-radius: 1rem;
  background-color: var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(37, 99, 235, 0.45);
}

.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.feature p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* CTA */
.cta {
  text-align: center;
}

.cta-container p {
  margin: 0.75rem auto 1.75rem;
}

/* ===== DIVU SOCIALS ===== */

.divu-socials {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.divu-socials h3 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.divu-socials p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.4rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-icons a {
  width: 52px;
  height: 52px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);

  border: 1.6px solid rgba(56, 189, 248, 0.55);

  box-shadow:
    0 0 14px rgba(56,189,248,0.25),
    0 0 28px rgba(56,189,248,0.18);

  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.social-icons a:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 22px rgba(56,189,248,0.45),
    0 0 40px rgba(56,189,248,0.35);
}

/* same obrazki */
.social-icons img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(1.05);
}

/* ========== APP ========== */
.app {
  background: radial-gradient(circle at top, rgba(226, 232, 240, 0.6), transparent 60%);
}

body.theme-dark .app {
  background: radial-gradient(circle at top, rgba(30, 64, 175, 0.35), transparent 60%);
}

.app-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.app-header h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.app-header p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--color-text-muted);
}

/* Karta / card */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  overflow: visible;
}

/* App shell – mobile: kolumnowo */
.app-shell {
  display: grid;
  gap: 1.25rem;
}

/* Pola */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
}

.field span {
  font-weight: 500;
}

.field input,
.field select {
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.field input:focus,
.field select:focus {
  border-color: rgba(37, 99, 235, 0.75);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.field textarea {
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.field textarea:focus {
  border-color: rgba(37, 99, 235, 0.75);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 8px;
}

.field-error {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #b42318;
}

.field-hint {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.is-invalid {
  border-color: #f04438 !important;
  box-shadow: 0 0 0 1px rgba(240, 68, 56, 0.25) !important;
}

.route-summary {
  margin-top: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.8rem;
  background-color: var(--color-primary-soft);
  font-size: 0.85rem;
}

.route-summary p {
  margin-bottom: 0.15rem;
}

.route-summary small {
  display: block;
  margin-top: 0.3rem;
  color: var(--color-text-muted);
}

/* Lista kierowców */
.drivers-panel{
  display: flex;
  flex-direction: column;
  max-height: clamp(620px, 72vh, 560px);
  overflow: hidden;
  margin-top: 20px;
}

/* WAŻNE: pozwala dziecku scrollować we flexie */
.drivers-list{
  flex: 1;
  min-height: 0;     
  overflow-y: auto;  
}

/* Okrągły przycisk odświeżania */
.refresh-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;

  border: 1.5px solid #00c4ff;      
  background: transparent;          

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 0 12px rgba(0, 196, 255, 0.28),
    0 0 22px rgba(0, 196, 255, 0.20);

  backdrop-filter: blur(6px);
  transition: 0.25s ease;
}

/* domyślnie (dark mode) */
.refresh-icon-btn::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 30%,
    #0b1220 0%,
    #020617 70%
  );
  z-index: 1;
}

/* LIGHT MODE – jasny, chłodny, nie biały, nie czarny */
body:not(.theme-dark) .refresh-icon-btn::before {
  background: radial-gradient(
    circle at 30% 30%,
    #ffffff 0%,
    #ffffff 45%,
    #ffffff 100%
  );
}

/* większa ikonka */
.refresh-icon-symbol {
  position: relative;
  z-index: 2;
  font-size: 1.2rem;
  font-weight: 600;
  color: #00c4ff;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(0, 196, 255, 0.35);
}

/* hover */
.refresh-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 18px rgba(0, 196, 255, 0.55),
    0 0 28px rgba(0, 196, 255, 0.35);
}

/* active */
.refresh-icon-btn:active {
  transform: scale(0.95);
}

/* animacja obrotu */
@keyframes spin-refresh {
  to {
    transform: rotate(360deg);
  }
}
.refresh-icon-btn.is-rotating .refresh-icon-symbol {
  animation: spin-refresh 0.6s linear infinite;
}

/* ciemny tryb — też bez czarnego środka */
body.theme-dark .refresh-icon-btn {
  background: transparent;
}

.drivers-count {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.drivers-list {
  margin-top: 0.25rem;
  overflow-y: auto;
  padding-right: 0.35rem;
  display: grid;
  gap: 0.75rem;
}

/* Karta kierowcy */
.driver-card {
  display: grid;
  grid-template-columns: auto 1fr auto; /* avatar | treść | auto */
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem;
  border-radius: 0.9rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.driver-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.75);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.driver-card.active {
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.18), transparent 70%), var(--color-bg);
}

.driver-car-thumb {
  width: 82px;
  height: 56px;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-alt);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.driver-car-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.driver-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(56, 189, 248, 0.85);
}

.driver-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.driver-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3rem;
}

.driver-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.driver-rating {
  font-size: 0.75rem;
  color: #fbbf24;
}

.driver-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.driver-price {
  font-size: 0.85rem;
  font-weight: 500;
}

.driver-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.driver-tag {
  font-size: 0.7rem;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-alt);
  color: var(--color-text-muted);
}

/* ==== Styl nagłówka pola (Status dostępności) */
.status-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0.55rem 0 0.35rem 0;
  position: relative;
  display: inline-block;
  letter-spacing: -0.2px;
}

.status-label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: 115%;
  height: 160%;

  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.20) 0%,
    rgba(56, 189, 248, 0.07) 45%,
    rgba(56, 189, 248, 0) 80%
  );
  filter: blur(12px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

.status-label:hover::after {
  opacity: 0.85;
}

@keyframes softGlowGreen {
  0%   { box-shadow: 0 0 4px rgba(34,197,94,0.25); }
  50%  { box-shadow: 0 0 9px rgba(34,197,94,0.40); }
  100% { box-shadow: 0 0 4px rgba(34,197,94,0.25); }
}

@keyframes softGlowRed {
  0%   { box-shadow: 0 0 4px rgba(239,68,68,0.25); }
  50%  { box-shadow: 0 0 9px rgba(239,68,68,0.40); }
  100% { box-shadow: 0 0 4px rgba(239,68,68,0.25); }
}

.driver-status-helper {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.22rem 0.8rem;
  border-radius: 999px;

  backdrop-filter: blur(5px);
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(148,163,184,0.35);

  font-size: 0.85rem;
  font-weight: 600;

  /* gradient Move DIVU */
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(90deg, #38bdf8, #22d3ee, #6366f1);

  margin-top: 0.15rem;
}

/* Zielony/czerwony glow zależnie od statusu */
.driver-status-helper.online {
  animation: softGlowGreen 2.6s ease-in-out infinite;
}

.driver-status-helper.offline {
  animation: softGlowRed 2.6s ease-in-out infinite;
}

/* kontener tylko dla tego jednego pola */
.field-status .status-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap; /* żeby na mniejszych ekranach mogło się złamać */
}

/* label przy statusie – bez dużego marginesu w dół */
.field-status .status-label {
  margin: 0;
}

/* Przycisk "Zaktualizuj lokalizację" – jak główny CTA */

.driver-location-save-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;

  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: none;
  outline: none;
  cursor: pointer;

  font-size: 0.95rem;
  font-weight: 600;

  background: linear-gradient(90deg, #00b4ff, #007bff);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 180, 255, 0.35);

  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease,
    transform 0.15s ease;
}

.driver-location-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 180, 255, 0.45);
}

.driver-location-save-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 180, 255, 0.25);
  opacity: 0.96;
}

body.theme-dark .driver-location-save-btn {
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}

/* ===== DIVU DRIVE MODE ===== */

/* ===== DIVU Drive Mode – szkło + niebieska obwódka + lekki glow ===== */

/* ===== DIVU Drive Mode – szkło + subtelna niebieska obwódka ===== */

.driver-drive-mode-section {
  position: relative;
  text-align: center;
  margin: 2rem 0 2rem;

  padding: 1.8rem 1.4rem;
  border-radius: 1.4rem;

  /* szkło – półprzezroczyste, ale BEZ kolorów */
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  /* subtelna niebieska obwódka */
  border: 1.8px solid rgba(0, 180, 255, 0.55);

  /* delikatny glow DIVU */
  box-shadow:
    0 0 22px rgba(0, 180, 255, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.06);

  /* bardzo delikatna animacja „oddychania” */
  animation: driveModeSoftGlow 5s ease-in-out infinite alternate;
}

/* animacja glow – bardzo subtelna */
@keyframes driveModeSoftGlow {
  0% {
    box-shadow:
      0 0 16px rgba(0, 180, 255, 0.20),
      0 6px 14px rgba(0, 0, 0, 0.04);
  }
  100% {
    box-shadow:
      0 0 26px rgba(0, 180, 255, 0.32),
      0 10px 20px rgba(0, 0, 0, 0.06);
  }
}

/* tytuł */
.driver-drive-mode-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

/* podtytuł */
.driver-drive-mode-subtitle {
  font-size: 0.96rem;
  color: #4b5563;
}

/* ===== Tryb ciemny ===== */

body.theme-dark .driver-drive-mode-section {
  background: rgba(15, 23, 42, 0.45);           /* ciemne mleczne szkło */
  border-color: rgba(56, 189, 248, 0.55);       /* neonowy turkus */

  box-shadow:
    0 0 32px rgba(56, 189, 248, 0.42),
    0 14px 28px rgba(0, 0, 0, 0.55);
}

body.theme-dark .driver-drive-mode-title {
  color: #e5e7eb;
}

body.theme-dark .driver-drive-mode-subtitle {
  color: #9ca3af;
}

/* ===== DIVU Warning Box ===== */
.driver-email-warning {
  display: none; /* kontrolowane JS-em */
  
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  border-radius: 1rem;

  /* szkło – jasne */
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  /* niebieska obwódka */
  border: 1.6px solid rgba(0, 180, 255, 0.55);

  /* delikatny glow */
  box-shadow:
    0 0 14px rgba(0, 180, 255, 0.22),
    0 6px 14px rgba(0, 0, 0, 0.04);

  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.4rem;
}

/* przycisk "wyślij ponownie" */
.driver-email-warning .link-button-inline {
  color: #0077b6;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* Tryb ciemny */
body.theme-dark .driver-email-warning {
  background: rgba(15, 23, 42, 0.45); /* ciemne szkło */
  border-color: rgba(56, 189, 248, 0.55); /* neonowy turkus */

  box-shadow:
    0 0 26px rgba(56, 189, 248, 0.42),
    0 12px 24px rgba(0, 0, 0, 0.55);

  color: #e5e7eb; /* jasny tekst */
}

body.theme-dark .driver-email-warning .link-button-inline {
  color: #7dd3fc; /* turkusowy akcent */
}

/* Animacje warning */
.driver-email-warning.animate {
  animation: emailWarningPulse 5s ease-in-out infinite alternate;
}

@keyframes emailWarningPulse {
  0% {
    box-shadow:
      0 0 10px rgba(0, 180, 255, 0.18),
      0 4px 10px rgba(0, 0, 0, 0.03);
  }
  100% {
    box-shadow:
      0 0 18px rgba(0, 180, 255, 0.28),
      0 6px 14px rgba(0, 0, 0, 0.05);
  }
}

/* Dark mode – mocniejszy puls, ale nadal subtelny */
body.theme-dark .driver-email-warning.animate {
  animation: emailWarningPulseDark 5s ease-in-out infinite alternate;
}

@keyframes emailWarningPulseDark {
  0% {
    box-shadow:
      0 0 22px rgba(56, 189, 248, 0.32),
      0 8px 18px rgba(0, 0, 0, 0.45);
  }
  100% {
    box-shadow:
      0 0 30px rgba(56, 189, 248, 0.45),
      0 12px 22px rgba(0, 0, 0, 0.55);
  }
}

/* ===== DIVU disclaimer (informacja o roli platformy) ===== */
.divu-disclaimer{
  margin-top: 10px;
  padding: 8px 12px;

  font-size: 0.8rem;       /* mniejsze niż normalny tekst */
  line-height: 1.45;
  color: rgba(100, 116, 139, 0.9);

  background: transparent; /* brak „ramki alarmowej” */
}

.divu-disclaimer strong{
  font-weight: 600;
  color: var(--color-text);
}

/* ===== Leaflet map card polish ===== */

.map-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

/* #map ma rosnąć w karcie */
#map {
  width: 100%;
  flex: 1 1 auto;          /* <-- KLUCZ: wypełnia wolne miejsce w .map-panel */
  min-height: 280px;       /* mobile zabezpieczenie */
  border-radius: 0.95rem;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Desktop: podnieś tylko minimum, NIE ustawiaj height */
@media (min-width: 768px) {
  #map {
    min-height: 360px;
  }
}

/* Leaflet container musi wypełniać #map */
#map .leaflet-container {
  height: 100% !important;
  width: 100% !important;
}

/* Hint zawsze widoczny */
.map-hint {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ========== MODALE ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  margin: 3rem 1rem;
  width: 100%;
  max-width: 640px;          /* było 480px – trochę więcej miejsca */
  max-height: 90vh;          /* nie wyjdzie poza ekran */
  overflow-y: auto;          /* jeśli treści jest dużo, przewijamy wewnątrz */
  background-color: var(--color-surface);
  border-radius: 1.4rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.55);
  animation: slideUp 0.23s ease-out;
}

@media (max-width: 640px) {
  .modal-content {
    margin: 1.5rem 1rem;
    border-radius: 1rem;
  }
}

.modal-body {
  padding: 1.4rem 1.35rem 1.3rem;
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}

/* === HERO MODAL === */

.modal-hero {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 1.2rem;
  overflow: hidden;
  margin-bottom: 2rem;
}

.modal-hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68);
}

.modal-hero-overlay {
  position: absolute;
  top: 47%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  padding: 0 1rem;
}

.modal-avatar-large {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff80;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  margin: 0 auto 0.6rem;
  margin-top: 12px;
  display: block;
}

.modal-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.1rem 0;
  color: white;
}

.modal-rating-line {
  color: #ffd54f;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.modal-car {
  color: #d1d5db;
  font-size: 0.95rem;
  margin: 0;
}

/* ---- MODAL – potwierdzenie e-maila ---- */

#email-verified-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(5px);
  background: rgba(15, 23, 42, 0.55);
}

#email-verified-modal .email-verified-content {
  max-width: 420px;
  border-radius: 1.4rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.45);
}

#email-verified-modal .email-verified-body {
  padding: 1.8rem 1.8rem 1.5rem;
  text-align: left;
}

#email-verified-modal h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.35rem;
  font-weight: 600;
}

#email-verified-modal p {
  margin: 0 0 1.1rem 0;
  font-size: 0.98rem;
  opacity: 0.9;
}

/* dark mode dla potwierdzenia maila */
body.theme-dark #email-verified-modal .email-verified-content {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.5);
}

body.theme-dark #email-verified-modal p {
  color: #e5e7eb;
}

/*  MODALE: Reset hasła (oba)  */

#forgotPasswordModal .modal-body,
#resetPasswordModal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;                 /* większy oddech między elementami */
  padding: 1.8rem 1.8rem 1.5rem;
}

#forgotPasswordModal h3,
#resetPasswordModal h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.3rem;
}

#forgotPasswordModal p,
#resetPasswordModal p {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

#forgotPasswordModal .field span,
#resetPasswordModal .field span {
  display: inline-block;
  margin-bottom: 0.35rem;
}

/* żeby komunikaty pod przyciskami miały trochę powietrza */
#forgot-password-message,
#reset-password-message {
  margin-top: 0.6rem;
  line-height: 1.4;
  font-size: 0.9rem;
}

/* Opis */
.modal-description {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

/* Grid */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modal-grid h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.modal-grid p {
  font-size: 0.9rem;
}

/* Opinie */
.modal-reviews h4 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.modal-reviews li {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.legal-modal { position: fixed; inset: 0; display: none; z-index: 9999; }
.legal-modal.is-open { display: block; }
.legal-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.legal-modal__dialog {
  position: relative;
  max-width: 900px;
  margin: 5vh auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.legal-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,.08);
}
.legal-modal__content {
  padding: 16px;
  max-height: 75vh;
  overflow: auto;
  line-height: 1.5;
}
.legal-modal__close { border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.footer-disclaimer { margin-top: 8px; opacity: .85; font-size: .9em; }

/* ===== Cookies Consent Modal ===== */

.cookie-consent-content {
  max-width: 720px; /* ciut większy niż standard */
}

/* Cookies modal – odstęp nagłówka od treści */
.cookie-consent-content h3 {
  margin-bottom: 12px; /* było ~4–6px z resetu */
}

.cookie-consent-text {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--color-text);
  opacity: 0.95;
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.cookie-consent-primary {
  flex: 1 1 240px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
}

.cookie-consent-secondary {
  flex: 0 0 auto;
  opacity: 0.9;
}

.cookie-consent-links {
  margin-top: 14px;
  font-size: 0.85rem;
  opacity: 0.85;
}

.cookie-consent-links a {
  text-decoration: underline;
}

.cookie-consent-options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.cookie-consent-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
}

.cookie-consent-option input {
  margin-top: 3px;
}

.cookie-consent-muted {
  display: inline-block;
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Stopka */
.footer {
  background-color: #020617;
  color: #9ca3af;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.8rem;
}

.footer a {
  color: #e5e7eb;
  text-decoration: underline;
}

/* Utility */
.hidden {
  display: none;
}

/* Kontener input + ikonka */
.field-with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Input zajmuje całą szerokość, obok mały przycisk */
.field-with-icon input {
  flex: 1;
}

/* Przycisk lokalizacji */
.location-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1.5px solid #00c4ff;              /* kolor jak poświata */
  background: rgba(0, 0, 0, 0.9);           /* ciemne tło jak przy „Uruchom DIVU” */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 196, 255, 0.45); /* lekka poświata */
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

/* SVG w środku – dwukolorowe */
.location-icon {
  width: 18px;
  height: 18px;
}

/* obwódka ikony = kolor poświaty, środek ciemny */
.location-icon circle {
  stroke: #00c4ff;
}

.location-icon path {
  fill: #00c4ff;   /* wypełnienie w kolorze poświaty */
  stroke: #000000; /* czarny kontur */
}

/* hover / focus */
.location-btn:hover,
.location-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 196, 255, 0.7);
}

/* w trybie ciemnym – trochę jaśniejsze tło, żeby obrys był widoczny */
body.theme-dark .location-btn {
  background: radial-gradient(circle at 30% 30%, #111827, #020617);
}

/* w trybie jasnym – delikatne tło, dalej neonowe obramowanie */
body:not(.theme-dark) .location-btn {
  background: radial-gradient(circle at 30% 30%, #f9fafb, #e5f3ff);
}

/* ========== BOX TRASY ========== */

/* Bazowy wygląd boxa z trasą */
.route-summary {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(234,242,255,0.92));
  font-size: 0.9rem;
}

/* Tekst w jasnym trybie */
.route-summary p,
.route-summary strong,
.route-summary span {
  color: #0f172a;
}

/* DARK MODE – czytelne tło + tekst */
body.theme-dark .route-summary {
  background: radial-gradient(circle at 0 0, #1e293b, #020617);
  border: 1px solid rgba(56, 189, 248, 0.4); /* lekki niebieski border */
  box-shadow: 0 0 20px rgba(15, 118, 255, 0.35);
}

body.theme-dark .route-summary p,
body.theme-dark .route-summary strong,
body.theme-dark .route-summary span {
  color: #e5f0ff;
  opacity: 0.95;
}

/* ========== AUTH PANEL ========== */

#auth-panel h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.auth-form h4 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.auth-form .field {
  margin-bottom: 0.6rem;
}

#auth-message {
  font-size: 0.85rem;
  min-height: 1rem;
}

#user-panel p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.auth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.auth-actions--compact .button {
  padding: 8px 12px;      /* było pewnie ~12-16px */
  font-size: 14px;        /* było pewnie 16px */
  line-height: 1.1;
  border-radius: 999px;   /* zostaje pill, ale mniejszy */
  min-height: 34px;       /* zbija "balon" */
}

.auth-actions--compact .button.secondary-button {
  /* jeśli secondary-button ma dodatkowy padding/min-height – nadpisujemy */
  min-height: 34px;
}

#delete-account-btn {
  opacity: 0.9;
}

#delete-account-btn:hover {
  opacity: 1;
}

/* ====== Panel kierowcy – nagłówek i harmonijka ====== */

.driver-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.driver-profile-header h4 {
  margin: 0;
  font-size: 1rem;
}

/* mały przycisk z boku – nie aż tak „krzyczy” jak primary */
.driver-profile-toggle-btn {
  padding-inline: 0.9rem;
  padding-block: 0.4rem;
  font-size: 0.85rem;
  border-radius: 999px;
}

.driver-profile-toggle-chevron {
  margin-left: 0.35rem;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

/* kontener z formularzem – zwijany */
.driver-profile-collapsible {
  overflow: hidden;
  transition:
    max-height 0.28s ease,
    opacity 0.22s ease,
    transform 0.22s ease,
    margin-top 0.22s ease;
}

/* stan zwinięty */
.driver-profile-collapsible.is-collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  margin-top: 0;
}

/* stan rozwinięty */
.driver-profile-collapsible.is-expanded {
  max-height: 1800px; /* spokojnie wystarcza na cały formularz */
  opacity: 1;
  transform: translateY(0);
  margin-top: 0.25rem;
}

/* strzałka obrócona gdy otwarte */
.driver-profile-toggle-btn.is-open .driver-profile-toggle-chevron {
  transform: rotate(-180deg);
}

/* dark mode – trochę jaśniejszy tekst przycisku */
body.theme-dark .driver-profile-toggle-btn {
  border-color: rgba(148, 163, 184, 0.5);
}

/* ====== Driver status toggle (panel kierowcy) ====== */

.driver-status-group {
  display: inline-flex;
  gap: 0.55rem;
  margin: 0.5rem 0 0.4rem;
}

/* „Pigułka” z napisem Dostępny / Niedostępny */
.driver-status-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;

  padding: 0.32rem 0.85rem;
  border-radius: 999px;

  border: 1px solid var(--color-border);

  font-size: 0.9rem;
  cursor: pointer;

  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(4px);

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    color 0.2s ease;
}

/* standardowe radio – zostawiamy, ale można też ukryć */
.driver-status-option input[type="radio"] {
  accent-color: var(--color-primary);
}

/* hover – delikatne podświetlenie */
.driver-status-option:hover {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.25);
}

/* Tekst w pigułce – żeby płynnie zmieniał kolor / grubość */
.driver-status-option span {
  transition: color 0.2s ease, font-weight 0.2s ease;
}

/* DRIVERS HEADER */

.drivers-header{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0.9rem;
}

/* wspólny rząd */
.drivers-header-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drivers-header-row--top{
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
}

/* lewa grupa: tytuł + licznik + refresh razem */
.drivers-title-group{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.drivers-header h3{
  margin: 0;
  font-size: 1.05rem;
}

/* filtry w jednej grupie */
.drivers-filters{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* akcje (pigułki) razem */
.drivers-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 1024px){
  .drivers-actions{
    margin-left: auto;      /* 🔥 wypycha akcje na prawą stronę */
    justify-content: flex-end;
  }
}

/* mobilka: filtry i akcje jeden pod drugim */
@media (max-width: 860px){
  .drivers-header-row--controls{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Notka info: lekka i czytelna */
.drivers-note{
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
  opacity: 0.75;
  max-width: 560px;
}

/* Klasa do chowania */
.drivers-note.is-hidden{
  display: none;
}

/* Na dużych ekranach utrzymaj notkę w ryzach (nie rozlewa się) */
@media (min-width: 1024px){
  .drivers-note{
    max-width: 560px;
  }
}

/* === Filtruj promień === */
.radius-filter{
  display:flex;
  align-items:center;
  gap:.5rem;
  flex-wrap:wrap;
  margin:.4rem 0 .2rem;
}

.radius-filter label{
  font-size:.82rem;
  color: var(--color-text-muted);
}

.radius-filter select{
  border:1px solid var(--color-border);
  border-radius:999px;
  padding:.28rem .7rem;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
}

body.theme-dark .radius-filter select{
  background: rgba(2,6,23,0.55);
  color: rgba(230,238,245,0.92);
}

.filter-hint{
  font-size:.8rem;
  color: rgba(148, 163, 184, 0.95);
}

/* Preferowany czas */
.inline-row{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.is-hidden{
  display: none !important;
}

/* styl selecta czasu podobny do pozostałych */
#inquiry-time-mode{
  height: 32px;
  padding: 0 28px 0 10px;
  border-radius: 999px;
  border: 1.5px solid #00c4ff;
  background: radial-gradient(circle at 30% 30%, #0b1220 0%, #020617 70%);
  color: #00c4ff;
  font-weight: 800;
  font-size: 0.9rem;
  appearance: none;
  cursor: pointer;
}

/* datetime-local jako normalne pole formularza (spójne) */
#inquiry-datetime{
  height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  min-width: 220px;
}

/* light mode dopasowanie */
body:not(.theme-dark) #inquiry-time-mode{
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffffff 45%, #ffffff 100%);
  color: #0284c7;
}



/* =========================
   DRIVER BOOKINGS (tabs + lista)
   ========================= */

#driver-bookings-message {
  color: var(--color-text-muted);
}

/* Tabs */
#driver-bookings-tab-pending,
#driver-bookings-tab-confirmed,
#driver-bookings-tab-completed {
  position: relative;
  padding-inline: 1rem;
  padding-block: 0.55rem;
  font-size: 0.9rem;
}

/* Active tab (delikatnie, bez disco) */
.driver-bookings-tab-active {
  border-color: rgba(37, 99, 235, 0.55) !important;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(34, 211, 238, 0.06)) !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

/* Badge (bez inline-styli) */
#driver-bookings .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  margin-left: 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.20);
}

/* “Nowe” na pending: subtelne podświetlenie taba */
#driver-bookings-tab-pending.has-new {
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.12);
}

/* Lista: pojedyncza rezerwacja jako “mini-karta” */
.booking-item {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.10), transparent 65%), var(--color-bg);
  border-radius: 1rem;
  padding: 0.95rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  margin-bottom: 0.75rem;
}

.booking-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
  letter-spacing: -0.2px;
}

.booking-meta {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.booking-contact {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  color: var(--color-text);
  opacity: 0.92;
}

/* Actions row */
.booking-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

/* Spójne przyciski akcji */
.button.btn-accept {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

.button.btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.30);
}

.button.btn-reject {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.button.btn-reject:hover {
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.10);
}

.button.btn-complete {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.35);
  color: #166534;
}

.button.btn-complete:hover {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 16px 34px rgba(34, 197, 94, 0.10);
}

/* Mobile: przyciski niech oddychają */
@media (max-width: 520px) {
  .booking-actions .button {
    width: 100%;
  }
}

/* ===== Guest booking (panel z linku mailowego) ===== */
#guest-booking {
  margin-top: 1rem !important; /* nadpisze inline 12px */
}

#guest-booking h3 {
  margin-bottom: 0.35rem;
}

#guest-booking-message {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.65rem;
}

#guest-booking-content .guest-title {
  font-weight: 800;
  letter-spacing: -0.2px;
  margin-bottom: 0.35rem;
}

#guest-booking-content .guest-meta {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

#guest-booking-content .guest-contact {
  margin-top: 0.6rem;
  font-size: 0.88rem;
}

#guest-booking-content .guest-actions {
  margin-top: 0.9rem;
}

/* ====== Zobacz profil ====== */
.driver-profile-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 34px;                 /* jak refresh */
  padding: 0 14px;              /* pigułka */
  border-radius: 999px;

  border: 1.5px solid #00c4ff;
  cursor: pointer;

  /* rdzeń jak w refresh — bez ::before, więc nic nie zasłoni tekstu */
  background: radial-gradient(circle at 30% 30%, #0b1220 0%, #020617 70%);
  color: #00c4ff;

  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 0.2px;

  box-shadow:
    0 0 12px rgba(0, 196, 255, 0.28),
    0 0 22px rgba(0, 196, 255, 0.20);

  text-shadow: 0 0 8px rgba(0, 196, 255, 0.35);

  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.driver-profile-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(0, 196, 255, 1);
  box-shadow:
    0 0 18px rgba(0, 196, 255, 0.55),
    0 0 28px rgba(0, 196, 255, 0.35);
}

.driver-profile-btn:active{
  transform: scale(0.98);
}

/* LIGHT MODE — jasny rdzeń jak refresh */
body:not(.theme-dark) .driver-profile-btn{
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffffff 45%, #ffffff 100%);
  color: #0284c7; /* ciemniejszy cyjan, czytelny na jasnym */
  text-shadow: none;
}

/* disabled */
.driver-profile-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  border-color: rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at 30% 30%, #0b1220 0%, #020617 70%);
  color: rgba(148, 163, 184, 0.9);
  text-shadow: none;
}

body:not(.theme-dark) .driver-profile-btn:disabled{
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%);
  color: rgba(100, 116, 139, 0.95);
}

/* ====== Radius (Promień) ====== */
.radius-filter{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  /* żeby nie "pchało" headera w kosmos */
  flex: 0 0 auto;
}

.radius-filter label{
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  color: rgba(226, 232, 240, 0.92); /* slate-200-ish */
  white-space: nowrap;
}

/* select jak pigułka */
#radiusSelect{
  height: 34px;                /* spójnie z driver-profile-btn */
  min-width: 96px;
  padding: 0 38px 0 14px;      /* miejsce na strzałkę */
  border-radius: 999px;

  border: 1.5px solid #00c4ff;
  background: radial-gradient(circle at 30% 30%, #0b1220 0%, #020617 70%);
  color: #00c4ff;

  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 0.2px;

  box-shadow:
    0 0 12px rgba(0, 196, 255, 0.28),
    0 0 22px rgba(0, 196, 255, 0.20);

  /* zdejmujemy systemowy wygląd */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;

  /* własna strzałka (dwa paski pod kątem) */
  background-image:
    linear-gradient(45deg, transparent 50%, #00c4ff 50%),
    linear-gradient(-45deg, transparent 50%, #00c4ff 50%),
    radial-gradient(circle at 30% 30%, #0b1220 0%, #020617 70%);
  background-repeat: no-repeat;
  background-size: 7px 7px, 7px 7px, cover;
  background-position: right 16px center, right 11px center, center;
}

#radiusSelect:hover{
  transform: translateY(-1px);
  box-shadow:
    0 0 18px rgba(0, 196, 255, 0.55),
    0 0 28px rgba(0, 196, 255, 0.35);
}

#radiusSelect:active{
  transform: scale(0.98);
}

#radiusSelect:focus-visible{
  outline: 2px solid rgba(0, 196, 255, 0.55);
  outline-offset: 2px;
}

/* hint pod spodem (jak jest używany) */
#drivers-filter-hint.filter-hint{
  margin-left: 6px;
}

/* ====== Light mode ====== */
body:not(.theme-dark) .radius-filter label{
  color: rgba(15, 23, 42, 0.80); /* slate-900-ish */
}

body:not(.theme-dark) #radiusSelect{
  border-color: #00c4ff;
  color: #0284c7;
  box-shadow:
    0 0 12px rgba(0, 196, 255, 0.18),
    0 0 22px rgba(0, 196, 255, 0.12);

  background-image:
    linear-gradient(45deg, transparent 50%, #0284c7 50%),
    linear-gradient(-45deg, transparent 50%, #0284c7 50%),
    radial-gradient(circle at 30% 30%, #ffffff 0%, #ffffff 45%, #ffffff 100%);
}

/* ====== Seats (Liczba miejsc) ====== */
#seatsSelect{
  height: 32px;
  min-width: auto;
  padding: 0 26px 0 10px;
  border-radius: 999px;

  border: 1.5px solid #00c4ff;
  background: radial-gradient(circle at 30% 30%, #0b1220 0%, #020617 70%);
  color: #00c4ff;

  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 0.2px;

  box-shadow:
    0 0 12px rgba(0, 196, 255, 0.28),
    0 0 22px rgba(0, 196, 255, 0.20);

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;

  background-image:
    linear-gradient(45deg, transparent 50%, #00c4ff 50%),
    linear-gradient(-45deg, transparent 50%, #00c4ff 50%),
    radial-gradient(circle at 30% 30%, #0b1220 0%, #020617 70%);
  background-repeat: no-repeat;
  background-size: 7px 7px, 7px 7px, cover;
  background-position: right 16px center, right 11px center, center;
}

#seatsSelect:hover{
  transform: translateY(-1px);
  box-shadow:
    0 0 18px rgba(0, 196, 255, 0.55),
    0 0 28px rgba(0, 196, 255, 0.35);
}

#seatsSelect:active{
  transform: scale(0.98);
}

/* Light mode */
body:not(.theme-dark) #seatsSelect{
  border-color: #00c4ff;
  color: #0284c7;
  box-shadow:
    0 0 12px rgba(0, 196, 255, 0.18),
    0 0 22px rgba(0, 196, 255, 0.12);

  background-image:
    linear-gradient(45deg, transparent 50%, #0284c7 50%),
    linear-gradient(-45deg, transparent 50%, #0284c7 50%),
    radial-gradient(circle at 30% 30%, #ffffff 0%, #ffffff 45%, #ffffff 100%);
}

/* checkbox w ramach .field */
.checkbox-field{
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.checkbox-field input[type="checkbox"]{
  width: 18px;
  height: 18px;
  margin-top: 3px; /* wyrównanie do pierwszej linii tekstu */
  flex: 0 0 auto;
  accent-color: var(--color-primary);
}

.checkbox-field span{
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--color-text);
}

/* hint pod checkboxem */
.field-hint{
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* gdy checkbox ma błąd */
.checkbox-field.is-invalid{
  border-color: #f04438 !important;
  box-shadow: 0 0 0 2px rgba(240, 68, 56, 0.18) !important;
}

/* ====== STAN AKTYWNY – radio zaznaczone ====== */
/* Wymaga :has(), działa w nowoczesnych przeglądarkach */

.driver-status-option:has(input[type="radio"]:checked) {
  border-color: rgba(56, 189, 248, 0.9);
  background-color: rgba(240, 249, 255, 0.95);
  box-shadow:
    0 0 8px rgba(56, 189, 248, 0.30),
    0 0 15px rgba(56, 189, 248, 0.20);
}

.driver-status-option:has(input[type="radio"]:checked) span {
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== DARK MODE – poprawa czytelności etykiet w panelu kierowcy ===== */

body.theme-dark #driver-panel .status-label,
body.theme-dark #driver-panel .field > span {
  color: #e5e7eb;            /* jasny, ale nie oślepiający */
}

/* Podpisy / małe opisy pod polami (np. "Możesz wpisać adres ręcznie...") */
body.theme-dark #driver-panel small,
body.theme-dark #driver-panel .driver-location-helper,
body.theme-dark #driver-panel .driver-location-hint {
  color: #9ca3af;            /* szary jak w reszcie dark UI */
}

/* Sam tekst w inputach też lekko rozjaśnij, jeśli jest za ciemny */
body.theme-dark #driver-panel input,
body.theme-dark #driver-panel textarea {
  color: #e5e7eb;
}

/* Placeholder w dark mode – delikatnie jaśniejszy */
body.theme-dark #driver-panel input::placeholder,
body.theme-dark #driver-panel textarea::placeholder {
  color: #6b7280;
}

/* ========== ANIMACJE ========== */
@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === ANIMACJA WEJŚCIA KARTY HERO === */
@keyframes heroCardIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* === MIKRO-ANIMACJA GLOW DLA URUCHOM DIVU === */
@keyframes divuGlowPulse {
  0% {
    box-shadow:
      0 0 10px rgba(56,189,248,0.22),
      0 0 22px rgba(56,189,248,0.16);
  }
  50% {
    box-shadow:
      0 0 16px rgba(56,189,248,0.33),
      0 0 32px rgba(56,189,248,0.24);
  }
  100% {
    box-shadow:
      0 0 12px rgba(56,189,248,0.28),
      0 0 26px rgba(56,189,248,0.20);
  }
}

/* Desktop glow */
@keyframes heroGlow {
  0% { box-shadow: 0 0 18px 6px rgba(59,130,246,0.45); }
  50% { box-shadow: 0 0 28px 10px rgba(59,130,246,0.75); }
  100% { box-shadow: 0 0 18px 6px rgba(59,130,246,0.45); }
}

/* Mobile glow – lżejszy, żeby działał */
@keyframes heroGlowMobile {
  0% { box-shadow: 0 0 10px 3px rgba(59,130,246,0.25); }
  50% { box-shadow: 0 0 16px 5px rgba(59,130,246,0.45); }
  100% { box-shadow: 0 0 10px 3px rgba(59,130,246,0.25); }
}


/* ========== MEDIA QUERIES ========== */
@media (min-width: 768px) {
  .nav-menu {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .nav-menu-mobile {
    display: none !important;
  }

  .hero-container {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
  }

  .hero-card {
    display: block;
  }

  .hero-content h1 {
    font-size: 2.7rem;
  }

  .features-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
    grid-template-areas:
      "search map"
      "drivers map";
    gap: 1.3rem;
  }

  .search-panel {
    grid-area: search;
  }

  .drivers-panel {
    grid-area: drivers;
  }

  .map-panel {
    grid-area: map;
  }

  .map {
    height: 100%;
    min-height: 360px;
  }

  .modal-content {
    margin-top: 5rem;
  }
}

/* ===== HERO – MOBILE FIX v2 (dużo jaśniejsze tło) ===== */
@media (max-width: 768px) {

  .hero {
    padding: 3.5rem 0 3.2rem;
    background-size: 200%;
    background-position: center 18%;
  }

  /* mocno rozjaśniony overlay */
  .hero-overlay {
    background:
      linear-gradient(
        to bottom,
        rgba(0,0,0,0.35),
        rgba(0,0,0,0.20) 40%,
        rgba(0,0,0,0.45)
      ),
      radial-gradient(
        circle at 50% 35%,
        rgba(0,0,0,0.15),
        transparent 65%
      );
  }

  .hero-content::before {
    background: radial-gradient(
      circle at 30% 20%,
      rgba(0,0,0,0.35) 0,
      rgba(0,0,0,0.25) 40%,
      transparent 75%
    );
  }

  .hero-cta-primary {
    animation: heroGlowMobile 3.5s ease-in-out infinite;
  }
}

/* ===== KONIEC STAREGO CSS ===== */

/* =========================================================
   TOWARY (freight) – styl docelowy spójny z DIVU
   Wklej na końcu main.css i usuń wcześniejsze wersje bloków TOWARY
   ========================================================= */

/* Tekst pomocniczy */
body.freight .muted{ color: var(--color-text-muted); }

/* ===== Układ strony (zawsze pionowo) ===== */
body.freight .freight-layout{
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  gap: 22px;                 /* równy odstęp: Ogłoszenia -> Panel */
}

/* ===== Nagłówek strony ===== */
/* domyślnie (gdy nie dodasz .towary-hero) */
body.freight .section-header{
  text-align: left;
  margin: 6px 0 18px;
}

body.freight .section-title{
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

body.freight .section-subtitle{
  margin: 0;
  color: var(--color-text-muted);
}

/* wersja docelowa (gdy w HTML dasz .towary-hero) */
body.freight .section-header.towary-hero{
  text-align: center;
  margin: 10px 0 28px;
}

body.freight .towary-hero .section-title{
  font-size: clamp(1.65rem, 2.2vw, 2.05rem);
  line-height: 1.15;
}

body.freight .towary-hero .section-subtitle{
  max-width: 760px;
  margin: 0 auto;
  font-size: 0.98rem;
  line-height: 1.65;
  opacity: 0.95;
}

/* ===== Formularze (kompaktowe, spójne) ===== */
body.freight .form-group{
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.7rem;
  font-size: 0.84rem;
}

body.freight .form-group label{ font-weight: 500; }

body.freight .input,
body.freight .form-group input,
body.freight .form-group select,
body.freight .form-group textarea{
  padding: 0.46rem 0.65rem;        /* kompaktowo */
  border-radius: 0.55rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
}

body.freight .input:focus,
body.freight .form-group input:focus,
body.freight .form-group select:focus,
body.freight .form-group textarea:focus{
  border-color: rgba(37, 99, 235, 0.75);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

/* ===== "Jak to działa" (info-box) ===== */
body.freight .info-box{
  padding: 1.25rem 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.4px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              border-color var(--transition-fast);
}

body.theme-dark body.freight .info-box{
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(56, 189, 248, 0.35);
}

body.freight .info-box h3{
  font-size: 0.98rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

body.freight .info-box p{
  margin: 0;
  color: var(--color-text-muted);
  opacity: 0.95;
  line-height: 1.65;
  font-size: 0.92rem;
}

body.freight .info-box:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
  border-color: rgba(37, 99, 235, 0.35);
}

/* grid używany w tej stronie */
body.freight .grid{
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* jeśli dodasz w HTML klasy do "Jak to działa" */
body.freight .how-card{ margin-bottom: 22px; }
body.freight .how-title{ margin: 0 0 14px; letter-spacing: -0.015em; }
body.freight .how-grid{ gap: 16px; }

/* ===== Filtry (ogłoszenia) ===== */
body.freight .filters{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

body.freight .filters .form-group{ margin-bottom: 0; }
body.freight .filters .button{ height: 42px; }

body.freight .filters .form-group.filter-voivodeship{ min-width: 240px; }
body.freight .filters .form-group.filter-query{ min-width: 260px; flex: 1; }

/* ===== Tag/pigułki ===== */
body.freight .tag{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

body.theme-dark body.freight .tag{
  background: rgba(2, 6, 23, 0.35);
  border-color: rgba(56, 189, 248, 0.25);
  color: #cbd5e1;
}

/* ===== Lista ogłoszeń (scroll tylko w środku) ===== */
/* wymaga wrappera .listings-scroll w HTML */
body.freight .listings-scroll{
  max-height: 620px;       /* 520–650 OK */
  overflow: auto;
  padding-right: 4px;
  margin-top: 14px;
  margin-bottom: 6px;
  border-radius: 14px;
}

body.freight .listings-grid{
  margin-top: 0;
  display: grid;
  gap: 12px;
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 520px){
  body.freight .listings-grid{ grid-template-columns: 1fr; }
}

/* ===== Karta ogłoszenia ===== */
body.freight .listing-card{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              border-color var(--transition-fast);
}

body.freight .listing-card:hover{
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

body.freight .listing-thumb{
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid rgba(148, 163, 184, 0.20);
  max-height: 260px;
}

body.freight .listing-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 260px;
}

body.freight .listing-body{ padding: 14px; }

body.freight .listing-body h3{
  margin: 0 0 6px;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

body.freight .listing-body .muted{
  margin: 0 0 10px;
  line-height: 1.45;
  font-size: 0.9rem;
}

body.freight .listing-meta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

body.freight .listing-actions{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Karta ogłoszeń: porządek w headerze (zamiast inline) ===== */
body.freight #publicListingsCard .card-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

body.freight #publicListingsCard .actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Panel zleceniodawcy ===== */
body.freight #authCard .card-title{ margin: 0 0 8px; }
body.freight #authCard .auth-lead{ margin: 0 0 14px; line-height: 1.6; }

body.freight #authCard form.form{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--color-bg);
  margin-top: 12px;
}

body.theme-dark body.freight #authCard form.form{
  border-color: rgba(56, 189, 248, 0.20);
}

body.freight #authCard form.form h3{
  margin: 0 0 8px;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

body.freight #authCard form.form .button{
  width: 100%;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  font-size: 0.92rem;
}

body.freight #authCard .form-group:last-child{ margin-bottom: 0; }

/* Wiersze "Twoje ogłoszenia" */
body.freight .row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

body.freight .row-main b{ display: block; margin-bottom: 2px; }
body.freight .row-actions{ display: flex; gap: 8px; align-items: center; }

/* Scrollbar (opcjonalnie) */
body.freight .listings-scroll::-webkit-scrollbar{ width: 10px; }

body.freight .listings-scroll::-webkit-scrollbar-thumb{
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0);
  background-clip: padding-box;
}

body.theme-dark body.freight .listings-scroll::-webkit-scrollbar-thumb{
  background: rgba(56, 189, 248, 0.28);
  border: 3px solid rgba(2, 6, 23, 0);
  background-clip: padding-box;
}

/* =========================================================
   TOWARY – LISTA OFERT jak OLX: treść + miniaturka obok
   (wklej na sam koniec main.css)
   ========================================================= */

/* 1) Lista: większe odstępy i oddech od panelu */
body.freight #publicListingsCard{
  margin-bottom: 18px; /* oddech pod kartą ogłoszeń */
}

body.freight .listings-scroll{
  max-height: 620px;        /* zostaje scroll wewnątrz */
  overflow: auto;
  margin-top: 14px;
  padding: 10px;            /* odstęp od krawędzi scrolla */
  border-radius: 14px;
}

body.freight .listings-grid{
  display: grid;
  grid-template-columns: 1fr;  /* lista, nie kafle */
  gap: 16px;                   /* większy odstęp między ofertami */
  margin: 0;
  align-content: start;
}

/* 2) Karta oferty: układ poziomy (treść + miniaturka) */
body.freight .listing-card{
  display: grid;
  grid-template-columns: 1fr 148px; /* content | miniaturka */
  gap: 14px;
  align-items: center;

  padding: 12px;
  border-radius: 16px;
  overflow: hidden;
}

/* 3) Miniaturka: mała, stała, zawsze po prawej */
body.freight .listing-thumb{
  width: 148px;
  height: 104px;
  border-radius: 14px;
  overflow: hidden;

  /* nadpisuje stare “duże zdjęcie” */
  max-height: none;
  aspect-ratio: auto;

  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255,255,255,0.10);
}

body.freight .listing-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  /* nadpisuje stare “duże zdjęcie” */
  max-height: none;
}

/* 4) Treść: ciaśniej i czytelniej */
body.freight .listing-body{
  padding: 0;               /* bo karta ma padding */
  min-width: 0;             /* ważne: pozwala ucinać długie teksty */
}

body.freight .listing-body h3{
  margin: 0 0 6px;
  font-size: 1.02rem;
}

body.freight .listing-body .muted{
  margin: 0 0 10px;
  line-height: 1.45;
  font-size: 0.9rem;
}

/* tagi + akcje: porządek w jednym rytmie */
body.freight .listing-meta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

body.freight .listing-actions{
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 5) Mobilka: wraca pionowo (miniaturka nad treścią) */
@media (max-width: 640px){
  body.freight .listing-card{
    grid-template-columns: 1fr;
  }

  body.freight .listing-thumb{
    width: 100%;
    height: 180px; /* na mobile może być większa, ale nadal “lista”, nie hero */
  }
}

/* =========================================================
   TOWARY – LISTA jak OLX (naprawa: content nie ucieka w prawo)
   Wklej NA SAM KONIEC main.css
   ========================================================= */

/* Oddech między Ogłoszeniami a Panelem */
body.freight #publicListingsCard{ margin-bottom: 24px; }
body.freight #authCard{ margin-top: 0; }

/* Lista = jedna kolumna + odstępy */
body.freight .listings-grid{
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Karta: miniaturka po LEWEJ, treść obok */
body.freight .listing-card{
  display: grid !important;
  grid-template-columns: 148px 1fr !important;  /* thumb | content */
  gap: 16px !important;
  align-items: center;
  padding: 12px !important;
  margin-top: 6px;
}

/* Miniaturka */
body.freight .listing-thumb{
  width: 148px;
  height: 104px;
  border-radius: 14px;
  overflow: hidden;
  max-height: none !important;
  aspect-ratio: auto !important;
}

body.freight .listing-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: none !important;
}

/* Treść MUSI być normalnym flow (żadnego space-between / auto-marginesów) */
body.freight .listing-body{
  padding: 0 !important;
  min-width: 0;
  display: block !important;
  text-align: left !important;
  justify-content: initial !important;
  align-items: initial !important;
  margin-left: 0 !important;
}

/* Jeśli masz gdzieś „row”/„meta” wypychane w prawo – kasujemy to */
body.freight .listing-body > *{
  margin-left: 0 !important;
}

/* Tagi i akcje – trzymamy przy lewej, w równym rytmie */
body.freight .listing-meta{
  justify-content: flex-start !important;
}

body.freight .listing-actions{
  display: flex;
  justify-content: flex-start !important;
  align-items: center;
  gap: 10px;
}

/* Mobilka: pionowo */
@media (max-width: 640px){
  body.freight .listing-card{
    grid-template-columns: 1fr !important;
    align-items: start;
  }
  body.freight .listing-thumb{
    width: 100%;
    height: 180px;
  }
}

.offers-group { margin-bottom: 14px; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; overflow: hidden; }
.offers-group-header { padding: 10px 12px; background: rgba(0,0,0,.03); }
.offers-group-list { padding: 6px 0; }
.offer-row { padding: 8px 12px; }

/* === GLOBAL FIX: oddech w każdym modalu === */
.modal-content {
  padding: 1.6rem 1.6rem 1.7rem;
}

/* ===== MODAL: Szczegóły ogłoszenia ===== */

.listing-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

.listing-modal-thumb {
  border-radius: 1rem;
  overflow: hidden;
  max-height: 320px;
}

#listingModalImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#listingModalTitle {
  margin-bottom: 0.8rem;
}

#listingModalRoute {
  font-size: 1.05rem;
  line-height: 1.45;
}

#listingModalDesc {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 0.4rem;
}

#listingModalRegion,
#listingModalStatus {
  margin-right: 0.4rem;
}

#offerModal .modal-content {
  padding: 1.8rem 1.8rem 1.9rem;
}

#offerModal h2 {
  margin-bottom: 0.6rem;
}

#offerModal .form-group {
  margin-bottom: 0.85rem;
}

.legal-modal__content {
  padding: 2rem 2.2rem;
  line-height: 1.65;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .legal-modal__content {
    padding: 1.4rem 1.2rem;
  }
}

.modal-close {
  top: 1rem;
  right: 1rem;
}

/* === FIX: poprawne selektory dark mode dla freight === */
body.theme-dark.freight .info-box{
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(56, 189, 248, 0.35);
}

body.theme-dark.freight .tag{
  background: rgba(2, 6, 23, 0.35);
  border-color: rgba(56, 189, 248, 0.25);
  color: #cbd5e1;
}

/* =========================
   LEGAL MODAL – DARK MODE FIX
   ========================= */

body.theme-dark .legal-modal__dialog {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

body.theme-dark .legal-modal__header {
  border-bottom: 1px solid var(--color-border);
}

body.theme-dark .legal-modal__content {
  color: var(--color-text);
}

/* Nagłówki */
body.theme-dark .legal-modal__content h1,
body.theme-dark .legal-modal__content h2,
body.theme-dark .legal-modal__content h3 {
  color: var(--color-text);
}

/* Tekst */
body.theme-dark .legal-modal__content p,
body.theme-dark .legal-modal__content li,
body.theme-dark .legal-modal__content dd {
  color: var(--color-text-muted);
}

/* Definicje */
body.theme-dark .legal-modal__content dt {
  color: var(--color-text);
  font-weight: 600;
}

/* Linki */
body.theme-dark .legal-modal__content a {
  color: var(--color-accent);
  text-decoration: underline;
}

body.theme-dark .legal-modal__content a:hover {
  opacity: 0.85;
}

/* Przycisk zamknięcia */
body.theme-dark .legal-modal__close {
  color: var(--color-text-muted);
}

body.theme-dark .legal-modal__close:hover {
  color: var(--color-text);
}
