/* Kalendarz portalu — klient / realizator */
.pjm-pcal {
    background: #fff;
    border: 1px solid var(--pjm-border, #e3e8e5);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.pjm-pcal__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pjm-pcal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--pjm-dark, #14352A);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pjm-pcal__title .material-symbols-rounded {
    font-size: 22px;
    color: var(--pjm-orange, #E67E22);
}

.pjm-pcal__sub {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7a72;
    max-width: 520px;
}

.pjm-pcal__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7faf8;
    border: 1px solid #e3e8e5;
    border-radius: 10px;
    padding: 4px 6px;
}

.pjm-pcal__nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #dfe6e9;
    background: #fff;
    color: #14352A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.pjm-pcal__nav-btn:hover {
    border-color: var(--pjm-orange, #E67E22);
    color: var(--pjm-orange, #E67E22);
}

.pjm-pcal__nav-label {
    min-width: 130px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: capitalize;
}

.pjm-pcal__today {
    font-size: 12px;
    font-weight: 600;
    color: var(--pjm-orange, #E67E22);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.pjm-pcal__today[hidden] {
    display: none !important;
}

.pjm-pcal.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.pjm-pcal__upcoming {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pjm-pcal__upcoming-lbl {
    font-size: 12px;
    font-weight: 700;
    color: #6b7a72;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pjm-pcal__up-chip {
    border: 1px solid #e3e8e5;
    background: #fbfcfc;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #14352A;
}

.pjm-pcal__up-chip.tone-pending, .pjm-pcal__up-chip.tone-pay { border-color: #fcd34d; background: #fffbeb; }
.pjm-pcal__up-chip.tone-active { border-color: #93c5fd; background: #eff6ff; }
.pjm-pcal__up-chip.tone-done { border-color: #86efac; background: #ecfdf5; }

.pjm-pcal__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.pjm-pcal__dow {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #8a938d;
    padding: 4px 0;
}

.pjm-pcal__spacer {
    min-height: 52px;
}

.pjm-pcal__day {
    min-height: 52px;
    border: 1px solid #eef2f0;
    border-radius: 8px;
    background: #fbfcfc;
    padding: 4px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font: inherit;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.pjm-pcal__day:hover,
.pjm-pcal__day.is-selected {
    border-color: var(--pjm-orange, #E67E22);
    box-shadow: inset 0 0 0 1px var(--pjm-orange, #E67E22);
}

.pjm-pcal__day.is-today {
    background: #fff7ed;
}

.pjm-pcal__day.has-ev {
    background: #fff;
}

.pjm-pcal__dnum {
    font-size: 11px;
    font-weight: 700;
    color: #586660;
}

.pjm-pcal__dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.pjm-pcal__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.pjm-pcal__dot.tone-pending, .pjm-pcal__dot.tone-pay { background: #f59e0b; }
.pjm-pcal__dot.tone-active { background: #3b82f6; }
.pjm-pcal__dot.tone-done { background: #22c55e; }
.pjm-pcal__dot.tone-neutral { background: #9ca3af; }
.pjm-pcal__dot.tone-st-new { background: #1B5E4B; }
.pjm-pcal__dot.tone-st-in_progress { background: #b45309; }
.pjm-pcal__dot.tone-st-completed { background: #15803d; }
.pjm-pcal__dot.tone-st-finished { background: #4338ca; }
.pjm-pcal__dot.tone-st-cancelled { background: #b91c1c; }

.pjm-pcal__count {
    font-size: 9px;
    font-weight: 700;
    color: #6b7a72;
}

.pjm-pcal__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 16px;
    font-size: 11px;
    color: #6b7a72;
}

.pjm-pcal__sw {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: -1px;
}

.pjm-pcal__sw.tone-pending, .pjm-pcal__sw.tone-pay { background: #f59e0b; }
.pjm-pcal__sw.tone-active { background: #3b82f6; }
.pjm-pcal__sw.tone-done { background: #22c55e; }
.pjm-pcal__sw.tone-st-new { background: #1B5E4B; }
.pjm-pcal__sw.tone-st-in_progress { background: #b45309; }
.pjm-pcal__sw.tone-st-completed { background: #15803d; }
.pjm-pcal__sw.tone-st-finished { background: #4338ca; }
.pjm-pcal__sw.tone-st-cancelled { background: #b91c1c; }

.pjm-pcal__agenda-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.pjm-pcal__agenda-head h4 {
    margin: 0;
    font-size: 14px;
    color: #14352A;
}

.pjm-pcal__agenda-reset {
    border: 1px solid #dfe6e9;
    background: #fff;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.pjm-pcal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pjm-pcal__item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #eef2f0;
    border-radius: 10px;
    background: #fbfcfc;
    cursor: pointer;
    border-left: 4px solid #d1d5db;
}

.pjm-pcal__item.tone-pending, .pjm-pcal__item.tone-pay { border-left-color: #f59e0b; }
.pjm-pcal__item.tone-active { border-left-color: #3b82f6; }
.pjm-pcal__item.tone-done { border-left-color: #22c55e; }
.pjm-pcal__item.tone-st-new { border-left-color: #1B5E4B; }
.pjm-pcal__item.tone-st-in_progress { border-left-color: #b45309; }
.pjm-pcal__item.tone-st-completed { border-left-color: #15803d; }
.pjm-pcal__item.tone-st-finished { border-left-color: #4338ca; }
.pjm-pcal__item.tone-st-cancelled { border-left-color: #b91c1c; }

.pjm-pcal__item:hover {
    background: #fff;
    border-color: #d4e8de;
}

.pjm-pcal__item-date strong {
    display: block;
    font-size: 15px;
    color: #14352A;
}

.pjm-pcal__item-date span {
    font-size: 11px;
    color: #8a938d;
    text-transform: capitalize;
}

.pjm-pcal__item-main strong {
    display: block;
    font-size: 14px;
    color: #14352A;
}

.pjm-pcal__item-meta {
    display: block;
    font-size: 12px;
    color: #6b7a72;
    margin-top: 2px;
}

.pjm-pcal__item-st {
    font-size: 11px;
    font-weight: 700;
    color: #586660;
    white-space: nowrap;
}

.pjm-pcal__empty {
    margin: 0;
    font-size: 13px;
    color: #8a938d;
}

.pjm-pcal-highlight {
    outline: 2px solid var(--pjm-orange, #E67E22);
    outline-offset: 2px;
    border-radius: 10px;
}

@media (max-width: 720px) {
    .pjm-pcal__item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .pjm-pcal__item-st {
        justify-self: start;
    }
}
