/* ==========================================================================
   PANEL UI – RESPONSIVE / MOBILE-FIRST
   Cel:
   - Stała górna belka (topbar) + pod nią przewijane poziomo zakładki (tabs)
   - Content poniżej ma automatyczny "oddech" (padding-top) tak, aby nie chował się pod belką
   - Tabele: na mobile poziomy scroll (bez łamania layoutu)
   - Formularze: czytelne pola i checkboxy (role)
   ========================================================================== */

/* ----------------------------
   1) Zmienne i bazowe ustawienia
   ---------------------------- */
:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,.04);
  --border: rgba(255,255,255,.10);
  --muted: rgba(255,255,255,.65);
  --text: rgba(255,255,255,.92);
  --shadow: 0 12px 40px rgba(0,0,0,.35);

  --primary: #4f8cff;
  --danger: #ff4d4f;

  /* Wysokość górnej belki (nagłówek + tabs).
     Używane do odsunięcia contentu (padding-top w .page).
     Jeśli zmienisz paddingi w topbar/tabs – dopasuj to. */
  --topbar-height: 112px;
}

html, body{
  height: 100%;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* Kontener treści – bezpieczna szerokość na desktop */
.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px;
}

/* ----------------------------
   2) Stała górna belka (topbar)
   ---------------------------- */
/* Cały header jest "sticky": zostaje na górze przy scrollowaniu */
.topbar{
  position: sticky;
  top: 0;
  z-index: 1000; /* musi być powyżej tabel i contentu */
  background: rgba(11, 18, 32, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

/* Wewnętrzny rząd: logo/brand + prawa strona (np logout) */
.topbar__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.topbar__brand{
  font-weight: 900;
  letter-spacing: .02em;
}

/* Tu możesz trzymać drobne linki / przyciski w prawym rogu */
.topbar__nav{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ----------------------------
   3) Zakładki (tabs) – przewijane w poziomie na mobile
   ---------------------------- */
/* Tabs to drugi pasek pod topbar__inner */
.tabs{
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  overflow-x: auto;          /* poziomy scroll */
  overflow-y: hidden;
  white-space: nowrap;       /* nie łam zakładek do nowej linii */
  -webkit-overflow-scrolling: touch; /* płynny scroll na iOS */
  scrollbar-width: none;     /* Firefox: ukryj pasek */
}
.tabs::-webkit-scrollbar{
  display: none;             /* Chrome/Safari: ukryj pasek */
}

/* Pojedyncza zakładka */
.tab{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

/* Hover/focus – czytelny feedback */
.tab:hover{
  background: rgba(255,255,255,.07);
}
.tab:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(79,140,255,.18);
  border-color: rgba(79,140,255,.55);
}

/* Aktywna zakładka:
   - ustawiasz klasę "is-active" w template (w zależności od request.path) */
.tab.is-active{
  background: rgba(79,140,255,.18);
  border-color: rgba(79,140,255,.55);
}

/* ----------------------------
   4) Odsunięcie treści od sticky topbar
   ---------------------------- */
/* Dzięki temu content nie "wchodzi" pod belkę. */
.page{
  padding-top: var(--topbar-height);
}

/* Na większych ekranach topbar zwykle optycznie jest niższy (mniej zawijania).
   Możesz zmniejszyć padding-top na desktop. */
@media (min-width: 900px){
  :root{ --topbar-height: 98px; }
}

/* ----------------------------
   5) Narzędzia / toolbar (szukanie, przyciski)
   ---------------------------- */
.toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap: wrap; /* na mobile łam do nowej linii */
  margin: 0 0 14px;
}

.input{
  flex: 1;
  min-width: 260px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
}
.input::placeholder{ color: rgba(255,255,255,.45); }
.input:focus{
  border-color: rgba(79,140,255,.65);
  box-shadow: 0 0 0 4px rgba(79,140,255,.15);
}

.btn{
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.btn:hover{ background: rgba(255,255,255,.06); }

.btn-primary{
  border-color: rgba(79,140,255,.55);
  background: rgba(79,140,255,.16);
}
.btn-primary:hover{ background: rgba(79,140,255,.22); }

.btn-danger{
  border-color: rgba(255,77,79,.55);
  background: rgba(255,77,79,.14);
}
.btn-danger:hover{ background: rgba(255,77,79,.20); }

.btn-ghost{
  background: transparent;
}

/* ----------------------------
   6) Tabele – bezpieczne na mobile
   ---------------------------- */
/* Kontener z overflow: auto robi poziomy scroll na małych ekranach,
   zamiast rozjeżdżać layout. */
.table-wrap{
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: auto; /* klucz pod mobile */
}

/* Sama tabela: minimalna szerokość, żeby kolumny nie były zbyt ciasne. */
.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 980px; /* na mobile pojawi się scroll poziomy */
}

.table thead th{
  text-align:left;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);

  /* Sticky header tabeli działa również w poziomym scrollu */
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.table tbody td{
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}

.table tbody tr:nth-child(2n){
  background: rgba(255,255,255,.02);
}
.table tbody tr:hover{
  background: rgba(79,140,255,.08);
}

/* Kolumna akcji – żeby nie pękała */
.actions{
  display:flex;
  gap: 10px;
  align-items:center;
  white-space: nowrap;
}
.actions form{ margin: 0; }

.link{
  color: rgba(79,140,255,.95);
  text-decoration: none;
  font-weight: 700;
}
.link:hover{ text-decoration: underline; }

.mono{
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

/* ----------------------------
   7) Formularze – lepszy układ + checkboxy ról
   ---------------------------- */
/* Jeśli w template masz {{ form.as_p }}, Django generuje <p> z label + input.
   Ujednolicamy wygląd w całym panelu. */
form p{
  margin: 0 0 14px;
}

form label{
  display: block;
  margin: 0 0 6px;
  font-weight: 800;
  color: rgba(255,255,255,.85);
}

/* Pola tekstowe i email */
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="password"],
form textarea,
form select{
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}

form textarea{
  height: auto;
  padding: 12px 14px;
  min-height: 90px;
}

form input:focus,
form textarea:focus,
form select:focus{
  border-color: rgba(79,140,255,.65);
  box-shadow: 0 0 0 4px rgba(79,140,255,.15);
}

/* Checkbox "is_active" i listy ról (CheckboxSelectMultiple) */
form input[type="checkbox"]{
  width: 18px;
  height: 18px;
  transform: translateY(2px);
}

/* CheckboxSelectMultiple generuje <ul><li><label><input> ... </label></li></ul>
   Ustawiamy estetyczne odstępy i wyrównanie. */
form ul{
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0;
}

form ul li{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Ważne: label niech nie wpycha checkboxa na środek ekranu */
form ul li label{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 0;
  font-weight: 800;
}

/* ----------------------------
   8) Drobne elementy: badge / pill (role, status)
   ---------------------------- */
.badges{ display:flex; flex-wrap: wrap; gap: 6px; }

.badge{
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.12);
}
.pill-ok{ border-color: rgba(43,213,118,.45); background: rgba(43,213,118,.12); }
.pill-off{ border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); }

/* ----------------------------
   9) Mobile: drobne korekty
   ---------------------------- */
@media (max-width: 520px){
  .topbar__inner{ padding: 10px 12px; }
  .tabs{ padding: 8px 10px 10px; }
  .tab{ height: 32px; padding: 0 10px; font-size: 12px; }
  .container{ padding: 12px; }
}


/* --- SELECT: poprawa czytelności listy rozwijanej --- */

/* Podpowiedź dla przeglądarki, żeby renderowała kontrolki w trybie dark (działa w wielu przypadkach) */
html { color-scheme: dark; }

/* Fallback: jeśli dropdown i tak jest systemowy na biało, wymuś czytelny tekst */
form select option,
form select optgroup{
  color: #111 !important;        /* czarny tekst na białym dropdownie */
  background: #fff !important;   /* wiele przeglądarek ignoruje, ale nie szkodzi */
}

/* Opcjonalnie: żeby samo pole select (zamknięte) dalej było dark jak masz */
form select{
  color: var(--text);
  background: rgba(255,255,255,.03);
}










/* ===========================
   Company table – mobile scroll
   =========================== */

/* Kontener tabeli: poziomy scroll zawsze działa */
.table-wrap{
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* Tabela: dopuszczamy poziomy scroll zamiast ucinania */
.table{
  width: 100%;
  border-collapse: collapse;
}

/* Wersja "kompaktowa" pod listy */
.table--compact thead th,
.table--compact tbody td{
  padding: 12px 12px;
}

/* Nie łam nagłówków/komórek – wtedy scroll ma sens */
.table thead th,
.table tbody td{
  white-space: nowrap;
}

/* Kontakt: pozwól na złamanie wiersza, ale bez psucia kolumn */
.cell-contact{
  white-space: normal;
  max-width: 320px;
  line-height: 1.25;
}
.cell-contact span{
  display: block;
}

/* Akcje: trzymać w jednym wierszu */
.th-actions{ text-align: left; }
.cell-actions{ white-space: nowrap; }

/* “Hint” że można przewijać: delikatne gradienty po bokach */
.table-wrap--hint{
  position: relative;
}
.table-wrap--hint::before,
.table-wrap--hint::after{
  content:"";
  position:absolute;
  top:0; bottom:0;
  width: 16px;
  pointer-events:none;
}
.table-wrap--hint::before{
  left:0;
  background: linear-gradient(to right, rgba(11,18,32,.95), rgba(11,18,32,0));
}
.table-wrap--hint::after{
  right:0;
  background: linear-gradient(to left, rgba(11,18,32,.95), rgba(11,18,32,0));
}








/* =========================
   Order summary (KPI grid)
   ========================= */

.order-summary{
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Nagłówek */
.order-summary__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.order-summary__header h2{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
}

/* Siatka KPI */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* Karta KPI */
.kpi-card{
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
}

.kpi-card .label{
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.kpi-card .value{
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

/* Elementy szerokie (4 kolumny) */
.kpi-wide{
  grid-column: span 4;
}

/* Responsywność */
@media (max-width: 1100px){
  .kpi-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px){
  .kpi-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px){
  .kpi-grid{
    grid-template-columns: 1fr;
  }
  .kpi-wide{
    grid-column: span 1;
  }
}







/* =========================
   Dictionaries (Dicts home)
   ========================= */

.dicts{
  margin-top: 14px;
}

.dicts__header{
  margin-bottom: 14px;
}

.dicts__header h2{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
}

.dicts__hint{
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Grid kart */
.dicts-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* Karta */
.dict-card{
  display: block;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.dict-card:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  box-shadow: 0 16px 44px rgba(0,0,0,.45);
}

/* Tytuł + opis */
.dict-title{
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 6px;
}

.dict-desc{
  font-size: 13px;
  color: var(--muted);
}

/* Placeholder */
.dict-card--placeholder{
  opacity: .55;
  cursor: default;
}
.dict-card--placeholder:hover{
  transform: none;
  box-shadow: var(--shadow);
  background: rgba(255,255,255,.04);
}

/* Responsywność */
@media (max-width: 1100px){
  .dicts-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px){
  .dicts-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px){
  .dicts-grid{
    grid-template-columns: 1fr;
  }
}





/* =========================
   Dicts list (simple table)
   ========================= */

.th-id{
  width: 80px;
}

.table--compact thead th,
.table--compact tbody td{
  padding: 12px 14px;
}

.cell-actions{
  white-space: nowrap;
}









/* =========================
   Section wrapper (order-summary)
   ========================= */
.order-summary{
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.order-summary__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-summary__header h2{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
}

/* Mobile: przycisk pod tytułem */
@media (max-width: 520px){
  .order-summary__header{
    flex-direction: column;
    align-items: stretch;
  }
  .order-summary__header .btn{
    width: 100%;
    justify-content: center;
  }
}

/* =========================
   Table compact + actions
   ========================= */
.table--compact thead th,
.table--compact tbody td{
  padding: 12px 14px;
}

.th-id{ width: 90px; }

.th-actions,
.cell-actions{
  white-space: nowrap;
}

/* delikatne “row hover” (czytelniej w panelu) */
.table tbody tr:hover td{
  background: rgba(255,255,255,.04);
}





/* Toolbar: ładne łamanie na mobile */
.toolbar--wrap{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}
.toolbar--wrap .input{
  min-width: 240px;
  flex: 1 1 320px;
}

/* Firmy: kontakt + akcje */
.cell-contact{
  white-space: normal;
  max-width: 320px;
  line-height: 1.25;
}
.cell-contact span{
  display:block;
}
.cell-actions{
  white-space: nowrap;
}



/* Budowy/Firmy: kontakt i akcje */
.cell-contact{
  white-space: normal;
  max-width: 320px;
  line-height: 1.25;
}
.cell-contact span{ display:block; }

.th-actions,
.cell-actions{
  white-space: nowrap;
}

.table--compact thead th,
.table--compact tbody td{
  padding: 12px 14px;
}








/* =========================
   ITEMS TABLE (pozycje zamówienia) – jedna wersja
   ========================= */

.items-table{
  border-collapse: collapse;
}

/* wiersz jest wysoki przez "Pliki" – wszystko do góry */
.items-table th,
.items-table td{
  vertical-align: top;
}

/* Opis/wymagania: start jak input (nie globalne 90px) */
.items-table .col-details textarea[id^="id_items-"][id$="-details"]{
  min-height: 42px !important;
  height: 42px !important;
  padding: 10px 14px !important;
  line-height: 1.25 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  resize: vertical;
}

/* Kontrolki w wierszu – równa wysokość */
.items-table input[type="text"],
.items-table input[type="number"],
.items-table select{
  height: 36px;
}

/* ===== j.m. + ilość: kompakt i "na styk" ===== */

/* kolumny */
.items-table .col-unit{
  width: 72px;
  min-width: 72px;
  padding-left: 4px !important;
  padding-right: 0 !important;   /* <-- usuwa przerwę od prawej */
}

.items-table .col-qty{
  width: 72px;
  min-width: 72px;
  padding-left: 0 !important;    /* <-- usuwa przerwę od lewej */
  padding-right: 4px !important;
}

/* same pola */
.items-table .col-unit select{
  width: 64px !important;
  min-width: 64px !important;
  padding: 0 6px !important;
  font-size: 13px;
  text-align: center;
}

.items-table .col-qty input[type="number"]{
  width: 64px !important;
  min-width: 64px !important;
  padding: 0 6px !important;
  font-size: 13px;
  text-align: right;
}

/* usuń strzałki number */
.items-table .col-qty input[type="number"]::-webkit-outer-spin-button,
.items-table .col-qty input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
.items-table .col-qty input[type="number"]{
  -moz-appearance: textfield;
}

/* =========================
   Items table – wspólna wysokość pól w wierszu
   (Nazwa + Opis + Pliki)
   ========================= */

/* Komórki, które mają „iść razem” */
.items-table td.col-name,
.items-table td.col-details,
.items-table td.col-files{
  /* wypełnij wysokość wiersza */
  height: 100%;
}

/* Zrób z komórek kontenery, żeby kontrolki mogły się rozciągać */
.items-table td.col-name,
.items-table td.col-details{
  display: flex;
  align-items: stretch;
}

/* Nazwa materiału – input rozciąga się w pionie, ale z limitem */
.items-table td.col-name input[type="text"]{
  align-self: stretch;
  height: auto !important;
  min-height: 36px;
  max-height: 140px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Opis – textarea rośnie, ale nie bez końca */
.items-table td.col-details textarea[id^="id_items-"][id$="-details"]{
  align-self: stretch;
  height: auto !important;
  min-height: 36px !important;
  max-height: 140px;          /* sensowny limit */
  overflow: auto;             /* po limicie pojawia się scroll */
}

/* Pliki – układ pionowy i limit wysokości (żeby nie pompował wiersza w nieskończoność) */
.items-table td.col-files > div{
  max-height: 140px;
  overflow: auto;
}

/* (opcjonalnie) wygładź czytanie długiego tekstu w textarea */
.items-table td.col-details textarea{
  line-height: 1.35 !important;
}







/* ===== FIX: nie używamy flex na TD (powoduje nachodzenie) ===== */
.items-table td.col-name,
.items-table td.col-details{
  display: table-cell !important;
}

/* Wspólna „sensowna” wysokość pól w wierszu */
.items-table td.col-name input[type="text"],
.items-table td.col-details textarea[id^="id_items-"][id$="-details"]{
  height: auto !important;
  min-height: 36px !important;
  max-height: 120px !important;  /* limit */
  overflow: auto;                /* po limicie scroll */
  box-sizing: border-box;
}

/* Opis: trochę większa czytelność */
.items-table td.col-details textarea{
  line-height: 1.35 !important;
}

/* Pliki: też limit, żeby nie pompowało wiersza w nieskończoność */
.items-table td.col-files > div{
  max-height: 120px;
  overflow: auto;
}

/* Kluczowe: wiersz wyrównuj do góry, żeby wszystko było czytelne */
.items-table th,
.items-table td{
  vertical-align: top !important;
}



/* ===== Podgląd zamówienia: tabela pozycji – zawijanie opisu ===== */
.items-view-table th,
.items-view-table td{
  white-space: normal !important;   /* przełam globalne nowrap */
  vertical-align: top;
}

/* Opis może być długi – pozwól mu się ładnie zawijać */
.items-view-table td:nth-child(3){
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}



/* Zmniejszenie odstępu między górną belką a treścią */
main.page{
  padding-top: 8px; /* było większe */
}

.container{
  margin-top: 0;
}

.card{
  margin-top: 8px; /* było ~20-24px */
}


/* =========================
   GLOBAL BUTTON STYLE
   (jak "Zapisz firmy")
   ========================= */

button,
input[type="submit"],
input[type="button"],
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 38px;
  padding: 0 18px;

  border-radius: 999px;
  border: 1px solid rgba(79,140,255,.55);

  background: rgba(79,140,255,.16);
  color: var(--text);

  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;

  cursor: pointer;
  transition: all .15s ease;
}

/* 🔥 kluczowe — pozwala zawsze ukryć przycisk */
.btn[hidden]{
  display: none !important;
}

/* poprawne disabled */
.btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}


/* Hover */
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover{
  background: rgba(79,140,255,.25);
  border-color: rgba(79,140,255,.75);
}

/* Active */
button:active,
input[type="submit"]:active,
input[type="button"]:active,
.btn:active{
  transform: translateY(1px);
}

/* Focus */
button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
.btn:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(79,140,255,.18);
}





/* =========================
   DELIVERY BOX (Adresy dostaw)
   ========================= */

.delivery-box {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: linear-gradient(
      180deg,
      rgba(255,255,255,.03),
      rgba(255,255,255,.015)
  );
}

.delivery-box__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.delivery-box__header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.delivery-box__badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(64,169,255,.15);
  border: 1px solid rgba(64,169,255,.35);
  color: rgba(64,169,255,.9);
}

.delivery-box__section {
  margin-bottom: 18px;
}

.delivery-box__section--border {
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.delivery-box__title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  opacity: .85;
}

.delivery-box__grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.delivery-box__grid > div {
  flex: 1;
  min-width: 280px;
}

.delivery-box__radios {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.delivery-box__field {
  margin-bottom: 12px;
}

.delivery-box__actions {
  margin-top: 10px;
}



/* ===== GLOBAL: usuń podkreślenia linków ===== */
a {
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  text-decoration: none;
}


/* --------------- Strzałki nawigacyjne--------------*/
/* ============================= */
/* GLOBALNE STRZAŁKI NAWIGACJI   */
/* ============================= */
/* TOPBAR – upewnij się że to flex */
.topbar__inner {
  display: flex;
  align-items: center;
  
}

/* Strzałki maksymalnie w prawo */
.nav-arrows {
  margin-left: auto;   /* kluczowa linia */
  display: flex;
  gap: 8px;
}

/* Styl przycisków */
.nav-arrow {
  width: 36px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

/* Hover */
.nav-arrow:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
}


/* Klik */
.nav-arrow:active {
  transform: scale(0.92);
}

/* Gdy brak historii */
.nav-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* -----------------------------------------------------*/



/* =========================
   Daty budowy – jeden rząd na desktop
   ========================= */

.dates-row{
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;   /* mobile */
  margin-top: 12px;
}

/* tablet */
@media (min-width: 720px){
  .dates-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* desktop */
@media (min-width: 1100px){
  .dates-row{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}





				.email-badge{
				  display:inline-block;
				  padding:6px 12px;
				  border-radius:6px;
				  font-weight:900;
				}

				/* OK */
				.email-badge--ok{
				  background:#102a17;
				  color:#3ddc84;
				  border:1px solid #1f5a35;
				}

				/* BLOKADA */
				.email-badge--blocked{
				  background:#2a1111;
				  color:#ff4d4f;
				  border:1px solid #5a1a1a;
				  animation: blink-block 1.8s infinite;
				}

				/* mruganie */
				@keyframes blink-block{
				  0%   { opacity: 1; box-shadow: 0 0 0 0 rgba(255,77,79,.6); }
				  50%  { opacity: .35; box-shadow: 0 0 12px 2px rgba(255,77,79,.8); }
				  100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,77,79,.6); }
				}









