/* ===== Kalender (Profil → Kalender) ===== */

.lp-cal-hero {
    margin-top: 18px;
    border-radius: 18px;
    background: linear-gradient(90deg, #3aa0ff 0%, #053a7a 55%, #ffd200 100%);
    box-shadow: 0 14px 28px rgba(2,6,23,.14);
    color: #fff;
    overflow: hidden;
    padding: 22px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.lp-cal-hero-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lp-cal-hero-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.22);
    font-size: 26px;
}

.lp-cal-hero-title {
    font-size: 26px;
    font-weight: 1000;
    line-height: 1.1;
}

.lp-cal-hero-sub {
    font-weight: 800;
    opacity: .92;
    margin-top: 2px;
}

.lp-cal-hero-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lp-cal-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: 6px;
}

.lp-cal-nav-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background .15s;
}

    .lp-cal-nav-btn:hover {
        background: rgba(255,255,255,.22);
    }

.lp-cal-title {
    min-width: 190px;
    text-align: center;
    font-weight: 1000;
    font-size: 17px;
    letter-spacing: .2px;
    padding: 0 10px;
    text-transform: capitalize;
}

.lp-cal-today-btn {
    background: #fff;
    color: #053a7a;
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(2,6,23,.12);
}

    .lp-cal-today-btn:hover {
        filter: brightness(.96);
    }

.lp-cal-today-btn--hidden { display: none !important; }

.lp-cal-viewswitch {
    display: inline-flex;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
}

.lp-cal-view-btn {
    background: transparent;
    border: 0;
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    font-size: 13px;
}

    .lp-cal-view-btn.active {
        background: #fff;
        color: #053a7a;
    }

.lp-cal-add-btn {
    background: linear-gradient(90deg, #ffd200 0%, #ff9e00 100%);
    color: #053a7a;
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0,0,0,.14);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .lp-cal-add-btn:hover {
        filter: brightness(.97);
    }

/* ===== Layout Hauptfläche ===== */

.lp-cal-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    margin-top: 16px;
}

@media (max-width: 1100px) {
    .lp-cal-layout {
        grid-template-columns: 1fr;
    }
}

.lp-cal-card {
    background: #fff;
    border: 1px solid #e6edf7;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(2,6,23,.08);
    overflow: hidden;
}

/* ===== Monats-Grid ===== */

.lp-cal-month {
    display: flex;
    flex-direction: column;
}

.lp-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}

.lp-cal-weekday {
    padding: 10px 0;
    text-align: center;
    font-weight: 1000;
    color: #475569;
    font-size: 12px;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.lp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(112px, auto);
}

.lp-cal-day {
    border-right: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    padding: 6px 6px 4px;
    position: relative;
    min-height: 112px;
    cursor: pointer;
    transition: background .15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .lp-cal-day:hover {
        background: #f3f8ff;
    }

    .lp-cal-day:nth-child(7n) {
        border-right: 0;
    }

.lp-cal-day--out {
    background: #fafbfd;
    color: #94a3b8;
}

    .lp-cal-day--out .lp-cal-day-num {
        color: #94a3b8;
    }

.lp-cal-day--today .lp-cal-day-num {
    background: #3aa0ff;
    color: #fff;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    font-weight: 1000;
}

.lp-cal-day--weekend {
    background: #fcfcff;
}

.lp-cal-day-num {
    font-weight: 900;
    font-size: 13px;
    color: #0f172a;
    padding: 0 4px;
    align-self: flex-start;
    line-height: 26px;
    min-height: 26px;
}

.lp-cal-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.lp-cal-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 7px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: var(--cal-c, #3aa0ff);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.3;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(2,6,23,.08);
}

    .lp-cal-pill:hover {
        filter: brightness(.95);
    }

.lp-cal-pill--more {
    background: #e2e8f0;
    color: #334155;
    justify-content: center;
    font-size: 11px;
}

.lp-cal-pill-time {
    font-weight: 700;
    font-size: 11px;
    opacity: .9;
}

.lp-cal-pill-allday-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    flex: 0 0 auto;
}

/* Neue kompakte Tages-Darstellung: Kopf mit Zahl + Count, dann Dots */
.lp-cal-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.lp-cal-day-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 900;
}
.lp-cal-day--today .lp-cal-day-count { background: #dbeafe; color: #0656b0; }
.lp-cal-day-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 2px;
}
.lp-cal-day-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cal-c, #94a3b8);
    box-shadow: 0 1px 2px rgba(2,6,23,.12);
}
.lp-cal-day--selected {
    background: #eff6ff;
    box-shadow: inset 0 0 0 2px #0783ff;
    z-index: 1;
}
.lp-cal-day--selected:hover { background: #dbeafe; }

/* Tagesdetails-Panel unter dem Monatsgrid */
.lp-cal-dayview {
    border-top: 1px solid #e2e8f0;
    padding: 14px 18px 18px;
    background: #fff;
}
.lp-cal-dayview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.lp-cal-dayview-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.lp-cal-dayview-jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.lp-cal-dayview-jump:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #0656b0;
}
.lp-cal-dayview-jump:disabled {
    opacity: .35;
    cursor: not-allowed;
    background: #f8fafc;
}
.lp-cal-dayview-jump i { font-size: 14px; line-height: 1; }
.lp-cal-dayview-date {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 15px;
    color: #0f172a;
}
.lp-cal-dayview-today-chip {
    background: #3aa0ff;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.lp-cal-dayview-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #053a7a;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: filter .12s;
}
.lp-cal-dayview-add:hover { filter: brightness(1.1); }

.lp-cal-dayview-empty {
    padding: 18px 8px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.lp-cal-dayview-empty i { margin-right: 6px; opacity: .7; }

.lp-cal-dayview-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lp-cal-dayview-item {
    display: flex;
    align-items: stretch;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .12s, background .12s;
}
.lp-cal-dayview-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.lp-cal-dayview-bar {
    width: 4px;
    background: var(--cal-c, #94a3b8);
    flex-shrink: 0;
}
.lp-cal-dayview-main {
    flex: 1;
    padding: 8px 4px 8px 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lp-cal-dayview-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lp-cal-dayview-title i { color: var(--cal-c, #64748b); flex-shrink: 0; }
.lp-cal-dayview-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    flex-wrap: wrap;
}
.lp-cal-dayview-time { font-weight: 700; color: #334155; }
.lp-cal-dayview-sep { opacity: .5; }
.lp-cal-dayview-open {
    background: transparent;
    border: 0;
    color: #94a3b8;
    padding: 0 12px;
    cursor: pointer;
    font-size: 18px;
    transition: color .12s;
}
.lp-cal-dayview-item:hover .lp-cal-dayview-open { color: #0783ff; }

/* ===== Wochenansicht ===== */

.lp-cal-week {
    display: flex;
    flex-direction: column;
    max-height: 760px;
    overflow: auto;
}

.lp-cal-week-header {
    display: grid;
    grid-template-columns: 64px repeat(7, 1fr);
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
}

.lp-cal-week-corner {
    border-right: 1px solid #eef2f7;
}

.lp-cal-week-dayhead {
    padding: 8px 6px;
    text-align: center;
    border-right: 1px solid #eef2f7;
    font-weight: 900;
    color: #334155;
    font-size: 12px;
}

    .lp-cal-week-dayhead:last-child {
        border-right: 0;
    }

    .lp-cal-week-dayhead .lp-cal-week-daynum {
        display: inline-grid;
        place-items: center;
        margin-top: 2px;
        font-size: 14px;
        font-weight: 1000;
        color: #0f172a;
        width: 26px;
        height: 26px;
        border-radius: 999px;
    }

    .lp-cal-week-dayhead.today .lp-cal-week-daynum {
        background: #3aa0ff;
        color: #fff;
    }

.lp-cal-week-body {
    display: grid;
    grid-template-columns: 64px repeat(7, 1fr);
    position: relative;
}

.lp-cal-hours {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eef2f7;
}

.lp-cal-hour {
    height: 44px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 800;
    text-align: right;
    padding: 2px 6px;
    border-bottom: 1px dashed #eef2f7;
}

.lp-cal-day-col {
    position: relative;
    border-right: 1px solid #eef2f7;
    /* Höhe = Anzahl Stunden * 44px. BIZ_END − BIZ_START = 21 − 6 = 15 Stunden. */
    height: calc(44px * 15);
}

    .lp-cal-day-col:last-child {
        border-right: 0;
    }

.lp-cal-hour-cell {
    height: 44px;
    border-bottom: 1px dashed #eef2f7;
    cursor: pointer;
}

    .lp-cal-hour-cell:hover {
        background: #f3f8ff;
    }

.lp-cal-event-box {
    position: absolute;
    left: 4px;
    right: 4px;
    background: var(--cal-c, #3aa0ff);
    color: #fff;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 900;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(2,6,23,.1);
    z-index: 1;
}

    .lp-cal-event-box:hover {
        filter: brightness(.95);
    }

    .lp-cal-event-box small {
        display: block;
        font-weight: 700;
        opacity: .92;
        font-size: 11px;
    }

/* All-Day-Zeile */
.lp-cal-week-allday {
    display: grid;
    grid-template-columns: 64px 1fr;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    position: sticky;
    top: 54px; /* unter dem Header */
    z-index: 1;
}
.lp-cal-week-allday-label {
    padding: 8px 8px 6px;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-right: 1px solid #eef2f7;
    text-align: right;
}
.lp-cal-week-allday-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 4px;
}
.lp-cal-week-allday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.lp-cal-week-allday-band {
    background: var(--cal-c, #3aa0ff);
    color: #fff;
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(2,6,23,.12);
    min-width: 0;
    transition: filter .12s;
}
.lp-cal-week-allday-band:hover { filter: brightness(.95); }
.lp-cal-week-allday-band > span {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}
.lp-cal-week-allday-band > span small {
    font-weight: 700;
    opacity: .85;
    margin-left: 4px;
    font-size: 10.5px;
}
.lp-cal-week-allday-band > i { flex-shrink: 0; font-size: 11.5px; opacity: .9; }

/* ===== Seitenleiste ===== */

.lp-cal-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lp-cal-side-card {
    background: #fff;
    border: 1px solid #e6edf7;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(2,6,23,.06);
    padding: 16px;
}

.lp-cal-side-title {
    font-weight: 1000;
    font-size: 14px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

    .lp-cal-side-title i {
        color: #3aa0ff;
    }

.lp-cal-cats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lp-cal-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s;
    user-select: none;
}

    .lp-cal-cat:hover {
        background: #eef6ff;
    }

    .lp-cal-cat.off {
        opacity: .45;
    }

    .lp-cal-cat.active {
        border-color: #cfe3ff;
    }

.lp-cal-cat-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #0f172a;
    font-size: 13px;
}

.lp-cal-cat-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--cal-c, #3aa0ff);
    box-shadow: 0 0 0 3px rgba(2,6,23,.05);
}

.lp-cal-cat-count {
    font-size: 11px;
    font-weight: 900;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 2px 8px;
    min-width: 26px;
    text-align: center;
}

.lp-cal-up {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 340px;
    overflow: auto;
}

.lp-cal-up-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    cursor: pointer;
    transition: background .15s;
}

    .lp-cal-up-item:hover {
        background: #eef6ff;
    }

.lp-cal-up-date {
    flex: 0 0 44px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 4px 0;
}

    .lp-cal-up-date .d {
        font-size: 15px;
        font-weight: 1000;
        color: #0f172a;
        line-height: 1;
    }

    .lp-cal-up-date .m {
        font-size: 10px;
        font-weight: 900;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: .6px;
    }

.lp-cal-up-body {
    flex: 1;
    min-width: 0;
}

.lp-cal-up-title {
    font-weight: 900;
    font-size: 13px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-cal-up-title-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--cal-c, #3aa0ff);
    flex: 0 0 auto;
}

.lp-cal-up-meta {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-cal-up-empty {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    padding: 16px 0;
}

/* ===== Modal ===== */

.lp-cal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 16px;
}

    .lp-cal-backdrop.open {
        display: flex;
    }

.lp-cal-modal {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    box-shadow: 0 30px 60px rgba(2,6,23,.35);
    display: flex;
    flex-direction: column;
}

.lp-cal-modal-head {
    padding: 18px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lp-cal-modal-title {
    font-size: 18px;
    font-weight: 1000;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .lp-cal-modal-title i {
        color: #3aa0ff;
        font-size: 20px;
    }

.lp-cal-modal-close {
    background: #f1f5f9;
    border: 0;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    font-size: 16px;
    cursor: pointer;
    color: #334155;
}

    .lp-cal-modal-close:hover {
        background: #e2e8f0;
    }

.lp-cal-modal-body {
    padding: 14px 20px 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lp-cal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Wiederholungs-Hinweis im Modal */
.lp-cal-series-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 4px;
}
.lp-cal-series-info i.bi { font-size: 18px; }

/* Wiederholung */
.lp-cal-recur-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.lp-cal-recur-row > select {
    flex: 0 0 auto;
    min-width: 200px;
}
.lp-cal-recur-until {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}
.lp-cal-recur-until input[type=date] {
    width: 160px;
}

/* Reminder-Chips + Picker */
.lp-cal-reminders {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}
.lp-cal-reminder-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 4px 8px 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.lp-cal-reminder-chip i.bi-bell { color: #d97706; font-size: 11px; }
.lp-cal-reminder-chip-x {
    background: transparent;
    border: none;
    color: #92400e;
    cursor: pointer;
    padding: 0 2px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
}
.lp-cal-reminder-chip-x:hover { color: #b91c1c; background: #fee2e2; }
.lp-cal-reminder-empty {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

.lp-cal-reminder-add { position: relative; }
.lp-cal-reminder-add-btn {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    color: #475569;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .12s;
}
.lp-cal-reminder-add-btn:hover { background: #e2e8f0; border-color: #94a3b8; }
.lp-cal-reminder-picker {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lp-cal-reminder-picker-title {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.lp-cal-reminder-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lp-cal-reminder-presets button {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.lp-cal-reminder-presets button:hover {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}
.lp-cal-reminder-day {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #475569;
}
.lp-cal-reminder-day input[type="number"],
.lp-cal-reminder-day input[type="time"] {
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
}
.lp-cal-reminder-day input[type="number"] { width: 60px; }
.lp-cal-reminder-day button {
    background: #d97706;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.lp-cal-reminder-day button:hover { background: #b45309; }

/* ── Mitarbeiter-Einladung ──────────────────────────────── */
.lp-cal-invitees {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
    margin-bottom: 6px;
}
.lp-cal-invitee-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #064a96;
    padding: 3px 6px 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.lp-cal-invitee-chip-av {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #0783ff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    overflow: hidden;
}
.lp-cal-invitee-chip-av img { width: 100%; height: 100%; object-fit: cover; }
.lp-cal-invitee-chip-x {
    background: transparent;
    border: none;
    color: #064a96;
    cursor: pointer;
    padding: 0 2px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
}
.lp-cal-invitee-chip-x:hover { color: #b91c1c; background: #fee2e2; }

.lp-cal-invite-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
}
.lp-cal-invite-search i { color: #94a3b8; }
.lp-cal-invite-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: #0f172a;
}
.lp-cal-invite-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15,23,42,.12);
    z-index: 10;
    max-height: 240px;
    overflow-y: auto;
}
.lp-cal-invite-result-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}
.lp-cal-invite-result-item:last-child { border-bottom: none; }
.lp-cal-invite-result-item:hover { background: #eff6ff; }
.lp-cal-invite-result-av {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #0783ff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    flex-shrink: 0;
}
.lp-cal-invite-result-av img { width: 100%; height: 100%; object-fit: cover; }
.lp-cal-invite-result-text { flex: 1; min-width: 0; }
.lp-cal-invite-result-name {
    font-weight: 700; font-size: 13px; color: #0f172a;
}
.lp-cal-invite-result-sub {
    font-size: 11px; color: #64748b;
}
.lp-cal-invite-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    font-style: italic;
}

    .lp-cal-field label {
        font-weight: 900;
        color: #0f172a;
        font-size: 13px;
    }

    .lp-cal-field input,
    .lp-cal-field textarea,
    .lp-cal-field select {
        border-radius: 10px;
        padding: 9px 12px;
        border: 1px solid #d6dee8;
        background: #fff;
        font-size: 14px;
        font-family: inherit;
    }

    .lp-cal-field input:focus,
    .lp-cal-field textarea:focus,
    .lp-cal-field select:focus {
        outline: 2px solid rgba(45,156,219,.35);
        border-color: #3aa0ff;
    }

.lp-cal-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lp-cal-cat-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lp-cal-cat-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 900;
    font-size: 12px;
    color: #0f172a;
    user-select: none;
}

    .lp-cal-cat-opt .dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: var(--cal-c, #3aa0ff);
    }

    .lp-cal-cat-opt.selected {
        background: #fff;
        border-color: var(--cal-c, #3aa0ff);
        box-shadow: 0 0 0 3px rgba(45,156,219,.14);
    }

.lp-cal-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: #0f172a;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

    .lp-cal-check input {
        width: 16px;
        height: 16px;
    }

.lp-cal-modal-foot {
    padding: 12px 20px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    margin-top: 6px;
}

/* ── Event-Detail-Popup (read-only) ───────────────────────── */
.lp-cal-detail {
    position: relative;
    width: min(560px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 48px));
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(15,23,42,.28), 0 4px 12px rgba(15,23,42,.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(12px) scale(.95);
    opacity: 0;
    transition: transform .22s cubic-bezier(.34,1.2,.64,1), opacity .22s ease;
}
.lp-cal-backdrop.open .lp-cal-detail {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.lp-cal-detail-hero {
    position: relative;
    padding: 28px 28px 22px;
    color: #fff;
    background: linear-gradient(135deg, #0783ff 0%, #064a96 100%);
    --cal-accent: #fff;
}
/* Kategorie-Akzente über Inline-Style --cal-accent */
.lp-cal-detail-hero[data-cat="vacation"],
.lp-cal-detail-hero[data-cat="vacation_pending"] {
    background: linear-gradient(135deg, #16a34a 0%, #14532d 100%);
}
.lp-cal-detail-hero[data-cat="sick"] {
    background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
}
.lp-cal-detail-hero[data-cat="meeting"] {
    background: linear-gradient(135deg, #f59e0b 0%, #92400e 100%);
}
.lp-cal-detail-hero[data-cat="birthday"] {
    background: linear-gradient(135deg, #ec4899 0%, #831843 100%);
}
.lp-cal-detail-hero[data-cat="work"] {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
}
.lp-cal-detail-hero[data-cat="reminder"] {
    background: linear-gradient(135deg, #10b981 0%, #064e3b 100%);
}
.lp-cal-detail-hero[data-cat="note"] {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

.lp-cal-detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: none;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background .15s;
}
.lp-cal-detail-close:hover { background: rgba(255,255,255,.32); }

.lp-cal-detail-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.22);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.lp-cal-detail-cat-chip i { font-size: 12px; }

.lp-cal-detail-title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 10px;
    word-break: break-word;
}

.lp-cal-detail-when {
    font-size: 15px;
    color: rgba(255,255,255,.85);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-cal-detail-body {
    padding: 20px 28px 4px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.lp-cal-detail-row {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.lp-cal-detail-row:last-child { border-bottom: none; }

.lp-cal-detail-row-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.lp-cal-detail-row-content { flex: 1; min-width: 0; }

.lp-cal-detail-row-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 3px;
}

.lp-cal-detail-row-value {
    font-size: 14px;
    color: #0f172a;
    font-weight: 600;
}

.lp-cal-detail-desc {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.lp-cal-detail-reminders {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lp-cal-detail-reminder-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.lp-cal-detail-reminder-chip i { font-size: 11px; color: #d97706; }

.lp-cal-detail-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lp-cal-detail-part-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 3px 10px 3px 3px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.lp-cal-detail-part-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0ea5e9;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.3px;
}
.lp-cal-detail-part-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lp-cal-detail-part-badge {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 7px;
    border-radius: 999px;
    line-height: 1.5;
}
.lp-cal-detail-part-chip--owner                        { background: #eef2ff; border-color: #c7d2fe; }
.lp-cal-detail-part-chip--owner .lp-cal-detail-part-avatar { background: #4f46e5; }
.lp-cal-detail-part-badge--owner                       { background: #4f46e5; color: #fff; }

.lp-cal-detail-part-chip--accepted                     { background: #ecfdf5; border-color: #a7f3d0; }
.lp-cal-detail-part-chip--accepted .lp-cal-detail-part-avatar { background: #10b981; }
.lp-cal-detail-part-badge--accepted                    { background: #d1fae5; color: #047857; }

.lp-cal-detail-part-chip--pending                      { background: #fffbeb; border-color: #fde68a; }
.lp-cal-detail-part-chip--pending .lp-cal-detail-part-avatar { background: #f59e0b; }
.lp-cal-detail-part-badge--pending                     { background: #fef3c7; color: #92400e; }

.lp-cal-detail-part-chip--rejected                     { background: #fef2f2; border-color: #fecaca; color: #64748b; }
.lp-cal-detail-part-chip--rejected .lp-cal-detail-part-name { text-decoration: line-through; }
.lp-cal-detail-part-chip--rejected .lp-cal-detail-part-avatar { background: #94a3b8; }
.lp-cal-detail-part-badge--rejected                    { background: #fee2e2; color: #b91c1c; }

/* Einladung-zurückziehen-Button am Chip (nur für Organisator) */
.lp-cal-detail-part-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 2px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    transition: background .15s, color .15s;
}
.lp-cal-detail-part-remove:hover { background: #fee2e2; color: #dc2626; }
.lp-cal-detail-part-remove:disabled { opacity: .5; cursor: default; }

.lp-cal-detail-foot {
    padding: 14px 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.lp-cal-btn {
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 1000;
    cursor: pointer;
    border: 0;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lp-cal-btn-save {
    background: linear-gradient(90deg, #3aa0ff 0%, #053a7a 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(2,6,23,.18);
}

    .lp-cal-btn-save:hover {
        filter: brightness(.97);
    }

.lp-cal-btn-cancel {
    background: #f1f5f9;
    color: #334155;
}

    .lp-cal-btn-cancel:hover {
        background: #e2e8f0;
    }

.lp-cal-btn-delete {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
}

    .lp-cal-btn-delete:hover {
        background: #fee2e2;
    }

.lp-cal-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 9px 12px;
    font-weight: 800;
    font-size: 13px;
}

/* ===== Loading Spinner ===== */

.lp-cal-loading {
    padding: 80px 0;
    text-align: center;
    color: #64748b;
    font-weight: 900;
}

    .lp-cal-loading .spinner {
        width: 32px;
        height: 32px;
        border: 3px solid #e2e8f0;
        border-top-color: #3aa0ff;
        border-radius: 999px;
        animation: lp-cal-spin 1s linear infinite;
        margin: 0 auto 10px;
    }

@keyframes lp-cal-spin {
    to { transform: rotate(360deg); }
}
