/* Sekcje przeniesione z panel-przewoznika.html — wspólne dla podstron przewoźnika */
main.subpage { max-width: 900px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }
main.subpage .back { margin-bottom: 0.75rem; font-size: 0.9rem; }
main.subpage .back a { color: var(--text-muted); text-decoration: none; }
main.subpage .back a:hover { color: var(--accent); }
main.subpage h1 { font-size: clamp(1.35rem, 3vw, 1.65rem); font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
main.subpage .lead { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 1.25rem; }

.card { background: rgba(30, 41, 59, 0.5); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,0.1); border-radius: 18px; padding: 1.35rem 1.35rem 1.45rem; margin-bottom: 1.1rem; box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.card h2 { font-size: 1.12rem; color: var(--accent); margin-bottom: 0.65rem; font-weight: 800; letter-spacing: -0.02em; }
.card h3 { font-size: 1rem; margin-bottom: 0.65rem; color: #e2e8f0; font-weight: 700; }
.card p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 0.85rem; }
.card p:last-child { margin-bottom: 0; }

.driver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.driver-card { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem; }
.driver-card .name { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25rem; }
.driver-card .vehicle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.driver-card .next { font-size: 0.9rem; color: var(--accent); margin-bottom: 1rem; }
.driver-card .btn { display: block; width: 100%; text-align: center; padding: 0.6rem 1rem; border-radius: 10px; font-size: 0.95rem; font-weight: 600; text-decoration: none; background: var(--accent); color: #000; }
.driver-card .btn:hover { background: var(--accent-hover); }
.driver-actions { display:flex; gap: 0.6rem; flex-wrap: wrap; }
.driver-actions .btn { width: auto; flex: 1; min-width: 190px; display: inline-flex; align-items: center; justify-content: center; }
.btn-anim {
  position: relative;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, color .14s ease, background .14s ease;
  transform: translateZ(0);
}
.btn-anim:hover { transform: translateY(-1px); box-shadow: 0 14px 40px rgba(0,0,0,0.28); }
.btn-anim:active { transform: translateY(0px) scale(0.99); }

.wyjazdy-list { display: flex; flex-direction: column; gap: 0.85rem; }
.wyjazd-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem 1.15rem 1.2rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148,163,184,0.28);
  border-radius: 16px;
  transition: border-color 0.25s ease, box-shadow 0.28s ease, transform 0.2s ease;
}
.wyjazd-card:hover {
  border-color: rgba(176,38,255,0.4);
  box-shadow: 0 10px 32px rgba(0,0,0,0.22);
}
.wyjazd-card .left { flex: 1; min-width: 0; }
.wyjazd-card .title { font-weight: 800; font-size: 1.02rem; margin-bottom: 0.35rem; letter-spacing: -0.02em; line-height: 1.3; }
.wyjazd-card .wyj-badges { margin-bottom: 0.35rem; }
.wyjazd-card .wyj-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(176, 38, 255, 0.18);
  color: var(--accent, #c084fc);
  border: 1px solid rgba(176, 38, 255, 0.35);
}
.wyjazd-card .wyj-sub {
  font-size: 0.88rem;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 0.45rem;
  line-height: 1.45;
}
.wyjazd-card .wyj-sub.wyj-sub--muted { color: var(--text-muted); font-size: 0.82rem; }
.wyjazd-card .wyj-sub .wyj-recency { color: var(--accent); font-weight: 600; }
.wyjazd-card .meta { font-size: 0.9rem; color: var(--text-muted); line-height: 1.45; }
.wyjazd-card .wyj-btn--disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: not-allowed;
  opacity: 0.72;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.5);
  user-select: none;
}
.wyjazd-card .actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  width: 100%;
}
@media (min-width: 440px) {
  .wyjazd-card .actions { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .wyjazd-card {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
  }
  .wyjazd-card .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: auto;
    min-width: min(100%, 420px);
    max-width: 460px;
  }
}
@media (min-width: 1200px) {
  .wyjazd-card .actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: min(100%, 560px);
    max-width: 620px;
  }
}
.wyj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.22s ease, filter 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}
.wyj-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}
.wyj-btn:hover::after { transform: translateX(120%); }
.wyj-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
}
.wyj-btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.wyj-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.wyj-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.wyj-btn--primary {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(56,189,248,0.35);
}
.wyj-btn--primary:hover:not(:disabled) { filter: brightness(1.05); }
.wyj-btn--maps {
  background: linear-gradient(145deg, rgba(66,133,244,0.25), rgba(15,23,42,0.85));
  color: #e8f0fe;
  border: 1px solid rgba(66,133,244,0.45);
  box-shadow: 0 4px 14px rgba(66,133,244,0.2);
}
.wyj-btn--maps:hover:not(:disabled) { border-color: rgba(66,133,244,0.75); }
.wyj-btn--app {
  background: linear-gradient(145deg, rgba(176,38,255,0.2), rgba(15,23,42,0.75));
  color: #bae6fd;
  border: 1px solid rgba(176,38,255,0.45);
}
.wyj-btn--app:hover:not(:disabled) { border-color: rgba(176,38,255,0.85); color: #fff; }
.wyj-btn--sum {
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.82));
  color: #ecfdf5;
  border: 1px solid rgba(34, 197, 94, 0.42);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.12);
}
.wyj-btn--sum:hover:not(:disabled) { border-color: rgba(34, 197, 94, 0.75); filter: brightness(1.06); }
.wyj-btn--copy {
  background: rgba(255,255,255,0.07);
  color: #f1f5f9;
  border: 1px solid rgba(148,163,184,0.45);
}
.wyj-btn--copy:hover:not(:disabled) {
  background: rgba(255,255,255,0.11);
  border-color: rgba(226,232,240,0.55);
}
.wyjazdy-sub { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.5; }

.scan-table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.scan-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.scan-table th, .scan-table td { padding: 0.6rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.scan-table th { color: var(--text-muted); font-weight: 600; }
.scan-table .route { font-weight: 600; }
.scan-table .map-link { color: var(--accent); text-decoration: none; }
.scan-table .map-link:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .driver-grid { grid-template-columns: 1fr; }
  .scan-table th, .scan-table td { font-size: 0.8rem; padding: 0.5rem 0.35rem; }
}

.more-section summary { cursor: pointer; font-size: 1rem; color: var(--text-muted); padding: 0.75rem 0; border-top: 1px solid var(--border); }
.more-section summary::-webkit-details-marker { display: none; }
.more-section summary::after { content: ' Pokaż'; color: var(--accent); }
.more-section[open] summary::after { content: ' Ukryj'; }
.more-section .inner { padding-top: 0.75rem; }
.match-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.match-table th, .match-table td { padding: 0.6rem 0; text-align: left; border-bottom: 1px solid var(--border); }
.match-table th { color: var(--text-muted); font-weight: 600; }
.match-table .score { font-weight: 700; color: var(--accent); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.stats-grid .box { padding: 0.75rem; background: var(--bg-input); border-radius: 10px; text-align: center; }
.stats-grid .box .val { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.stats-grid .box .lbl { font-size: 0.8rem; color: var(--text-muted); }

.trips-list { display: flex; flex-direction: column; gap: 0.75rem; }
.trip-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid rgba(148,163,184,0.28);
  background: rgba(255,255,255,0.04);
}
.trip-row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.trip-row-actions a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.95rem; border-radius: 10px; font-weight: 700; font-size: 0.88rem;
  text-decoration: none; background: var(--accent); color: #0f172a;
}
.trip-row-actions a.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--accent); }

.bz-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
}
.bz-modal-card {
  width: 100%; max-width: 420px; padding: 1.35rem 1.25rem;
  border-radius: 18px; border: 1px solid rgba(148,163,184,0.35);
  background: rgba(15,23,42,0.98); box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.bz-modal-card h3 { margin-bottom: 1rem; font-size: 1.1rem; color: #e2e8f0; }
.modal-form label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.35rem; margin-top: 0.65rem; }
.modal-form label:first-of-type { margin-top: 0; }
.modal-form input {
  width: 100%; padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text-primary); font-size: 0.95rem;
}
.bz-modal-actions { display: flex; gap: 0.65rem; justify-content: flex-end; margin-top: 1.15rem; flex-wrap: wrap; }
.bz-modal-actions button {
  padding: 0.55rem 1.1rem; border-radius: 10px; font-weight: 700; cursor: pointer; border: none; font-size: 0.9rem;
}
.bz-modal-actions #drv-cancel, #btn-trip-cancel { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.bz-modal-actions #drv-save, #btn-trip-create { background: var(--accent); color: #0f172a; }

.btn { display: inline-block; padding: 0.65rem 1.2rem; border-radius: 10px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; font-size: 0.95rem; }
.btn-primary { background: var(--accent); color: #000; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--accent); }

/* Makietka zleceń — wyraźnie odróżniona od prawdziwych danych */
.demo-visual-wrap {
  border: 2px dashed rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.15rem;
  background: rgba(251, 191, 36, 0.06);
  margin-bottom: 0.75rem;
}
.demo-visual-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 0.5rem;
}
.demo-visual-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}
.demo-visual-wrap .match-table { opacity: 0.95; }
.demo-visual-wrap button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}
