/* =============================================================
   Central Transport – style.css (bez Bootstrap, bez collapse/toggler)
   ============================================================= */

/* =====================
   Reset i bazowe zmienne
   ===================== */
:root {
  --ct-body-bg: transparent;
  --ct-text: #ffffff;
  --ct-muted: #b1b1b1;
  --ct-primary: #257cff;
  --ct-primary-600: #1e63cc;
  --ct-accent: #4c7ee9;
  --ct-dark: rgba(0,0,0,.32);
  --ct-dark-solid: #111317;
  --ct-border: rgba(255,255,255,.12);
  --ct-radius: 20px;
  --ct-shadow: 0 10px 30px rgba(0,0,0,.25);
  --ct-gutter: 15px;
  --ct-font: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ct-font);
  color: var(--ct-text);
  line-height: 1.5;
  background-image: url(../img/trucks.jpg);
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; border-style: none; }
hr { height: 1px; border: 0; background-color: rgb(0,110,255); margin: 1rem 0; }

/* =====================
   Typografia
   ===================== */
h1, h2, h3, h4, h5, h6 { margin: .5rem 0; font-weight: 700; line-height: 1.2; }
p { margin-top: 0; margin-bottom: 1rem; }
a { color: var(--ct-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =====================
   Kontener i siatka
   ===================== */
.container { width: 100%; height: fit-content; padding-right: var(--ct-gutter); padding-left: var(--ct-gutter); margin-right: auto; margin-left: auto; position: relative; padding-bottom: 10px; }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px){ .container { max-width: 1140px; } }

.row { display: flex; flex-wrap: wrap; margin-right: calc(var(--ct-gutter) * -1); margin-left: calc(var(--ct-gutter) * -1); }
[class^="col"], [class*=" col"] { position: relative; width: 100%; padding-right: var(--ct-gutter); padding-left: var(--ct-gutter); }
.col { flex: 1 0 0%; }
.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10{ flex: 0 0 83.333%; max-width: 83.333%; }
.col-11{ flex: 0 0 91.666%; max-width: 91.666%; }
.col-12{ flex: 0 0 100%; max-width: 100%; }
@media (min-width:576px){
  .col-sm-6 { flex:0 0 50%; max-width:50%; }
  .col-sm-12{ flex:0 0 100%; max-width:100%; }
}
@media (min-width:768px){
  .col-md-4 { flex:0 0 33.333%; max-width:33.333%; }
  .col-md-6 { flex:0 0 50%; max-width:50%; }
  .col-md-12{ flex:0 0 100%; max-width:100%; }
}
@media (min-width:992px){
  .col-lg-3 { flex:0 0 25%; max-width:25%; }
  .col-lg-4 { flex:0 0 33.333%; max-width:33.333%; }
  .col-lg-6 { flex:0 0 50%; max-width:50%; }
}
@media (min-width:1200px){
  .col-xl-3 { flex:0 0 25%; max-width:25%; }
  .col-xl-4 { flex:0 0 33.333%; max-width:33.333%; }
  .col-xl-6 { flex:0 0 50%; max-width:50%; }
}

/* =====================
   Navbar (bez collapse/toggler)
   ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: .5rem 1rem;
  background-color: var(--ct-dark);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ct-border);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.125rem;
  margin-right: 1rem;
  display: inline-flex;
  align-items: center;
}

.navbar-brand img {
  margin-right: .5rem;
}

.navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  width: auto;
}

.nav-item {
  display: inline-block;
}

.nav-link {
  display: inline-block;
  padding: .5rem .75rem;
  border-radius: 10px;
  color: #ffffff;
  opacity: .9;
  transition: opacity .2s ease, background-color .2s ease;
}

.nav-link:hover,
.nav-link:focus {
  opacity: 1;
  text-decoration: none;
  background-color: rgba(255,255,255,.08);
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
  color: #ffffff;
}

.bg-dark {
  background-color: var(--ct-dark);
}

/* Utility do wyrównania nawigacji do prawej */
.ml-auto {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* =====================
   Przyciski
   ===================== */
.btn { display: inline-block; font-weight: 600; line-height: 1.25; padding: .5rem 1rem; border: 1px solid transparent; border-radius: 10px; background-color: rgba(0,50,124,0.199); color: #fff; cursor: pointer; user-select: none; transition: transform .05s ease, filter .2s ease, background-color .2s ease; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .65; cursor: not-allowed; }
.btn-primary { background-color: var(--ct-primary); border-color: var(--ct-primary); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background-color: #6c757d; border-color: #6c757d; }
.btn-outline-light { background: transparent; color:#fff; border-color: rgba(255,255,255,.6); }
.btn-sm { padding: .25rem .5rem; font-size: .875rem; }
.btn-lg { padding: .75rem 1.25rem; font-size: 1.125rem; border-radius: 12px; }

/* =====================
   Jumbotron / hero
   ===================== */
.jumbotron { position: relative; background-image: url(../img/wallpaper.gif); background-size: cover; background-position: center; height: 500px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin-bottom: 0; border-radius: var(--ct-radius); overflow: hidden; box-shadow: var(--ct-shadow); }
.jumbotron::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.jumbotron .container { position: relative; z-index: 1; background-color: rgba(7,6,6,0.397); padding: 30px; border-radius: var(--ct-radius); }

/* =====================
   Karty, tabele, formularze
   ===================== */
.card { background: rgba(0,0,0,.35); border: 1px solid var(--ct-border); border-radius: var(--ct-radius); box-shadow: var(--ct-shadow); overflow: hidden; }
.card-body { padding: 1rem; }

.table { width:100%; border-collapse: collapse; background: rgba(0,0,0,.35); border-radius: var(--ct-radius); overflow: hidden; }
.table th, .table td { padding: .75rem; border-bottom: 1px solid var(--ct-border); text-align: left; }
.table thead th { font-weight: 700; }

.form-control { display:block; width:100%; padding:.5rem .75rem; background: rgba(0,0,0,.35); color:#fff; border:1px solid var(--ct-border); border-radius: 10px; outline: none; }
.form-control::placeholder { color: rgba(255,255,255,.6); }
.form-control:focus { border-color: var(--ct-primary); box-shadow: 0 0 0 3px rgba(37,124,255,.25); }

/* =====================
   Utility
   ===================== */
.d-flex{display:flex!important} .flex-column{flex-direction:column!important} .flex-row{flex-direction:row!important}
.justify-content-start{justify-content:flex-start!important} .justify-content-center{justify-content:center!important} .justify-content-between{justify-content:space-between!important}
.align-items-start{align-items:flex-start!important} .align-items-center{align-items:center!important} .align-items-end{align-items:flex-end!important}
.text-left{text-align:left!important} .text-center{text-align:center!important} .text-right{text-align:right!important}
.w-100{width:100%!important}
.rounded{border-radius: var(--ct-radius)!important}
.shadow{box-shadow: var(--ct-shadow)!important}
.align-top{vertical-align:top!important}

/* =====================
   Stopka i niestandardowe
   ===================== */
.footer { margin-top: auto; }
.coloraccent { color: #fff; }
.stat-number { font-size: 2rem; color: var(--ct-primary); }
.blue { color: var(--ct-accent); }
.infooo { color: var(--ct-muted); }
.background-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; border-radius: var(--ct-radius); }
.border-radius { border-radius: var(--ct-radius); }
.background-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; border-radius: var(--ct-radius); }
.imgrounded, .rounded-circle { border-radius: 50%; }
.scaling { transform: scale(1.1); }
.containerv2 { position: relative; padding-bottom: 30px; padding-inline: 5%; }
.pading { transform: translateY(20%); }
.fade-out { opacity: 1; animation: fadeout .2s ease-in-out forwards; }
@keyframes fadeout { to { opacity: 0; } }
.fade-in { opacity: 0; animation: fadeIn .2s ease-in-out forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.bg-glass { background: rgba(0,0,0,.35); border: 1px solid var(--ct-border); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.alert { position: relative; padding: .75rem 1rem; border: 1px solid var(--ct-border); border-radius: 10px; background: rgba(0,0,0,.35); }
.alert-primary { border-color: rgba(37,124,255,.4); box-shadow: inset 0 0 0 1px rgba(37,124,255,.25); }


/* =============================================================
   Central Transport — Dashboard add-on (sidebar + utilities)
   Wersja bez Bootstrapa. Zintegrowane z paletą --ct-*
   ============================================================= */

/* --- layout sidebar + content --- */
.dash-layout {
  display: flex;
  gap: var(--ct-gutter);
}

/* boczny panel nawigacji */
.dash-sidebar {
  width: 240px;
  min-height: calc(100vh - 120px);
  background: var(--ct-dark-solid);
  color: var(--ct-text);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  padding: 16px;
  box-shadow: var(--ct-shadow);
  position: sticky;
  top: 15px;
}

.dash-sidebar__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 12px;
}

.dash-section {
  margin: 16px 0 6px;
  font-size: 12px;
  color: var(--ct-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* linki w nawigacji */
.dash-nav { display: flex; flex-direction: column; gap: 6px; }

.dash-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ct-text);
  opacity: .9;
  transition: background .2s ease, opacity .2s ease;
}

.dash-link:hover {
  background: rgba(255,255,255,.06);
  opacity: 1;
  text-decoration: none;
}

.dash-link.active {
  background: rgba(37,124,255,.18); /* var(--ct-primary) tint */
  box-shadow: inset 0 0 0 1px rgba(37,124,255,.30);
  opacity: 1;
}

.dash-link.danger { color: #ff8080; }
.dash-link.danger:hover { background: rgba(255,0,0,.08); }

/* obszar treści dashboardu */
.dash-main { flex: 1; }

/* --- utilities użyte w szablonach --- */
.table-responsive { width: 100%; overflow-x: auto; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ct-gutter);
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.inline-row { display: inline-flex; align-items: center; gap: 8px; }
.align-end  { display: flex; align-items: end; }
.narrow     { max-width: 120px; }
.spacer     { height: 10px; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* lekki przycisk obrysowy do +/- punktów */
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid var(--ct-border);
  padding: .5rem .75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s ease, filter .2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,.08); }


/* =============================================================
   MOBILE FIXES (dopisz na końcu style.css)
   - bez zmian nazw klas/HTML
   ============================================================= */

/* 1) Mobile viewport + tło: fixed na telefonach potrafi lagować i psuć scroll */
@media (max-width: 575.98px) {
  body {
    background-attachment: scroll; /* zamiast fixed na telefonie */
    min-height: 100svh;            /* lepsze niż 100vh na mobile */
  }
}

/* 2) Bezpieczne zawijanie tekstu i elementów, żeby nie wychodziły poza ekran */
* {
  min-width: 0;
}
body {
  overflow-x: hidden;
}
p, h1, h2, h3, h4, h5, h6, a, td, th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =============================================================
   MOBILE NAVBAR → LISTA (bez zmian HTML)
   ============================================================= */
@media (max-width: 894.98px) {

  /* cały navbar w kolumnie */
  .navbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* brand na górze */
  .navbar-brand {
    width: 100%;
    justify-content: center;
    margin-right: 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--ct-border);
  }

  /* lista linków = pionowa lista */
  .navbar-nav {
    flex-direction: column;
    width: 100%;
    gap: 6px;
    margin-top: 6px;
  }

  /* element listy */
  .nav-item {
    width: 100%;
  }

  /* link jako pełna belka */
  .nav-link {
    width: 100%;
    display: block;
    text-align: center;
    padding: .65rem .75rem;
    border-radius: 12px;
  }

  /* hover/active bardziej „listowy” */
  .nav-link:hover,
  .nav-link:focus {
    background-color: rgba(255,255,255,.12);
  }

  /* jeśli używasz .ml-auto – na mobile nie wypychamy */
  .ml-auto {
    margin-left: 0 !important;
  }
}


/* 4) Container: mniejszy gutter na telefonie */
@media (max-width: 575.98px) {
  :root { --ct-gutter: 12px; }
  .container { padding-left: var(--ct-gutter); padding-right: var(--ct-gutter); }
  .row { margin-left: calc(var(--ct-gutter) * -1); margin-right: calc(var(--ct-gutter) * -1); }
  [class^="col"], [class*=" col"] { padding-left: var(--ct-gutter); padding-right: var(--ct-gutter); }
}

/* 5) Jumbotron/hero: 500px na telefonie bywa za duże – dajemy elastyczną wysokość */
@media (max-width: 575.98px) {
  .jumbotron {
    height: auto;
    min-height: 320px;
    padding: 16px;
    border-radius: 16px;
  }

  .jumbotron .container {
    padding: 16px;
    border-radius: 16px;
  }
}

/* 6) Karty i tabele: mniejsze paddingi na mobile + responsywna tabela */
@media (max-width: 575.98px) {
  .card-body { padding: .85rem; }

  .table th, .table td { padding: .55rem; }
  .table { display: block; }            /* pomaga gdy border-radius + overflow */
  .table-responsive { -webkit-overflow-scrolling: touch; }
}

/* 7) Dashboard: sidebar pod treść na telefonie (zamiast obok) */
@media (max-width: 991.98px) {
  .dash-layout {
    flex-direction: column;
  }

  .dash-sidebar {
    width: 100%;
    min-height: auto;
    position: static;        /* sticky na mobile często przeszkadza */
    top: auto;
    padding: 14px;
  }
}

/* 8) Przyciski i inputy: lepsze „tap targets” na telefonie */
@media (max-width: 575.98px) {
  .btn, .btn-ghost, .form-control, .nav-link {
    -webkit-tap-highlight-color: transparent;
  }

  .btn, .btn-ghost {
    padding: .6rem .9rem;
  }

  .form-control {
    padding: .6rem .75rem;
  }
}

/* 9) Drobne: elementy, które potrafią „uciekać” */
.scaling { max-width: 100%; }
.background-image { max-width: 100%; }

/* 10) Jeśli używasz .pading (translateY(20%)) – na telefonie często rozwala układ */
@media (max-width: 575.98px) {
  .pading { transform: none; }
}

