/* ======================================================
   AquaForce Systems – styles.css
   Biało–niebieska stylistyka | Login / Panel
   ====================================================== */

:root{
  --af-blue-900:#0b2a5a;
  --af-blue-800:#0e3c80;
  --af-blue-700:#114b9b;
  --af-blue-600:#1e66d0;
  --af-blue-500:#2f80ed;
  --af-blue-100:#e9f2ff;

  --af-white:#ffffff;
  --af-bg-soft:#f7fbff;

  --af-text:#0d1b2a;
  --af-muted:#5b6b7a;

  --af-border:rgba(17,75,155,.18);
  --af-shadow: 0 18px 45px rgba(11,42,90,.18);
}

/* ================= RESET ================= */

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,body{
  height:100%;
}

body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--af-text);
  background:#fff;
}

/* ================= TŁO ================= */

.af-bg{
  min-height:100%;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(30,102,208,.25), transparent 55%),
    radial-gradient(900px 500px at 90% 30%, rgba(17,75,155,.18), transparent 55%),
    linear-gradient(180deg, var(--af-blue-100), var(--af-white) 55%);
}

/* ================= LAYOUT ================= */

.af-shell{
  min-height:100%;
  display:grid;
  place-items:center;
  padding:24px;
}

.af-card{
  width:min(520px, 100%);
  background:var(--af-white);
  border:1px solid var(--af-border);
  border-radius:18px;
  box-shadow:var(--af-shadow);
  padding:24px 24px 20px;
}

/* ================= BRAND / LOGO ================= */

.af-brand{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}

.af-mark{
  width:64px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.af-logo{
  background:transparent;
}

.af-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.af-title{
  font-weight:800;
  font-size:18px;
  line-height:1.2;
}

.af-subtitle{
  font-size:13px;
  color:var(--af-muted);
  margin-top:2px;
}

/* ================= FORM ================= */

.af-form{
  margin-top:10px;
  display:grid;
  gap:12px;
}

.af-label{
  font-size:13px;
  font-weight:700;
  color:var(--af-blue-900);
}

.af-input{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--af-border);
  background:var(--af-bg-soft);
  outline:none;
  font-size:14px;
  transition:border-color .15s ease, box-shadow .15s ease;
}

.af-input::placeholder{
  color:#9aa9bb;
}

.af-input:focus{
  border-color:rgba(30,102,208,.6);
  box-shadow:0 0 0 4px rgba(30,102,208,.14);
  background:#fff;
}

/* ================= BUTTON ================= */

.af-btn{
  margin-top:8px;
  border:none;
  border-radius:12px;
  padding:13px 16px;
  font-weight:800;
  font-size:14px;
  color:#fff;
  background:linear-gradient(135deg, var(--af-blue-700), var(--af-blue-600));
  cursor:pointer;
  transition:transform .06s ease, filter .15s ease, box-shadow .15s ease;
}

.af-btn:hover{
  filter:brightness(1.05);
  box-shadow:0 8px 22px rgba(30,102,208,.35);
}

.af-btn:active{
  transform:translateY(1px);
}

/* ================= ALERT ================= */

.af-alert{
  margin:10px 0 6px;
  padding:11px 13px;
  border-radius:12px;
  background:rgba(30,102,208,.08);
  border:1px solid rgba(30,102,208,.25);
  color:var(--af-blue-900);
  font-size:13px;
}

/* ================= FOOTNOTE ================= */

.af-footnote{
  margin-top:12px;
  font-size:12px;
  color:var(--af-muted);
  line-height:1.4;
  text-align:center;
}

/* ================= DASHBOARD ================= */

.af-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.af-brand-mini{
  display:flex;
  align-items:center;
  gap:12px;
}

.af-content{
  margin-top:18px;
}

.af-h1{
  font-size:20px;
  margin:0 0 8px;
}

.af-p{
  margin:0 0 16px;
  color:var(--af-muted);
}

/* ================= GRID ================= */

.af-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
}

@media (max-width:520px){
  .af-grid{
    grid-template-columns:1fr;
  }
}

/* ================= TILE ================= */

.af-tile{
  border:1px solid var(--af-border);
  background:linear-gradient(180deg, #ffffff, rgba(233,242,255,.6));
  border-radius:14px;
  padding:14px;
}

.af-tile-title{
  font-size:12px;
  font-weight:700;
  color:var(--af-muted);
}

.af-tile-value{
  margin-top:6px;
  font-size:14px;
  font-weight:900;
  color:var(--af-blue-900);
}

/* ================= LINK BUTTON ================= */

.af-linkbtn{
  text-decoration:none;
  font-weight:800;
  font-size:13px;
  color:var(--af-blue-700);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--af-border);
  background:#fff;
  transition:box-shadow .15s ease;
}

.af-linkbtn:hover{
  box-shadow:0 0 0 4px rgba(30,102,208,.12);
}

/* ================= ADMIN BOX ================= */

.af-adminbox{
  margin-top:16px;
  padding:14px;
  border-radius:14px;
  background:rgba(30,102,208,.08);
  border:1px solid rgba(30,102,208,.25);
}

/* ================= ACCESSIBILITY ================= */

button:focus-visible,
input:focus-visible,
a:focus-visible{
  outline:2px solid var(--af-blue-600);
  outline-offset:2px;
}
/* ======================================================
   AquaForce – LEWY PASEK NAWIGACYJNY (SIDEBAR)
   ====================================================== */

.af-layout{
  display:flex;
  min-height:100vh;
}

/* SIDEBAR */
.af-sidebar{
  position:fixed;
  top:0;
  left:0;
  width:240px;
  height:100vh;
  background:linear-gradient(180deg, var(--af-blue-900), var(--af-blue-700));
  color:#fff;
  padding:20px 16px;
  box-shadow:4px 0 20px rgba(0,0,0,.15);
  z-index:1000;
}

/* LOGO */
.af-sidebar-brand{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:24px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(255,255,255,.15);
}

.af-sidebar-brand img{
  width:36px;
  height:36px;
  object-fit:contain;
}

.af-sidebar-brand span{
  font-weight:800;
  font-size:16px;
  letter-spacing:.3px;
}

/* NAV */
.af-nav{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.af-nav a{
  display:block;
  padding:12px 14px;
  border-radius:10px;
  color:#fff;
  text-decoration:none;
  font-weight:600;
  font-size:14px;
  transition:background .15s ease, transform .05s ease;
}

.af-nav a:hover{
  background:rgba(255,255,255,.15);
}

.af-nav a.active{
  background:#fff;
  color:var(--af-blue-900);
  font-weight:800;
}

/* GŁÓWNA TREŚĆ */
.af-main{
  margin-left:240px;
  padding:28px;
  width:100%;
}

/* MOBILE */
@media (max-width: 900px){
  .af-sidebar{
    width:200px;
  }
  .af-main{
    margin-left:200px;
  }
}
/* ================= PRACOWNICY – PAGE HEAD ================= */
.af-pagehead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

/* Button jako link (żeby działał jako <a>) */
.af-btn--link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  white-space:nowrap;
}

/* ================= TABELA ================= */
.af-tablecard{
  background:#fff;
  border:1px solid var(--af-border);
  border-radius:16px;
  box-shadow: var(--af-shadow);
  padding:14px;
}

.af-tablewrap{
  width:100%;
  overflow:auto; /* tabela nie rozwali layoutu na małych ekranach */
}

.af-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:900px;
}

.af-table thead th{
  text-align:left;
  font-size:12px;
  color:var(--af-muted);
  font-weight:800;
  padding:12px 10px;
  border-bottom:1px solid var(--af-border);
  background:linear-gradient(180deg, #ffffff, rgba(233,242,255,.55));
  position:sticky;
  top:0;
}

.af-table tbody td{
  padding:12px 10px;
  border-bottom:1px solid rgba(17,75,155,.12);
  font-size:13px;
}

.af-table tbody tr:hover{
  background:rgba(233,242,255,.55);
}

.af-empty{
  text-align:center;
  color:var(--af-muted);
  padding:18px 10px !important;
}

/* ================= BADGE ================= */
.af-badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(255,255,255,.2);
}

.af-badge--ok{
  background:rgba(46, 204, 113, .12);
  color:#1f7a44;
  border-color:rgba(46, 204, 113, .25);
}

.af-badge--off{
  background:rgba(231, 76, 60, .10);
  color:#a63b30;
  border-color:rgba(231, 76, 60, .25);
}
/* ================= FORM CARD (DODAJ PRACOWNIKA) ================= */
.af-formcard{
  background:#fff;
  border:1px solid var(--af-border);
  border-radius:16px;
  box-shadow: var(--af-shadow);
  padding:16px;
}

.af-formgrid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:12px;
}

@media (max-width: 720px){
  .af-pagehead{flex-direction:column; align-items:flex-start;}
  .af-formgrid{grid-template-columns:1fr;}
}
/* ================= Klikalny wiersz tabeli ================= */
.af-row-click{
  cursor:pointer;
}
.af-row-click:focus{
  outline:2px solid rgba(30,102,208,.55);
  outline-offset:-2px;
}

/* ================= MODAL (Popup) ================= */
.af-modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:2000;
}

.af-modal.is-open{
  display:block;
}

.af-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(13,27,42,.55);
}

.af-modal__panel{
  position:relative;
  width:min(680px, calc(100% - 28px));
  margin:70px auto;
  background:#fff;
  border:1px solid var(--af-border);
  border-radius:18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
  overflow:hidden;
  outline:none;
}

.af-modal__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px 12px;
  border-bottom:1px solid rgba(17,75,155,.12);
  background:linear-gradient(180deg, #ffffff, rgba(233,242,255,.6));
}

.af-modal__title{
  font-weight:900;
  color:var(--af-blue-900);
  font-size:16px;
}

.af-modal__subtitle{
  margin-top:3px;
  font-size:12px;
  color:var(--af-muted);
  font-weight:700;
}

.af-modal__close{
  border:1px solid rgba(17,75,155,.18);
  background:#fff;
  border-radius:12px;
  width:40px;
  height:40px;
  font-size:16px;
  cursor:pointer;
}

.af-modal__body{
  padding:16px;
}

.af-modal__grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:12px;
}

.af-modal__item{
  border:1px solid rgba(17,75,155,.12);
  background:linear-gradient(180deg, #ffffff, rgba(233,242,255,.35));
  border-radius:14px;
  padding:12px;
}

.af-modal__item--full{
  grid-column:1 / -1;
}

.af-modal__label{
  font-size:12px;
  color:var(--af-muted);
  font-weight:800;
}

.af-modal__value{
  margin-top:6px;
  font-size:14px;
  font-weight:900;
  color:var(--af-blue-900);
  word-break:break-word;
}

.af-modal__footer{
  padding:12px 16px 16px;
  border-top:1px solid rgba(17,75,155,.12);
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

@media (max-width: 720px){
  .af-modal__panel{ margin:22px auto; }
  .af-modal__grid{ grid-template-columns:1fr; }
}
/* ================= TABS w MODALU ================= */
.af-tabs{
  display:flex;
  gap:8px;
  padding:10px 12px;
  border-bottom:1px solid rgba(17,75,155,.12);
  background:#fff;
}

.af-tab{
  border:1px solid rgba(17,75,155,.18);
  background:#fff;
  color:var(--af-blue-900);
  padding:9px 12px;
  border-radius:999px;
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  transition: box-shadow .15s ease, background .15s ease;
}

.af-tab:hover{
  box-shadow:0 0 0 4px rgba(30,102,208,.10);
}

.af-tab.is-active{
  background:linear-gradient(135deg, var(--af-blue-700), var(--af-blue-600));
  border-color:transparent;
  color:#fff;
}

/* Panele */
.af-tabpanel{
  display:none;
}

.af-tabpanel.is-active{
  display:block;
}

/* Placeholder box w Dokumenty/Powiadomienia */
.af-panelbox{
  border:1px solid rgba(17,75,155,.12);
  background:linear-gradient(180deg, #ffffff, rgba(233,242,255,.45));
  border-radius:14px;
  padding:14px;
}

.af-panelbox__title{
  font-weight:900;
  color:var(--af-blue-900);
  margin-bottom:6px;
}

.af-panelbox__text{
  color:var(--af-muted);
  font-weight:600;
  font-size:13px;
  line-height:1.4;
}
.af-formgrid-full{ grid-column: 1 / -1; }
.af-input textarea{ resize: vertical; }
