:root {
    --bg: #f4f5f7;
    --panel: #fff;
    --text: #25282d;
    --muted: #69707a;
    --line: #dfe3e8;
    --primary: #275a52;
    --primary-dark: #1d443e;
    --danger: #a33a3a;
    --part-meeting: #2d655d;
    --part-gray: #73777d;
    --part-orange: #c98518;
    --part-burgundy: #8a2635;
    --shadow: 0 5px 15px rgba(24, 34, 45, .05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}

button, input, select { font: inherit; }
[hidden] { display: none !important; }

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, #1e4943, #2d655d);
    color: #fff;
    padding: 14px max(14px, calc((100vw - 1240px) / 2));
}

.app-header h1 {
    margin: 1px 0 3px;
    font-size: 22px;
}

.subtitle {
    margin: 0;
    color: rgba(255,255,255,.8);
    font-size: 11px;
}

.eyebrow {
    margin: 0 0 2px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

.top-nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(255,255,255,.15);
}

.page {
    width: min(1240px, calc(100% - 20px));
    margin: 10px auto 30px;
}

.panel,
.program-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.toolbar {
    display: flex;
    gap: 10px;
    align-items: end;
    justify-content: space-between;
    padding: 9px;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.field {
    display: grid;
    gap: 3px;
}

.field > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.field-wide { width: min(430px, 100%); }

input,
select {
    width: 100%;
    min-height: 29px;
    padding: 4px 6px;
    border: 1px solid #cdd2da;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    font-size: 11px;
}

input:focus,
select:focus {
    outline: 2px solid rgba(39,90,82,.14);
    border-color: var(--primary);
}

.button {
    min-height: 29px;
    padding: 4px 8px;
    border: 1px solid #c8ced7;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    font-size: 10px;
}

.button:hover { background: #f7f8f9; }

.button-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.button-primary:hover { background: var(--primary-dark); }

.button-danger-outline {
    color: var(--danger);
    border-color: rgba(163,58,58,.45);
}

.button-small {
    min-height: 25px;
    padding: 3px 7px;
    font-size: 9px;
}

.warning,
.info {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 10px;
}

.warning {
    border-left: 4px solid #b7791f;
    background: #fff8e7;
}

.meeting-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    margin-top: 8px;
}

.meeting-heading h2 {
    margin: 1px 0;
    font-size: 17px;
}

.reading {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.status {
    min-width: 90px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eef2f1;
    color: #35534e;
    text-align: center;
    font-size: 9px;
    font-weight: 700;
}

.status.changed {
    background: #fff4d9;
    color: #79550c;
}

.status.saved {
    background: #e6f4ec;
    color: #27603d;
}

.sections {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.program-section { overflow: hidden; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
}

.section-header > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-marker {
    display: block;
    width: 5px;
    height: 20px;
    border-radius: 3px;
}

.theme-meeting .section-marker { background: var(--part-meeting); }
.theme-meeting-end .section-marker { background: #4f7c75; }
.theme-gray .section-marker { background: var(--part-gray); }
.theme-orange .section-marker { background: var(--part-orange); }
.theme-burgundy .section-marker { background: var(--part-burgundy); }

.section-title {
    margin: 0;
    font-size: 12px;
}

.task-list { display: grid; }

.task-card {
    position: relative;
    display: grid;
    grid-template-columns: 29px minmax(220px,1fr) minmax(180px,.7fr) 68px 74px 25px;
    gap: 6px;
    align-items: end;
    padding: 6px 8px;
    border-bottom: 1px solid #e9ebee;
}

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

.task-number {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef0f3;
    font-size: 10px;
    font-weight: 800;
}

.task-number.is-unnumbered {
    background: #e4f0ed;
    color: var(--primary);
    font-size: 13px;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 3px;
}

.input-with-suffix span {
    color: var(--muted);
    font-size: 9px;
}

.task-meta {
    grid-column: 2 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
}

.roles-label {
    font-weight: 800;
    color: #4d5560;
}

.task-note { max-width: 900px; }

.icon-button {
    align-self: center;
    width: 23px;
    height: 23px;
    border: 0;
    border-radius: 50%;
    background: #f3e8e8;
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.icon-button:hover { background: #ecd2d2; }

.task-card.without-duration {
    grid-template-columns: 29px minmax(250px,1fr) minmax(200px,.8fr) 74px 25px;
}

.task-card.without-duration .task-title-field { grid-column: 2; }
.task-card.without-duration .task-type-field { grid-column: 3; }
.task-card.without-duration .participants-field { grid-column: 4; }
.task-card.without-duration .remove-task-button { grid-column: 5; }

.task-card.without-duration.without-remove {
    grid-template-columns: 29px minmax(250px,1fr) minmax(200px,.8fr) 74px;
}

.empty-section {
    padding: 10px;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

/* Admin typów zadań */
.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 370px) 1fr;
    gap: 10px;
    margin-top: 8px;
}

.form-panel,
.list-panel {
    padding: 10px;
}

.form-panel h2,
.list-panel h2 {
    margin: 0 0 8px;
    font-size: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.form-grid .full { grid-column: 1 / -1; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 29px;
}

.checkbox-row input {
    width: auto;
    min-height: auto;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.admin-table th,
.admin-table td {
    padding: 5px 6px;
    border-bottom: 1px solid #e7e9ed;
    text-align: left;
    white-space: nowrap;
}

.admin-table th {
    color: var(--muted);
    font-size: 9px;
}

.admin-table tr:hover td { background: #fafbfc; }

.small-muted {
    color: var(--muted);
    font-size: 9px;
}

@media (max-width: 920px) {
    .task-card,
    .task-card.without-duration,
    .task-card.without-duration.without-remove {
        grid-template-columns: 29px minmax(180px,1fr) minmax(170px,1fr);
    }

    .task-title-field { grid-column: 2; }
    .task-type-field { grid-column: 3; }
    .duration-field { grid-column: 2; }
    .participants-field { grid-column: 3; }

    .task-card.without-duration .task-title-field,
    .task-card.without-duration.without-remove .task-title-field { grid-column: 2; }

    .task-card.without-duration .task-type-field,
    .task-card.without-duration.without-remove .task-type-field { grid-column: 3; }

    .task-card.without-duration .participants-field,
    .task-card.without-duration.without-remove .participants-field { grid-column: 2; }

    .task-meta,
    .task-card.without-duration .task-meta,
    .task-card.without-duration.without-remove .task-meta {
        grid-column: 2 / 4;
    }

    .remove-task-button {
        position: absolute;
        right: 7px;
        top: 6px;
    }

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

@media (max-width: 600px) {
    .app-header,
    .toolbar,
    .meeting-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .top-nav { align-self: flex-start; }

    .toolbar-actions {
        display: grid;
        justify-content: stretch;
    }

    .task-card,
    .task-card.without-duration,
    .task-card.without-duration.without-remove {
        grid-template-columns: 27px 1fr;
    }

    .task-title-field,
    .task-type-field,
    .duration-field,
    .participants-field,
    .task-card.without-duration .task-title-field,
    .task-card.without-duration .task-type-field,
    .task-card.without-duration .participants-field,
    .task-card.without-duration.without-remove .task-title-field,
    .task-card.without-duration.without-remove .task-type-field,
    .task-card.without-duration.without-remove .participants-field,
    .task-meta,
    .task-card.without-duration .task-meta,
    .task-card.without-duration.without-remove .task-meta {
        grid-column: 2;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: 1; }
}


/* Wersja 1.3 — zapis programu do bazy */
.heading-status {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.chairman-assignment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #365d56;
    font-weight: 700;
    white-space: nowrap;
}

.chairman-assignment input {
    width: auto;
    min-height: auto;
    margin: 0;
}

button:disabled,
select:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: .65;
}

@media (max-width: 600px) {
    .heading-status {
        justify-items: start;
    }
}


/* Wersja 1.4 — logowanie, role i konta */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-left: 9px;
    border-left: 1px solid rgba(255,255,255,.28);
}

.user-menu > span {
    display: grid;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
}

.user-menu small {
    color: rgba(255,255,255,.72);
    font-size: 8px;
    font-weight: 400;
}

.user-menu form {
    margin: 0;
}

.button-header {
    min-height: 25px;
    border-color: rgba(255,255,255,.35);
    background: rgba(255,255,255,.1);
    color: #fff;
}

.button-header:hover {
    background: rgba(255,255,255,.2);
}

.read-only-banner {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-left: 4px solid #64748b;
    color: #475569;
    font-size: 10px;
}

.auth-page {
    min-height: 100vh;
    background:
        linear-gradient(rgba(30,73,67,.88), rgba(30,73,67,.88)),
        var(--bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 16px;
}

.auth-card {
    width: min(380px, 100%);
    padding: 20px;
}

.auth-card h1 {
    margin: 2px 0 15px;
    font-size: 22px;
}

.auth-field {
    margin-bottom: 10px;
}

.auth-field > span {
    font-size: 10px;
}

.auth-field input {
    min-height: 34px;
    font-size: 12px;
}

.auth-main-button {
    width: 100%;
    min-height: 34px;
    margin-top: 5px;
    text-align: center;
    text-decoration: none;
}

.auth-message {
    display: block;
    margin: 0 0 12px;
    padding: 8px 10px;
}

.success-message {
    border-left: 4px solid #2d655d;
    background: #e6f4ec;
    color: #27603d;
}

.form-actions {
    margin-top: 8px;
    justify-content: flex-start;
}

@media (max-width: 760px) {
    .header-right {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-menu {
        padding-left: 0;
        border-left: 0;
    }

    .user-menu > span {
        text-align: left;
    }
}


/* Wersja 1.5 — uczestnicy i macierz uprawnień */
textarea {
    width: 100%;
    padding: 5px 7px;
    border: 1px solid #cdd2da;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 11px;
    resize: vertical;
}

textarea:focus {
    outline: 2px solid rgba(39,90,82,.14);
    border-color: var(--primary);
}

.participants-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 8px;
}

.participants-sidebar,
.participant-editor {
    padding: 9px;
}

.participants-sidebar-header,
.participant-editor-header,
.permissions-heading,
.permission-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.participants-sidebar h2,
.participant-editor h2,
.permissions-heading h3,
.permission-section h4 {
    margin: 0;
}

.participants-sidebar h2,
.participant-editor h2 {
    font-size: 14px;
}

.participant-search-field {
    margin-top: 8px;
}

.participants-list {
    display: grid;
    gap: 3px;
    max-height: calc(100vh - 195px);
    margin-top: 7px;
    overflow-y: auto;
}

.participant-list-item {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #dde1e6;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.participant-list-item:hover {
    background: #f6f8f8;
}

.participant-list-item.active {
    border-color: var(--primary);
    background: #e9f2f0;
}

.participant-list-item.inactive {
    opacity: .58;
}

.participant-list-name {
    font-size: 11px;
    font-weight: 800;
}

.participant-list-meta {
    color: var(--muted);
    font-size: 8px;
}

.participants-empty,
.permissions-empty {
    padding: 10px;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

.participant-basic-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(220px, .8fr);
    gap: 7px 12px;
    margin-top: 9px;
}

.participant-active-row {
    align-self: end;
}

.participant-notes-field {
    grid-column: 1 / -1;
}

.permissions-heading {
    margin-top: 13px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.permissions-heading h3 {
    font-size: 13px;
}

.permissions-heading p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.permissions-matrix {
    display: grid;
    gap: 7px;
    margin-top: 7px;
}

.permission-section {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.permission-section-header {
    padding: 5px 7px;
    background: #f6f7f8;
    border-bottom: 1px solid var(--line);
}

.permission-section h4 {
    font-size: 11px;
}

.permission-rows {
    display: grid;
}

.permission-row {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(240px, 1fr);
    gap: 8px;
    align-items: center;
    padding: 5px 7px;
    border-bottom: 1px solid #eceef1;
}

.permission-row:last-child {
    border-bottom: 0;
}

.permission-row.inactive {
    background: #fafafa;
    opacity: .62;
}

.permission-task-name {
    display: grid;
    gap: 1px;
}

.permission-task-name strong {
    font-size: 10px;
}

.permission-task-name small {
    color: var(--muted);
    font-size: 8px;
}

.permission-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
}

.permission-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #41464e;
    font-size: 9px;
    cursor: pointer;
}

.permission-checkbox input {
    width: auto;
    min-height: auto;
    margin: 0;
}

@media (max-width: 900px) {
    .participants-layout {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .permission-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 650px) {
    .participants-layout {
        grid-template-columns: 1fr;
    }

    .participants-list {
        max-height: 240px;
    }

    .participant-basic-grid {
        grid-template-columns: 1fr;
    }

    .participant-notes-field {
        grid-column: 1;
    }

    .participant-editor-header,
    .permissions-heading,
    .permission-section-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Wersja 1.5.1 — czytelniejsze uprawnienia uczestników */
.permission-presets {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 8px 9px;
    border: 1px solid #d9e2e0;
    border-radius: 7px;
    background: #f7faf9;
}

.permission-presets-copy {
    display: grid;
    gap: 2px;
}

.permission-presets-copy strong {
    font-size: 11px;
}

.permission-presets-copy span {
    color: var(--muted);
    font-size: 9px;
}

.permission-presets-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.button-preset-sister {
    display: grid;
    gap: 1px;
    min-height: 36px;
    padding: 5px 12px;
    border-color: #8c4f76;
    background: #fff7fc;
    color: #713a5e;
    line-height: 1.05;
}

.button-preset-sister:hover {
    background: #fbeaf5;
}

.button-preset-sister > span {
    font-size: 8px;
    font-weight: 400;
    opacity: .82;
}

.permission-section {
    border-radius: 8px;
    border-width: 1px;
}

.permission-section-header {
    min-height: 39px;
    padding: 7px 9px;
    border-left: 5px solid #84908e;
}

.permission-scope-general .permission-section-header {
    border-left-color: var(--part-meeting);
}

.permission-scope-part1 .permission-section-header {
    border-left-color: var(--part-gray);
}

.permission-scope-part2 .permission-section-header {
    border-left-color: var(--part-orange);
}

.permission-scope-part3 .permission-section-header {
    border-left-color: var(--part-burgundy);
}

.permission-section-title {
    display: grid;
    gap: 1px;
}

.permission-section-title > span {
    color: var(--muted);
    font-size: 8px;
}

.permission-rows {
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
    gap: 7px;
    padding: 8px;
    background: #f5f6f7;
}

.permission-row,
.permission-task-card {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    min-height: 91px;
    padding: 8px;
    border: 1px solid #dfe3e8;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(24, 34, 45, .04);
}

.permission-row:last-child {
    border-bottom: 1px solid #dfe3e8;
}

.permission-task-card:hover {
    border-color: #bdc6c5;
    box-shadow: 0 2px 6px rgba(24, 34, 45, .07);
}

.permission-task-name {
    display: grid;
    gap: 4px;
}

.permission-task-name strong {
    font-size: 11px;
    line-height: 1.22;
}

.permission-code {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    padding: 2px 5px;
    border-radius: 4px;
    background: #eef1f3;
    color: #66707a;
    font-family: Consolas, "Courier New", monospace;
    font-size: 8px;
    overflow-wrap: anywhere;
}

.permission-code em {
    color: #934444;
    font-family: Arial, Helvetica, sans-serif;
    font-style: normal;
    font-weight: 700;
}

.permission-roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 6px;
    margin-top: auto;
}

.permission-checkbox {
    position: relative;
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 5px 7px;
    border: 1px solid #d5dae0;
    border-radius: 6px;
    background: #fafbfc;
    color: #41464e;
    font-size: 10px;
    cursor: pointer;
    user-select: none;
    transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.permission-checkbox:hover {
    border-color: #9eaaa8;
    background: #fff;
}

.permission-checkbox.selected {
    border-color: var(--primary);
    background: #e9f3f1;
    color: #244f48;
    box-shadow: inset 0 0 0 1px rgba(39, 90, 82, .08);
}

.permission-checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.permission-checkbox:focus-within {
    outline: 2px solid rgba(39, 90, 82, .22);
    outline-offset: 1px;
}

.permission-checkmark {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border: 2px solid #aeb6bf;
    border-radius: 5px;
    background: #fff;
    color: transparent;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.permission-checkbox.selected .permission-checkmark {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.permission-role-label {
    line-height: 1.15;
}

.permission-row.inactive {
    opacity: .58;
}

@media (max-width: 900px) {
    .permission-rows {
        grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    }

    .permission-row,
    .permission-task-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .permission-presets {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-presets-actions {
        justify-content: flex-start;
    }

    .permission-rows {
        grid-template-columns: 1fr;
    }

    .permission-roles {
        grid-template-columns: 1fr;
    }
}


/* Wersja 1.6 — ręczne przydzielanie uczestników */
.task-assignments {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 6px;
    align-items: start;
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px dashed #dfe3e8;
}

.task-assignments-label {
    padding-top: 7px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.assignment-roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 6px;
}

.assignment-role {
    display: grid;
    grid-template-columns: minmax(105px, .55fr) minmax(150px, 1fr);
    gap: 6px;
    align-items: center;
    min-height: 39px;
    padding: 5px 6px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    background: #fafbfc;
}

.assignment-role-label {
    color: #515963;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.15;
}

.assignment-person-button {
    display: grid;
    gap: 1px;
    width: 100%;
    min-height: 29px;
    padding: 4px 7px;
    border: 1px solid #cfd5db;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.assignment-person-button strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignment-person-button small {
    color: var(--muted);
    font-size: 8px;
}

.assignment-person-button.unassigned {
    border-color: #d8bb74;
    background: #fffaf0;
    color: #79550c;
}

.assignment-person-button.assigned {
    border-color: #7da69d;
    background: #edf6f4;
    color: #244f48;
}

.assignment-person-button:hover:not(:disabled) {
    filter: brightness(.98);
    box-shadow: 0 1px 4px rgba(24, 34, 45, .08);
}

.inherited-assignment {
    grid-template-columns: minmax(130px, .55fr) 1fr;
    border-style: dashed;
    background: #f3f6f5;
}

.assignment-person {
    padding: 6px 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
}

.assignment-person.assigned {
    background: #e6f2ef;
    color: #28574f;
}

.assignment-person.unassigned {
    background: #fff3d8;
    color: #7b570d;
}

body.modal-open {
    overflow: hidden;
}

.assignment-modal {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
}

.assignment-modal[hidden] {
    display: none;
}

.assignment-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 33, .58);
    backdrop-filter: blur(2px);
}

.assignment-modal-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    width: min(760px, 100%);
    max-height: min(780px, calc(100vh - 36px));
    overflow: hidden;
    border: 1px solid #cfd5db;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .26);
}

.assignment-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 9px;
    border-bottom: 1px solid var(--line);
}

.assignment-modal-header h2 {
    margin: 1px 0 2px;
    font-size: 16px;
}

.assignment-modal-header p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.assignment-modal-close {
    flex: 0 0 auto;
}

.assignment-partner-info {
    margin: 8px 12px 0;
    padding: 7px 9px;
    border-left: 4px solid var(--part-orange);
    border-radius: 4px;
    background: #fff8e8;
    color: #694b13;
    font-size: 9px;
}

.assignment-candidates-status {
    padding: 8px 13px 6px;
    color: var(--muted);
    font-size: 9px;
}

.assignment-candidates-list {
    display: grid;
    gap: 5px;
    min-height: 120px;
    padding: 0 12px 10px;
    overflow-y: auto;
}

.assignment-candidate {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) minmax(120px, auto);
    gap: 8px;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: 7px 9px;
    border: 1px solid #d9dee4;
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.assignment-candidate:hover:not(:disabled) {
    border-color: #8ca9a3;
    background: #f6faf9;
}

.assignment-candidate.selected {
    border-color: var(--primary);
    background: #e9f3f1;
    box-shadow: inset 0 0 0 1px rgba(39, 90, 82, .08);
}

.assignment-candidate.disabled {
    opacity: .52;
    cursor: not-allowed;
}

.candidate-rank {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #eef1f3;
    color: #56606a;
    font-size: 9px;
    font-weight: 900;
}

.candidate-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.candidate-main strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.candidate-main > span {
    color: var(--muted);
    font-size: 9px;
}

.candidate-main b {
    color: #414a53;
}

.candidate-pair {
    color: #8a5b18 !important;
    font-weight: 700;
}

.candidate-side {
    display: flex;
    justify-content: flex-end;
}

.candidate-side em {
    padding: 3px 5px;
    border-radius: 4px;
    background: #eef3f2;
    color: #4f625e;
    font-size: 8px;
    font-style: normal;
    white-space: nowrap;
}

.candidate-side .candidate-warning {
    background: #fff0d4;
    color: #79550c;
}

.assignment-modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 7px;
    padding: 8px 12px;
    border-top: 1px solid var(--line);
    background: #fafbfc;
}

@media (max-width: 920px) {
    .task-assignments,
    .task-card.without-duration .task-assignments,
    .task-card.without-duration.without-remove .task-assignments {
        grid-column: 2 / 4;
    }

    .assignment-roles {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .task-assignments,
    .task-card.without-duration .task-assignments,
    .task-card.without-duration.without-remove .task-assignments {
        grid-column: 2;
        grid-template-columns: 1fr;
    }

    .task-assignments-label {
        padding-top: 0;
    }

    .assignment-role {
        grid-template-columns: 1fr;
    }

    .assignment-modal {
        padding: 6px;
    }

    .assignment-modal-card {
        max-height: calc(100vh - 12px);
    }

    .assignment-candidate {
        grid-template-columns: 27px minmax(0, 1fr);
    }

    .candidate-side {
        grid-column: 2;
        justify-content: flex-start;
    }
}


/* Wersja 1.7 — obsługa techniczna i weekend */
.theme-technical .section-marker{background:#3b6f86}.theme-weekend .section-marker{background:#0d3f6b}
.meeting-title-line{display:flex;align-items:center;gap:7px}.meeting-title-line .eyebrow{margin:0}.meeting-type-badge{display:inline-flex;padding:3px 6px;border-radius:4px;font-size:8px;font-weight:900;letter-spacing:.06em;background:#eef1f3;color:#55606a}.meeting-type-badge.midweek{background:#e9f3f1;color:#275a52}.meeting-type-badge.weekend{background:#e7f0fa;color:#0d3f6b}.button-weekend{border-color:#376d9b;background:#f2f7fc;color:#194c78}.button-weekend:hover{background:#e7f1fa}
.manual-assignment-field{display:grid;grid-template-columns:minmax(115px,.45fr) minmax(190px,1fr);gap:6px;align-items:center;width:100%;padding:5px 6px;border:1px solid #dfe3e8;border-radius:6px;background:#fafbfc}.manual-assignment-field>span{font-size:9px;font-weight:800;color:#515963}.manual-assignment-field input,.manual-assignment-field select{min-height:30px;background:#fff}.nested-form-grid{padding:7px;border:1px solid #e1e5e9;border-radius:6px;background:#fafbfc}.weekend-create-card{width:min(560px,100%);grid-template-rows:auto minmax(0,1fr)}.weekend-create-form{display:grid;gap:9px;padding:12px}.weekend-create-form .assignment-modal-footer{margin:3px -12px -12px}.weekend-create-note{padding:7px 9px;border-left:4px solid #376d9b;background:#edf5fb;color:#315872;font-size:9px}
.permission-scope-technical .permission-section-header{border-left-color:#3b6f86}.permission-scope-weekend .permission-section-header{border-left-color:#0d3f6b}
@media(max-width:600px){.manual-assignment-field{grid-template-columns:1fr}.meeting-title-line{align-items:flex-start;flex-direction:column}}

.candidate-preferred{display:inline-block;margin-left:5px;padding:2px 5px;border-radius:999px;background:#dfeeea;color:#28574f;font-size:8px;font-weight:800;vertical-align:middle}


/* Wersja 1.8 — kalendarz i skondensowany układ podobny do arkusza */
.compact-app-header{min-height:46px;padding-top:7px;padding-bottom:7px}.compact-app-header h1{font-size:17px}.compact-planner-page{width:min(1480px,calc(100% - 12px));margin-top:6px}.planner-commandbar{position:sticky;z-index:80;top:0;display:flex;align-items:center;gap:7px;min-height:45px;padding:6px 7px;border-radius:5px}.button-calendar.active{border-color:var(--primary);background:#e8f2ef;color:#28574f}.selected-meeting-summary{display:flex;align-items:center;gap:7px;min-width:270px;max-width:430px}.selected-meeting-summary>div{display:grid;min-width:0}.selected-meeting-summary strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.selected-meeting-summary span:not(.meeting-type-badge){overflow:hidden;color:var(--muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}.status-switch{display:flex;align-items:center;gap:2px;margin-left:auto}.status-switch button{display:flex;align-items:center;gap:4px;min-height:27px;padding:3px 6px;border:1px solid transparent;border-radius:5px;background:transparent;color:#66707a;font-size:9px;cursor:pointer}.status-switch button.active{border-color:#cdd3d8;background:#f5f6f7;color:#2f343a;font-weight:800}.status-switch button:disabled{cursor:default}.status-dot{display:block;width:10px;height:10px;border-radius:50%}.status-dot.draft,.calendar-marker.draft,.calendar-meeting-dot.draft{background:#8a9097}.status-dot.approved,.calendar-marker.approved,.calendar-meeting-dot.approved{background:#d88713}.status-dot.published,.calendar-marker.published,.calendar-meeting-dot.published{background:#3a8b55}.planner-command-actions{display:flex;flex-wrap:wrap;gap:4px}.planner-command-actions .button{min-height:27px;padding:3px 7px}.meeting-settings{display:grid;grid-template-columns:150px minmax(240px,1.2fr) minmax(220px,1fr) auto;gap:7px;align-items:end;margin-top:5px;padding:7px}.meeting-settings-info{align-self:center;color:var(--muted);font-size:9px}.plan-meta-line{display:flex;justify-content:flex-end;align-items:center;gap:10px;min-height:23px;padding:2px 5px;color:var(--muted);font-size:8px}.plan-meta-line .status{min-width:70px;padding:3px 6px}.calendar-panel{margin-top:5px;padding:6px;border-radius:5px}.calendar-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}.calendar-navigation{display:flex;align-items:center;gap:4px}.calendar-navigation strong{min-width:115px;text-align:center;font-size:11px;text-transform:capitalize}.calendar-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 9px;color:var(--muted);font-size:8px}.calendar-legend>span{display:flex;align-items:center;gap:3px}.calendar-marker{display:inline-block;width:8px;height:8px;border-radius:50%}.calendar-type-help b{display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#edf0f2;color:#424a53}.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr)}.calendar-weekdays span{padding:2px 4px;color:#69717a;font-size:8px;font-weight:800;text-align:center}.calendar-day{position:relative;display:grid;grid-template-columns:18px 1fr;align-items:center;min-height:29px;padding:2px 3px;border-top:1px solid #e5e8eb;border-left:1px solid #e5e8eb;background:#fff}.calendar-day:nth-child(7n){border-right:1px solid #e5e8eb}.calendar-day:nth-last-child(-n+7){border-bottom:1px solid #e5e8eb}.calendar-day.outside{background:#f8f9fa;color:#adb3b9}.calendar-day.today{box-shadow:inset 0 0 0 1px #4d7770}.calendar-day-number{font-size:8px}.calendar-meetings{display:flex;justify-content:flex-end;gap:3px}.calendar-meeting-dot{display:grid;place-items:center;width:18px;height:18px;padding:0;border:0;border-radius:50%;color:#fff;font-size:8px;font-weight:900;cursor:pointer}.calendar-meeting-dot.weekend{border-radius:50%}.calendar-meeting-dot.selected{outline:2px solid #173f39;outline-offset:1px}.compact-sections{display:grid;gap:4px}.compact-program-section{overflow:hidden;border:1px solid #cfd4d9;border-radius:3px;background:#fff}.compact-section-header{display:flex;align-items:center;min-height:23px;padding:2px 5px;border-bottom:1px solid #d9dde1;background:#edf0f2}.compact-section-header .section-marker{width:5px;height:16px;margin-right:5px}.compact-section-header h3{margin:0;font-size:10px;text-transform:uppercase;letter-spacing:.02em}.compact-section-header .add-task-button{margin-left:auto;min-height:20px;padding:2px 5px}.compact-section-header.theme-technical{background:#aeb1b4;color:#fff}.compact-section-header.theme-gray{background:#757a80;color:#fff}.compact-section-header.theme-orange{background:#c8841a;color:#fff}.compact-section-header.theme-burgundy{background:#92243a;color:#fff}.compact-section-header.theme-weekend{background:#0d416e;color:#fff}.compact-task-list{display:grid}.compact-task-row{display:grid;grid-template-columns:26px 39px minmax(190px,1.25fr) minmax(330px,1fr) 25px;align-items:stretch;min-height:30px;border-bottom:1px dotted #c9cdd1}.compact-task-row:last-child{border-bottom:0}.compact-task-number,.compact-task-duration,.compact-task-title{display:flex;align-items:center;padding:3px 5px;border-right:1px solid #e0e3e6}.compact-task-number{justify-content:center;color:#535b64;font-size:9px;font-weight:800}.compact-task-duration{justify-content:flex-end;color:#4c555e;font-size:8px;white-space:nowrap}.compact-task-title{overflow:hidden;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.compact-assignment-area{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:2px;padding:2px}.compact-assignment{display:grid;grid-template-columns:minmax(58px,.55fr) minmax(80px,1fr);align-items:center;min-height:25px;padding:2px 5px;border:1px solid #cfd5da;border-radius:3px;background:#fff;text-align:left;cursor:pointer}.compact-assignment span{overflow:hidden;color:#67707a;font-size:7px;text-overflow:ellipsis;white-space:nowrap}.compact-assignment strong{overflow:hidden;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.compact-assignment.unassigned{border-color:#d8b967;background:#fff9e9;color:#78570e}.compact-assignment.assigned{border-color:#7ca89d;background:#edf6f3;color:#245149}.compact-assignment.inherited{cursor:default}.compact-manual-field{display:grid;grid-template-columns:80px 1fr;align-items:center;gap:4px}.compact-manual-field>span{overflow:hidden;color:#67707a;font-size:7px;text-overflow:ellipsis;white-space:nowrap}.compact-manual-field input,.compact-manual-field select{min-height:25px;padding:2px 5px;font-size:9px}.task-details-toggle{width:25px;border:0;border-left:1px solid #e0e3e6;background:#f7f8f9;color:#5d6670;font-size:14px;cursor:pointer}.task-details-toggle.active{background:#dfeae7;color:#254e48}.compact-task-details{grid-column:1/-1;display:grid;grid-template-columns:minmax(240px,1.2fr) minmax(200px,1fr) 75px 75px minmax(180px,auto) auto;gap:5px;align-items:end;padding:6px;border-top:1px solid #d9dde1;background:#f6f7f8}.compact-task-details[hidden]{display:none}.compact-task-details input,.compact-task-details select{min-height:27px}.compact-task-details .chairman-assignment{align-self:center}.compact-task-details .task-note{color:var(--muted);font-size:8px}.compact-task-details .remove-task-button{align-self:end;white-space:nowrap}.statistical-candidate{min-height:76px}.candidate-stats{display:flex!important;flex-wrap:wrap;gap:4px;margin-top:3px}.candidate-stats i{padding:3px 5px;border-radius:4px;background:#eef1f3;color:#4e5861;font-size:8px;font-style:normal}.candidate-stats b{color:#243039;font-size:10px}.candidate-preferred{display:inline-block;margin-left:4px;padding:2px 4px;border-radius:999px;background:#dceee8;color:#28574f;font-size:7px;vertical-align:middle}
@media(max-width:1050px){.planner-commandbar{flex-wrap:wrap}.status-switch{margin-left:0}.selected-meeting-summary{flex:1}.compact-task-row{grid-template-columns:24px 36px minmax(170px,.9fr) minmax(290px,1.2fr) 24px}.compact-task-details{grid-template-columns:1fr 1fr 70px 70px}.compact-task-details .chairman-assignment,.compact-task-details .task-note,.compact-task-details .remove-task-button{grid-column:auto}}
@media(max-width:720px){.compact-app-header{position:static}.planner-commandbar{position:static}.status-switch{order:4;width:100%;justify-content:flex-start}.calendar-legend{display:none}.calendar-day{grid-template-columns:14px 1fr;padding:1px}.calendar-meeting-dot{width:16px;height:16px}.meeting-settings{grid-template-columns:1fr}.compact-task-row{grid-template-columns:22px 34px minmax(120px,1fr) 25px}.compact-assignment-area{grid-column:1/-1;border-top:1px dotted #d7dade}.task-details-toggle{grid-column:4;grid-row:1}.compact-task-details{grid-template-columns:1fr}.compact-assignment{grid-template-columns:80px 1fr}.planner-command-actions{width:100%}}


/* Wersja 1.9 — ustawienia harmonogramu, filtry historii i import PDF */
.assignment-history-window{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;padding:7px 13px;border-bottom:1px solid var(--line);background:#f7f8f9;font-size:9px}.assignment-history-window>span{font-weight:800;color:#4d5660}.assignment-history-window label{display:inline-flex;align-items:center;gap:4px;cursor:pointer}.assignment-history-window input{width:auto;min-height:auto;margin:0}
.settings-page{max-width:960px}.congregation-settings-card{padding:16px}.settings-intro h2{margin:0 0 4px;font-size:17px}.settings-intro p{margin:0 0 14px;color:var(--muted)}.schedule-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.schedule-setting-block{display:grid;grid-template-columns:1fr 140px;gap:9px;padding:12px;border:1px solid var(--line);border-left:6px solid var(--primary);border-radius:8px;background:#fafbfc}.schedule-setting-block.weekend{border-left-color:#123d64}.schedule-setting-block h3{grid-column:1/-1;margin:0;font-size:14px}.settings-generation-row{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.generation-result{margin-top:12px;padding:10px;border-left:4px solid var(--primary);background:#eaf4f2;font-size:11px}
.pdf-import-page{max-width:1180px}.pdf-upload-card{padding:14px}.pdf-upload-card h2,.pdf-review-heading h2{margin:0 0 4px;font-size:16px}.pdf-upload-card p,.pdf-review-heading p{margin:0 0 10px;color:var(--muted)}.pdf-upload-card form{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:10px;align-items:end}.pdf-fallback{grid-column:1/-1}.pdf-fallback textarea{margin-top:6px}.pdf-engine-status{margin-top:9px;color:var(--muted);font-size:9px}.import-message,.import-result{margin-bottom:8px;padding:9px 11px}.import-result.error{border-left:4px solid var(--danger);color:var(--danger)}.pdf-review-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:15px 0 8px}.pdf-week-card{margin-bottom:8px;padding:9px}.pdf-week-card>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}.pdf-week-include{display:flex;align-items:center;gap:7px;font-size:13px}.pdf-week-include input{width:auto;min-height:auto}.pdf-reading-field{margin-bottom:7px}.pdf-warning{margin:5px 0;padding:6px 8px;border-left:3px solid #b7791f;background:#fff8e7;font-size:9px}.pdf-items-table{display:grid;border:1px solid var(--line);border-radius:6px;overflow:hidden}.pdf-item-head,.pdf-item-row{display:grid;grid-template-columns:38px minmax(250px,1fr) minmax(190px,.65fr) 65px;gap:6px;align-items:center;padding:5px 7px}.pdf-item-head{background:#eef1f3;color:var(--muted);font-size:8px;font-weight:800}.pdf-item-row{border-top:1px solid #e7e9ed}.pdf-item-row input,.pdf-item-row select{min-height:28px}.pdf-review-footer{display:flex;justify-content:flex-end;margin:12px 0 30px}
@media(max-width:700px){.schedule-settings-grid{grid-template-columns:1fr}.schedule-setting-block{grid-template-columns:1fr}.settings-generation-row,.pdf-review-heading{align-items:stretch;flex-direction:column}.pdf-upload-card form{grid-template-columns:1fr}.pdf-item-head{display:none}.pdf-item-row{grid-template-columns:30px 1fr}.pdf-item-row select,.pdf-item-row input[type=number]{grid-column:2}.pdf-item-row b{grid-row:1/4}}


/* Wersja 1.9.2 — instrukcja pdftotext */
.pdf-tool-help {
    margin-top: 9px;
    border: 1px solid #d9dee4;
    border-radius: 6px;
    background: #f8fafb;
}

.pdf-tool-help summary {
    padding: 7px 9px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
}

.pdf-tool-help > div {
    padding: 0 9px 9px;
    color: #4d5660;
    font-size: 9px;
    line-height: 1.45;
}

.pdf-tool-help p {
    margin: 5px 0;
}

.pdf-tool-help pre {
    margin: 7px 0;
    padding: 7px 8px;
    overflow-x: auto;
    border-radius: 5px;
    background: #20262c;
    color: #f3f5f7;
}

.pdf-tool-help code {
    font-family: Consolas, "Courier New", monospace;
}


/* Wersja 1.10 — import JSON przygotowanego przez ChatGPT */
.import-method-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 9px;
    padding: 12px 14px;
    border-left: 5px solid var(--primary);
    background: #f3f8f7;
}

.import-method-intro h2 {
    margin: 2px 0 4px;
    font-size: 15px;
}

.import-method-intro p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.import-downloads {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.import-source-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 9px;
}

.import-source-grid .pdf-upload-card {
    position: relative;
    margin: 0;
    overflow: hidden;
}

.import-source-grid .pdf-upload-card form {
    grid-template-columns: 1fr auto;
}

.import-method-number {
    position: absolute;
    top: -12px;
    right: -8px;
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #dfeeea;
    color: #2f655c;
    font-size: 20px;
    font-weight: 900;
    opacity: .8;
}

.import-method-number.secondary {
    background: #eceff2;
    color: #64707b;
}

.import-json-card {
    border-top: 4px solid var(--primary);
}

.import-pdf-card {
    border-top: 4px solid #9ba3ab;
}

.import-validation-list {
    display: grid;
    gap: 3px;
    margin: 10px 0 0;
    padding: 8px 8px 8px 24px;
    border-radius: 6px;
    background: #f6f8f8;
    color: #53605e;
    font-size: 9px;
}

.import-clear-form {
    display: flex;
    justify-content: flex-end;
    margin: -20px 0 28px;
}

@media (max-width: 850px) {
    .import-method-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .import-downloads {
        justify-content: flex-start;
    }

    .import-source-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .import-source-grid .pdf-upload-card form {
        grid-template-columns: 1fr;
    }
}


/* Wersja 1.11 — kompaktowy kalendarz i nawigacja między zebraniami */
.meeting-step-navigation {
    display: flex;
    align-items: stretch;
    gap: 2px;
    flex: 0 0 auto;
}

.meeting-step-button {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: 1px solid #cfd5da;
    border-radius: 6px;
    background: #fff;
    color: #354048;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.meeting-step-button:hover:not(:disabled) {
    border-color: #7f9b95;
    background: #eef5f3;
    color: #245149;
}

.meeting-step-button:disabled {
    opacity: .30;
    cursor: default;
}

.calendar-panel {
    width: min(780px, 100%);
    margin: 5px auto 6px;
    padding: 5px 7px 7px;
    border: 1px solid #d7dde1;
    border-radius: 8px;
    background: linear-gradient(#ffffff, #fbfcfc);
    box-shadow: 0 1px 4px rgba(31, 43, 49, .05);
}

.calendar-header {
    min-height: 25px;
    margin-bottom: 2px;
}

.calendar-navigation {
    gap: 3px;
}

.calendar-navigation .button {
    min-height: 22px;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 9px;
}

.calendar-navigation strong {
    min-width: 105px;
    font-size: 10px;
}

.calendar-legend {
    gap: 3px 7px;
    font-size: 7px;
}

.calendar-marker {
    width: 7px;
    height: 7px;
}

.calendar-type-help b {
    width: 12px;
    height: 12px;
    font-size: 7px;
}

.calendar-weekdays {
    margin-top: 1px;
    border-bottom: 1px solid #dfe3e6;
}

.calendar-weekdays span {
    padding: 2px 1px 3px;
    color: #68727a;
    font-size: 7px;
    letter-spacing: .02em;
}

.calendar-grid {
    gap: 1px;
    padding-top: 1px;
    background: #e5e9ec;
}

.calendar-day {
    position: relative;
    display: grid;
    grid-template-columns: 15px 1fr;
    align-items: center;
    min-height: 22px;
    padding: 1px 2px;
    border: 0 !important;
    background: #fff;
    transition: background .12s ease, box-shadow .12s ease;
}

.calendar-day.weekend-day {
    background: #fafbfc;
}

.calendar-day.outside {
    background: #f5f7f8;
    color: #b2b7bd;
}

.calendar-day.today {
    box-shadow: inset 0 0 0 1px #7a9f98;
}

.calendar-day.selected-meeting-day {
    z-index: 1;
    background: #e8f3f0;
    box-shadow:
        inset 0 0 0 2px #35756a,
        0 1px 3px rgba(25, 74, 66, .12);
}

.calendar-day.selected-meeting-day .calendar-day-number {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-left: -1px;
    border-radius: 50%;
    background: #35756a;
    color: #fff;
    font-weight: 900;
}

.calendar-day-number {
    font-size: 7px;
    font-weight: 700;
    text-align: center;
}

.calendar-meetings {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
}

.calendar-meeting-dot {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent !important;
    color: #fff;
    cursor: pointer;
}

.calendar-status-fill {
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--meeting-status-color, #8a9097);
    color: #fff;
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.calendar-meeting-dot[data-plan-status="draft"] .calendar-status-fill {
    background: #8a9097;
}

.calendar-meeting-dot[data-plan-status="approved"] .calendar-status-fill {
    background: #d88713;
}

.calendar-meeting-dot[data-plan-status="published"] .calendar-status-fill {
    background: #3a8b55;
}

.calendar-meeting-dot:hover .calendar-status-fill {
    transform: scale(1.08);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, .10),
        0 0 0 2px #fff,
        0 0 0 3px #9da8ad;
}

.calendar-meeting-dot.selected .calendar-status-fill {
    transform: scale(1.06);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, .12),
        0 0 0 2px #fff,
        0 0 0 4px #173f39;
}

@media (max-width: 880px) {
    .calendar-panel {
        width: 100%;
    }

    .calendar-legend {
        display: none;
    }

    .selected-meeting-summary {
        min-width: 190px;
    }
}

@media (max-width: 720px) {
    .calendar-day {
        grid-template-columns: 12px 1fr;
        min-height: 20px;
    }

    .calendar-status-fill {
        width: 13px;
        height: 13px;
        font-size: 6px;
    }

    .calendar-meeting-dot {
        width: 15px;
        height: 15px;
    }

    .meeting-step-button {
        width: 27px;
        height: 27px;
    }
}


/* Wersja 1.12 — automatyczny status i autozapis */
.auto-plan-status {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid #d7dce0;
    border-radius: 7px;
    background: #f7f8f9;
    white-space: nowrap;
}

.auto-plan-status > span:last-child {
    display: grid;
    gap: 0;
    line-height: 1.05;
}

.auto-plan-status strong {
    font-size: 9px;
}

.auto-plan-status small {
    color: var(--muted);
    font-size: 7px;
}

.auto-plan-status.draft {
    border-color: #cdd1d5;
    background: #f4f5f6;
}

.auto-plan-status.approved {
    border-color: #e4bd7e;
    background: #fff7e8;
}

.auto-plan-status.published {
    border-color: #99bca4;
    background: #eef7f0;
}

.auto-plan-status .status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
}

.plan-meta-line .status.changed {
    color: #8a5a12;
}

.plan-meta-line .status.saved {
    color: #2f6f45;
}


/* Wersja 1.12.2 — jednorazowy import historii */
.history-import-page {
    max-width: 980px;
}

.history-import-card,
.history-import-result,
.history-import-after {
    padding: 12px;
    margin-bottom: 8px;
}

.history-import-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.history-import-heading h2,
.history-import-result h2,
.history-import-after h2 {
    margin: 0;
    font-size: 15px;
}

.history-import-badge {
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef2f3;
    color: #59636b;
    font-size: 9px;
    font-weight: 800;
}

.history-import-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.history-import-stats > div {
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid #e0e4e7;
    border-radius: 6px;
    background: #fafbfc;
}

.history-import-stats strong {
    font-size: 16px;
}

.history-import-stats span {
    color: var(--muted);
    font-size: 8px;
}

.history-import-stats .warning-stat {
    border-color: #e0b77c;
    background: #fff7e9;
}

.history-import-note {
    margin-top: 10px;
    padding: 8px 9px;
    border-left: 4px solid #4c8178;
    border-radius: 5px;
    background: #f0f7f5;
    font-size: 9px;
    line-height: 1.45;
}

.history-import-missing {
    margin-top: 10px;
    border: 1px solid #e3d1ac;
    border-radius: 6px;
    background: #fffaf0;
}

.history-import-missing summary {
    padding: 7px 9px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
}

.history-name-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px 8px;
    padding: 0 9px 9px;
}

.history-name-grid span {
    padding: 3px 5px;
    border-radius: 4px;
    background: #fff;
    font-size: 9px;
}

.history-import-form {
    margin-top: 10px;
}

.history-create-missing {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 8px 9px;
    border: 1px solid #dfe3e6;
    border-radius: 6px;
    background: #fafbfc;
    cursor: pointer;
}

.history-create-missing input {
    width: auto;
    min-height: auto;
    margin-top: 2px;
}

.history-create-missing > span {
    display: grid;
    gap: 2px;
}

.history-create-missing strong {
    font-size: 10px;
}

.history-create-missing small {
    color: var(--muted);
    font-size: 8px;
    line-height: 1.35;
}

.history-import-actions {
    display: flex;
    gap: 6px;
    margin-top: 9px;
}

.history-import-success {
    margin-bottom: 8px;
    padding: 9px 11px;
    border-left: 4px solid #3a8b55;
    background: #eef7f0;
}

.history-import-error {
    margin-bottom: 8px;
}

.history-import-result p,
.history-import-after p {
    margin: 7px 0 0;
    font-size: 9px;
    line-height: 1.5;
}

.history-import-after code {
    font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 760px) {
    .history-import-stats {
        grid-template-columns: repeat(3, 1fr);
    }

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


/* Wersja 1.13 — oddzielne generatory zebrań */
.settings-save-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.settings-saved-at {
    color: var(--muted);
    font-size: 8px;
}

.schedule-setting-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-setting-title h3 {
    grid-column: auto;
    margin: 0;
}

.schedule-setting-title small {
    color: var(--muted);
    font-size: 8px;
}

.schedule-kind-mark,
.generator-icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.schedule-setting-block.weekend .schedule-kind-mark,
.meeting-generator-card.weekend .generator-icon {
    background: #123d64;
}

.meeting-generators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 9px;
}

.meeting-generator-card {
    padding: 12px;
    border-top: 4px solid var(--primary);
}

.meeting-generator-card.weekend {
    border-top-color: #123d64;
}

.meeting-generator-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.meeting-generator-header h2 {
    margin: 1px 0 2px;
    font-size: 14px;
}

.meeting-generator-header p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
}

.meeting-generator-form {
    margin-top: 10px;
}

.generator-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 3px;
    border: 1px solid #d9dee2;
    border-radius: 7px;
    background: #f1f3f4;
}

.generator-mode-switch label {
    cursor: pointer;
}

.generator-mode-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.generator-mode-switch span {
    display: block;
    padding: 6px 8px;
    border-radius: 5px;
    color: #5d666f;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.generator-mode-switch input:checked + span {
    background: #fff;
    color: #2e4742;
    box-shadow: 0 1px 3px rgba(30, 41, 47, .12);
}

.meeting-generator-card.weekend .generator-mode-switch input:checked + span {
    color: #123d64;
}

.generator-period-panel {
    min-height: 103px;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #e1e5e8;
    border-radius: 7px;
    background: #fafbfc;
}

.generator-period-panel[hidden] {
    display: none;
}

.generator-year-field {
    max-width: 180px;
}

.generator-date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.generator-hint {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

.generator-submit {
    width: 100%;
    margin-top: 8px;
}

.generation-result {
    margin-top: 8px;
    padding: 8px;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    background: #eaf4f2;
}

.meeting-generator-card.weekend .generation-result {
    border-left-color: #123d64;
    background: #edf3f8;
}

.generation-result-main {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 9px;
}

.generation-result-main span {
    color: var(--muted);
}

.generation-result-counters {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.generation-result-counters span {
    padding: 3px 5px;
    border-radius: 4px;
    background: rgba(255,255,255,.75);
    font-size: 8px;
}

.generation-result-counters b {
    font-size: 10px;
}

.generator-safety-note {
    margin-top: 9px;
    padding: 8px 10px;
    color: #55616a;
    font-size: 9px;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .meeting-generators-grid {
        grid-template-columns: 1fr;
    }

    .generator-date-range {
        grid-template-columns: 1fr;
    }

    .settings-save-row {
        align-items: stretch;
        flex-direction: column;
    }
}


/* Wersja 1.13.1 — rozwiązywanie duplikatów przy imporcie historii */
.history-import-stats {
    grid-template-columns: repeat(7, 1fr);
}

.history-ambiguous-section {
    margin-top: 10px;
    padding: 9px;
    border: 1px solid #dfbd80;
    border-radius: 7px;
    background: #fff9ed;
}

.history-ambiguous-heading {
    display: grid;
    gap: 2px;
}

.history-ambiguous-heading strong {
    font-size: 10px;
    color: #755210;
}

.history-ambiguous-heading span {
    color: #76684c;
    font-size: 8px;
}

.history-ambiguous-list {
    display: grid;
    gap: 5px;
    margin-top: 7px;
}

.history-ambiguous-row {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(260px, 1.3fr);
    gap: 8px;
    align-items: center;
    padding: 6px 7px;
    border: 1px solid #ead8b5;
    border-radius: 5px;
    background: #fff;
}

.history-source-name {
    font-size: 9px;
    font-weight: 800;
}

.history-ambiguous-row select {
    min-width: 0;
}

@media (max-width: 760px) {
    .history-import-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .history-ambiguous-row {
        grid-template-columns: 1fr;
    }
}


/* Wersja 1.13.2 — usuwanie uczestnika */
#deleteParticipantButton {
    margin-right: 4px;
}

#deleteParticipantButton:hover:not(:disabled) {
    background: #fff1f1;
    border-color: var(--danger);
}

#deleteParticipantButton:disabled {
    opacity: .5;
    cursor: wait;
}


/* Wersja 1.13.4 — automatyczne tworzenie brakujących osób w imporcie historii */
.history-create-missing-info {
    cursor: default;
}

.history-auto-create-mark {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    background: #eef7f0;
    color: #2f7045;
    font-size: 15px;
    font-weight: 900;
}

.history-created-participants {
    margin-top: 9px;
    padding: 8px;
    border: 1px solid #b8d2c0;
    border-radius: 6px;
    background: #f1f8f3;
}

.history-created-participants > strong {
    display: block;
    margin-bottom: 5px;
    font-size: 9px;
}

.history-created-participants small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
}


/* Wersja 1.14 — Brat / Siostra i filtr kandydatów */
.participant-gender-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.participant-gender-field legend {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
}

.participant-gender-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.participant-gender-options label {
    cursor: pointer;
}

.participant-gender-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.participant-gender-options span {
    display: grid;
    place-items: center;
    min-height: 31px;
    padding: 5px 8px;
    border: 1px solid #d7dce0;
    border-radius: 6px;
    background: #fff;
    color: #566069;
    font-size: 9px;
    font-weight: 850;
}

.participant-gender-options input:checked + span {
    border-color: #4e8178;
    background: #eaf4f2;
    color: #285d54;
    box-shadow: inset 0 0 0 1px rgba(45,101,93,.08);
}

.participant-gender-field small {
    display: block;
    margin-top: 4px;
    color: #9a6716;
    font-size: 8px;
}

.participant-gender-mini {
    display: inline-block;
    font-weight: 850;
}

.participant-gender-mini.brother {
    color: #315f88;
}

.participant-gender-mini.sister {
    color: #815c78;
}

.participant-gender-mini.unset {
    color: #9a6716;
}

.assignment-gender-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 10px;
    padding: 5px 8px;
    border-top: 1px solid #e0e4e7;
    border-bottom: 1px solid #e0e4e7;
    background: #f8f9fa;
    font-size: 9px;
}

.assignment-gender-filter > span {
    color: var(--muted);
    font-weight: 800;
}

.assignment-gender-filter label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-weight: 800;
}

.assignment-gender-filter input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.candidate-gender {
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    margin-right: 2px;
    border-radius: 50%;
    background: #eef1f3;
    color: #5d666d;
    font-size: 8px;
    font-weight: 900;
    vertical-align: middle;
}

.candidate-gender.brother {
    background: #e9f1f8;
    color: #315f88;
}

.candidate-gender.sister {
    background: #f4edf2;
    color: #815c78;
}

.candidate-gender.unset {
    background: #fff4dd;
    color: #986713;
}


/* Wersja 1.14.1 — poprawka nagłówka wyboru uczestnika */
.assignment-modal-card {
    display: flex;
    flex-direction: column;
    grid-template-rows: none;
}

.assignment-modal-header,
.assignment-partner-info,
.assignment-history-window,
.assignment-gender-filter,
.assignment-candidates-status,
.assignment-modal-footer {
    flex: 0 0 auto;
}

.assignment-partner-info {
    width: auto;
}

.assignment-history-window,
.assignment-gender-filter {
    position: relative;
    z-index: 2;
    min-height: 34px;
    box-sizing: border-box;
}

.assignment-gender-filter {
    padding: 7px 13px;
    border-top: 0;
}

.assignment-gender-filter label {
    position: relative;
    z-index: 3;
    min-height: 20px;
}

.assignment-gender-filter input {
    position: static;
    z-index: auto;
    opacity: 1;
    pointer-events: auto;
    flex: 0 0 auto;
}

.assignment-candidates-status {
    min-height: 29px;
    box-sizing: border-box;
}

.assignment-candidates-list {
    flex: 1 1 auto;
    min-height: 120px;
    overflow-y: auto;
}

.assignment-modal-footer {
    margin-top: 0;
}

@media (max-height: 620px) {
    .assignment-modal {
        align-items: stretch;
        padding: 8px;
    }

    .assignment-modal-card {
        max-height: calc(100vh - 16px);
    }

    .assignment-modal-header {
        padding-top: 8px;
        padding-bottom: 6px;
    }

    .assignment-partner-info {
        margin-top: 5px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .assignment-history-window,
    .assignment-gender-filter {
        min-height: 30px;
        padding-top: 5px;
        padding-bottom: 5px;
    }
}


/* Wersja 1.14.2 — jednorazowe przeniesienie historii do planów */
.history-plan-page {
    max-width: 1080px;
}

.history-plan-card,
.history-plan-details,
.history-plan-after {
    margin-bottom: 9px;
    padding: 12px;
}

.history-plan-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.history-plan-heading h2 {
    margin: 1px 0 0;
    font-size: 15px;
}

.history-plan-success {
    margin-bottom: 9px;
    padding: 9px 11px;
    border-left: 4px solid #3a8b55;
    background: #eef7f0;
    font-size: 9px;
}

.history-plan-error {
    margin-bottom: 9px;
}

.history-plan-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.history-plan-stats > div {
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid #e0e4e7;
    border-radius: 6px;
    background: #fafbfc;
}

.history-plan-stats strong {
    font-size: 16px;
}

.history-plan-stats span {
    color: var(--muted);
    font-size: 8px;
}

.history-plan-stats .warning-stat {
    border-color: #dfbd80;
    background: #fff8eb;
}

.history-plan-rules {
    margin-top: 10px;
    padding: 9px 10px;
    border-left: 4px solid #4b8177;
    border-radius: 5px;
    background: #f0f7f5;
    font-size: 9px;
    line-height: 1.45;
}

.history-plan-rules ul {
    margin: 5px 0 0 17px;
    padding: 0;
}

.history-plan-rules li + li {
    margin-top: 2px;
}

.history-plan-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.history-plan-secondary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
}

.history-plan-secondary-stats span {
    padding: 4px 6px;
    border-radius: 5px;
    background: #f1f3f4;
    color: #5d666e;
    font-size: 8px;
}

.history-plan-detail-list {
    display: grid;
    gap: 3px;
    max-height: 420px;
    margin-top: 8px;
    overflow-y: auto;
}

.history-plan-detail {
    padding: 5px 7px;
    border-left: 3px solid #aab1b6;
    border-radius: 3px;
    background: #f7f8f9;
    font-size: 8px;
    line-height: 1.35;
}

.history-plan-detail.conflict {
    border-left-color: #c77a1c;
    background: #fff7e8;
}

.history-plan-detail.skip {
    border-left-color: #87929a;
}

.history-plan-empty,
.history-plan-after {
    font-size: 9px;
    line-height: 1.45;
}

.history-plan-after code {
    font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 820px) {
    .history-plan-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .history-plan-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-plan-actions {
        flex-direction: column;
    }
}


/* Wersja 1.14.3 — import historii bezpośrednio z pliku */
.history-upload-card {
    margin-bottom: 9px;
    padding: 12px;
}

.history-upload-form {
    display: flex;
    align-items: end;
    gap: 8px;
    margin-top: 10px;
}

.history-file-picker {
    display: grid;
    flex: 1 1 420px;
    gap: 4px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
}

.history-file-picker input[type="file"] {
    width: 100%;
    min-height: 35px;
    padding: 6px;
    border: 1px solid #d8dde1;
    border-radius: 6px;
    background: #fff;
    color: #39434a;
    font-size: 9px;
}

.history-weekend-rules {
    margin-top: 10px;
    border-left-color: #315f88;
    background: #f0f5fa;
}

.history-plan-stats-upload {
    grid-template-columns: repeat(6, 1fr);
}

.history-preview-note {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 7px;
}

.history-plan-detail.info {
    border-left-color: #315f88;
    background: #eef5fb;
}

.history-plan-actions form {
    margin: 0;
}

@media (max-width: 680px) {
    .history-upload-form {
        align-items: stretch;
        flex-direction: column;
    }

    .history-plan-stats-upload {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Wersja 1.15 — publiczny link do przydziałów */
.public-share-settings-card {
    margin-top: 9px;
    padding: 12px;
    border-top: 4px solid #315f88;
}

.public-share-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.public-share-settings-header h2 {
    margin: 1px 0 2px;
    font-size: 14px;
}

.public-share-settings-header p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.public-share-state-badge {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
}

.public-share-state-badge.off {
    background: #eef0f2;
    color: #707980;
}

.public-share-state-badge.on {
    background: #eaf5ed;
    color: #2e7145;
}

.public-share-disabled,
.public-share-enabled {
    margin-top: 10px;
}

.public-share-disabled p,
.public-share-warning {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

.public-share-url-field input {
    font-family: Consolas, "Courier New", monospace;
    font-size: 8px;
}

.public-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.public-share-warning {
    margin-top: 7px;
    margin-bottom: 0;
    color: #8a621e;
}

@media (max-width: 720px) {
    .public-share-settings-header {
        flex-direction: column;
    }

    .public-share-actions {
        flex-direction: column;
    }
}


/* Wersja 1.15.5 — większa i czytelniejsza typografia planu */
.compact-section-header {
    min-height: 27px;
}

.compact-section-header h3 {
    font-size: 12px;
    line-height: 1.1;
}

.compact-task-row {
    min-height: 35px;
}

.compact-task-number {
    font-size: 10px;
}

.compact-task-duration {
    font-size: 9px;
}

.compact-task-title {
    font-size: 12px;
    line-height: 1.15;
}

.compact-assignment {
    min-height: 29px;
    padding-top: 3px;
    padding-bottom: 3px;
}

.compact-assignment span {
    font-size: 8px;
    line-height: 1.05;
}

.compact-assignment strong {
    font-size: 11px;
    line-height: 1.1;
}

.compact-manual-field > span {
    font-size: 8px;
}

.compact-manual-field input,
.compact-manual-field select {
    min-height: 29px;
    font-size: 11px;
}

.compact-task-details .task-note {
    font-size: 9px;
}

.selected-meeting-summary strong {
    font-size: 13px;
}

.selected-meeting-summary span:not(.meeting-type-badge) {
    font-size: 10px;
}

.meeting-type-badge {
    font-size: 9px;
}

@media (max-width: 720px) {
    .compact-task-title {
        font-size: 11px;
    }

    .compact-assignment strong {
        font-size: 10px;
    }
}


/* Wersja 1.15.6 — przełączane warianty czytelności A / B / C */
.text-size-button {
    min-width: 72px;
    font-weight: 900;
}

body.planner-text-a .compact-section-header h3 {
    font-size: 12px;
}
body.planner-text-a .compact-task-row {
    min-height: 42px;
}
body.planner-text-a .compact-task-number {
    font-size: 10px;
}
body.planner-text-a .compact-task-duration {
    font-size: 9px;
}
body.planner-text-a .compact-task-title {
    font-size: 13px;
    line-height: 1.16;
}
body.planner-text-a .compact-assignment {
    min-height: 31px;
}
body.planner-text-a .compact-assignment span,
body.planner-text-a .compact-manual-field > span {
    font-size: 9px;
}
body.planner-text-a .compact-assignment strong,
body.planner-text-a .compact-manual-field input,
body.planner-text-a .compact-manual-field select {
    font-size: 12px;
}

body.planner-text-b .compact-section-header {
    min-height: 31px;
}
body.planner-text-b .compact-section-header h3 {
    font-size: 13px;
}
body.planner-text-b .compact-task-row {
    min-height: 50px;
}
body.planner-text-b .compact-task-number {
    font-size: 11px;
}
body.planner-text-b .compact-task-duration {
    font-size: 10px;
}
body.planner-text-b .compact-task-title {
    overflow: visible;
    font-size: 15px;
    line-height: 1.18;
    text-overflow: clip;
    white-space: normal;
}
body.planner-text-b .compact-assignment {
    min-height: 36px;
    padding-top: 4px;
    padding-bottom: 4px;
}
body.planner-text-b .compact-assignment span,
body.planner-text-b .compact-manual-field > span {
    font-size: 10px;
}
body.planner-text-b .compact-assignment strong {
    overflow: visible;
    font-size: 14px;
    line-height: 1.14;
    text-overflow: clip;
    white-space: normal;
}
body.planner-text-b .compact-manual-field input,
body.planner-text-b .compact-manual-field select {
    min-height: 34px;
    font-size: 14px;
}
body.planner-text-b .compact-task-details .task-note {
    font-size: 10px;
}

body.planner-text-c .compact-section-header {
    min-height: 34px;
}
body.planner-text-c .compact-section-header h3 {
    font-size: 14px;
}
body.planner-text-c .compact-task-row {
    min-height: 58px;
}
body.planner-text-c .compact-task-number {
    font-size: 12px;
}
body.planner-text-c .compact-task-duration {
    font-size: 11px;
}
body.planner-text-c .compact-task-title {
    overflow: visible;
    font-size: 17px;
    line-height: 1.18;
    text-overflow: clip;
    white-space: normal;
}
body.planner-text-c .compact-assignment {
    min-height: 42px;
    padding-top: 5px;
    padding-bottom: 5px;
}
body.planner-text-c .compact-assignment span,
body.planner-text-c .compact-manual-field > span {
    font-size: 11px;
}
body.planner-text-c .compact-assignment strong {
    overflow: visible;
    font-size: 16px;
    line-height: 1.14;
    text-overflow: clip;
    white-space: normal;
}
body.planner-text-c .compact-manual-field input,
body.planner-text-c .compact-manual-field select {
    min-height: 39px;
    font-size: 16px;
}
body.planner-text-c .compact-task-details .task-note {
    font-size: 11px;
}

/* Przy B/C zwiększamy trochę przestrzeń dla części z przydziałami,
   żeby większe nazwiska nie były niepotrzebnie ściskane. */
@media (min-width: 1051px) {
    body.planner-text-b .compact-task-row {
        grid-template-columns: 29px 44px minmax(230px, 1fr) minmax(390px, 1.25fr) 29px;
    }

    body.planner-text-c .compact-task-row {
        grid-template-columns: 31px 48px minmax(250px, 1fr) minmax(430px, 1.35fr) 31px;
    }
}

@media (max-width: 720px) {
    body.planner-text-b .compact-task-title {
        font-size: 14px;
    }

    body.planner-text-b .compact-assignment strong {
        font-size: 13px;
    }

    body.planner-text-c .compact-task-title {
        font-size: 15px;
    }

    body.planner-text-c .compact-assignment strong {
        font-size: 14px;
    }
}


/* Wersja 1.15.9 — uproszczona górna belka planera */
.planner-commandbar {
    gap: 10px;
    min-height: 48px;
    padding: 6px 8px;
}

.planner-meeting-selector {
    display: grid;
    grid-template-columns: 30px minmax(280px, 1fr) 30px;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1 1 520px;
}

.planner-meeting-selector .meeting-step-button {
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.planner-meeting-selector .selected-meeting-summary {
    min-width: 0;
    max-width: none;
}

.auto-plan-status {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
}

.auto-plan-status strong {
    font-size: 10px;
}

.planner-command-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.planner-more {
    position: relative;
}

.planner-more-button {
    min-width: 76px;
}

.planner-more-menu {
    position: absolute;
    z-index: 130;
    top: calc(100% + 5px);
    right: 0;
    width: 190px;
    overflow: hidden;
    border: 1px solid #cfd5da;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(33, 42, 48, .16);
}

.planner-more-menu[hidden] {
    display: none;
}

.planner-more-item {
    display: block;
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    background: #fff;
    color: #39434a;
    font: inherit;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
}

.planner-more-item:last-child {
    border-bottom: 0;
}

.planner-more-item:hover,
.planner-more-item:focus-visible,
.planner-more-item.active {
    background: #eef4f2;
    color: #244d46;
}

/* Kalendarz jest stale widoczny, więc nie potrzebuje już przycisku "Kalendarz". */
.calendar-panel {
    display: block;
}

/* Odchudzony nagłówek samego kalendarza. */
.calendar-header {
    min-height: 28px;
}

.calendar-navigation .button {
    min-height: 24px;
    padding: 2px 6px;
}

.calendar-navigation strong {
    font-size: 12px;
}

.calendar-legend {
    gap: 4px 7px;
    font-size: 7px;
}

@media (max-width: 1050px) {
    .planner-commandbar {
        flex-wrap: wrap;
    }

    .planner-meeting-selector {
        flex: 1 1 100%;
    }

    .planner-command-actions {
        margin-left: 0;
    }
}

@media (max-width: 720px) {
    .planner-meeting-selector {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        flex-basis: 100%;
    }

    .planner-command-actions {
        width: auto;
        margin-left: auto;
    }

    .planner-more-menu {
        right: 0;
    }
}


/* Wersja 1.15.10 — jeszcze prostsza górna belka */
.planner-command-actions {
    gap: 6px;
}

.icon-only-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    width: 32px;
    min-height: 32px;
    padding: 0;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.icon-only-button span {
    display: inline-block;
    transform: translateY(-1px);
}

/* Stare style menu "Więcej" nie są już używane. */
.planner-more,
.planner-more-button,
.planner-more-menu,
.planner-more-item {
    display: none !important;
}

/* Wersja 1.15.18 — jeden spójny layout okna kandydatów */

/* Wszystkie reguły są celowo ograniczone do assignmentModal,
   żeby starsze style .candidate-* z innych części aplikacji nie mieszały układu. */
#assignmentModal .assignment-modal-card {
    width: min(980px, calc(100vw - 32px));
    max-height: min(820px, calc(100vh - 32px));
}

#assignmentModal .assignment-candidates-status {
    padding: 6px 12px;
    font-size: 9px;
    line-height: 1.3;
}

#assignmentModal .assignment-candidates-list {
    gap: 5px;
    padding: 0 10px 9px;
    align-content: start;
    grid-auto-rows: max-content;
}

#assignmentModal .assignment-candidate.statistical-candidate {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    width: 100%;
    min-height: 0;
    padding: 7px 8px;
    overflow: hidden;
}

#assignmentModal .assignment-candidate.candidate-has-current-assignment {
    border: 2px solid #d58a17;
    background: #fff1d7;
    box-shadow: none;
}

#assignmentModal .assignment-candidate.candidate-has-current-assignment:hover:not(:disabled),
#assignmentModal .assignment-candidate.candidate-has-current-assignment.selected {
    border-color: #b96c08;
    background: #ffe9c0;
}

#assignmentModal .candidate-rank {
    width: 24px;
    height: 24px;
    margin-top: 1px;
    font-size: 8px;
}

/* Desktop: nazwisko | liczniki | historia w jednym zwartym wierszu. */
#assignmentModal .candidate-main {
    display: grid;
    grid-template-columns: minmax(180px, .85fr) minmax(280px, 1.2fr) minmax(250px, 1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
}

#assignmentModal .candidate-head {
    display: grid;
    gap: 4px;
    min-width: 0;
}

#assignmentModal .candidate-name-line {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#assignmentModal .candidate-current-meeting-warning {
    display: block;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    padding: 3px 6px;
    overflow: hidden;
    border-radius: 4px;
    background: #df941f;
    color: #2f2413;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#assignmentModal .candidate-stats {
    display: grid !important;
    gap: 4px;
    min-width: 0;
    margin: 0;
}

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

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

#assignmentModal .candidate-stats.stats-1 {
    grid-template-columns: minmax(110px, 170px);
}

#assignmentModal .candidate-stat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    align-items: center;
    min-width: 0;
    min-height: 31px;
    padding: 4px 6px;
    border: 1px solid #dce1e5;
    border-radius: 5px;
    background: #f4f6f7;
}

#assignmentModal .candidate-stat small {
    min-width: 0;
    overflow: hidden;
    color: #606a73;
    font-size: 9px;
    font-weight: 750;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#assignmentModal .candidate-stat b {
    color: #26323a;
    font-size: 13px;
    line-height: 1;
}

#assignmentModal .candidate-history {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 3px 6px;
    border-left: 1px solid #e0e4e7;
}

#assignmentModal .candidate-recent-dates,
#assignmentModal .candidate-role-last {
    display: grid !important;
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
    color: #4f5961;
    font-size: 9px !important;
    line-height: 1.25;
}

#assignmentModal .candidate-recent-dates > span,
#assignmentModal .candidate-role-last > span {
    color: #7a838a;
    font-weight: 700;
}

#assignmentModal .candidate-recent-dates b,
#assignmentModal .candidate-role-last b {
    min-width: 0;
    overflow: hidden;
    color: #3d474f;
    font-size: 9px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#assignmentModal .candidate-pair {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #875813 !important;
    font-size: 8px !important;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#assignmentModal .candidate-has-current-assignment .candidate-stat {
    border-color: rgba(185, 108, 8, .25);
    background: rgba(255,255,255,.58);
}

/* Węższy desktop / tablet: historia schodzi do drugiego wiersza,
   ale nazwa i liczniki nadal pozostają obok siebie. */
@media (max-width: 820px) and (min-width: 601px) {
    #assignmentModal .candidate-main {
        grid-template-columns: minmax(180px, .8fr) minmax(280px, 1.2fr);
    }

    #assignmentModal .candidate-history {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
        gap: 5px 12px;
        padding: 4px 0 0;
        border-top: 1px solid #e0e4e7;
        border-left: 0;
    }

    #assignmentModal .candidate-pair {
        grid-column: 1 / -1;
    }
}

/* Telefon: prosty pionowy kafelek. */
@media (max-width: 600px) {
    #assignmentModal {
        align-items: stretch;
        padding: 0;
    }

    #assignmentModal .assignment-modal-card {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    #assignmentModal .assignment-modal-header {
        padding: 7px 9px 5px;
    }

    #assignmentModal .assignment-modal-header h2 {
        font-size: 15px;
    }

    #assignmentModal .assignment-modal-header p:last-child {
        font-size: 9px;
    }

    #assignmentModal .assignment-history-window,
    #assignmentModal .assignment-gender-filter {
        min-height: 0;
        gap: 4px 10px;
        padding: 5px 8px;
        font-size: 8px;
    }

    #assignmentModal .assignment-candidates-status {
        padding: 5px 8px;
        font-size: 8px;
        line-height: 1.25;
    }

    #assignmentModal .assignment-candidates-list {
        gap: 5px;
        min-height: 0;
        padding: 0 6px 7px;
    }

    #assignmentModal .assignment-candidate.statistical-candidate {
        grid-template-columns: 23px minmax(0, 1fr);
        gap: 6px;
        padding: 6px;
        border-radius: 6px;
    }

    #assignmentModal .candidate-rank {
        width: 21px;
        height: 21px;
        font-size: 7.5px;
    }

    #assignmentModal .candidate-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
    }

    #assignmentModal .candidate-name-line {
        overflow: visible;
        font-size: 12px;
        text-overflow: clip;
        white-space: normal;
    }

    #assignmentModal .candidate-current-meeting-warning {
        width: 100%;
        padding: 4px 5px;
        overflow: visible;
        font-size: 8px;
        text-overflow: clip;
        white-space: normal;
    }

    /* Krótkie, stałe etykiety pozwalają zachować 3 liczniki w jednym rzędzie. */
    #assignmentModal .candidate-stats.stats-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    #assignmentModal .candidate-stats.stats-1 {
        grid-template-columns: minmax(0, 1fr);
    }

    #assignmentModal .candidate-stat {
        min-height: 29px;
        padding: 4px 5px;
    }

    #assignmentModal .candidate-stat small {
        font-size: 8px;
    }

    #assignmentModal .candidate-stat b {
        font-size: 12px;
    }

    #assignmentModal .candidate-history {
        gap: 2px;
        padding: 4px 0 0;
        border-top: 1px solid #e1e5e8;
        border-left: 0;
    }

    #assignmentModal .candidate-recent-dates,
    #assignmentModal .candidate-role-last {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 4px;
        font-size: 8px !important;
    }

    #assignmentModal .candidate-recent-dates b,
    #assignmentModal .candidate-role-last b {
        overflow: visible;
        font-size: 8px;
        line-height: 1.25;
        text-overflow: clip;
        white-space: normal;
    }

    #assignmentModal .candidate-pair {
        overflow: visible;
        font-size: 7.5px !important;
        text-overflow: clip;
        white-space: normal;
    }

    #assignmentModal .assignment-modal-footer {
        padding: 6px 8px;
    }
}

@media (max-width: 350px) {
    #assignmentModal .candidate-stats.stats-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3px;
    }

    #assignmentModal .candidate-stat {
        grid-template-columns: 1fr;
        gap: 1px;
        text-align: center;
    }
}


/* Wersja 1.15.21 — nazwa konkretnego punktu w statystyce.
   Dłuższa nazwa może zawinąć się w komórce zamiast znikać w ellipsis. */
#assignmentModal .candidate-stat small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

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

@media (max-width: 600px) {
    #assignmentModal .candidate-stat small {
        font-size: 7.5px;
        line-height: 1.12;
    }
}


/* ============================================================
   Wersja 1.15.22 — kalendarz wariant B: paski tygodniowe
   Bez pustych dni. Priorytet: dzień tygodnia + numer dnia.
   ============================================================ */

#calendarPanel.calendar-panel {
    width: min(920px, 100%);
    padding: 6px 8px 8px;
}

#calendarPanel .calendar-header {
    margin-bottom: 5px;
}

#calendarPanel .calendar-week-list {
    display: grid;
    gap: 4px;
    min-width: 0;
}

#calendarPanel .calendar-week-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    min-width: 0;
    padding: 3px;
    border: 1px solid #e2e6e9;
    border-radius: 8px;
    background: #f7f9fa;
}

#calendarPanel .calendar-week-row.selected-week {
    border-color: #b9d0ca;
    background: #eef6f4;
}

#calendarPanel .calendar-week-row.single .calendar-week-meeting {
    grid-column: 1 / -1;
}

#calendarPanel .calendar-week-meeting {
    position: relative;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 11px;
    gap: 8px;
    align-items: center;
    min-width: 0;
    min-height: 48px;
    padding: 5px 8px 5px 6px;
    border: 1px solid #d9dee2;
    border-left: 4px solid var(--meeting-status-color, #8a9097);
    border-radius: 7px;
    background: #fff;
    color: #283139;
    text-align: left;
    cursor: pointer;
    transition:
        border-color .12s ease,
        background .12s ease,
        box-shadow .12s ease;
}

#calendarPanel .calendar-week-meeting:hover {
    border-top-color: #aebcc1;
    border-right-color: #aebcc1;
    border-bottom-color: #aebcc1;
    border-left-color: var(--meeting-status-color, #8a9097);
    background: #fbfdfd;
}

#calendarPanel .calendar-week-meeting.selected {
    border-color: #35756a;
    border-left-color: var(--meeting-status-color, #35756a);
    background: #e6f2ef;
    box-shadow: inset 0 0 0 1px #35756a;
}

#calendarPanel .calendar-week-date {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding-right: 8px;
    border-right: 1px solid #e3e7e9;
}

#calendarPanel .calendar-week-date strong {
    color: #59646d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
}

#calendarPanel .calendar-week-date b {
    color: #222c33;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

#calendarPanel .calendar-week-type {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

#calendarPanel .calendar-week-type > b {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    border-radius: 7px;
    background: #e8edef;
    color: #39434b;
    font-size: 11px;
    font-weight: 900;
}

#calendarPanel .calendar-week-meeting.selected .calendar-week-type > b {
    background: #35756a;
    color: #fff;
}

#calendarPanel .calendar-week-type small {
    min-width: 0;
    overflow: hidden;
    color: #6e7880;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

#calendarPanel .calendar-status-fill {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--meeting-status-color, #8a9097);
    box-shadow: none;
}

#calendarPanel .calendar-week-meeting[data-plan-status="draft"] .calendar-status-fill {
    background: #8a9097 !important;
}

#calendarPanel .calendar-week-meeting[data-plan-status="approved"] .calendar-status-fill {
    background: #d88713 !important;
}

#calendarPanel .calendar-week-meeting[data-plan-status="published"] .calendar-status-fill {
    background: #3a8b55 !important;
}

#calendarPanel .calendar-week-empty {
    padding: 11px;
    border: 1px dashed #d7dde1;
    border-radius: 7px;
    background: #fafbfc;
    color: #747d85;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 720px) {
    #calendarPanel.calendar-panel {
        padding: 5px 6px 7px;
    }

    #calendarPanel .calendar-week-list {
        gap: 3px;
    }

    #calendarPanel .calendar-week-row {
        gap: 4px;
        padding: 3px;
    }

    #calendarPanel .calendar-week-meeting {
        grid-template-columns: 52px minmax(0, 1fr) 8px;
        gap: 5px;
        min-height: 45px;
        padding: 4px 5px 4px 5px;
    }

    #calendarPanel .calendar-week-date {
        gap: 3px;
        padding-right: 5px;
    }

    #calendarPanel .calendar-week-date strong {
        font-size: 8px;
    }

    #calendarPanel .calendar-week-date b {
        font-size: 19px;
    }

    #calendarPanel .calendar-week-type {
        gap: 5px;
    }

    #calendarPanel .calendar-week-type > b {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    #calendarPanel .calendar-week-type small {
        font-size: 7px;
    }

    #calendarPanel .calendar-status-fill {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 430px) {
    #calendarPanel .calendar-navigation strong {
        min-width: 92px;
        font-size: 10px;
    }

    #calendarPanel .calendar-navigation .button {
        padding-left: 5px;
        padding-right: 5px;
    }

    #calendarPanel .calendar-week-meeting {
        grid-template-columns: 47px minmax(0, 1fr) 6px;
        gap: 4px;
        min-height: 43px;
        padding: 4px;
    }

    #calendarPanel .calendar-week-date strong {
        font-size: 7px;
    }

    #calendarPanel .calendar-week-date b {
        font-size: 18px;
    }

    #calendarPanel .calendar-week-type > b {
        width: 23px;
        height: 23px;
    }

    #calendarPanel .calendar-week-type small {
        display: none;
    }
}


/* ============================================================
   Wersja 1.15.23 — mniejsza typografia + stałe kolumny
   Lewa: zebranie w tygodniu
   Prawa: zebranie weekendowe
   ============================================================ */

#calendarPanel .calendar-week-meeting.calendar-column-left {
    grid-column: 1;
}

#calendarPanel .calendar-week-meeting.calendar-column-right {
    grid-column: 2;
}

/* Nawet pojedyncze zebranie pozostaje w swojej właściwej kolumnie. */
#calendarPanel .calendar-week-row.single .calendar-week-meeting.calendar-column-left {
    grid-column: 1;
}

#calendarPanel .calendar-week-row.single .calendar-week-meeting.calendar-column-right {
    grid-column: 2;
}

/* Delikatnie mniejsza i bardziej zwarta typografia. */
#calendarPanel .calendar-week-meeting {
    min-height: 43px;
    padding-top: 4px;
    padding-bottom: 4px;
}

#calendarPanel .calendar-week-date strong {
    font-size: 8.5px;
}

#calendarPanel .calendar-week-date b {
    font-size: 18px;
}

#calendarPanel .calendar-week-type > b {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

#calendarPanel .calendar-week-type small {
    font-size: 7.5px;
}

#calendarPanel .calendar-month-label,
#calendarPanel .calendar-navigation strong {
    font-size: 10px;
}

@media (max-width: 720px) {
    #calendarPanel .calendar-week-meeting {
        min-height: 40px;
    }

    #calendarPanel .calendar-week-date strong {
        font-size: 7.5px;
    }

    #calendarPanel .calendar-week-date b {
        font-size: 16px;
    }

    #calendarPanel .calendar-week-type > b {
        width: 21px;
        height: 21px;
        font-size: 9px;
    }

    #calendarPanel .calendar-week-type small {
        font-size: 6.8px;
    }
}

@media (max-width: 430px) {
    #calendarPanel .calendar-week-meeting {
        min-height: 38px;
    }

    #calendarPanel .calendar-week-date b {
        font-size: 15px;
    }

    #calendarPanel .calendar-week-date strong {
        font-size: 7px;
    }

    #calendarPanel .calendar-week-type > b {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }
}


/* ============================================================
   Wersja 1.15.24 — wyśrodkowana nawigacja kalendarza
   ============================================================ */

#calendarPanel .calendar-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

#calendarPanel .calendar-navigation {
    grid-column: 2;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

#calendarPanel .calendar-navigation strong {
    min-width: 118px;
    text-align: center;
}

#calendarPanel .calendar-legend {
    grid-column: 3;
    justify-self: end;
    justify-content: flex-end;
}

/* Na węższym ekranie legenda schodzi pod wyśrodkowaną nawigację,
   dzięki czemu miesiąc i przyciski nadal pozostają dokładnie na środku. */
@media (max-width: 760px) {
    #calendarPanel .calendar-header {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    #calendarPanel .calendar-navigation {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
    }

    #calendarPanel .calendar-legend {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        justify-content: center;
    }
}

@media (max-width: 430px) {
    #calendarPanel .calendar-navigation {
        gap: 3px;
    }

    #calendarPanel .calendar-navigation strong {
        min-width: 98px;
    }
}


/* Wersja 1.15.25 — hover nie zmienia lewej belki statusu */
#calendarPanel .calendar-week-meeting {
    transition:
        border-top-color .12s ease,
        border-right-color .12s ease,
        border-bottom-color .12s ease,
        background .12s ease,
        box-shadow .12s ease;
}


/* ============================================================
   Wersja 1.15.26 — status kalendarza nie zmienia koloru na hover
   Kolor lewej belki jest przypięty bezpośrednio do data-plan-status.
   ============================================================ */

#calendarPanel .calendar-week-meeting[data-plan-status="draft"],
#calendarPanel .calendar-week-meeting[data-plan-status="draft"]:hover {
    border-left-color: #8a9097 !important;
}

#calendarPanel .calendar-week-meeting[data-plan-status="approved"],
#calendarPanel .calendar-week-meeting[data-plan-status="approved"]:hover {
    border-left-color: #d88713 !important;
}

#calendarPanel .calendar-week-meeting[data-plan-status="published"],
#calendarPanel .calendar-week-meeting[data-plan-status="published"]:hover {
    border-left-color: #3a8b55 !important;
}

/* To samo dla małej kropki statusu. */
#calendarPanel .calendar-week-meeting[data-plan-status="draft"] .calendar-status-fill,
#calendarPanel .calendar-week-meeting[data-plan-status="draft"]:hover .calendar-status-fill {
    background-color: #8a9097 !important;
}

#calendarPanel .calendar-week-meeting[data-plan-status="approved"] .calendar-status-fill,
#calendarPanel .calendar-week-meeting[data-plan-status="approved"]:hover .calendar-status-fill {
    background-color: #d88713 !important;
}

#calendarPanel .calendar-week-meeting[data-plan-status="published"] .calendar-status-fill,
#calendarPanel .calendar-week-meeting[data-plan-status="published"]:hover .calendar-status-fill {
    background-color: #3a8b55 !important;
}

/* Hover może zmienić tylko neutralne obramowanie i tło. */
#calendarPanel .calendar-week-meeting:hover {
    border-top-color: #aebcc1;
    border-right-color: #aebcc1;
    border-bottom-color: #aebcc1;
    background: #fbfdfd;
}


/* 1.16.3 — jawna publikacja pojedynczego zebrania */
.public-output-toggle {
    border-color: #c5ccd1;
    background: #fff;
    color: #536069;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}
.public-output-toggle.active {
    border-color: #4d8a64;
    background: #e9f5ed;
    color: #2f6844;
}
@media (max-width: 600px) {
    .public-output-toggle {
        padding-left: 7px;
        padding-right: 7px;
        font-size: 8px;
    }
}


/* ============================================================
   1.16.6 — wariant C: kompaktowa publikacja miesiąca + iOS switch
   ============================================================ */
.publication-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 5px 7px;
    border: 1px solid #d8dde1;
    border-radius: 8px;
    background: #fbfcfd;
    box-shadow: 0 1px 2px rgba(25, 34, 40, .04);
}

.publication-inline-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.publication-inline-copy strong {
    color: #303a42;
    font-size: 9px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.publication-inline-copy span {
    color: #7b848b;
    font-size: 7.5px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.publication-inline.is-on {
    border-color: #b9d6c1;
    background: #f7fbf8;
}

.publication-inline.is-on .publication-inline-copy span {
    color: #2f7d45;
}

.publication-inline.is-disabled {
    opacity: .58;
}

.ios-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 26px;
    cursor: pointer;
    user-select: none;
}

.ios-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.ios-toggle-track {
    position: relative;
    display: block;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #c6cacf;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
    transition: background-color .18s ease, box-shadow .18s ease;
}

.ios-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .30);
    transition: transform .18s cubic-bezier(.4, 0, .2, 1);
}

.ios-toggle input:checked + .ios-toggle-track {
    background: #34c759;
}

.ios-toggle input:checked + .ios-toggle-track .ios-toggle-knob {
    transform: translateX(18px);
}

.ios-toggle input:focus-visible + .ios-toggle-track {
    outline: 2px solid #2f6fb2;
    outline-offset: 2px;
}

.ios-toggle input:disabled + .ios-toggle-track {
    cursor: default;
}

#calendarPanel .calendar-publication-control {
    grid-column: 1;
    justify-self: start;
}

@media (max-width: 760px) {
    #calendarPanel .calendar-header {
        grid-template-columns: 1fr;
    }

    #calendarPanel .calendar-navigation {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
    }

    #calendarPanel .calendar-publication-control {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
    }

    #calendarPanel .calendar-legend {
        grid-column: 1;
        grid-row: 3;
        justify-self: center;
    }
}

@media (max-width: 430px) {
    .publication-inline {
        gap: 8px;
        padding: 4px 6px;
    }

    .publication-inline-copy strong {
        font-size: 8.5px;
    }

    .publication-inline-copy span {
        font-size: 7px;
    }

    .ios-toggle,
    .ios-toggle-track {
        width: 40px;
        height: 24px;
    }

    .ios-toggle-knob {
        width: 20px;
        height: 20px;
    }

    .ios-toggle input:checked + .ios-toggle-track .ios-toggle-knob {
        transform: translateX(16px);
    }
}

/* ============================================================
   1.17.0 — snapshot publikacji + stan „są nowsze zmiany”
   ============================================================ */
.publication-inline.has-updates {
    border-color: #e2bd6e;
    background: #fffaf0;
}

.publication-inline.has-updates .publication-inline-copy span {
    color: #a66a08;
}

.publication-update-button {
    justify-self: start;
    margin: 2px 0 0;
    padding: 2px 6px;
    border: 1px solid #d8a84b;
    border-radius: 5px;
    background: #fff3cf;
    color: #865400;
    font: inherit;
    font-size: 7px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
}

.publication-update-button:hover {
    background: #ffe9ad;
}

.publication-update-button:disabled {
    opacity: .55;
    cursor: default;
}

@media (max-width: 430px) {
    .publication-update-button {
        font-size: 6.8px;
        padding: 2px 5px;
    }
}

.publication-inline.has-updates .publication-inline-copy span {
    white-space: normal;
}


/* ============================================================
   1.18.0 — główna nawigacja: moduły oddzielone od ustawień
   ============================================================ */
.top-nav {
    align-items: center;
    flex-wrap: wrap;
}

.top-nav > .nav-link:nth-child(-n+2) {
    border-color: rgba(255,255,255,.48);
    background: rgba(255,255,255,.06);
}

.top-nav > .nav-link:nth-child(2) {
    position: relative;
    margin-right: 12px;
}

.top-nav > .nav-link:nth-child(2)::after {
    content: "";
    position: absolute;
    top: 3px;
    right: -9px;
    bottom: 3px;
    width: 1px;
    background: rgba(255,255,255,.35);
    pointer-events: none;
}

.top-nav > .nav-link.active {
    background: rgba(255,255,255,.18);
}

@media (max-width: 600px) {
    .top-nav {
        gap: 4px;
    }

    .top-nav > .nav-link:nth-child(2) {
        margin-right: 8px;
    }

    .top-nav > .nav-link:nth-child(2)::after {
        right: -6px;
    }
}


/* ============================================================
   1.18.0 — Ustawienia: stałe pory + generator w jednym bloku
   ============================================================ */
.settings-page {
    max-width: 1040px;
}

.meeting-planning-settings-card {
    padding: 14px;
}

.meeting-planning-settings-header {
    margin-bottom: 12px;
}

.meeting-planning-settings-header h2 {
    margin: 1px 0 3px;
    font-size: 17px;
}

.meeting-planning-settings-header p:last-child {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.meeting-settings-subsection {
    min-width: 0;
}

.meeting-settings-subheading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.meeting-settings-subheading h3 {
    margin: 0 0 2px;
    font-size: 13px;
}

.meeting-settings-subheading p {
    margin: 0;
    color: var(--muted);
    font-size: 8px;
}

.meeting-settings-divider {
    height: 1px;
    margin: 14px 0;
    background: var(--line);
}

.meeting-generators-nested {
    margin-top: 0;
}

.meeting-generators-nested .meeting-generator-card {
    border: 1px solid var(--line);
    border-top: 4px solid var(--primary);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.meeting-generators-nested .meeting-generator-card.weekend {
    border-top-color: #123d64;
}

.meeting-generator-safety {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 7px;
    background: #f4f7f8;
    color: #59656d;
    font-size: 8.5px;
    line-height: 1.4;
}


/* ============================================================
   1.18.0 — prosty publiczny output
   ============================================================ */
.public-output-settings-card {
    margin-top: 10px;
}

.public-output-settings-card .public-share-url-field input {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .01em;
}

.public-output-settings-card .public-share-enabled {
    padding-top: 2px;
}

.public-output-settings-card .public-share-actions {
    align-items: center;
}

@media (max-width: 720px) {
    .meeting-planning-settings-card {
        padding: 10px;
    }

    .meeting-settings-subheading {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-output-settings-card .public-share-actions {
        align-items: stretch;
    }
}

/* ============================================================
   1.19.0 — niedostępność w pickerze
   ============================================================ */
.assignment-candidate.candidate-unavailable {
    border-color: #e3b9b9;
    background: #fff6f6;
}
.assignment-candidate.candidate-unavailable:not(.candidate-has-current-assignment) {
    box-shadow: inset 4px 0 0 #c45454;
}
.candidate-unavailable-badge,
.service-unavailable-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    background: #b84242;
    color: #fff;
    font-size: 7px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .04em;
    vertical-align: middle;
}
.service-candidate.candidate-unavailable {
    border-color: #dfb5b5;
    background: #fff5f5;
}

/* 1.19.0 — konto uczestnika w Użytkownikach */
.participant-account-pair-field {
    padding: 8px;
    border: 1px solid #cfdce3;
    border-radius: 8px;
    background: #f5f9fb;
}
.participant-account-pair-field small {
    color: var(--muted);
    font-size: 8px;
    line-height: 1.35;
}

/* ============================================================
   1.19.0 — Panel uczestnika
   ============================================================ */
.participant-portal-page { background: #f2f5f6; }
.participant-app-header { position: sticky; top: 0; z-index: 20; }
.participant-top-nav .nav-link { white-space: nowrap; }
.participant-portal-shell { display: grid; gap: 12px; max-width: 960px; }
.participant-dashboard-section { display: grid; gap: 10px; }
.participant-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}
.participant-section-header h2 { margin: 1px 0 3px; font-size: 17px; }
.participant-section-header p:last-child {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}
.participant-next-assignment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 124px;
    padding: 18px 20px;
    border: 0;
    background: linear-gradient(135deg, rgba(20,66,101,.98), rgba(41,103,112,.95));
    color: #fff;
    box-shadow: 0 7px 24px rgba(20,53,72,.18);
}
.participant-next-copy { min-width: 0; }
.participant-next-copy .eyebrow { color: rgba(255,255,255,.68); }
.participant-next-kind {
    display: inline-block;
    margin: 2px 0 3px;
    color: #b9dbe7;
    font-size: 9px;
    font-weight: 800;
}
.participant-next-copy h2 { margin: 0 0 3px; color: #fff; font-size: 22px; }
.participant-role-label { display: block; margin-bottom: 3px; color: #ddf1f3; font-size: 10px; }
.participant-next-copy p:last-child { margin: 0; color: rgba(255,255,255,.82); font-size: 10px; }
.participant-next-countdown {
    display: grid;
    flex: 0 0 auto;
    gap: 2px;
    min-width: 110px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    background: rgba(255,255,255,.09);
    text-align: center;
}
.participant-next-countdown strong { font-size: 15px; }
.participant-next-countdown span { color: rgba(255,255,255,.7); font-size: 8px; }
.participant-assignment-conflict {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #fff1d9;
    color: #773f13;
    font-size: 8px;
    font-weight: 900;
}
.participant-next-empty h2 { margin: 3px 0; color: #fff; }
.participant-next-empty p:last-child { color: rgba(255,255,255,.75); }
.participant-assignments-panel,
.participant-availability-panel,
.participant-permissions-panel { padding: 14px; }
.my-assignments-list { display: grid; gap: 7px; }
.my-assignment-card {
    display: grid;
    grid-template-columns: 56px minmax(0,1fr);
    min-height: 68px;
    overflow: hidden;
    border: 1px solid #dbe1e4;
    border-radius: 9px;
    background: #fff;
}
.my-assignment-card:nth-child(even) { background: #f7f9fa; }
.my-assignment-card.has-conflict { border-color: #e0ad70; box-shadow: inset 4px 0 0 #d28327; }
.my-assignment-date {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    background: #e9f0f3;
    color: #163e5d;
}
.my-assignment-date strong { font-size: 22px; line-height: 1; }
.my-assignment-date span { font-size: 8px; font-weight: 900; }
.my-assignment-copy { min-width: 0; padding: 8px 10px; }
.my-assignment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    color: #71808a;
    font-size: 8px;
    font-weight: 800;
}
.my-assignment-meta b { color: #244b62; }
.my-assignment-copy h3 { margin: 0; color: #202a31; font-size: 13px; }
.my-assignment-role,
.my-assignment-details { margin: 2px 0 0; font-size: 8.5px; }
.my-assignment-role { color: #345b70; font-weight: 800; }
.my-assignment-details { color: #75828a; }
.participant-conflict-badge {
    display: inline-flex;
    margin-top: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #d88a2e;
    color: #fff;
    font-size: 7px;
    font-weight: 900;
}
.participant-calendar-heading { align-items: center; }
.participant-calendar-nav {
    display: grid;
    grid-template-columns: 30px minmax(120px,auto) 30px;
    align-items: center;
    gap: 5px;
}
.participant-calendar-nav strong { text-align: center; text-transform: capitalize; font-size: 11px; }
.participant-calendar-weekdays,
.participant-availability-calendar {
    display: grid;
    grid-template-columns: repeat(7,minmax(0,1fr));
    gap: 4px;
}
.participant-calendar-weekdays { margin-bottom: 4px; }
.participant-calendar-weekdays span {
    padding: 3px;
    color: #77838b;
    font-size: 8px;
    font-weight: 900;
    text-align: center;
}
.participant-calendar-empty { min-height: 46px; }
.participant-calendar-day {
    position: relative;
    display: grid;
    align-content: space-between;
    min-height: 52px;
    padding: 6px;
    border: 1px solid #dbe2e5;
    border-radius: 7px;
    background: #fff;
    color: #28333a;
    text-align: left;
    cursor: pointer;
}
.participant-calendar-day:hover:not(:disabled) { border-color: #7aa4ba; background: #f4f9fb; }
.participant-calendar-day strong { font-size: 11px; }
.participant-calendar-day.today { box-shadow: inset 0 0 0 2px #397db6; }
.participant-calendar-day.past { opacity: .38; cursor: default; }
.participant-calendar-day.unavailable { border-color: #d7aaaa; background: #fff0f0; color: #9b3434; }
.participant-calendar-day.selected-range {
    border-color: #246d91;
    background: #e2f2f8;
    color: #164f6c;
    box-shadow: inset 0 0 0 1px #246d91;
}
.participant-calendar-day.conflict { background: linear-gradient(135deg,#fff0f0 0 49%,#fff7df 49% 100%); }
.participant-calendar-markers { display: flex; gap: 3px; justify-content: flex-end; }
.participant-calendar-markers i { display: block; width: 6px; height: 6px; border-radius: 50%; }
.assignment-dot { background: #276c9f; }
.unavailable-dot { background: #c14848; }
.participant-availability-editor {
    display: grid;
    grid-template-columns: minmax(180px,.8fr) minmax(220px,1.2fr) auto;
    align-items: end;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #dfe5e8;
    border-radius: 8px;
    background: #f7f9fa;
}
.participant-selected-range { display: grid; gap: 2px; }
.participant-selected-range span { color: var(--muted); font-size: 8px; font-weight: 800; }
.participant-selected-range strong { font-size: 10px; }
.participant-availability-note { margin: 0; }
.participant-ranges-block { margin-top: 12px; }
.participant-ranges-block h3 { margin: 0 0 6px; font-size: 11px; }
.participant-ranges-list { display: grid; gap: 5px; }
.participant-range-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    border: 1px solid #e0e5e7;
    border-radius: 7px;
    background: #fff;
}
.participant-range-row > span { display: grid; gap: 1px; }
.participant-range-row strong { font-size: 9px; }
.participant-range-row small { color: var(--muted); font-size: 8px; }
.participant-permissions-list {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 6px;
}
.participant-permission-item {
    display: grid;
    grid-template-columns: 24px minmax(0,1fr);
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid #dce3e6;
    border-radius: 7px;
    background: #fff;
}
.participant-permission-item.service { border-color: #b9d6c5; background: #f3faf5; }
.participant-permission-check {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dcefe2;
    color: #267443;
    font-size: 11px;
    font-weight: 900;
}
.participant-permission-item > span:last-child { display: grid; gap: 1px; min-width: 0; }
.participant-permission-item strong { font-size: 9px; }
.participant-permission-item small { color: var(--muted); font-size: 7.5px; }
.participant-empty-state {
    padding: 18px;
    border: 1px dashed #cfd8dd;
    border-radius: 8px;
    color: #78858d;
    font-size: 9px;
    text-align: center;
}
.participant-empty-state.compact { padding: 10px; }

@media (max-width: 720px) {
    .participant-app-header { position: static; }
    .participant-portal-shell { padding: 8px; }
    .participant-next-assignment { align-items: stretch; flex-direction: column; min-height: 0; padding: 14px; }
    .participant-next-countdown { display: flex; align-items: center; justify-content: space-between; min-width: 0; padding: 8px 10px; }
    .participant-next-copy h2 { font-size: 18px; }
    .participant-section-header,
    .participant-calendar-heading { align-items: flex-start; flex-direction: column; }
    .participant-calendar-nav { align-self: stretch; grid-template-columns: 32px 1fr 32px; }
    .participant-availability-editor { grid-template-columns: 1fr; align-items: stretch; }
    .participant-permissions-list { grid-template-columns: 1fr; }
    .participant-calendar-day { min-height: 46px; padding: 5px; }
    .participant-calendar-empty { min-height: 42px; }
}

@media (max-width: 430px) {
    .participant-assignments-panel,
    .participant-availability-panel,
    .participant-permissions-panel { padding: 10px; }
    .my-assignment-card { grid-template-columns: 48px minmax(0,1fr); }
    .my-assignment-date strong { font-size: 19px; }
    .participant-calendar-weekdays,
    .participant-availability-calendar { gap: 2px; }
    .participant-calendar-day { min-height: 40px; padding: 4px; border-radius: 5px; }
    .participant-calendar-day strong { font-size: 9px; }
    .participant-calendar-markers i { width: 5px; height: 5px; }
}


/* ============================================================
   1.19.1 — powiadomienia e-mail + prywatny kalendarz uczestnika
   ============================================================ */
.participant-notifications-panel {
    padding: 14px;
}

.participant-notification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.participant-notification-card {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe3e6;
    border-radius: 9px;
    background: #fff;
}

.participant-notification-card.calendar-card {
    background: #f8fafb;
}

.participant-notification-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.participant-notification-card-header h3 {
    margin: 0 0 2px;
    color: #27343c;
    font-size: 12px;
}

.participant-notification-card-header p,
.participant-calendar-help,
.participant-notification-footnote {
    margin: 0;
    color: #78858d;
    font-size: 8px;
    line-height: 1.45;
}

.participant-reminder-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
    padding: 8px;
    border: 1px solid #e0e5e8;
    border-radius: 7px;
}

.participant-reminder-options legend {
    padding: 0 4px;
    color: #69767e;
    font-size: 8px;
    font-weight: 900;
}

.participant-reminder-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 7px;
    border: 1px solid #dce3e6;
    border-radius: 6px;
    background: #fff;
    color: #344149;
    font-size: 8.5px;
    font-weight: 800;
    cursor: pointer;
}

.participant-reminder-options label:has(input:checked) {
    border-color: #8ebba0;
    background: #f1f8f3;
    color: #2b6c40;
}

.participant-calendar-state {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: #e4e7e9;
    color: #69747a;
    font-size: 7.5px;
    font-weight: 900;
}

.participant-calendar-state.on {
    background: #dff0e4;
    color: #267342;
}

.participant-calendar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

#calendarUrl {
    font-size: 8px;
}

#notificationSchemaNotice {
    margin: 0 0 10px;
}

@media (max-width: 720px) {
    .participant-notification-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .participant-notifications-panel {
        padding: 10px;
    }

    .participant-reminder-options {
        grid-template-columns: 1fr;
    }

    .participant-calendar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .participant-calendar-actions .button {
        width: 100%;
    }
}


/* 1.19.1.1 — testowy e-mail */
.participant-notification-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

@media (max-width: 520px) {
    .participant-notification-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .participant-notification-actions .button {
        width: 100%;
    }
}


/* ============================================================
   1.19.1.2 — zmiana hasła w panelu uczestnika
   ============================================================ */
.participant-account-panel {
    padding: 14px;
}

.participant-password-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    max-width: 820px;
}

.participant-password-form .field {
    margin: 0;
}

.participant-password-form .field small {
    color: var(--muted);
    font-size: 7.5px;
}

.participant-password-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 2px;
}

.participant-password-status {
    min-height: 16px;
    font-size: 8.5px;
    font-weight: 800;
}

.participant-password-status.success {
    color: #287644;
}

.participant-password-status.error {
    color: #b33c3c;
}

@media (max-width: 720px) {
    .participant-password-form {
        grid-template-columns: 1fr;
    }

    .participant-password-actions {
        grid-column: 1;
        align-items: stretch;
        flex-direction: column;
    }
}


/* ============================================================
   1.19.2 — kolory przydziałów w panelu uczestnika
   zgodne z publicznym planem
   ============================================================ */
.participant-portal-page {
    --task-part1: #757a80;
    --task-part2: #c8841a;
    --task-part3: #92243a;
    --task-weekend: #0d416e;
    --task-technical: #7a858b;
    --task-service: #5a9f62;
    --task-general: #48687d;
}

.task-color-part1 { --task-accent: var(--task-part1); --task-tint: #f3f4f5; }
.task-color-part2 { --task-accent: var(--task-part2); --task-tint: #fff7e8; }
.task-color-part3 { --task-accent: var(--task-part3); --task-tint: #fff0f3; }
.task-color-weekend { --task-accent: var(--task-weekend); --task-tint: #edf5fb; }
.task-color-technical { --task-accent: var(--task-technical); --task-tint: #f2f4f5; }
.task-color-service { --task-accent: var(--task-service); --task-tint: #f0f8f1; }
.task-color-general { --task-accent: var(--task-general); --task-tint: #f1f6f8; }

.participant-next-assignment.task-color-part1 {
    background: linear-gradient(135deg, #555b60, #777d82);
}
.participant-next-assignment.task-color-part2 {
    background: linear-gradient(135deg, #a56810, #cf8b23);
}
.participant-next-assignment.task-color-part3 {
    background: linear-gradient(135deg, #70192d, #9c2b43);
}
.participant-next-assignment.task-color-weekend {
    background: linear-gradient(135deg, #082f52, #0d416e 62%, #165783);
}
.participant-next-assignment.task-color-technical {
    background: linear-gradient(135deg, #566168, #78858b);
}
.participant-next-assignment.task-color-service {
    background: linear-gradient(135deg, #3f7e49, #5aa064);
}
.participant-next-assignment.task-color-general {
    background: linear-gradient(135deg, #35566b, #50768d);
}

.participant-next-program {
    display: block;
    margin: 0 0 4px;
    color: rgba(255,255,255,.82);
    font-size: 9px;
    font-weight: 900;
}

.my-assignment-card {
    position: relative;
    border-left: 5px solid var(--task-accent, #617985);
    background: var(--task-tint, #fff);
}

.my-assignment-card:nth-child(even) {
    background: var(--task-tint, #f7f9fa);
}

.my-assignment-card .my-assignment-date {
    background: var(--task-accent, #e9f0f3);
    color: #fff;
}

.my-assignment-weekday {
    display: block;
    margin-bottom: 1px;
    font-size: 7px !important;
    font-weight: 900;
    opacity: .84;
}

.my-assignment-program {
    margin: 1px 0 2px;
    color: var(--task-accent, #526b79);
    font-size: 8px;
    font-weight: 900;
}

.my-assignment-card.has-conflict {
    box-shadow: inset 4px 0 0 #d28327;
}


/* ============================================================
   1.19.2 — kalendarz: kolory + nazwy zadań
   ============================================================ */
.participant-calendar-day.has-assignment {
    border-color: color-mix(in srgb, var(--task-accent, #50768d) 48%, #dbe2e5);
    background:
        linear-gradient(180deg, var(--task-tint, #f5f8fa), #fff 78%);
}

.participant-calendar-day.task-color-mixed {
    --task-accent: #5c6f7a;
    --task-tint: #f4f7f8;
}

.participant-calendar-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
}

.participant-calendar-task-chips {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.participant-calendar-task-chip,
.participant-calendar-more {
    display: block;
    min-width: 0;
    overflow: hidden;
    padding: 2px 3px;
    border-radius: 3px;
    background: var(--task-accent, #54768a);
    color: #fff;
    font-size: 6.5px;
    font-style: normal;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.participant-calendar-more {
    background: #667782;
    text-align: center;
}

.participant-calendar-day.unavailable .participant-calendar-task-chip {
    outline: 1px solid rgba(255,255,255,.8);
}

.participant-calendar-task-details {
    margin-top: 8px;
    padding: 9px;
    border: 1px solid #d9e2e6;
    border-radius: 8px;
    background: #f8fafb;
}

.participant-calendar-task-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.participant-calendar-task-details-header > strong {
    font-size: 10px;
}

.participant-calendar-task-close {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    padding: 0;
    border: 1px solid #d0d9dd;
    border-radius: 50%;
    background: #fff;
    color: #54636c;
    cursor: pointer;
    font-size: 17px;
}

.participant-calendar-task-list {
    display: grid;
    gap: 5px;
}

.participant-calendar-task-item {
    display: grid;
    grid-template-columns: 5px minmax(0,1fr);
    gap: 7px;
    overflow: hidden;
    border: 1px solid #e0e5e7;
    border-radius: 6px;
    background: #fff;
}

.calendar-task-accent {
    background: var(--task-accent, #56788a);
}

.participant-calendar-task-item > div {
    display: grid;
    gap: 1px;
    padding: 6px 7px 6px 0;
}

.participant-calendar-task-item small {
    color: var(--task-accent, #56788a);
    font-size: 7.5px;
    font-weight: 900;
}

.participant-calendar-task-item strong {
    font-size: 9px;
}

.participant-calendar-task-item em {
    color: #6c7981;
    font-size: 7.5px;
    font-style: normal;
}


/* ============================================================
   1.19.2 — zwijane Konto / Informacje / Powiadomienia
   ============================================================ */
.participant-collapsible {
    padding: 0;
    overflow: hidden;
}

.participant-collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.participant-collapsible-summary::-webkit-details-marker {
    display: none;
}

.participant-collapsible-summary > span:first-child {
    display: grid;
    gap: 2px;
}

.participant-collapsible-summary strong {
    color: #27343c;
    font-size: 12px;
}

.participant-collapsible-summary small {
    color: var(--muted);
    font-size: 8px;
}

.participant-collapsible-chevron {
    color: #66757e;
    font-size: 18px;
    font-weight: 900;
    transition: transform .18s ease;
}

.participant-collapsible[open] .participant-collapsible-chevron {
    transform: rotate(180deg);
}

.participant-collapsible[open] .participant-collapsible-summary {
    border-bottom: 1px solid #e0e6e8;
    background: #f8fafb;
}

.participant-collapsible-body {
    padding: 12px 14px 14px;
}

.participant-collapsible.participant-notifications-panel,
.participant-collapsible.participant-account-panel,
.participant-collapsible.participant-permissions-panel {
    padding: 0;
}

.participant-readonly-note {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

@media (max-width: 720px) {
    .participant-calendar-day {
        min-height: 55px;
    }

    .participant-calendar-task-chip,
    .participant-calendar-more {
        font-size: 5.8px;
    }
}

@media (max-width: 430px) {
    .participant-calendar-day {
        min-height: 48px;
    }

    .participant-calendar-task-chip {
        max-width: 100%;
        padding: 2px;
        font-size: 5.3px;
    }

    .participant-collapsible-summary {
        padding: 10px;
    }

    .participant-collapsible-body {
        padding: 10px;
    }
}


/* ============================================================
   1.20.0 — miesięczny warsztat przydziałów
   Duży ekran: cały miesiąc + filtry + kandydaci po prawej.
   ============================================================ */

.planner-view-and-publication {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.planner-view-switch {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border: 1px solid #d2dbe1;
    border-radius: 8px;
    background: #f4f7f9;
}

.planner-view-button {
    min-height: 28px;
    padding: 4px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #52616d;
    font: inherit;
    font-size: 8.5px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.planner-view-button:hover {
    background: #e9eef2;
}

.planner-view-button.active {
    background: #174f82;
    color: #fff;
    box-shadow: 0 1px 2px rgba(25, 52, 76, .18);
}

.monthly-assignment-mode .compact-planner-page {
    width: min(1880px, calc(100% - 12px));
}

.monthly-assignment-mode .planner-commandbar,
.monthly-assignment-mode #meetingSettings,
.monthly-assignment-mode .plan-meta-line,
.monthly-assignment-mode #sectionsContainer {
    display: none !important;
}

.monthly-planner-workspace[hidden] {
    display: none !important;
}

.monthly-planner-workspace {
    margin-top: 7px;
}

.monthly-planner-large-screen-note {
    display: none;
    margin-bottom: 6px;
    padding: 7px 10px;
    border: 1px solid #d8e1e8;
    border-radius: 7px;
    background: #f5f8fa;
    color: #53626d;
    font-size: 9px;
    font-weight: 800;
}

.monthly-planner-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    padding: 6px 8px;
    border: 1px solid #d8dfe4;
    border-radius: 8px;
    background: #f8fafb;
}

.monthly-filter-group,
.monthly-filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.monthly-filter-group > strong {
    margin-right: 2px;
    color: #2d3a44;
    font-size: 9px;
}

.monthly-filter-group label,
.monthly-only-open {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    padding: 3px 7px;
    border: 1px solid #d6dde2;
    border-radius: 999px;
    background: #fff;
    color: #43515c;
    font-size: 8px;
    font-weight: 850;
    cursor: pointer;
    white-space: nowrap;
}

.monthly-filter-group label:has(input:checked),
.monthly-only-open:has(input:checked) {
    border-color: #8fb1cc;
    background: #eaf3f9;
    color: #174f82;
}

.monthly-filter-group input,
.monthly-only-open input {
    width: 12px;
    height: 12px;
    margin: 0;
}

.monthly-planner-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 8px;
    align-items: start;
}

.monthly-planner-board-wrap {
    min-width: 0;
}

.monthly-planner-status {
    margin-bottom: 5px;
    color: #6a7680;
    font-size: 8px;
    font-weight: 800;
}

.monthly-planner-board {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.monthly-week-row {
    overflow: hidden;
    border: 1px solid #ced8df;
    border-radius: 9px;
    background: #fff;
}

.monthly-week-label {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    background: #123f6b;
    color: #fff;
}

.monthly-week-label strong {
    grid-column: 1;
    font-size: 9px;
    font-weight: 950;
}

.monthly-week-label span {
    grid-column: 2;
    justify-self: center;
    font-size: 9px;
    font-weight: 900;
}

.monthly-week-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
    background: #f1f4f6;
}

.monthly-meeting-card,
.monthly-meeting-slot-empty {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d5dde2;
    border-left: 4px solid #8a9097;
    border-radius: 7px;
    background: #fff;
}

.monthly-meeting-card.status-approved {
    border-left-color: #d88713;
}

.monthly-meeting-card.status-published {
    border-left-color: #3a8b55;
}

.monthly-meeting-card.weekend {
    box-shadow: inset 0 2px 0 #1c5fa5;
}

.monthly-meeting-slot-empty {
    display: grid;
    min-height: 58px;
    place-items: center;
    border-left-width: 1px;
    border-style: dashed;
    color: #9aa4ab;
    font-size: 8px;
    font-weight: 800;
}

.monthly-meeting-card-header {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 64px;
    gap: 7px;
    align-items: center;
    min-height: 45px;
    padding: 5px 7px;
    border-bottom: 1px solid #dce2e6;
    background: #f8fafb;
}

.monthly-meeting-card-header:hover {
    background: #f2f6f8;
}

.monthly-meeting-date {
    display: grid;
    gap: 1px;
}

.monthly-meeting-date b {
    color: #183b58;
    font-size: 10px;
    font-weight: 950;
}

.monthly-meeting-date span {
    color: #71808a;
    font-size: 7px;
    font-weight: 800;
}

.monthly-meeting-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.monthly-meeting-type {
    display: grid;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 5px;
    background: #69816e;
    color: #fff;
    font-size: 11px;
    font-weight: 950;
}

.monthly-meeting-card.weekend .monthly-meeting-type {
    background: #1d63b3;
}

.monthly-meeting-title strong {
    min-width: 0;
    overflow: hidden;
    color: #26333c;
    font-size: 9px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-meeting-progress {
    display: grid;
    justify-items: end;
    gap: 1px;
}

.monthly-meeting-progress b {
    font-size: 9px;
    color: #33414a;
}

.monthly-meeting-progress span {
    color: #7c878e;
    font-size: 6.5px;
    font-weight: 800;
}

.monthly-meeting-card-body {
    display: grid;
}

.monthly-meeting-section + .monthly-meeting-section {
    border-top: 2px solid #eef1f3;
}

.monthly-meeting-section-title {
    padding: 3px 7px;
    border-bottom: 1px solid #e2e6e9;
    background: #edf0f2;
    color: #46545e;
    font-size: 7px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.monthly-meeting-section.theme-orange .monthly-meeting-section-title {
    background: #f8e7c8;
    color: #7a511f;
}

.monthly-meeting-section.theme-burgundy .monthly-meeting-section-title {
    background: #efd9df;
    color: #6f3442;
}

.monthly-meeting-section.theme-technical .monthly-meeting-section-title {
    background: #e4e8eb;
    color: #4d5961;
}

.monthly-task-row {
    display: grid;
    grid-template-columns: minmax(150px, .92fr) minmax(230px, 1.45fr);
    min-width: 0;
    border-bottom: 1px solid #edf0f2;
}

.monthly-task-row:last-child {
    border-bottom: 0;
}

.monthly-task-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    min-width: 0;
    padding: 4px 6px;
    border-right: 1px solid #e5e9eb;
    background: #fbfcfc;
}

.monthly-task-title strong {
    min-width: 0;
    overflow: hidden;
    color: #34414a;
    font-size: 7.6px;
    font-weight: 850;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-task-title span {
    flex: 0 0 auto;
    color: #8a949b;
    font-size: 6.5px;
    font-weight: 800;
}

.monthly-task-assignments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    min-width: 0;
}

.monthly-role-button,
.monthly-inherited-assignment {
    display: grid;
    grid-template-columns: minmax(65px, .75fr) minmax(0, 1.25fr);
    gap: 4px;
    align-items: center;
    min-width: 0;
    min-height: 30px;
    padding: 3px 5px;
    border: 0;
    border-left: 1px solid #e5e9eb;
    background: #fff;
    text-align: left;
}

.monthly-role-button {
    cursor: pointer;
}

.monthly-role-button:hover:not(:disabled) {
    background: #edf5fb;
}

.monthly-role-button.unassigned {
    background: #fff4f4;
}

.monthly-role-button.assigned {
    background: #f1f8f3;
}

.monthly-role-button span,
.monthly-inherited-assignment span {
    overflow: hidden;
    color: #758189;
    font-size: 6.4px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-role-button strong,
.monthly-inherited-assignment strong {
    min-width: 0;
    overflow: hidden;
    color: #26343d;
    font-size: 7.7px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-role-button.unassigned strong,
.monthly-inherited-assignment.unassigned strong {
    color: #b84c4c;
}

.monthly-manual-assignment {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    min-width: 0;
    padding: 3px 5px;
}

.monthly-manual-assignment span {
    color: #758189;
    font-size: 6.5px;
    font-weight: 850;
}

.monthly-manual-assignment input,
.monthly-manual-assignment select {
    min-width: 0;
    min-height: 26px;
    padding: 2px 5px;
    font-size: 7.5px;
}

.monthly-meeting-filter-empty {
    padding: 10px;
    color: #8c969d;
    font-size: 8px;
    font-weight: 800;
    text-align: center;
}

.monthly-candidate-panel {
    position: sticky;
    top: 6px;
    overflow: hidden;
    max-height: calc(100vh - 20px);
    border: 1px solid #ced9e0;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 2px 9px rgba(32, 49, 60, .08);
}

.monthly-candidate-empty {
    display: grid;
    gap: 5px;
    padding: 24px 18px;
    color: #75828b;
    text-align: center;
}

.monthly-candidate-empty strong {
    color: #33424d;
    font-size: 11px;
}

.monthly-candidate-empty span {
    font-size: 8px;
    line-height: 1.35;
}

.monthly-candidate-header {
    padding: 10px 11px 8px;
    border-bottom: 1px solid #dde4e8;
    background: #f6f9fb;
}

.monthly-candidate-header h3 {
    margin: 1px 0 2px;
    color: #183e62;
    font-size: 14px;
}

.monthly-candidate-header p:last-child {
    margin: 0;
    color: #687681;
    font-size: 8px;
    font-weight: 750;
}

.monthly-candidate-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 7px 9px;
    border-bottom: 1px solid #e2e7ea;
}

.monthly-candidate-controls > label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #596771;
    font-size: 7.5px;
    font-weight: 850;
}

.monthly-candidate-controls select {
    min-height: 25px;
    padding: 2px 5px;
    font-size: 7.5px;
}

.monthly-gender-filter {
    display: flex;
    gap: 7px;
}

.monthly-gender-filter label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #596771;
    font-size: 7.5px;
    font-weight: 850;
}

.monthly-candidate-panel .assignment-partner-info {
    margin: 7px 9px 0;
}

.monthly-candidate-panel .assignment-candidates-status {
    padding: 6px 9px;
    font-size: 7px;
}

.monthly-candidates-list {
    display: grid;
    gap: 4px;
    max-height: calc(100vh - 235px);
    padding: 0 7px 8px;
    overflow: auto;
}

.monthly-candidate-card {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
    align-items: stretch;
    min-width: 0;
    padding: 5px;
    border: 1px solid #dce3e7;
    border-radius: 7px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.monthly-candidate-card:hover:not(:disabled) {
    border-color: #91b1c9;
    background: #f2f8fc;
}

.monthly-candidate-card.selected {
    border-color: #4c8a64;
    background: #ecf7ef;
}

.monthly-candidate-card.has-current {
    border-color: #e3a85f;
    background: #fff8eb;
}

.monthly-candidate-card.candidate-unavailable {
    border-color: #d99a9a;
    background: #fff1f1;
}

.monthly-candidate-card.disabled {
    opacity: .48;
    cursor: default;
}

.monthly-candidate-rank {
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: #edf2f5;
    color: #60707b;
    font-size: 8px;
    font-weight: 950;
}

.monthly-candidate-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.monthly-candidate-main > strong {
    min-width: 0;
    overflow: hidden;
    color: #25343d;
    font-size: 9px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-candidate-main em {
    color: #2f7550;
    font-size: 6px;
    font-style: normal;
}

.monthly-candidate-main i {
    color: #b24747;
    font-size: 6px;
    font-style: normal;
}

.monthly-candidate-warning {
    overflow: hidden;
    color: #ad671d;
    font-size: 6.2px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-candidate-stats {
    display: flex;
    gap: 3px;
    min-width: 0;
}

.monthly-candidate-stat {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 2px 4px;
    border-radius: 4px;
    background: #eef2f4;
}

.monthly-candidate-stat small {
    overflow: hidden;
    color: #65737d;
    font-size: 5.8px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-candidate-stat b {
    color: #263841;
    font-size: 8px;
}

.monthly-candidate-history {
    overflow: hidden;
    color: #7a858d;
    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-candidate-history b {
    color: #4c5a63;
}

.monthly-clear-assignment {
    width: calc(100% - 14px);
    margin: 0 7px 8px;
}

@media (max-width: 1320px) {
    .planner-view-and-publication {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .monthly-planner-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .monthly-task-row {
        grid-template-columns: minmax(120px, .8fr) minmax(205px, 1.4fr);
    }
}

@media (max-width: 1100px) {
    .monthly-planner-workspace {
        overflow: visible;
    }

    .monthly-planner-toolbar {
        min-width: 0;
        flex-wrap: wrap;
    }

    .monthly-planner-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    #calendarPanel .planner-view-and-publication {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        align-items: center;
    }

    #calendarPanel .calendar-navigation {
        grid-row: 1;
    }

    #calendarPanel .calendar-legend {
        grid-row: 3;
    }
}


/* ============================================================
   1.20.2 — naprawa układu „Przydziały miesiąca”
   Stary panel kalendarza ma limit 920 px. W miesięcznym warsztacie
   musi wykorzystać pełną szerokość planera.
   ============================================================ */
body.monthly-assignment-mode #calendarPanel.calendar-panel {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
}

body.monthly-assignment-mode #calendarPanel .calendar-header {
    width: 100% !important;
}

body.monthly-assignment-mode .monthly-planner-workspace,
body.monthly-assignment-mode .monthly-planner-layout,
body.monthly-assignment-mode .monthly-planner-board-wrap,
body.monthly-assignment-mode .monthly-planner-board {
    width: 100%;
    min-width: 0;
}

/* Globalne input/select mają width:100% i min-height:29px.
   Checkboxy w panelu kandydatów nie mogą tego dziedziczyć. */
.monthly-gender-filter input[type="checkbox"] {
    width: 12px !important;
    height: 12px !important;
    min-height: 0 !important;
    margin: 0 !important;
    flex: 0 0 12px;
}

@media (min-width: 1321px) {
    body.monthly-assignment-mode .monthly-planner-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
    }
}


/* ============================================================
   1.20.3 — filtr rodzaju zebrania w widoku Przydziały miesiąca
   ============================================================ */
.monthly-meeting-type-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.monthly-meeting-type-filter > strong {
    margin-right: 2px;
    color: #2d3a44;
    font-size: 9px;
}

.monthly-meeting-type-filter label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid #d6dde2;
    border-radius: 999px;
    background: #fff;
    color: #43515c;
    font-size: 8px;
    font-weight: 850;
    cursor: pointer;
    white-space: nowrap;
}

.monthly-meeting-type-filter label:has(input:checked) {
    border-color: #6f9fc5;
    background: #e2eff8;
    color: #123f6b;
    box-shadow: inset 0 0 0 1px rgba(18, 63, 107, .04);
}

.monthly-meeting-type-filter input {
    width: 12px;
    height: 12px;
    margin: 0;
}

.monthly-week-cards.single-meeting-type {
    grid-template-columns: minmax(0, 1fr);
}

.monthly-planner-filter-empty {
    display: grid;
    min-height: 120px;
    place-items: center;
    padding: 18px;
    border: 1px dashed #cdd7dd;
    border-radius: 9px;
    background: #f8fafb;
    color: #7b878f;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 1100px) {
    .monthly-meeting-type-filter {
        width: 100%;
    }
}

/* ============================================================
   1.20.5 — wyjątki tygodniowe zebrań
   Przywraca model „Zebranie odbędzie się / Brak zebrania”.
   ============================================================ */
.meeting-exception-card {
    width: min(775px, calc(100vw - 28px));
    max-height: min(92vh, 760px);
    grid-template-rows: auto minmax(0, 1fr);
}

.meeting-exception-header .eyebrow {
    color: #31383e;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .16em;
}

.meeting-exception-header h2 {
    margin-top: 2px;
    font-size: 20px;
}

.meeting-exception-form {
    display: grid;
    gap: 11px;
    overflow: auto;
    padding: 13px 15px 0;
}

.meeting-exception-occurs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.meeting-exception-choice {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-height: 68px;
    padding: 12px 13px;
    border: 1px solid #d5dde3;
    border-radius: 8px;
    background: #fbfcfd;
    cursor: pointer;
}

.meeting-exception-choice:has(input:checked) {
    border-color: #6c9fd0;
    background: #f5f9fd;
    box-shadow: inset 0 0 0 1px rgba(38,116,190,.08);
}

.meeting-exception-choice input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
}

.meeting-exception-choice span {
    display: grid;
    gap: 3px;
}

.meeting-exception-choice strong {
    color: #27323a;
    font-size: 11px;
}

.meeting-exception-choice small {
    color: #77828a;
    font-size: 8px;
    line-height: 1.35;
}

.meeting-exception-date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.meeting-exception-date-grid .field small {
    margin-top: 3px;
    color: #8a949b;
    font-size: 8px;
}

.meeting-exception-form .field > span {
    font-size: 8px;
    font-weight: 850;
}

.meeting-exception-form input,
.meeting-exception-form select {
    min-height: 36px;
    font-size: 11px;
}

.meeting-exception-form input:disabled {
    background: #f7f8f9;
    color: #b7bec3;
}

.meeting-exception-preview {
    display: grid;
    gap: 2px;
    min-height: 49px;
    padding: 10px 13px;
    border-left: 5px solid #9ca6ad;
    border-radius: 6px;
    background: #f2f4f5;
}

.meeting-exception-preview strong {
    font-size: 11px;
}

.meeting-exception-preview span {
    font-size: 8px;
}

.meeting-exception-preview.exception-red {border-left-color:#d14e62;background:#fff0f3;color:#9b2437}
.meeting-exception-preview.exception-yellow {border-left-color:#d89b25;background:#fff7df;color:#77510b}
.meeting-exception-preview.exception-blue {border-left-color:#3b82bd;background:#edf6fd;color:#235d8a}
.meeting-exception-preview.exception-green {border-left-color:#4b936d;background:#edf7f1;color:#2c6748}
.meeting-exception-preview.exception-none {border-left-color:#98a2a8;background:#f3f5f6;color:#4f5a61}

.meeting-exception-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 1px -15px 0;
    background: #fff;
}

.meeting-exception-footer-left {
    display: flex;
    gap: 7px;
}

#calendarPanel .calendar-week-meeting {
    padding-right: 36px;
}

#calendarPanel .calendar-meeting-exception-edit {
    position: absolute;
    top: 50%;
    right: 7px;
    z-index: 5;
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid #ccd5da;
    border-radius: 5px;
    background: rgba(255,255,255,.94);
    color: #4e5d66;
    font-size: 13px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

#calendarPanel .calendar-meeting-exception-edit:hover,
#calendarPanel .calendar-meeting-exception-edit:focus-visible {
    border-color: #598f84;
    background: #eef7f5;
    color: #23574f;
    outline: none;
}

#calendarPanel .calendar-week-type-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

#calendarPanel .calendar-week-type-copy em {
    overflow: hidden;
    color: #68747c;
    font-size: 7px;
    font-style: normal;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#calendarPanel .calendar-week-meeting.has-week-exception.exception-red,
#calendarPanel .calendar-week-meeting.has-week-exception.exception-red:hover {border-left-color:#d14e62!important}
#calendarPanel .calendar-week-meeting.has-week-exception.exception-yellow,
#calendarPanel .calendar-week-meeting.has-week-exception.exception-yellow:hover {border-left-color:#d89b25!important}
#calendarPanel .calendar-week-meeting.has-week-exception.exception-blue,
#calendarPanel .calendar-week-meeting.has-week-exception.exception-blue:hover {border-left-color:#3b82bd!important}
#calendarPanel .calendar-week-meeting.has-week-exception.exception-green,
#calendarPanel .calendar-week-meeting.has-week-exception.exception-green:hover {border-left-color:#4b936d!important}

#calendarPanel .calendar-week-meeting.calendar-no-meeting,
#calendarPanel .calendar-week-meeting.calendar-no-meeting:hover {
    background: #f7f7f8!important;
    color: #707a81;
    box-shadow: none!important;
}

#calendarPanel .calendar-week-meeting.calendar-no-meeting .calendar-week-type > b {
    background: #e5e7e9!important;
    color: #69737a!important;
}

#calendarPanel .calendar-week-meeting.calendar-no-meeting .calendar-week-type small {
    color: #a1273a;
    font-weight: 950;
}

#calendarPanel .calendar-week-meeting.calendar-no-meeting .calendar-status-fill {
    background: #b5bcc1!important;
}

@media (max-width: 720px) {
    .meeting-exception-occurs-grid,
    .meeting-exception-date-grid {
        grid-template-columns: 1fr;
    }

    .meeting-exception-card {
        width: min(96vw, 650px);
    }
}

.meeting-exception-notice {
    margin-top: 5px;
    padding: 7px 10px;
    border-left: 4px solid #98a2a8;
    border-radius: 5px;
    background: #f3f5f6;
    color: #4f5a61;
    font-size: 9px;
    font-weight: 800;
}
.meeting-exception-notice.exception-red {border-left-color:#d14e62;background:#fff0f3;color:#92263a}
.meeting-exception-notice.exception-yellow {border-left-color:#d89b25;background:#fff7df;color:#77510b}
.meeting-exception-notice.exception-blue {border-left-color:#3b82bd;background:#edf6fd;color:#235d8a}
.meeting-exception-notice.exception-green {border-left-color:#4b936d;background:#edf7f1;color:#2c6748}


/* 1.20.6 — kompaktowy podgląd; układ modala pozostaje bez zmian. */
#meetingExceptionPreview > strong {
    font-size: 11px !important;
    line-height: 1.3;
    font-weight: 700;
}
#meetingExceptionPreview > span {
    font-size: 10px !important;
    line-height: 1.35;
}
.meeting-exception-form input[type="radio"] {
    min-height: 0;
}
.auth-password-wrap {
    position: relative;
    display: block;
}
.auth-password-wrap > input {
    padding-right: 40px;
}
.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 28px;
    min-height: 0;
    padding: 4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #526c68;
    cursor: pointer;
    transform: translateY(-50%);
}
.auth-password-toggle:hover { background: #eaf2f0; }
.auth-password-toggle:focus-visible { outline: 2px solid var(--primary); }
.auth-password-toggle svg { display: block; width: 20px; height: 20px; }
.auth-password-wrap > input::-ms-reveal,
.auth-password-wrap > input::-ms-clear { display: none; }

.auth-field > label { color: var(--muted); font-size: 10px; font-weight: 700; }

/* 1.20.11 — szczegóły zadania bez opuszczania widoku przydziałów. */
.monthly-task-more {
    flex: 0 0 auto;
    padding: 3px 4px;
    border: 1px solid #cbdbe8;
    border-radius: 4px;
    background: #f2f7fc;
    color: #174f82;
    font: inherit;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
}
.monthly-task-more:hover,
.monthly-task-more[aria-expanded="true"] { background: #dceeff; }
.monthly-task-description {
    grid-column: 1 / -1;
    padding: 8px 10px;
    border-top: 1px solid #d7e4ef;
    background: #f2f7fc;
    color: #263f52;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.import-task-description { grid-column: 2 / -1; min-width: 0; font-size: 12px; }
.import-task-description summary { cursor: pointer; color: #174f82; padding: 4px 0; }
.import-task-description textarea { width: 100%; min-height: 90px; white-space: pre-wrap; }
.import-description-mode { margin: 10px 0; }
@media (max-width: 700px) {
    .monthly-task-title.has-description { flex-wrap: wrap; }
    .monthly-task-more { min-height: 30px; font-size: 11px; }
    .monthly-task-description { font-size: 13px; }
    .import-task-description { grid-column: 1 / -1; }
}

/* 1.20.10 — aktywne pole i zakres przydziałów wokół wybranego tygodnia. */
.monthly-role-button.is-selected,
.monthly-role-button.is-selected:hover:not(:disabled) {
    position: relative;
    z-index: 1;
    background: #dceeff;
    box-shadow: inset 0 0 0 2px #1765a7;
}

.monthly-role-button.is-selected span,
.monthly-role-button.is-selected strong { color: #123e66; }
.monthly-role-button.is-selected:disabled { opacity: 1; }
.monthly-role-button:focus-visible { outline: 2px solid #1765a7; outline-offset: -2px; }
.monthly-manual-assignment:focus-within { background: #dceeff; box-shadow: inset 0 0 0 2px #1765a7; }
.monthly-week-row.is-center-week > .monthly-week-label { background: #e8f2fc; border-left: 3px solid #1765a7; }
.monthly-week-row.is-center-week > .monthly-week-label strong,
.monthly-week-row.is-center-week > .monthly-week-label span { color: #123e66; }
.monthly-week-label small { margin-left: 5px; font-size: inherit; color: #1765a7; }
.rolling-week-control { display: inline-flex; gap: 5px; align-items: center; font-size: 11px; }
.rolling-week-control input { min-width: 0; width: 135px; padding: 4px; border: 1px solid #cbd6df; border-radius: 5px; font: inherit; }
body.rolling-assignment-mode .calendar-navigation { flex-wrap: wrap; }
.planner-view-switch { flex-wrap: wrap; }

/* 1.20.7 — Przydziały miesiąca na telefonie i tablecie. */
.monthly-filters-toggle,
.monthly-candidate-close,
.monthly-candidate-backdrop { display: none; }
.monthly-candidate-heading { min-width: 0; }

@media (max-width: 1100px) {
    body.monthly-candidate-open {
        position: fixed;
        width: 100%;
        overflow: hidden;
    }

    .monthly-candidate-backdrop {
        position: fixed;
        z-index: 1998;
        inset: 0;
        display: block;
        background: rgba(18, 35, 48, .48);
    }

    .monthly-candidate-panel {
        display: none;
        position: fixed;
        z-index: 1999;
        top: 8px;
        right: 8px;
        bottom: 8px;
        width: min(460px, calc(100% - 16px));
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 12px;
        box-shadow: 0 12px 40px rgba(18, 35, 48, .25);
    }

    .monthly-candidate-panel.active { display: block; }

    #monthlyCandidateContent {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
    }

    .monthly-candidate-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
        flex: 0 0 auto;
        padding: 12px;
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .monthly-candidate-close {
        display: block;
        flex: 0 0 auto;
        min-height: 40px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .monthly-candidate-header h3 { font-size: 17px; }
    .monthly-candidate-header p:last-child { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
    .monthly-candidate-header .eyebrow { font-size: 9px; }

    .monthly-candidate-controls {
        flex: 0 0 auto;
        flex-wrap: wrap;
        padding: 8px 10px;
    }

    .monthly-candidate-controls > label,
    .monthly-gender-filter label { min-height: 36px; font-size: 12px; }
    .monthly-candidate-controls select { width: auto; min-height: 36px; font-size: 16px; }
    .monthly-gender-filter { gap: 12px; }
    .monthly-gender-filter input[type="checkbox"] { width: 16px !important; height: 16px !important; flex-basis: 16px; }

    .monthly-candidate-panel .assignment-partner-info,
    .monthly-candidate-panel .assignment-candidates-status {
        flex: 0 0 auto;
        font-size: 11px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .monthly-candidates-list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        grid-auto-rows: max-content;
        align-content: start;
        gap: 6px;
        padding: 0 8px 8px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .monthly-candidate-card { min-height: 44px; padding: 8px; }
    .monthly-candidate-rank { font-size: 11px; }
    .monthly-candidate-main { gap: 5px; }
    .monthly-candidate-main > strong { font-size: 14px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
    .monthly-candidate-main em,
    .monthly-candidate-main i { font-size: 10px; }
    .monthly-candidate-warning { font-size: 11px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
    .monthly-candidate-stat { padding: 4px; }
    .monthly-candidate-stat small { font-size: 10px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
    .monthly-candidate-stat b { font-size: 13px; }
    .monthly-candidate-history { font-size: 11px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
    .monthly-clear-assignment {
        flex: 0 0 auto;
        min-height: 40px;
        margin-bottom: max(8px, env(safe-area-inset-bottom));
        font-size: 12px;
    }
}

@media (max-width: 760px) {
    body.monthly-assignment-mode .compact-app-header {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    body.monthly-assignment-mode .header-right { flex-direction: column; align-items: stretch; min-width: 0; }
    body.monthly-assignment-mode .user-menu { justify-content: space-between; padding-left: 0; border-left: 0; }
    body.monthly-assignment-mode .user-menu > span { text-align: left; }
    body.monthly-assignment-mode .compact-planner-page { width: calc(100% - 12px); }
    body.monthly-assignment-mode #calendarPanel .calendar-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    body.monthly-assignment-mode #calendarPanel .calendar-navigation { order: 0; justify-content: center; }
    body.monthly-assignment-mode #calendarPanel .planner-view-and-publication { order: 1; align-items: stretch; width: 100%; }
    body.monthly-assignment-mode #calendarPanel .calendar-legend { display: none; }
    body.monthly-assignment-mode .calendar-navigation .button { min-height: 36px; min-width: 36px; font-size: 12px; }
    body.monthly-assignment-mode .calendar-navigation strong { min-width: 0; font-size: 13px; }
    body.monthly-assignment-mode .planner-view-switch { display: flex; width: 100%; }
    body.monthly-assignment-mode .planner-view-button { flex: 1 1 auto; min-height: 36px; font-size: 11px; }
    body.monthly-assignment-mode .calendar-publication-control { width: 100%; justify-content: space-between; }
    body.monthly-assignment-mode .publication-inline-copy strong { font-size: 11px; }
    body.monthly-assignment-mode .publication-inline-copy span { font-size: 10px; }

    .monthly-filters-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 38px;
        margin-bottom: 6px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .monthly-filters-toggle[aria-expanded="true"] > span:last-child { transform: rotate(180deg); }
    .monthly-planner-toolbar { display: none; align-items: stretch; padding: 8px; }
    .monthly-planner-toolbar.is-open { display: flex; }
    .monthly-filter-group,
    .monthly-meeting-type-filter,
    .monthly-filter-actions { width: 100%; gap: 6px; }
    .monthly-filter-group > strong,
    .monthly-meeting-type-filter > strong { width: 100%; font-size: 11px; }
    .monthly-filter-group label,
    .monthly-only-open,
    .monthly-meeting-type-filter label { min-height: 36px; font-size: 11px; padding: 6px 8px; }
    .monthly-filter-group input,
    .monthly-only-open input,
    .monthly-meeting-type-filter input { width: 15px; height: 15px; min-height: 0; flex: 0 0 15px; }
    .monthly-filter-actions .button { min-height: 36px; font-size: 11px; }
    .monthly-planner-status { font-size: 11px; line-height: 1.35; }
    .monthly-week-label { padding: 7px 8px; }
    .monthly-week-label strong,
    .monthly-week-label span { font-size: 11px; }
    .monthly-week-cards,
    .monthly-week-cards.single-meeting-type { grid-template-columns: minmax(0, 1fr); padding: 5px; }
    .monthly-meeting-card-header { grid-template-columns: 90px minmax(0, 1fr) 62px; gap: 4px; padding: 7px 6px; }
    .monthly-meeting-date b { font-size: 12px; }
    .monthly-meeting-date span,
    .monthly-meeting-progress span { font-size: 9px; }
    .monthly-meeting-title strong { font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
    .monthly-meeting-progress b { font-size: 12px; }
    .monthly-meeting-section-title { padding: 5px 6px; font-size: 10px; }
    .monthly-task-row { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
    .monthly-task-title { padding: 6px; align-items: flex-start; }
    .monthly-task-title strong { font-size: 11px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
    .monthly-task-title span { font-size: 9px; }
    .monthly-task-assignments { grid-template-columns: minmax(0, 1fr); }
    .monthly-role-button,
    .monthly-inherited-assignment { grid-template-columns: minmax(0, 1fr); gap: 2px; min-height: 44px; padding: 6px; }
    .monthly-role-button + .monthly-role-button { border-top: 1px solid #e5e9eb; }
    .monthly-role-button span,
    .monthly-inherited-assignment span { font-size: 10px; white-space: normal; }
    .monthly-role-button strong,
    .monthly-inherited-assignment strong { font-size: 12px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
    .monthly-manual-assignment { grid-template-columns: minmax(0, 1fr); padding: 6px; }
    .monthly-manual-assignment span { font-size: 10px; }
    .monthly-manual-assignment input,
    .monthly-manual-assignment select { width: 100%; min-width: 0; min-height: 38px; font-size: 16px; }
    .monthly-meeting-slot-empty,
    .monthly-meeting-filter-empty,
    .monthly-planner-filter-empty { font-size: 11px; }
}

@media (max-width: 370px) {
    .monthly-meeting-card-header { grid-template-columns: minmax(0, 1fr) 62px; }
    .monthly-meeting-title { grid-column: 1; grid-row: 2; }
    .monthly-meeting-progress { grid-column: 2; grid-row: 1 / 3; }
    .monthly-task-title { flex-wrap: wrap; gap: 2px; }
}
