/* ========================================================================== */
/*  PKA Gdynia - Style                                                      */
/*  Uproszczona, bardziej firmowa wersja CSS                                */
/* ========================================================================== */

:root {
  /* Kolory firmowe / bazowe */
  --pka-navy: #003366;
  --pka-navy-dark: #00264d;
  --pka-blue: #007bff;
  --pka-blue-soft: #e6f0ff;
  --pka-gold: #ffb000;

  --bg-main: #f5f7fb;
  --bg-card: #ffffff;
  --bg-card-soft: #ffffffcc;

  --text-main: #1f2933;
  --text-muted: #6b7280;
  --text-invert: #ffffff;

  --border-soft: #d0d7e2;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.12);

  --transition-fast: 0.15s ease-out;
  --transition: 0.2s ease-out;

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ========================================================================== */
/*  RESET                                                                    */
/* ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* ========================================================================== */
/*  BODY I UKLAD                                                             */
/* ========================================================================== */

body {
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text-main);
  background:
    radial-gradient(circle at top left,  #C7D2FE 0,  #EFF6FF 40%, transparent 70%),
    radial-gradient(circle at bottom right, #BFDBFE 0, #EFF6FF 40%, transparent 70%),
    linear-gradient(180deg, #E0F2FF 0%, #F9FBFF 40%, #EFF6FF 100%);
}

/* Główny kontener treści (pod top-bar + nav) */
.content {
  max-width: 1400px;
  margin: 80px auto 40px;
  padding: 0 16px 40px;
}

/* ========================================================================== */
/*  TOP BAR / NAV BAR                                                        */
/* ========================================================================== */

/* TOP BAR — jasny wariant modern blue */
.top-bar {
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 14px 26px;

  background: linear-gradient(
      135deg,
      #EBF3FF 0%,
      #D8E8FF 35%,
      #BFD6FF 100%
  );

  color: var(--pka-navy-dark);
  border-bottom: 1px solid #c9d6ea;
  box-shadow: 0 4px 12px rgba(0, 40, 90, 0.08);
}

/* logo */
.top-bar .logo img {
  height: 100px;
  width: auto;
  display: block;
}

/* nagłówek po środku */
.top-bar h1 {
  flex: 1 1 auto;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  color: #1E3A5F;
}

/* prawa część */
.top-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* user info */
.top-bar .user-info {
  color: #29476F;
  text-align: right;
  line-height: 1.3;
  font-size: 13px;
}

.top-bar .user-name,
.top-bar .user-number {
  font-weight: 700;
  color: #1E3A5F;
  font-size: 14px;
}

.top-bar .user-label {
  font-size: 12px;
  color: #64748B;        /* trochę jaśniejszy, opisowy tekst */
}

/* przyciski w headerze */
.top-right a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #AFC4E6;
  background: #ffffff;
  color: #1E3A5F;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.top-right a:hover {
  background-color: #F0F6FF;
  border-color: #88A6D8;
  box-shadow: 0 2px 8px rgba(0, 40, 90, 0.15);
  transform: translateY(-2px);
}

/* Pasek z tytułem sekcji (np. GRAFIK KIEROWCÓW) */
.nav-bar {
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.nav-bar span {
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--pka-navy-dark);
}

/* ========================================================================== */
/*  PRZYCISKI                                                                */
/* ========================================================================== */

.btn,
button,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  background-color: var(--pka-blue);
  color: var(--text-invert);
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background-color: #0062cc;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Warianty */
.btn-secondary {
  background-color: #ffffff;
  color: var(--pka-navy);
  border-color: var(--border-soft);
}
.btn-secondary:hover {
  background-color: #f1f5f9;
}

.btn-danger {
  background-color: #dc2626;
}
.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-success {
  background-color: #16a34a;
}
.btn-success:hover {
  background-color: #15803d;
}

.btn-warning {
  background-color: #f59e0b;
}
.btn-warning:hover {
  background-color: #d97706;
}

.btn-info {
  background-color: #0ea5e9;
}
.btn-info:hover {
  background-color: #0284c7;
}

.btn-small {
  padding: 4px 10px;
  font-size: 12px;
}

.logout-btn {
  padding-inline: 12px;
  font-size: 12px;
}

/* przyciski w nagłówkach (Planista, Zarządzenia, Archiwum, PDF) */
.grafik-header a,
.header-buttons a,
.archive-card .header-buttons a,
.zarz-header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  background-color: #ffffff;
  color: var(--pka-navy);
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.grafik-header a:hover,
.header-buttons a:hover,
.archive-card .header-buttons a:hover,
.zarz-header a:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Główny przycisk: Pobierz PDF */
.grafik-header a.download-btn {
  background: #2563EB;
  border-color: #1D4ED8;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.grafik-header a.download-btn:hover {
  background: #1D4ED8;
  border-color: #1E40AF;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
  transform: translateY(-1px);
}

/* ========================================================================== */
/*  KARTY / BLOKI                                                            */
/* ========================================================================== */

.card,
.grafik-card,
.add-user-card,
.archive-card {
  background: var(--bg-card-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  backdrop-filter: blur(4px);
}

/* Główna karta z grafikiem */
.grafik-card {
  margin: 0 auto;
  max-width: 1120px;
}

/* Nagłówek grafiku / sekcji */
.grafik-header,
.header-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.grafik-header h2,
.archive-card h2,
.card h2 {
  margin: 0;
  font-size: 20px;
  color: var(--pka-navy-dark);
}

/* ========================================================================== */
/*  LOGIN                                                                    */
/* ========================================================================== */

.login-container {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 40px;
}

.login-box {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  padding: 24px 22px 28px;
}

.login-box h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  text-align: center;
  color: var(--pka-navy-dark);
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  font-size: 14px;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
  border-color: var(--pka-blue);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.login-box .error {
  margin-top: 4px;
  font-size: 12px;
  color: #b91c1c;
  text-align: center;
}

/* ========================================================================== */
/*  FORMULARZE / INPUTY OGÓLNE                                               */
/* ========================================================================== */

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  font-family: var(--font-main);
}

.planner-form,
.orders-form,
.add-user-card form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.orders-field,
.add-user-field,
.planner-field,
.planner-field-date {
  flex: 1 1 180px;
  min-width: 160px;
}

.orders-field label,
.add-user-field label,
.planner-field label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.orders-field input,
.orders-field textarea,
.add-user-field input,
.planner-field input,
.planner-field-date input,
select {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  font-size: 13px;
}

.orders-field textarea {
  min-height: 80px;
  resize: vertical;
}

/* ========================================================================== */
/*  TABELA GRAFIKU / ARCHIWUM / ZARZADZENIA                                  */
/* ========================================================================== */

.table-wrapper,
.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: #ffffff;
}

.grafik-table,
.archive-table,
.zarz-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.grafik-table thead,
.archive-table thead,
.zarz-table thead,
.data-table thead {
  background: var(--pka-navy);
  color: var(--text-invert);
}

.grafik-table th,
.grafik-table td,
.archive-table th,
.archive-table td,
.zarz-table th,
.zarz-table td,
.data-table th,
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.grafik-table tbody tr:nth-child(odd),
.archive-table tbody tr:nth-child(odd),
.zarz-table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(odd) {
  background: #f9fafb;
}

.grafik-table tbody tr:hover,
.archive-table tbody tr:hover,
.zarz-table tbody tr:hover,
.data-table tbody tr:hover {
  background: #eef2ff;
}

/* ========================================================================== */
/*  BADGE / STATUSY                                                          */
/* ========================================================================== */

.badge,
.status-badge,
.role-badge,
.zarz-badge-nowe,
.day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge {
  background: var(--pka-blue-soft);
  color: var(--pka-navy);
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-blocked {
  background: #fee2e2;
  color: #b91c1c;
}

.status-warning {
  background: #fef3c7;
  color: #92400e;
}

.role-badge-admin {
  background: var(--pka-navy);
  color: var(--text-invert);
}
.role-badge-planista {
  background: #0ea5e9;
  color: #0f172a;
}
.role-badge-user {
  background: #e5e7eb;
  color: #374151;
}

.zarz-badge-nowe {
  background: var(--pka-gold);
  color: #1f2933;
}

.day-badge {
  background: #e0f2fe;
  color: #1d4ed8;
}

/* DOMYŚLNIE: etykiety w komórkach są ukryte (PC) */
.grafik-label {
  display: none;
}

/* ========================================================================== */
/*  ZARZADZENIA / ARCHIWUM                                                   */
/* ========================================================================== */

.archive-card {
  margin: 0 auto;
  max-width: 1120px;
}

.header-buttons {
  gap: 10px;
}

.archive-empty,
p.empty {
  font-size: 15px;
  color: var(--pka-navy);
  text-align: center;
  background: var(--bg-card-soft);
  padding: 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

/* ========================================================================== */
/*  PANEL ADMINA – zakładki + panele                                         */
/* ========================================================================== */

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* wspólny wygląd dla buttonów i linków */
.admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #e5edf9;
  color: var(--pka-navy);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

/* usunięcie domyślnego stylu przycisku */
.admin-tab[type="button"] {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
}

/* hover dla wszystkich zakładek */
.admin-tab:hover {
  background: #d6e4ff;
  border-color: #c0cff9;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

/* stan aktywny */
.admin-tab.active {
  background: #ffffff;
  border-color: var(--border-soft);
  color: var(--pka-navy-dark);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
}

/* linki "Ataki" / "Licencja" */
.admin-tab-link {
  text-decoration: none;
  color: inherit;
}

/* panele z treścią */
.admin-tab-pane {
  display: none;
}
.admin-tab-pane[style*="display:block"],
.admin-tab-pane.active {
  display: block;
}

/* ========================================================================== */
/*  PANEL ADMINA – przewijane tabele                                         */
/* ========================================================================== */

/* Użytkownicy – przewijana lista w środku karty */
#admin-users .table-wrapper {
  max-height: 450px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: #ffffff;
}

/* Logi bezpieczeństwa – tak samo */
#admin-security .table-wrapper {
  max-height: 450px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: #ffffff;
}

/* scrollbar (tylko WebKit) */
#admin-users .table-wrapper::-webkit-scrollbar,
#admin-security .table-wrapper::-webkit-scrollbar {
  width: 8px;
}
#admin-users .table-wrapper::-webkit-scrollbar-thumb,
#admin-security .table-wrapper::-webkit-scrollbar-thumb {
  background: #c3d2ff;
  border-radius: 999px;
}
#admin-users .table-wrapper::-webkit-scrollbar-thumb:hover,
#admin-security .table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #9bb5ff;
}

/* ========================================================================== */
/*  ZMIANA HASLA                                                             */
/* ========================================================================== */

.change-password-card {
  max-width: 420px;
  margin: 0 auto;
}

.change-password-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.password-strength {
  font-size: 11px;
  color: var(--text-muted);
}

/* ========================================================================== */
/*  DROBNE ELEMENTY                                                          */
/* ========================================================================== */

.user-info {
  font-size: 13px;
  color: var(--text-muted);
}

.text-muted {
  color: var(--text-muted);
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }

/* ========================================================================== */
/*  RESPONSIVE - TABELA GRAFIKU = KAFELKI NA TELEFONIE                       */
/* ========================================================================== */

@media (max-width: 800px) {
  .grafik-table thead {
    display: none;
  }

  .grafik-table,
  .grafik-table tbody {
    display: block;
    width: 100%;
  }

  .grafik-table tr {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
  }

  .grafik-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 4px 0;
    white-space: normal;
  }

  .grafik-table td:last-child {
    border-bottom: none;
  }

  .grafik-label {
    display: inline-block;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 8px;
    flex: 0 0 45%;
    max-width: 45%;
  }

  .grafik-value {
    flex: 1 1 auto;
  }
}

/* Powiadomienie o nowych poleceniach / informacjach nad kartą grafiku */
.orders-alert {
  text-align: center;
  margin: 16px auto;
  padding: 8px 18px;
  display: block;              /* blok + margin auto = wycentrowane */
  max-width: 650px;            /* szerokość „pigułki” */
  border-radius: 999px;
  background: #EEF2FF;
  color: #1E3A5F;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* link w środku powiadomienia */
.orders-alert a {
  margin-left: 6px;
  color: #1D4ED8;
  font-weight: 600;
  text-decoration: none;
}

.orders-alert a:hover {
  text-decoration: underline;
}

/* ========================================================================== */
/*  RESPONSIVE OGOLNE                                                        */
/* ========================================================================== */

@media (max-width: 900px) {
  .top-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 16px;
  }

  .top-bar .logo {
    order: 1;
    margin-bottom: 4px;
  }

  .top-bar h1 {
    order: 2;
    font-size: 16px;
    margin: 0 0 6px 0;
  }

  .top-right {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }

  .top-bar .logo img {
    height: 140px;
    margin: 0 auto;
  }

  .content {
    margin-top: 20px;
    padding-inline: 12px;
  }

  .grafik-card,
  .archive-card {
    padding: 16px;
  }

  .grafik-header {
    align-items: flex-start;
  }
}

/* schowanie domyślnej ikonki kalendarza w Chrome / Edge / Safari */
.date-input::-webkit-inner-spin-button,
.date-input::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
}

/* dla Firefoxa i reszty – uproszczenie wyglądu */
.date-input {
  -moz-appearance: textfield;
  text-align: center;
}

/* ========================================================================== */
/*  ATAKI & ANOMALIE – wygląd                                               */
/* ========================================================================== */

.attacks-card {
  margin-bottom: 20px;
}

.attacks-filter-row {
  margin-bottom: 12px;
}

.ip-header {
  width: 100%;
  margin: 6px 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #eef2ff;
  color: var(--pka-navy-dark);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.ip-header:hover {
  background: #e0e7ff;
  border-color: #c4cdfa;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.ip-label {
  flex: 1 1 auto;
}

.ip-count {
  font-size: 12px;
  color: var(--text-muted);
}

.ip-arrow {
  flex: 0 0 auto;
}

.ip-block {
  margin: 4px 0 10px 0;
  padding-left: 8px;
  border-left: 2px solid #cbd5f5;
}

.ip-block .table-scroll {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.attack-cell {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 8px;
}

.attack-xss {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
}

.attack-sqli {
  background: #fff7ed;
  border-left: 4px solid #ea580c;
}

.attack-trav {
  background: #ecfeff;
  border-left: 4px solid #06b6d4;
}

.attack-lfi {
  background: #f5f3ff;
  border-left: 4px solid #7c3aed;
}

.attack-soft {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
}

.attack-other {
  background: #f9fafb;
  border-left: 4px solid #9ca3af;
}

.chart-box {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 768px) {
  .ip-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .ip-count {
    font-size: 11px;
  }
}

/* ========================================================================== */
/*  ZARZĄDZANIE LICENCJĄ                                                     */
/* ========================================================================== */

.license-card {
  max-width: 720px;
  margin: 0 auto 24px;
}

.license-message {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 500;
}

.license-message-ok {
  color: #15803d;
}

.license-message-error {
  color: #b91c1c;
}

.license-status {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: #f9fafb;
  margin-bottom: 20px;
}

.license-status-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.license-status-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.license-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.license-status-pill-ok {
  background: #16a34a;
  color: #ffffff;
}

.license-status-pill-error {
  background: #dc2626;
  color: #ffffff;
}

.license-status-text {
  margin-top: 6px;
  font-size: 13px;
}

.license-upload h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--pka-navy-dark);
}

.license-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.license-file-input {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  font-size: 13px;
  background: #ffffff;
  max-width: 260px;
}

@media (max-width: 600px) {
  .license-form {
    flex-direction: column;
    align-items: stretch;
  }

  .license-file-input {
    max-width: 100%;
  }

  .license-form .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================================================== */
/*  PANEL ADMINA – uporządkowana kolumna AKCJE                                */
/* ========================================================================== */

.data-table td.actions {
  min-width: 180px;
  vertical-align: top;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.data-table td.actions form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.actions input[type="password"],
.actions input[type="text"] {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
}

.actions .btn,
.actions button {
  font-size: 12px;
  padding: 6px 8px;
  width: 100%;
  border-radius: 6px;
  justify-content: center;
}

.actions select {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 6px;
}

.actions .btn-warning {
  background-color: #f59e0b;
}
.actions .btn-warning:hover {
  background-color: #d97706;
}

.actions .btn-danger {
  background-color: #dc2626;
}
.actions .btn-danger:hover {
  background-color: #b91c1c;
}

.actions .btn-success {
  background-color: #16a34a;
}
.actions .btn-success:hover {
  background-color: #15803d;
}

.actions .btn-info {
  background-color: #0ea5e9;
}
.actions .btn-info:hover {
  background-color: #0284c7;
}

/* Podświetlenie wiersza z dzisiaj */
.today-row {
  background: #e8f1ff !important;
}

.today-row:hover {
  background: #dce8ff !important;
}
/* Karta z polityką prywatności */
.privacy-card {
  max-width: 900px;
  margin: 0 auto 32px;
}

.privacy-card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 22px;
  color: var(--pka-navy-dark);
}

.privacy-card h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--pka-navy);
}

.privacy-card p,
.privacy-card li {
  font-size: 14px;
  line-height: 1.5;
}

/* Stopka z linkiem do polityki */
.site-footer {
  margin-top: 24px;
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.site-footer a {
  margin-left: 8px;
  color: #1D4ED8;
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ========================================================================== */
/*  LOGIN – top-bar: Desktop = logo lewo + h1 center                          */
/* ========================================================================== */

body.login-page .top-bar {
  position: relative;
  justify-content: flex-start;
}

body.login-page .top-bar h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  margin: 0;
}

body.login-page .top-bar .logo img {
  height: 120px;
}

/* LOGIN – MOBILE (logo u góry, napis pod spodem) */
@media (max-width: 900px) {
  body.login-page .top-bar {
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
  }

  body.login-page .top-bar .logo img {
    height: 140px;
    margin: 0 auto;
  }

  body.login-page .top-bar h1 {
    position: static;
    transform: none;
    width: auto;
    margin-top: 6px;
    text-align: center;
    font-size: 18px;
  }
}
