/*
 * System Ocen Pracowniczych - arkusz stylów (bez kompilacji, bez zależności).
 * Kontrasty kolorów spełniają WCAG 2.1 AA (tekst >= 4.5:1).
 * Znaczenie statusów jest zawsze przekazywane także tekstem.
 */

:root {
    --color-bg: #f4f6f8;
    --color-surface: #ffffff;
    --color-text: #1b1f24;
    --color-muted: #535a63;
    --color-border: #c9d0d8;
    --color-primary: #0b4f8a;
    --color-primary-dark: #083a66;
    --color-primary-light: #e3eef8;
    --color-focus: #ffbf47;
    --color-success: #1e6b34;
    --color-success-bg: #e5f4e9;
    --color-warning: #7a4b00;
    --color-warning-bg: #fff4d6;
    --color-danger: #a1191f;
    --color-danger-bg: #fde8e8;
    --color-info: #0b5577;
    --color-info-bg: #e3f2f9;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --sidebar-width: 250px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html {
    font-size: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-dark);
}

:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

h1, h2, h3 {
    line-height: 1.25;
}

code,
pre {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.9em;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--color-focus);
    color: #000;
    font-weight: 600;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

.muted {
    color: var(--color-muted);
}

.text-truncate {
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-right {
    text-align: right;
}

.nowrap {
    white-space: nowrap;
}

/* ---------- Pasek górny ---------- */

.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.25rem;
    background: var(--color-primary);
    color: #fff;
    flex-wrap: wrap;
}

.topbar__brand {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.topbar__title {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}

.topbar__title:hover {
    color: #fff;
    text-decoration: underline;
}

.topbar__office {
    font-size: 0.85rem;
    opacity: 0.95;
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar__user-name {
    color: #fff;
}

.topbar__user-name:hover {
    color: #fff;
}

.topbar__menu-toggle {
    display: none;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
    padding: 0.35rem 0.75rem;
    font: inherit;
    cursor: pointer;
}

.topbar .btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
}

.topbar .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ---------- Układ ---------- */

.layout {
    display: flex;
    flex: 1 0 auto;
    align-items: stretch;
}

.sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 1rem 0;
}

.sidebar__heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    margin: 1rem 1.25rem 0.35rem;
}

.sidebar__heading:first-child {
    margin-top: 0;
}

.sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar__link {
    display: block;
    padding: 0.45rem 1.25rem;
    color: var(--color-text);
    text-decoration: none;
    border-left: 4px solid transparent;
}

.sidebar__link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

.sidebar__link.is-active {
    border-left-color: var(--color-primary);
    background: var(--color-primary-light);
    font-weight: 600;
}

.content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1.5rem 2rem 2rem;
}

.content:focus {
    outline: none;
}

.page-title {
    margin: 0 0 1.25rem;
    font-size: 1.6rem;
}

.footer {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    color: var(--color-muted);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.footer--auth {
    margin-top: 1.5rem;
    width: 100%;
    max-width: 28rem;
    border-top: 0;
    background: transparent;
    padding: 0;
}

/* Stopka „Created by” – logo autora i ramka ze zdjęciem (stała we wszystkich wersjach) */
.credit {
    position: relative;
    display: inline-flex;
}

.credit__logo {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: none;
    line-height: 0;
    cursor: pointer;
}

.credit__logo img {
    display: block;
}

.credit__card {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.1rem 0.75rem 0.75rem;
    white-space: nowrap;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(11, 79, 138, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

/* Pomost nad odstępem – ramka nie znika przy przesuwaniu kursora z logo na link. */
.credit__card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

.credit:hover .credit__card,
.credit:focus-within .credit__card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.credit__photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary-light);
}

.credit__text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.credit__name {
    font-weight: 700;
    color: var(--color-text);
}

.credit__link {
    font-size: 0.9rem;
}

/* Wąskie ekrany: stopka i ramka wyśrodkowane, aby ramka nie wychodziła poza ekran. */
@media (max-width: 600px) {
    .footer {
        flex-direction: column;
        text-align: center;
    }

    .credit__card {
        right: auto;
        left: 50%;
        transform: translate(-50%, 4px);
    }

    .credit:hover .credit__card,
    .credit:focus-within .credit__card {
        transform: translate(-50%, 0);
    }
}

/* ---------- Karty i siatki ---------- */

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.card--narrow {
    max-width: 36rem;
}

.card__title {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.grid {
    display: grid;
    gap: 1.25rem;
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid > .card {
    margin-bottom: 0;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat__label {
    color: var(--color-muted);
}

.details {
    display: grid;
    grid-template-columns: minmax(10rem, max-content) 1fr;
    gap: 0.4rem 1.25rem;
    margin: 0 0 1rem;
}

.details dt {
    font-weight: 600;
    color: var(--color-muted);
}

.details dd {
    margin: 0;
}

.tag-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-size: 0.9rem;
}

.tag--muted {
    background: #eceff2;
    color: var(--color-muted);
}

/* ---------- Statusy (kolor + ikona + tekst) ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge--secondary { background: #eceff2; color: #3d444c; border-color: #c9d0d8; }
.badge--info { background: var(--color-info-bg); color: var(--color-info); border-color: #9ccbe2; }
.badge--primary { background: var(--color-primary-light); color: var(--color-primary-dark); border-color: #9dbfdf; }
.badge--warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: #e7c66d; }
.badge--success { background: var(--color-success-bg); color: var(--color-success); border-color: #94cfa3; }
.badge--dark { background: #2f343a; color: #fff; border-color: #2f343a; }
.badge--light { background: #fff; color: #3d444c; border-color: #8a939d; border-style: dashed; }
.badge--danger { background: var(--color-danger-bg); color: var(--color-danger); border-color: #eba5a7; }

/* ---------- Komunikaty ---------- */

.alert {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    border: 1px solid;
    border-left-width: 6px;
}

.alert__icon {
    font-weight: 700;
}

.alert__label {
    font-weight: 700;
}

.alert--success { background: var(--color-success-bg); color: var(--color-success); border-color: var(--color-success); }
.alert--info { background: var(--color-info-bg); color: var(--color-info); border-color: var(--color-info); }
.alert--warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: #b97800; }
.alert--error { background: var(--color-danger-bg); color: var(--color-danger); border-color: var(--color-danger); }

/* ---------- Tabele ---------- */

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}

.table th,
.table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.table thead th {
    background: #eef1f4;
    font-weight: 600;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #f8fafb;
}

.table th a {
    color: inherit;
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.table--compact th,
.table--compact td {
    padding: 0.35rem 0.5rem;
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
    color: var(--color-muted);
}

/* ---------- Formularze ---------- */

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form--inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-field label,
.form-field legend {
    font-weight: 600;
}

.form-field--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.form-field--checkbox label {
    font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
input[type="file"],
select,
textarea {
    font: inherit;
    padding: 0.5rem 0.65rem;
    border: 1px solid #8a939d;
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
    width: 100%;
    max-width: 100%;
}

textarea {
    min-height: 6rem;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--color-primary);
}

.has-error input,
.has-error select,
.has-error textarea,
[aria-invalid="true"] {
    border-color: var(--color-danger);
    border-width: 2px;
}

.field-error {
    color: var(--color-danger);
    font-size: 0.9rem;
    font-weight: 600;
}

.field-error::before {
    content: "✖ ";
}

.form-hint {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin: 0;
}

.required {
    color: var(--color-danger);
    font-weight: 700;
}

.password-field {
    display: flex;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

fieldset {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem 1rem;
    margin: 0;
}

/* ---------- Przyciski ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font: inherit;
    font-weight: 600;
    line-height: 1.3;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    background: #eceff2;
    color: var(--color-text);
}

.btn:hover {
    filter: brightness(0.95);
}

.btn[disabled],
.btn.is-busy {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--secondary { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.btn--danger { background: var(--color-danger); color: #fff; }
.btn--danger:hover { color: #fff; }
.btn--warning { background: #b45f06; color: #fff; }
.btn--warning:hover { color: #fff; }
.btn--success { background: var(--color-success); color: #fff; }
.btn--success:hover { color: #fff; }
.btn--ghost { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn--small { padding: 0.25rem 0.6rem; font-size: 0.9rem; }
.btn--block { width: 100%; }

.inline-form {
    display: inline;
    margin: 0;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.filters .form-field {
    min-width: 11rem;
}

/* ---------- Stronicowanie ---------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    min-width: 2.25rem;
    padding: 0.3rem 0.6rem;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    background: #fff;
}

.pagination [aria-current="page"] {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    font-weight: 700;
}

/* ---------- Postęp ---------- */

.progress {
    width: 100%;
    height: 1rem;
    accent-color: var(--color-primary);
}

/* ---------- Logowanie i strony błędów ---------- */

.auth-body {
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.auth-card__header {
    border-bottom: 3px solid var(--color-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
}

.auth-card__app {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-primary);
}

.auth-card__office {
    margin: 0;
    color: var(--color-muted);
}

.auth-card__title {
    font-size: 1.4rem;
    margin: 0 0 1rem;
}

.auth-card__help {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-top: 1.25rem;
}

.error-code {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-danger);
    margin: 0;
}

.debug-details {
    white-space: pre-wrap;
    background: #fff4d6;
    padding: 0.75rem;
    border-radius: var(--radius);
}

/* ---------- Ocena ---------- */

.card--editable {
    border-left: 6px solid var(--color-primary);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment {
    border-left: 4px solid var(--color-border);
    padding: 0.25rem 0.75rem;
}

.comment__meta {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.comment p:last-child {
    margin-bottom: 0;
}

/* ---------- Powiadomienia ---------- */

.topbar__notifications {
    color: #fff;
    text-decoration: none;
}

.topbar__notifications:hover {
    color: #fff;
    text-decoration: underline;
}

.counter {
    display: inline-block;
    min-width: 1.4rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--color-focus);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notification {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.notification--unread {
    background: var(--color-info-bg);
    border-left: 4px solid var(--color-info);
}

.notification__meta,
.notification__title,
.notification__body {
    margin: 0 0 0.25rem;
}

.notification__meta {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.notification__title {
    font-weight: 600;
}

/* ---------- Drzewo struktury ---------- */

.tree-indent {
    display: inline-block;
}

.tree-indent--1 { width: 1.25rem; }
.tree-indent--2 { width: 2.5rem; }
.tree-indent--3 { width: 3.75rem; }
.tree-indent--4 { width: 5rem; }
.tree-indent--5 { width: 6.25rem; }
.tree-indent--6 { width: 7.5rem; }

.tree-indent:not(.tree-indent--0)::after {
    content: "└ ";
    float: right;
    color: var(--color-muted);
}

/* ---------- Instalator ---------- */

.installer-steps {
    padding: 0 0.75rem;
}

.installer-steps__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius);
    color: var(--color-muted);
}

.installer-steps__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    font-weight: 700;
    font-size: 0.85rem;
}

.installer-steps__item--done {
    color: var(--color-success);
}

.installer-steps__item--current {
    color: var(--color-primary-dark);
    background: var(--color-primary-light);
    font-weight: 700;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

fieldset.card > legend {
    padding: 0 0.35rem;
    float: none;
}

/* ---------- Widok responsywny (tablety i telefony) ---------- */

@media (max-width: 1100px) {
    .grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .topbar__menu-toggle {
        display: inline-block;
    }

    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-basis: auto;
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
        display: none;
    }

    .sidebar.is-open,
    .sidebar--static {
        display: block;
    }

    .content {
        padding: 1rem;
    }

    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .details {
        grid-template-columns: 1fr;
    }

    .details dd {
        margin-bottom: 0.5rem;
    }
}

/* ---------- Raporty, wykresy, wydruk ---------- */

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0 0 1rem;
    border-bottom: 2px solid var(--color-border);
}

.tabs__item {
    padding: 0.5rem 0.9rem;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--color-primary);
    text-decoration: none;
}

.tabs__item:hover {
    background: var(--color-primary-light);
}

.tabs__item--active {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: -2px;
    border-bottom: 2px solid var(--color-surface);
}

.card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.card__header .card__title {
    margin: 0;
}

.export-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.details--compact {
    gap: 0.2rem 1rem;
    font-size: 0.95rem;
}

.chart {
    margin: 0 0 1.25rem;
}

.chart__table {
    width: 100%;
    max-width: 48rem;
    border-collapse: collapse;
}

.chart__label {
    width: 14rem;
    padding: 0.2rem 0.75rem 0.2rem 0;
    font-weight: 400;
    text-align: left;
}

.chart__bar meter {
    width: 100%;
    height: 1.1rem;
}

.chart__value {
    width: 6rem;
    padding-left: 0.75rem;
}

.progress-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.progress-list li {
    margin-bottom: 0.75rem;
}

.progress-list progress {
    width: 100%;
    height: 0.9rem;
}

.progress-list__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.task-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.task-list li:last-child {
    border-bottom: 0;
}

.deadline--overdue {
    color: var(--color-danger);
    font-weight: 600;
}

.deadline--soon {
    color: var(--color-warning);
    font-weight: 600;
}

.print-page {
    background: #fff;
    max-width: 297mm;
    margin: 0 auto;
    padding: 1rem;
}

.print-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.print-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.table--print {
    font-size: 0.85rem;
}

.print-footer {
    margin-top: 1rem;
    font-size: 0.85rem;
}


.code-block {
    max-height: 28rem;
    overflow: auto;
    padding: 0.75rem;
    background: #f6f8fa;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

details > summary {
    cursor: pointer;
    margin: 0.5rem 0;
    color: var(--color-primary);
}

.col-select {
    width: 2.5rem;
    text-align: center;
}

.col-select input {
    width: 1.15rem;
    height: 1.15rem;
}

.bulk-actions {
    margin: 1rem 0 0;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.bulk-actions__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bulk-actions legend {
    padding: 0 0.4rem;
    font-weight: 600;
}

/* ---------- Wydruk ---------- */

@media print {
    .topbar,
    .sidebar,
    .footer,
    .skip-link,
    .no-print,
    .btn,
    form.filters,
    .pagination {
        display: none !important;
    }

    body {
        background: #fff;
        font-size: 11pt;
    }

    .content {
        padding: 0;
    }

    .card {
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .table th,
    .table td {
        border: 1px solid #999;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    .print-page {
        max-width: none;
        padding: 0;
    }

    .table--print {
        font-size: 8.5pt;
    }

    .table--print thead {
        display: table-header-group;
    }

    .table--print tr {
        page-break-inside: avoid;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
