input,
select {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    padding: 0;
    border-radius: 3px;
    flex-shrink: 0;
    vertical-align: middle;
    accent-color: #16a34a;
}

input:focus,
select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

button {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: #16a34a;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease;
}

button:hover {
    background: #15803d;
}

button.danger {
    background: #dc2626;
}

button.danger:hover {
    background: #b91c1c;
}

button.secondary {
    background: #e5e7eb;
    color: #374151;
}

button.secondary:hover {
    background: #d1d5db;
}

.compact-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.field-error {
    min-height: 14px;
    margin-top: -6px;
    margin-bottom: 8px;
    color: #dc2626;
    font-size: 12px;
    line-height: 1.2;
}

.date-help {
    margin-top: -6px;
    margin-bottom: 14px;
    color: #64748b;
    font-size: 13px;
}

.date-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-row input[type="date"] {
    flex: 1;
}

/* Login */

.login-page {
    min-height: calc(100vh - 80px);
    display: grid;
    place-items: center;
    padding: 56px 0;
}

.login-page-simple {
    grid-template-columns: 1fr;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 34px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    box-shadow: 0 24px 70px rgba(35, 39, 64, 0.12);
}

.login-logo-top {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    box-shadow: 0 14px 34px rgba(35, 39, 64, 0.1);
}

.login-logo-top img {
    max-width: 56px;
    max-height: 56px;
    display: block;
}

.login-card-header {
    margin-bottom: 24px;
    text-align: center;
}

.login-card-kicker {
    margin: 0 0 8px;
    color: var(--zhp-green-dark);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-card h2 {
    margin: 0 0 8px;
    color: var(--zhp-navy);
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.office-login-button,
.office-login-button:link,
.office-login-button:visited {
    width: 100%;
    min-height: 56px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 0;
    background: #87a428;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 14px 30px rgba(135, 164, 40, 0.28);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

.office-login-button *,
.office-login-button:link *,
.office-login-button:visited * {
    color: #ffffff !important;
}

.office-login-button:hover,
.office-login-button:focus {
    transform: translateY(-1px);
    background: #587d18;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 18px 36px rgba(88, 125, 24, 0.32);
}

.office-login-button:active {
    transform: translateY(0);
    background: #587d18;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(88, 125, 24, 0.26);
}
.office-login-icon {
    width: 24px;
    height: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    flex: 0 0 auto;
}

.office-login-icon span {
    display: block;
    border-radius: 3px;
    background: #ffffff;
}

.login-security-note {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border-soft);
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    display: grid;
    gap: 7px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 800;
}

.login-form input {
    width: 100%;
}

.login-local-button {
    width: 100%;
    margin-top: 4px;
}

.login-error {
    margin-bottom: 18px;
}

@media (max-width: 560px) {
    .login-page {
        min-height: calc(100vh - 60px);
        padding: 18px 0;
    }

    .login-card {
        padding: 24px;
        border-radius: 24px;
    }

    .login-card h2 {
        font-size: 26px;
    }

    .login-logo-top {
        width: 72px;
        height: 72px;
        border-radius: 22px;
    }

    .login-logo-top img {
        max-width: 50px;
        max-height: 50px;
    }
}

/* Zarządzający — wybór z bazy osób */

.manager-picker {
    margin-bottom: 1rem;
}

.manager-picker-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.manager-picker-search {
    margin-bottom: 0.35rem;
}

.manager-picker-results,
.manager-picker-selected {
    list-style: none;
    margin: 0;
    padding: 0;
}

.manager-picker-results:empty {
    display: none;
}

.manager-picker-results li button {
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    background: #f4f6ef;
    color: #1a1a1a;
    font-weight: 500;
}

.manager-picker-results li button:hover {
    background: #e8f0e0;
}

.manager-picker-result-email,
.manager-picker-result-tipi {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 400;
}

.manager-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.manager-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: #eef3e4;
    border: 1px solid #d5e3c3;
    font-size: 0.88rem;
}

.manager-picker-chip-email {
    color: #64748b;
    font-size: 0.82rem;
}

.manager-picker-remove {
    padding: 0 0.35rem;
    min-width: 1.5rem;
    min-height: 1.5rem;
    border-radius: 999px;
    background: #fff;
    color: #666;
    font-size: 1rem;
    line-height: 1;
}

.manager-picker-remove:hover {
    background: #fdecea;
    color: #b71c1c;
}

/* Zbiorowe zaznaczanie i przypisywanie zarządzających */

.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 1rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    background: #eef3e4;
    border: 1px solid #d5e3c3;
}

.bulk-bar[hidden] {
    display: none !important;
}

.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.bulk-all-pages-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    cursor: pointer;
    color: #3d5c2e;
}

.bulk-all-pages-label input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.bulk-bar-count {
    margin-right: 0.35rem;
    font-size: 0.92rem;
}

.bulk-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.45);
}

.bulk-modal[hidden] {
    display: none !important;
}

.bulk-modal-dialog {
    width: min(520px, 100%);
    max-height: min(90vh, 720px);
    overflow: auto;
    padding: 1.1rem 1.25rem 1.25rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.bulk-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.bulk-modal-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.bulk-modal-close {
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    background: #f4f4f4;
    color: #333;
    font-size: 1.2rem;
    line-height: 1;
}

.bulk-modal-note {
    margin: 0 0 0.85rem;
    color: #64748b;
    font-size: 0.9rem;
}

.bulk-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.col-select {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 2.75rem;
    padding: 8px 4px;
    text-align: center;
    vertical-align: middle;
}

.col-select input[type="checkbox"] {
    width: auto;
    margin: 0;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.bulk-select-head-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    cursor: pointer;
}

/* Skróty raportów na zakładkach list */

.report-shortcuts {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #f8faf5;
    border: 1px solid #e2e8d8;
}
.report-shortcuts-label {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.45rem;
}
.report-shortcuts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.report-chip {
    display: inline-block;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    text-decoration: none;
    background: #eef0ea;
    color: var(--zhp-green-dark);
    border: 1px solid transparent;
}
.report-chip:hover { background: #e2e8d8; }
.report-chip.active {
    background: var(--zhp-green);
    color: #fff;
    border-color: var(--zhp-green-dark);
}
.report-chip-clear {
    background: #fff;
    border-color: #d5dde5;
    color: #64748b;
}
.report-ideas {
    margin-top: 0.55rem;
    font-size: 0.82rem;
    color: #64748b;
}
.report-ideas ul {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
}
.report-gap-banner {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fff8e6;
    border-left: 4px solid #e6a817;
    font-size: 0.9rem;
}

/* Wspólny pasek filtrów (kategorie + raporty w jednym rzędzie) */

.list-filter-bar-panel {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #f8faf5;
    border: 1px solid #e2e8d8;
}
.list-filter-bar-label {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.45rem;
}
.list-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}
.list-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    background: #eef0ea;
    color: var(--zhp-green-dark);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.list-filter-chip:hover { background: #e2e8d8; }
.list-filter-chip.active {
    background: var(--zhp-green);
    color: #fff;
    border-color: var(--zhp-green-dark);
}
.list-filter-chip-count {
    font-size: 0.78rem;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
}
.list-filter-chip.active .list-filter-chip-count {
    background: rgba(255, 255, 255, 0.2);
}
.list-filter-divider {
    width: 1px;
    height: 1.6rem;
    background: #c5cbb8;
    align-self: center;
    margin: 0 0.15rem;
    flex-shrink: 0;
}
.list-filter-chip--report:not(.active) {
    border-style: dashed;
    border-color: #c5cbb8;
}
.list-filter-chip--clear {
    font-size: 0.85rem;
    opacity: 0.9;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem 1rem;
    align-items: end;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    gap: 0.2rem;
    min-width: 0;
}

.form-grid .form-check,
label.form-check {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.35rem 0;
}

.form-grid .form-check input[type="checkbox"],
.form-grid .form-check input[type="radio"] {
    margin: 0;
}