html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}


.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.card-hover {
    transition: transform .08s ease, box-shadow .08s ease;
}

    .card-hover:hover {
        transform: translateY(-2px);
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.12);
    }

/* Długie listy (logi, audyty) */
.card.card-log-table {
    background-color: rgba(15, 23, 42, 0.85); /* lekko odcina od tła */
    backdrop-filter: blur(2px);
}


html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.footer {
    position: static !important;
    width: 100%;
    white-space: normal;
    line-height: normal;
}

footer.footer {
    position: static !important;
    inset: auto !important; /* kasuje bottom/left/right jeśli były */
    height: auto !important;
    line-height: normal !important;
    width: 100%;
    flex-shrink: 0;
}

/* tabela logów */
.log-table {
    font-size: 13px;
}

    .log-table tbody tr {
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

        .log-table tbody tr:nth-child(even) {
            background-color: rgba(255,255,255,0.02);
        }

    .log-table td {
        vertical-align: top;
        padding: 6px 8px;
    }

    .log-table .ua {
        color: #9ca3af;
        font-size: 12px;
    }

/* --- Admin: tabelki logów (czytelność) --- */
.admin-log-table {
    font-size: 13px;
}

    .admin-log-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: rgba(15, 23, 42, 0.92); /* pasuje do dark card */
        backdrop-filter: blur(6px);
        border-bottom: 1px solid rgba(255,255,255,0.10);
    }

    .admin-log-table tbody tr {
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

        .admin-log-table tbody tr:nth-child(even) {
            background-color: rgba(255,255,255,0.02);
        }

    .admin-log-table td,
    .admin-log-table th {
        padding: 6px 10px;
        vertical-align: top;
    }

/* UserAgent: zawijanie i mniejszy kontrast */
.admin-log-ua {
    color: rgba(229,231,235,0.85);
    font-size: 12px;
    word-break: break-word;
    max-width: 520px; /* ogranicz szerokość, żeby Info było widoczne */
}

/* IP i czas – węższe */
.admin-log-time {
    white-space: nowrap;
    width: 150px;
}

.admin-log-ip {
    white-space: nowrap;
    width: 90px;
}

.admin-log-ev {
    white-space: nowrap;
    width: 140px;
}

.admin-log-info {
    white-space: nowrap;
    width: 160px;
}

/* FIX: bootstrap .table robi jasne tło – wymuszamy dark look w logach */
.card-log-table .table,
.card-log-table .table > :not(caption) > * > * {
    background-color: transparent !important;
    color: rgba(229,231,235,0.92) !important;
}

    .card-log-table .table thead th {
        color: rgba(229,231,235,0.95) !important;
    }

    /* hover wiersza */
    .card-log-table .table tbody tr:hover {
        background-color: rgba(255,255,255,0.04) !important;
    }

/* linie tabeli (bootstrap używa border-color) */
.card-log-table .table {
    border-color: rgba(255,255,255,0.10) !important;
}

.card-log-table {
    max-height: 680px;
    overflow: auto;
}

.ev-ok {
    color: #34d399;
    font-weight: 600;
}
/* success */
.ev-bad {
    color: #fb7185;
    font-weight: 600;
}
/* failure */
.ev-neutral {
    color: #e5e7eb;
    font-weight: 600;
}
/* logout/others */

/* =========================
   Admin layout + dark tables
   ========================= */

.admin-shell {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* lewy panel */
.admin-sidebar {
    width: 240px;
    position: sticky;
    top: 76px; /* ~ wysokość navbaru */
    align-self: flex-start;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 14px;
    backdrop-filter: blur(8px);
}

.admin-brand {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.admin-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(229,231,235,0.90);
    text-decoration: none;
    margin-bottom: 6px;
}

    .admin-link:hover {
        background: rgba(255,255,255,0.06);
        color: #fff;
    }

    .admin-link.active {
        background: rgba(59,130,246,0.18);
        border: 1px solid rgba(59,130,246,0.30);
        color: #fff;
    }

.admin-content {
    flex: 1;
    min-width: 0;
}

/* karta admin (spójna z logami) */
.admin-card {
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(6px);
}

/* tabela admin w dark stylu */
.admin-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    --bs-table-border-color: rgba(255,255,255,0.08);
    --bs-table-hover-bg: rgba(255,255,255,0.04);
}

    .admin-table thead th {
        background: rgba(15, 23, 42, 0.92);
        color: rgba(229,231,235,0.95);
        border-bottom: 1px solid rgba(255,255,255,0.10);
    }

    .admin-table tbody tr {
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .admin-table td,
    .admin-table th {
        padding: 10px 12px;
    }

/* w LIGHT theme też ma wyglądać sensownie */
html:not([data-theme="dark"]) .admin-sidebar {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(17,24,39,0.10);
}

html:not([data-theme="dark"]) .admin-link {
    color: rgba(17,24,39,0.85);
}

    html:not([data-theme="dark"]) .admin-link:hover {
        background: rgba(17,24,39,0.06);
        color: rgba(17,24,39,0.95);
    }

html:not([data-theme="dark"]) .admin-card {
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(17,24,39,0.10);
}

html:not([data-theme="dark"]) .admin-table thead th {
    background: rgba(248,250,252,0.95);
    color: rgba(17,24,39,0.92);
    border-bottom: 1px solid rgba(17,24,39,0.10);
}

/* Admin: content bardziej "panelowy" */
.admin-content {
    max-width: 1200px;
    width: 100%;
}

    /* żeby nie kleiło się do samej góry */
    .admin-content > .d-flex:first-child,
    .admin-content > h1:first-child,
    .admin-content > h2:first-child {
        margin-top: 6px;
    }

/* =========================
   Notifications page
   ========================= */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.notif-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.20);
}

html[data-theme="dark"] .notif-item {
    background: rgba(255,255,255,0.03);
}

.notif-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.notif-title {
    font-weight: 700;
    font-size: 16px;
    margin: 0;
    color: var(--text-main);
}

.notif-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.notif-body {
    margin-top: 10px;
    color: rgba(229,231,235,0.92);
    overflow-wrap: anywhere;
}

html:not([data-theme="dark"]) .notif-body {
    color: rgba(17,24,39,0.90);
}

.notif-date {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 12px;
}

.notif-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.notif-unread {
    border-color: rgba(59,130,246,0.35) !important;
    background: rgba(59,130,246,0.12) !important;
}

.notif-read {
    opacity: 0.92;
}

.notif-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 10px 0 0;
}

html:not([data-theme="dark"]) .notif-divider {
    background: rgba(17,24,39,0.08);
}
