/* /assets/css/main.css
   Główny styl (niebieska identyfikacja + WCAG: focus, czytelność, kontrast).
   Możesz bezpiecznie modyfikować kolory w :root.
*/

:root{
  /* Niebieska paleta (łatwo podmienić pod Twoją stronę) */
  --blue-950:#061a4a;
  --blue-900:#0b2f8a;
  --blue-800:#103aa7;
  --blue-700:#1447c5;
  --blue-600:#1f5fff;

  --text:#0b1220;
  --muted:#3b4a66;

  --bg:#ffffff;
  --surface:#ffffff;
  --surface-alt: rgba(20,71,197,.05);

  --border:#d9e2f2;

  /* Fokus WCAG */
  --focus:#ffbf47;

  /* Stany */
  --danger:#b00020;
  --ok:#0f7b2b;
  --warn:#8a5a00;

  --radius:16px;
  --radius-sm:12px;

  --shadow: 0 1px 0 rgba(10,30,80,.05);
}

/* Reset / baza */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.45;
  background:var(--bg);
  color:var(--text);
}

a{color:inherit}
a:hover{text-decoration:underline}
code{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}

/* Skip link */
.skip{
  position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;
}
.skip:focus{
  left:12px;top:12px;width:auto;height:auto;padding:10px 12px;
  background:#fff;border:3px solid var(--focus);
  border-radius:10px;z-index:9999;
}

/* Układ */
.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:22px;
}

header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

header h1{
  font-size:1.35rem;
  margin:0;
}
header p{
  margin:6px 0 0;
  color:var(--muted);
}

main{margin-top:18px}

/* Nawigacja */
nav{display:flex;gap:10px;flex-wrap:wrap}

/* Karty */
.card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  padding:16px;
  box-shadow:var(--shadow);
}

/* Grid */
.grid{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:14px;
}
.col12{grid-column:span 12}
.col6{grid-column:span 6}
@media (max-width: 860px){
  .col6{grid-column:span 12}
}

/* Przyciski / linki-akcje */
.btn,
.btn-outline{
  display:inline-block;
  padding:10px 14px;
  border-radius:var(--radius-sm);
  border:2px solid var(--blue-700);
  text-decoration:none;
  font-weight:800;
  cursor:pointer;
}
.btn{
  background:var(--blue-700);
  color:#fff;
}
.btn:hover{filter:brightness(0.95)}
.btn-outline{
  background:#fff;
  color:var(--blue-700);
}
.btn-outline:hover{background:rgba(20,71,197,.06)}

/* Fokus (klawiatura) */
:focus{
  outline:3px solid var(--focus);
  outline-offset:2px;
}
:focus:not(:focus-visible){
  outline:none;
}
:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:2px;
}

/* Teksty pomocnicze */
.muted{color:var(--muted)}
.small{font-size:.95rem}

/* Pille / statusy */
.pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(31,95,255,.22);
  background:rgba(31,95,255,.10);
  color:var(--blue-900);
  font-weight:800;
  font-size:.9rem;
}
.pill.ok{
  border-color:rgba(15,123,43,.28);
  background:rgba(15,123,43,.08);
  color:var(--ok);
}
.pill.bad{
  border-color:rgba(176,0,32,.28);
  background:rgba(176,0,32,.08);
  color:var(--danger);
}
.pill.warn{
  border-color:rgba(138,90,0,.28);
  background:rgba(138,90,0,.08);
  color:var(--warn);
}

/* Alerty */
.notice{
  border:2px solid var(--danger);
  border-radius:var(--radius);
  padding:12px;
  background:#fff;
  margin-top:12px;
}
.success{
  border:2px solid rgba(15,123,43,.35);
  background:rgba(15,123,43,.06);
  border-radius:var(--radius);
  padding:12px;
  margin-top:12px;
}

/* Formularze */
fieldset{
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  margin:14px 0;
}
legend{
  font-weight:900;
  color:var(--blue-900);
  padding:0 6px;
}

label{
  display:block;
  font-weight:800;
  margin-bottom:6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="datetime-local"],
select,
textarea{
  width:100%;
  padding:10px;
  border:1px solid #b8c6e6;
  border-radius:12px;
  font:inherit;
  background:#fff;
  color:var(--text);
}

textarea{min-height:110px;resize:vertical}

.hint{
  color:var(--muted);
  margin-top:6px;
  font-size:.95rem;
}

.err{
  color:var(--danger);
  margin-top:6px;
}

.errsum{
  border:2px solid var(--danger);
  border-radius:14px;
  padding:12px;
  margin:12px 0;
  background:#fff;
}

/* Checkbox/radio w wierszu */
.checkrow{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:10px 0;
}
.checkrow input{margin-top:4px}

/* Tabele */
.table-wrap{
  overflow:auto;
  border-radius:14px;
  border:1px solid var(--border);
}
table{
  width:100%;
  border-collapse:collapse;
}
caption{
  caption-side:top;
  text-align:left;
  font-weight:900;
  margin:0 0 10px;
  color:var(--blue-900);
}
th,td{
  border-top:1px solid var(--border);
  padding:10px;
  vertical-align:top;
}
th{
  font-weight:900;
  text-align:left;
  white-space:nowrap;
}

/* „Kafelki”/sekcje informacyjne */
.info{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  background:var(--surface-alt);
}

/* Drobne */
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}