/* REGA Intranet Calendar v1.1.3 */

.rega-intranet-app{
    display:flex;
    gap:18px;
    width:100%;
    min-height:780px;
    font-family:Arial, Helvetica, sans-serif;
}

.rega-sidebar{
    width:265px;
    flex:0 0 265px;
    background:#f6f7f8;
    border:1px solid #e0e3e7;
    border-radius:14px;
    padding:18px;
    box-sizing:border-box;
}

.rega-sidebar-head h3{
    margin:0 0 14px;
    font-size:18px;
}

.rega-calendar-list{
    display:flex;
    flex-direction:column;
    gap:9px;
}

.rega-calendar-item{
    display:flex;
    align-items:center;
    gap:9px;
    font-size:14px;
    cursor:pointer;
    padding:5px;
    border-radius:8px;
}

.rega-calendar-item:hover{
    background:#eceff3;
}

.rega-cal-color{
    width:13px;
    height:13px;
    border-radius:50%;
    display:inline-block;
}

.rega-main{
    flex:1;
    min-width:0;
    background:#fff;
    border:1px solid #e0e3e7;
    border-radius:14px;
    padding:14px;
    box-sizing:border-box;
}

#rega-calendar{
    min-height:760px;
}

.fc .fc-toolbar-title{
    font-size:22px;
    font-weight:700;
}

.fc .fc-button{
    border-radius:8px!important;
    text-transform:none!important;
}

.fc .fc-button-group{
    gap:6px;
}

.fc .fc-button-group .fc-button{
    margin-left:0!important;
    margin-right:0!important;
}

.fc .fc-toolbar-chunk{
    display:flex;
    gap:6px;
    align-items:center;
}

.fc-event{
    border:none!important;
    border-radius:8px!important;
    cursor:pointer;
    white-space:pre-line;
}

.fc-event-title{
    white-space:pre-line;
    line-height:1.25;
}

.fc-timegrid-event .fc-event-main,
.fc-timegrid-event .fc-event-main-frame{
    align-items:flex-start!important;
    justify-content:flex-start!important;
}

.fc-timegrid-event .fc-event-title-container{
    flex-grow:0!important;
}

.rega-event-preview{
    line-height:1.08;
    overflow:hidden;
    padding-top:0;
}

.rega-event-preview-title{
    font-weight:700;
    margin-bottom:0;
}

.rega-event-preview-persons{
    font-size:12px;
    opacity:.95;
}

.rega-event-preview-time{
    font-size:11px;
    opacity:.9;
    margin-top:0;
}

.rega-modal-backdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    z-index:99999;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    box-sizing:border-box;
}

.rega-modal{
    background:#fff;
    width:min(720px, 96vw);
    max-height:92vh;
    overflow:auto;
    border-radius:16px;
    box-shadow:0 20px 60px rgba(0,0,0,.25);
    padding:0;
}

.rega-modal-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px 22px;
    border-bottom:1px solid #e5e7eb;
    position:sticky;
    top:0;
    background:#fff;
    z-index:2;
}

.rega-modal-header h3{
    margin:0;
    font-size:20px;
}

.rega-modal-close{
    border:0;
    background:transparent;
    font-size:30px;
    line-height:1;
    cursor:pointer;
}

#rega-event-form{
    padding:20px 22px 22px;
}

#rega-event-form label{
    display:block;
    margin:12px 0 6px;
    font-weight:600;
    font-size:13px;
}

#rega-event-form input[type="text"],
#rega-event-form input[type="date"],
#rega-event-form input[type="time"],
#rega-event-form select,
#rega-event-form textarea{
    width:100%;
    box-sizing:border-box;
    border:1px solid #d5d9de;
    border-radius:9px;
    padding:10px 11px;
    font-size:14px;
    background:#fff;
}

.rega-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px 14px;
}

.rega-checkbox-line{
    display:flex!important;
    align-items:center;
    gap:8px;
    font-weight:500!important;
}

.rega-details{
    border:1px solid #e1e5ea;
    border-radius:10px;
    margin-top:14px;
    background:#fafafa;
}

.rega-details summary{
    cursor:pointer;
    padding:12px 14px;
    font-weight:700;
}

.rega-details-inner{
    padding:0 14px 14px;
}

.rega-color-palette{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:8px 0 4px;
}

.rega-color-dot{
    width:30px;
    height:30px;
    border-radius:50%;
    border:3px solid transparent;
    cursor:pointer;
    box-shadow:0 1px 4px rgba(0,0,0,.2);
}

.rega-color-dot.is-selected{
    border-color:#111;
    transform:scale(1.08);
}

.rega-modal-actions{
    display:grid;
    grid-template-columns:auto 1fr auto auto;
    gap:10px;
    margin-top:22px;
    align-items:center;
}

.rega-btn{
    border:1px solid #cfd5dc;
    border-radius:9px;
    background:#fff;
    padding:10px 16px;
    cursor:pointer;
    font-weight:600;
}

.rega-btn-primary{
    background:#0066cc;
    border-color:#0066cc;
    color:#fff;
}

.rega-btn-danger{
    background:#d62828;
    border-color:#d62828;
    color:#fff;
}

.rega-login-hint{
    padding:16px;
    border:1px solid #ddd;
    border-radius:10px;
    background:#fafafa;
}

@media(max-width:900px){
    .rega-intranet-app{flex-direction:column;}
    .rega-sidebar{width:100%; flex:auto;}
    .rega-form-grid{grid-template-columns:1fr;}
}

/* REGA Intranet Calendar v1.0.3 - Mobile Ansicht + ICS Import */
.rega-ics-import{
    background:#f8fafc;
    border:1px dashed #cbd5e1;
    border-radius:10px;
    padding:12px;
    margin-bottom:14px;
}
.rega-ics-label{
    margin:0 0 8px!important;
    display:block;
}
.rega-ics-hint{
    font-size:12px;
    color:#64748b;
    margin-top:6px;
}
#rega-ics-file{
    width:100%;
    box-sizing:border-box;
}

.rega-mobile-calendar{
    width:100%;
    background:#fff;
}
.rega-mobile-toolbar{
    display:flex;
    align-items:center;
    gap:18px;
    padding:14px 12px 18px;
    border-bottom:1px solid #ececec;
    position:sticky;
    top:0;
    background:#fff;
    z-index:10;
}
.rega-mobile-icon,
.rega-mobile-nav button{
    border:0;
    background:transparent;
    font-size:30px;
    line-height:1;
    cursor:pointer;
    color:#222;
}
.rega-mobile-title{
    flex:1;
    line-height:1.05;
}
#rega-mobile-month{
    font-size:34px;
    font-weight:400;
}
#rega-mobile-week{
    font-size:24px;
    margin-top:6px;
}
.rega-mobile-nav{
    display:flex;
    justify-content:space-between;
    padding:6px 12px;
}
.rega-mobile-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    border-top:1px solid #eee;
    border-left:1px solid #eee;
}
.rega-mobile-day{
    min-height:210px;
    border-right:1px solid #eee;
    border-bottom:1px solid #eee;
    padding:8px 4px 10px;
    box-sizing:border-box;
    background:#fff;
}
.rega-mobile-day h3{
    margin:0 0 8px;
    font-size:24px;
    font-weight:400;
    line-height:1.1;
    color:#222;
}
.rega-mobile-day.is-today h3{
    color:#e00000;
}
.rega-mobile-events{
    display:flex;
    flex-direction:column;
    gap:4px;
}
.rega-mobile-event{
    color:#fff;
    border-radius:4px;
    padding:5px 7px;
    font-size:16px;
    font-weight:700;
    line-height:1.15;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    min-height:25px;
    box-sizing:border-box;
}
.rega-mobile-loading{
    grid-column:1 / -1;
    padding:20px;
    color:#64748b;
}

@media(max-width:700px){
    .rega-intranet-app{
        display:block;
        min-height:auto;
    }
    .rega-sidebar{
        display:none;
    }
    .rega-main{
        padding:0;
        border:0;
        border-radius:0;
        background:#fff;
    }
    #rega-calendar{
        display:none!important;
    }
    #rega-mobile-calendar{
        display:block!important;
    }
    .rega-modal-backdrop{
        padding:8px;
        align-items:flex-start;
    }
    .rega-modal{
        width:100%;
        max-height:96vh;
        border-radius:12px;
    }
    .rega-form-grid{
        grid-template-columns:1fr 1fr;
    }
    #rega-event-form{
        padding:14px;
    }
}

@media(max-width:420px){
    #rega-mobile-month{font-size:30px;}
    #rega-mobile-week{font-size:22px;}
    .rega-mobile-day{min-height:185px;}
    .rega-mobile-day h3{font-size:21px;}
    .rega-mobile-event{font-size:14px;}
}


/* v1.0.4: ICS-Import ausserhalb vom Termin-Popup */
.rega-sidebar-import{
    margin-top:18px;
    padding-top:16px;
    border-top:1px solid #dfe3e8;
}
.rega-sidebar-import input[type="file"]{
    width:100%;
    max-width:100%;
    font-size:12px;
}
.rega-ics-label{
    display:block;
    font-weight:700;
    margin-bottom:7px;
}
.rega-ics-hint{
    font-size:12px;
    line-height:1.35;
    color:#6b7280;
    margin-top:6px;
}

/* robustere mobile Vollbreite gegen Theme-Ränder */
@media (max-width: 760px){
    body .rega-intranet-app{
        width:100vw!important;
        max-width:100vw!important;
        margin-left:calc(50% - 50vw)!important;
        margin-right:calc(50% - 50vw)!important;
        padding:0!important;
        gap:0!important;
        min-height:100vh;
    }
    body .rega-main{
        border:0!important;
        border-radius:0!important;
        padding:0!important;
        margin:0!important;
        width:100vw!important;
        max-width:100vw!important;
        background:#fff;
    }
    body .entry,
    body article,
    body .wrap,
    body .inner{
        max-width:none;
    }
    #rega-calendar{
        display:none!important;
    }
    .rega-sidebar{
        display:none!important;
    }
    #rega-mobile-calendar{
        display:block!important;
        width:100vw;
        max-width:100vw;
        overflow-x:hidden;
        background:#fff;
    }
    .rega-mobile-toolbar{
        position:sticky;
        top:0;
        z-index:20;
        display:grid;
        grid-template-columns:1fr auto auto auto;
        align-items:center;
        gap:8px;
        min-height:76px;
        padding:10px 10px 8px;
        background:#f7f7f7;
        border-bottom:1px solid #e5e7eb;
    }
    .rega-mobile-title{
        min-width:0;
        line-height:1.05;
        font-size:24px;
        font-weight:500;
    }
    #rega-mobile-month{
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }
    #rega-mobile-week{
        font-size:18px;
        margin-top:4px;
    }
    .rega-mobile-icon,
    .rega-mobile-textbtn{
        appearance:none;
        border:0;
        background:transparent;
        font-size:27px;
        line-height:1;
        padding:8px;
        color:#222;
    }
    .rega-mobile-textbtn{
        font-size:14px;
        font-weight:700;
        color:#d00;
        border-radius:999px;
        background:#fff;
        border:1px solid #e5e7eb;
        padding:8px 10px;
    }
    .rega-mobile-nav{
        display:flex;
        justify-content:space-between;
        padding:0 8px;
        background:#fff;
        border-bottom:1px solid #ececec;
    }
    .rega-mobile-nav button{
        border:0;
        background:#fff;
        font-size:28px;
        padding:6px 18px;
    }
    .rega-mobile-grid{
        display:grid;
        grid-template-columns:1fr 1fr;
        width:100%;
        border-top:0;
    }
    .rega-mobile-grid-daymode{
        grid-template-columns:1fr;
    }
    .rega-mobile-day{
        min-height:190px;
        border-right:1px solid #efefef;
        border-bottom:1px solid #efefef;
        padding:4px 3px 10px;
        overflow:hidden;
    }
    .rega-mobile-grid-daymode .rega-mobile-day{
        min-height:calc(100vh - 130px);
    }
    .rega-mobile-day h3{
        margin:4px 4px 8px;
        font-size:24px;
        line-height:1.1;
        font-weight:500;
        color:#222;
    }
    .rega-mobile-day.is-today h3{
        color:#e00000;
    }
    .rega-mobile-events{
        display:flex;
        flex-direction:column;
        gap:3px;
    }
    .rega-mobile-event{
        border-radius:4px;
        color:#fff;
        font-weight:700;
        font-size:15px;
        line-height:1.15;
        padding:6px 7px;
        min-height:30px;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .rega-mobile-grid-daymode .rega-mobile-event{
        white-space:normal;
        font-size:17px;
        padding:8px 9px;
    }
    .rega-mobile-loading{
        grid-column:1 / -1;
        padding:20px;
        color:#555;
    }
}


/* v1.0.5: Kalender-eigenes Hamburger-Icon entfernt */
.rega-mobile-menu{display:none!important;}
@media (max-width:760px){
    .rega-mobile-toolbar{grid-template-columns:1fr auto auto auto!important;}
}


/* v1.0.7 - Nextcloud-nähere Termin-Darstellung */
.fc .fc-timegrid-slot{
    height:28px;
}

.fc .fc-timegrid-slot-label{
    font-size:13px;
    color:#1f2933;
}

.fc .fc-col-header-cell-cushion{
    font-size:14px;
    font-weight:500;
    color:#333;
    padding:7px 4px;
}

.fc-timegrid-event,
.fc-daygrid-event{
    border-radius:5px!important;
    box-shadow:none!important;
}

.fc-timegrid-event{
    margin:0 1px!important;
}

.fc-timegrid-event .fc-event-main,
.fc-daygrid-event .fc-event-main{
    padding:3px 4px!important;
}

.fc-timegrid-event .fc-event-main-frame{
    min-height:100%;
    align-items:flex-start!important;
}

.fc-event-title,
.fc-event-time{
    font-weight:500!important;
}

.rega-event-preview{
    line-height:1.12;
    font-size:12px;
    padding:0;
    margin:0;
    overflow:hidden;
}

.rega-event-preview-time{
    display:block;
    font-size:11px;
    font-weight:500;
    opacity:1;
    margin:0 0 2px 0;
    white-space:nowrap;
}

.rega-event-preview-title{
    font-size:12px;
    font-weight:600;
    margin:0;
    padding:0;
    line-height:1.13;
}

.rega-event-preview-persons{
    font-size:11px;
    font-weight:500;
    opacity:.95;
    margin:1px 0 0 0;
    line-height:1.12;
}

.fc-daygrid-event .rega-event-preview{
    display:block;
    white-space:normal;
}

.fc-daygrid-event .rega-event-preview-time{
    font-size:10px;
}

.fc-timegrid-now-indicator-line{
    border-color:#e60000!important;
    border-width:2px 0 0!important;
}

.fc-timegrid-now-indicator-arrow{
    border-color:#e60000!important;
}

/* v1.0.7 - Nextcloud-nähere Terminblöcke und Ansichtspopup */
.fc-timegrid-event .fc-event-main,
.fc-daygrid-event .fc-event-main{
    padding:4px 5px!important;
}

.fc-event-title,
.fc-event-time,
.rega-event-preview-title,
.rega-event-preview-persons,
.rega-event-preview-time{
    font-weight:400!important;
}

.rega-event-preview{
    font-size:13px;
    line-height:1.16;
}

.rega-event-preview-time{
    font-size:12px;
    line-height:1.12;
    margin:0 0 2px 0;
}

.rega-event-preview-title{
    font-size:13px;
    line-height:1.16;
}

.rega-event-preview-persons{
    font-size:12px;
    line-height:1.12;
}

/* Ganztägige Termine in Wochen-/Tagesansicht kompakt wie Nextcloud */
.fc-timegrid .fc-daygrid-event,
.fc-timegrid .fc-daygrid-block-event,
.fc-timegrid .fc-daygrid-dot-event{
    min-height:24px!important;
    max-height:28px!important;
    overflow:hidden!important;
}

.fc-timegrid .fc-daygrid-event .rega-event-preview,
.fc-timegrid .fc-daygrid-event .rega-event-preview-title{
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    display:block!important;
    line-height:18px!important;
}

.fc-timegrid .fc-daygrid-event .fc-event-main{
    padding:3px 5px!important;
}

.fc .fc-col-header-cell-cushion:hover{
    text-decoration:underline;
}

.rega-modal{
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

#rega-event-form,
.rega-event-view{
    overflow:auto;
    flex:1 1 auto;
    padding:20px 22px 12px;
}

.rega-event-view h2{
    margin:0 0 10px;
    font-size:22px;
    line-height:1.25;
}

.rega-view-time{
    font-size:15px;
    font-weight:600;
    margin-bottom:14px;
    color:#1f2937;
}

.rega-view-line{
    margin:7px 0;
    font-size:14px;
    color:#374151;
}

.rega-view-description,
.rega-view-customer{
    white-space:pre-wrap;
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #e5e7eb;
    font-size:14px;
    line-height:1.45;
}

.rega-modal-actions{
    position:sticky;
    bottom:0;
    background:#fff;
    z-index:5;
    padding:12px 22px;
    border-top:1px solid #e5e7eb;
    margin-top:0!important;
}


/* v1.0.8 - Nextcloud-naehere App-Hoehe, Scrollbereich und feinere Termintrennung */
.rega-intranet-app{
    align-items:flex-start;
}

.rega-sidebar{
    position:sticky;
    top:12px;
    max-height:calc(100vh - 24px);
    overflow:visible;
}

.rega-main{
    height:calc(100vh - 18px);
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

#rega-calendar{
    min-height:0!important;
    height:100%;
}

.fc{
    height:100%;
}

.fc .fc-toolbar.fc-header-toolbar{
    margin-bottom:10px;
    flex:0 0 auto;
}

.fc .fc-view-harness{
    min-height:0;
}

.fc-scroller{
    scrollbar-width:thin;
}

.fc-timegrid-event,
.fc-daygrid-event,
.fc-timegrid .fc-daygrid-event,
.fc-timegrid .fc-daygrid-block-event{
    border:1px solid rgba(255,255,255,.92)!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)!important;
}

.fc-v-event:not(.fc-event-mirror){
    border:1px solid rgba(255,255,255,.92)!important;
}

.fc .fc-timegrid-slot{
    height:34px;
}

.fc .fc-timegrid-slot-minor{
    border-top-style:dotted;
    border-top-color:#e9edf2;
}

.fc .fc-timegrid-slot-label{
    font-size:13px;
    vertical-align:top;
}

.fc-timegrid-event .fc-event-main,
.fc-daygrid-event .fc-event-main{
    padding:3px 5px!important;
}

.rega-event-preview{
    font-size:13.5px;
    line-height:1.18;
}

.rega-event-preview-title{
    font-size:13.5px;
    line-height:1.18;
}

.rega-event-preview-time{
    font-size:12px;
    line-height:1.12;
}

@media (max-width:760px){
    .rega-main{
        height:auto;
        overflow:visible;
        padding:0;
        border:0;
    }
    .rega-sidebar{
        position:static;
        max-height:none;
    }
}


/* v1.0.9 - erzwingt App-Layout / internen Scrollbereich fuer Desktop */
@media (min-width:761px){
    .rega-intranet-app{
        height:calc(100dvh - 18px)!important;
        max-height:calc(100dvh - 18px)!important;
        overflow:hidden!important;
    }
    .rega-sidebar{
        flex:0 0 280px;
        max-height:calc(100dvh - 22px)!important;
        overflow:visible!important;
    }
    .rega-main{
        height:calc(100dvh - 18px)!important;
        max-height:calc(100dvh - 18px)!important;
        min-height:0!important;
        overflow:hidden!important;
        display:flex!important;
        flex-direction:column!important;
    }
    #rega-calendar{
        height:100%!important;
        min-height:0!important;
        overflow:hidden!important;
    }
    #rega-calendar .fc{
        height:100%!important;
        max-height:100%!important;
    }
    #rega-calendar .fc-header-toolbar{
        position:sticky!important;
        top:0!important;
        z-index:50!important;
        background:#fff!important;
        padding-bottom:8px!important;
        margin-bottom:8px!important;
    }
    #rega-calendar .fc-view-harness{
        min-height:0!important;
    }
    #rega-calendar .fc-scroller,
    #rega-calendar .fc-scroller-liquid,
    #rega-calendar .fc-scroller-liquid-absolute{
        scrollbar-width:thin;
    }
    #rega-calendar .fc-timegrid-slot{
        height:38px!important;
    }
    #rega-calendar .fc-timegrid-slot-minor{
        border-top:1px dotted #e1e6ee!important;
    }
    #rega-calendar .fc-timegrid-slot-label{
        font-size:12.5px!important;
    }
}

/* v1.1.0: stabiler Desktop-Scrollbereich */
@media (min-width: 701px){
    .rega-intranet-app{
        align-items:flex-start;
        min-height:0!important;
    }
    .rega-sidebar{
        align-self:flex-start;
        max-height:none;
        overflow:visible;
    }
    .rega-main{
        overflow:hidden!important;
        min-height:0!important;
    }
    #rega-calendar{
        height:100%;
        min-height:0!important;
        overflow:hidden!important;
    }
    #rega-calendar .fc{
        height:100%!important;
        max-height:100%!important;
    }
    #rega-calendar .fc-header-toolbar{
        position:sticky;
        top:0;
        z-index:6;
        background:#fff;
        padding-bottom:8px;
        margin-bottom:8px;
    }
    #rega-calendar .fc-view-harness,
    #rega-calendar .fc-view-harness-active{
        min-height:0!important;
    }
    #rega-calendar .fc-scroller,
    #rega-calendar .fc-scroller-liquid,
    #rega-calendar .fc-scroller-liquid-absolute{
        overflow-y:auto!important;
    }
    #rega-calendar .fc-timegrid-slot{
        height:2.4em;
    }
    #rega-calendar .fc-timegrid-slot-minor{
        border-top-style:dashed;
        border-top-color:#eef1f4;
    }
}


/* v1.1.1: Admin-Hoehe greift wirklich; alte 100vh-Regeln werden ueberschrieben */
:root{
    --rega-calendar-height: 760px;
}

@media (min-width:761px){
    .rega-intranet-app{
        height:auto!important;
        max-height:none!important;
        overflow:visible!important;
    }
    .rega-main{
        height:var(--rega-calendar-height)!important;
        max-height:var(--rega-calendar-height)!important;
        min-height:0!important;
        overflow:hidden!important;
        display:flex!important;
        flex-direction:column!important;
    }
    #rega-calendar{
        height:var(--rega-calendar-height)!important;
        max-height:var(--rega-calendar-height)!important;
        min-height:0!important;
        overflow:hidden!important;
    }
    #rega-calendar .fc{
        height:100%!important;
        max-height:100%!important;
        min-height:0!important;
    }
    #rega-calendar .fc-view-harness,
    #rega-calendar .fc-view-harness-active{
        min-height:0!important;
        flex:1 1 auto!important;
    }
    #rega-calendar .fc-scroller,
    #rega-calendar .fc-scroller-liquid,
    #rega-calendar .fc-scroller-liquid-absolute{
        overflow-y:auto!important;
        scrollbar-width:thin;
    }
    #rega-calendar .fc-toolbar.fc-header-toolbar{
        position:sticky!important;
        top:0!important;
        z-index:60!important;
        background:#fff!important;
    }
    #rega-calendar .fc-timegrid-slot{
        height:38px!important;
    }
}

@media (max-width:760px){
    .rega-intranet-app,
    .rega-main,
    #rega-calendar{
        height:auto!important;
        max-height:none!important;
        overflow:visible!important;
    }
}


/* v1.1.2 - Admin-Hoehe + interner FullCalendar-Scroll */
@media (min-width: 761px){
    .rega-main{
        height:var(--rega-calendar-height, 760px)!important;
        max-height:var(--rega-calendar-height, 760px)!important;
        min-height:0!important;
        overflow:hidden!important;
    }
    #rega-calendar{
        height:var(--rega-calendar-height, 760px)!important;
        max-height:var(--rega-calendar-height, 760px)!important;
        min-height:0!important;
        overflow:hidden!important;
    }
    #rega-calendar .fc{
        height:var(--rega-calendar-height, 760px)!important;
        max-height:var(--rega-calendar-height, 760px)!important;
        display:flex!important;
        flex-direction:column!important;
        min-height:0!important;
    }
    #rega-calendar .fc-header-toolbar{
        flex:0 0 auto!important;
    }
    #rega-calendar .fc-view-harness{
        flex:1 1 auto!important;
        height:var(--rega-calendar-content-height, 682px)!important;
        min-height:0!important;
        overflow:hidden!important;
    }
    #rega-calendar .fc-view-harness-active{
        height:var(--rega-calendar-content-height, 682px)!important;
    }
    #rega-calendar .fc-scroller,
    #rega-calendar .fc-scroller-liquid,
    #rega-calendar .fc-scroller-liquid-absolute{
        overflow-y:auto!important;
        overflow-x:hidden!important;
    }
    #rega-calendar .fc-scroller-liquid-absolute{
        top:0!important;
        right:0!important;
        bottom:0!important;
        left:0!important;
        max-height:none!important;
    }
}


/* v1.1.3 - Admin-steuerbare Schriftgrössen und Terminabstände */
.rega-calendar-item{
    font-size:var(--rega-sidebar-font-size, 14px)!important;
}
.fc-timegrid-event .fc-event-main,
.fc-daygrid-event .fc-event-main{
    padding:var(--rega-event-padding-y, 3px) var(--rega-event-padding-x, 5px)!important;
}
.rega-event-preview{
    line-height:var(--rega-event-line-height, 1.16)!important;
}
.rega-event-preview-time{
    font-size:var(--rega-event-time-font-size, 12px)!important;
    line-height:var(--rega-event-line-height, 1.16)!important;
}
.rega-event-preview-title{
    font-size:var(--rega-event-title-font-size, 13.5px)!important;
    line-height:var(--rega-event-line-height, 1.16)!important;
}
.rega-event-preview-persons{
    font-size:var(--rega-event-persons-font-size, 12px)!important;
    line-height:var(--rega-event-line-height, 1.16)!important;
}


/* Kalenderseiten: Seitentitel im Frontend optional ausblenden */
body.rega-calendar-hide-page-title .entry-title,
body.rega-calendar-hide-page-title .page-title,
body.rega-calendar-hide-page-title .wp-block-post-title,
body.rega-calendar-hide-page-title main > h1:first-child,
body.rega-calendar-hide-page-title article > h1:first-child,
body.rega-calendar-hide-page-title .site-main > h1:first-child {
    display: none !important;
}

/* v1.1.8 - Monatsansicht wie Nextcloud: einzeilige Termine */
.fc-dayGridMonth-view .fc-daygrid-event,
.fc-dayGridMonth-view .fc-daygrid-block-event,
.fc-dayGridMonth-view .fc-daygrid-dot-event{
    min-height:20px!important;
    max-height:22px!important;
    height:22px!important;
    margin:1px 2px!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:3px!important;
    box-shadow:none!important;
}

.fc-dayGridMonth-view .fc-daygrid-event .fc-event-main,
.fc-dayGridMonth-view .fc-daygrid-block-event .fc-event-main,
.fc-dayGridMonth-view .fc-daygrid-dot-event .fc-event-main{
    padding:0 4px!important;
    height:100%!important;
    overflow:hidden!important;
}

.fc-dayGridMonth-view .rega-event-preview-month{
    height:20px!important;
    line-height:20px!important;
    display:flex!important;
    align-items:center!important;
    gap:4px!important;
    min-width:0!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    font-size:12px!important;
    font-weight:500!important;
}

.fc-dayGridMonth-view .rega-event-preview-month-timed{
    color:#111!important;
    background:#fff!important;
}

.fc-dayGridMonth-view .rega-month-timed-event,
.fc-dayGridMonth-view .rega-month-timed-event .fc-event-main{
    background:#fff!important;
    color:#111!important;
    border-color:transparent!important;
}

.fc-dayGridMonth-view .rega-month-dot{
    width:8px!important;
    height:8px!important;
    min-width:8px!important;
    border-radius:50%!important;
    display:inline-block!important;
}

.fc-dayGridMonth-view .rega-month-time{
    flex:0 0 auto!important;
    font-size:11.5px!important;
    font-weight:500!important;
    color:#111!important;
}

.fc-dayGridMonth-view .rega-month-persons{
    flex:0 1 auto!important;
    min-width:0!important;
    max-width:45%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    display:inline-block!important;
    font-size:12px!important;
    font-weight:600!important;
}

.fc-dayGridMonth-view .rega-month-title{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    display:block!important;
    font-size:12px!important;
    font-weight:600!important;
}

.fc-dayGridMonth-view .rega-event-preview-month-allday .rega-month-title{
    color:inherit!important;
}

.fc-dayGridMonth-view .fc-daygrid-day-events{
    margin-top:1px!important;
}

.fc-dayGridMonth-view .fc-daygrid-day-frame{
    overflow:hidden!important;
}


/* v1.2.0 - Monatsansicht: aktueller Tag besser scrollbar/fokussierbar */
.fc-dayGridMonth-view .fc-scroller,
.fc-dayGridMonth-view .fc-scroller-liquid-absolute{
    overflow-y:auto!important;
    overscroll-behavior:contain;
}
.fc-dayGridMonth-view .fc-day-today{
    scroll-margin-top:80px;
}
.fc-dayGridMonth-view .rega-month-persons::after{
    content:"";
}

/* v1.3.1 Ferienkalender + Jahresvorschau */
.rega-calendar-row{
    display:flex;
    align-items:center;
    gap:6px;
}
.rega-calendar-row .rega-calendar-item{
    flex:1;
    min-width:0;
}
.rega-vacation-new-btn{
    appearance:none;
    border:1px solid #cfd6dd;
    background:#fff;
    color:#1f2937;
    border-radius:8px;
    padding:4px 8px;
    font-size:12px;
    line-height:1.2;
    cursor:pointer;
}
.rega-vacation-new-btn:hover{
    background:#eef2f7;
}
.rega-vacation-modal .rega-form-grid{
    grid-template-columns:1fr 1fr;
}
.fc-multiMonthYear-view .fc-multimonth-title{
    font-size:16px!important;
    font-weight:700!important;
}
.fc-multiMonthYear-view .fc-daygrid-day-frame{
    min-height:58px!important;
    overflow:hidden!important;
}
.fc-multiMonthYear-view .fc-daygrid-day-events{
    margin-top:1px!important;
}
.fc-multiMonthYear-view .fc-daygrid-event,
.fc-multiMonthYear-view .fc-daygrid-block-event,
.fc-multiMonthYear-view .fc-daygrid-dot-event{
    min-height:18px!important;
    max-height:20px!important;
    height:20px!important;
    margin:1px 1px!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:3px!important;
}
.fc-multiMonthYear-view .rega-event-preview-month{
    height:18px!important;
    line-height:18px!important;
    font-size:11px!important;
}
.fc-multiMonthYear-view .rega-month-time,
.fc-multiMonthYear-view .rega-month-persons,
.fc-multiMonthYear-view .rega-month-title{
    font-size:10.5px!important;
}


/* v1.3.1 - Jahresvorschau / Ferienkalender Verfeinerung */
.rega-calendar-row:first-child{
    margin-bottom:6px;
    padding-bottom:8px;
    border-bottom:1px solid rgba(0,0,0,.08);
}
.rega-vacation-new-btn{
    white-space:nowrap;
    font-weight:600;
}
.rega-vacation-modal{
    width:min(520px, 96vw);
}
.rega-vacation-modal #rega-vacation-form{
    padding:20px 22px 10px;
}
.rega-vacation-modal label{
    display:block;
    margin:0 0 6px;
    font-weight:700;
    font-size:13px;
    color:#374151;
}
.rega-vacation-modal input[type="text"],
.rega-vacation-modal input[type="date"]{
    width:100%;
    box-sizing:border-box;
    border:1px solid #d5d9de;
    border-radius:10px;
    padding:11px 12px;
    font-size:15px;
    background:#fff;
}
.rega-vacation-modal .rega-form-grid{
    gap:14px;
    margin-top:14px;
}
.fc-multiMonthYear-view .fc-daygrid-more-link{
    display:block!important;
    width:max-content;
    max-width:calc(100% - 2px);
    padding:0 4px!important;
    margin:1px 1px!important;
    border:1px solid #c9cfd6;
    border-radius:4px;
    background:#fff;
    color:#111!important;
    font-size:10px!important;
    line-height:15px!important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.fc-multiMonthYear-view .fc-daygrid-block-event{
    border:1px solid rgba(255,255,255,.75)!important;
}
.fc-multiMonthYear-view .fc-daygrid-block-event .fc-event-main{
    overflow:hidden!important;
}
.fc-multiMonthYear-view .fc-event-title,
.fc-multiMonthYear-view .rega-event-preview-month,
.fc-multiMonthYear-view .rega-event-preview-month *{
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}
.fc-multiMonthYear-view .fc-daygrid-event-harness{
    overflow:hidden!important;
}

/* v1.3.3 - sicherer kleiner Fix: Ferien-Button zweizeilig */
.rega-vacation-new-btn{
    white-space:normal!important;
    min-width:54px;
    text-align:center;
    line-height:1.05!important;
    padding:5px 6px!important;
}

/* v1.3.4 - Jahres-/Monatsansicht: ganztägige Balken sichtbar, Tageszählung separat */
.fc-multiMonthYear-view .fc-daygrid-day-frame{
    overflow:visible!important;
    min-height:62px!important;
    height:auto!important;
}
.fc-multiMonthYear-view .fc-daygrid-day-events{
    min-height:0!important;
    overflow:visible!important;
}
.fc-multiMonthYear-view .fc-daygrid-event-harness{
    overflow:visible!important;
}
.fc-multiMonthYear-view .rega-year-hide-timed{
    display:none!important;
}
.fc-multiMonthYear-view .fc-daygrid-block-event,
.fc-multiMonthYear-view .fc-daygrid-event{
    white-space:nowrap!important;
}
.fc-multiMonthYear-view .rega-event-preview-month-allday{
    width:100%!important;
}
.fc-multiMonthYear-view .rega-year-count{
    display:block!important;
    width:max-content;
    max-width:calc(100% - 2px);
    padding:0 4px!important;
    margin:1px 1px!important;
    border:1px solid #c9cfd6;
    border-radius:4px;
    background:#fff;
    color:#111!important;
    font-size:10px!important;
    line-height:15px!important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.fc-multiMonthYear-view .fc-daygrid-more-link{
    display:none!important;
}


/* v1.3.6 - Monatsansicht: alle Termine sichtbar, Tageszellen wachsen */
.fc-dayGridMonth-view .fc-daygrid-day-frame{
    min-height: 118px !important;
    height: auto !important;
    overflow: visible !important;
}
.fc-dayGridMonth-view .fc-daygrid-day-events{
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
.fc-dayGridMonth-view .fc-daygrid-day-bottom{
    display: none !important;
}
.fc-dayGridMonth-view .fc-daygrid-event-harness{
    visibility: visible !important;
    margin-top: 1px !important;
}
.fc-dayGridMonth-view .fc-daygrid-body,
.fc-dayGridMonth-view .fc-daygrid-body table,
.fc-dayGridMonth-view .fc-scrollgrid-sync-table{
    height: auto !important;
}
.fc-dayGridMonth-view .fc-daygrid-day{
    height: auto !important;
}
.fc-dayGridMonth-view .fc-daygrid-block-event{
    border-color: rgba(255,255,255,.9) !important;
}


/* v1.3.7 - Monatsansicht: feste Tageszellen-Reihenfolge
   Datum -> ganztägige/Ferien -> Zeit-Termine, ohne More-Link-Limit */
.fc-dayGridMonth-view .fc-daygrid-day-events{
    display:block!important;
    padding:0 2px 3px!important;
}
.fc-dayGridMonth-view .fc-daygrid-day-top{
    position:relative!important;
    z-index:2!important;
}
/* v1.4.6: Do not override FullCalendar absolute harness positioning here.
   Native left/right/top values are required for multi-day bars to span across days. */
.fc-dayGridMonth-view .fc-daygrid-event-harness{
    visibility:visible!important;
}
.fc-dayGridMonth-view .fc-daygrid-day-bg,
.fc-dayGridMonth-view .fc-daygrid-bg-harness{
    display:none!important;
}
.fc-dayGridMonth-view .fc-daygrid-day-bottom,
.fc-dayGridMonth-view .fc-daygrid-more-link{
    display:none!important;
}
.fc-dayGridMonth-view .fc-daygrid-block-event{
    display:block!important;
    width:calc(100% - 4px)!important;
    margin:1px 2px!important;
    border:1px solid rgba(255,255,255,.9)!important;
}
.fc-dayGridMonth-view .fc-daygrid-dot-event,
.fc-dayGridMonth-view .rega-month-timed-event{
    display:block!important;
    width:calc(100% - 4px)!important;
    margin:1px 2px!important;
}
.fc-dayGridMonth-view .fc-daygrid-event-harness:has(.fc-daygrid-block-event){
    order:1;
}
.fc-dayGridMonth-view .fc-daygrid-event-harness:has(.rega-month-timed-event),
.fc-dayGridMonth-view .fc-daygrid-event-harness:has(.fc-daygrid-dot-event){
    order:2;
}
.fc-dayGridMonth-view .fc-daygrid-day-events{
    display:flex!important;
    flex-direction:column!important;
}
.fc-dayGridMonth-view .fc-daygrid-event-harness{
    flex:0 0 auto!important;
}


/* v1.4.0 - Monatsansicht: mehrtägige Ganztag-/Ferienbalken dürfen über mehrere Tage laufen */
.fc-dayGridMonth-view .fc-daygrid-day-frame{
    overflow: visible !important;
}

.fc-dayGridMonth-view .fc-daygrid-block-event{
    width: auto !important;
    max-width: none !important;
}

.fc-dayGridMonth-view .fc-daygrid-event-harness{
    overflow: visible !important;
}

.fc-dayGridMonth-view .fc-daygrid-event-harness-abs{
    overflow: visible !important;
}

.fc-dayGridMonth-view .fc-daygrid-body,
.fc-dayGridMonth-view .fc-daygrid-body table,
.fc-dayGridMonth-view .fc-scrollgrid-sync-table{
    overflow: visible !important;
}

.fc-dayGridMonth-view .fc-daygrid-day-events{
    overflow: visible !important;
}

.fc-dayGridMonth-view .fc-daygrid-event.fc-event-start,
.fc-dayGridMonth-view .fc-daygrid-event.fc-event-end{
    border-radius: 4px !important;
}

.fc-dayGridMonth-view .fc-daygrid-event:not(.fc-event-start){
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.fc-dayGridMonth-view .fc-daygrid-event:not(.fc-event-end){
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}


/* v1.4.5 - Monatsansicht: FullCalendar-DayGrid-Spanning wieder aktivieren
   Wichtig: keine Flex-Sortierung in .fc-daygrid-day-events, sonst koennen mehrtaegige Balken nicht sauber ueber mehrere Tage laufen. */
.fc-dayGridMonth-view .fc-daygrid-day-events{
    display:block!important;
    flex-direction:initial!important;
    overflow:visible!important;
}
.fc-dayGridMonth-view .fc-daygrid-event-harness,
.fc-dayGridMonth-view .fc-daygrid-event-harness:has(.fc-daygrid-block-event),
.fc-dayGridMonth-view .fc-daygrid-event-harness:has(.rega-month-timed-event),
.fc-dayGridMonth-view .fc-daygrid-event-harness:has(.fc-daygrid-dot-event){
    flex:initial!important;
    order:initial!important;
    overflow:visible!important;
}
.fc-dayGridMonth-view .fc-daygrid-block-event{
    display:block!important;
    width:auto!important;
    max-width:none!important;
    margin:1px 2px!important;
    border:1px solid rgba(255,255,255,.9)!important;
}
.fc-dayGridMonth-view .fc-daygrid-dot-event,
.fc-dayGridMonth-view .rega-month-timed-event{
    display:flex!important;
    width:calc(100% - 4px)!important;
    margin:1px 2px!important;
}
.fc-dayGridMonth-view .fc-daygrid-event.fc-event-start{
    border-top-left-radius:4px!important;
    border-bottom-left-radius:4px!important;
}
.fc-dayGridMonth-view .fc-daygrid-event.fc-event-end{
    border-top-right-radius:4px!important;
    border-bottom-right-radius:4px!important;
}
.fc-dayGridMonth-view .fc-daygrid-event:not(.fc-event-start){
    border-top-left-radius:0!important;
    border-bottom-left-radius:0!important;
}
.fc-dayGridMonth-view .fc-daygrid-event:not(.fc-event-end){
    border-top-right-radius:0!important;
    border-bottom-right-radius:0!important;
}


/* v1.4.6 - Monatsansicht: native mehrtaegige FullCalendar-Balken reparieren */
.fc-dayGridMonth-view .fc-daygrid-event-harness-abs{
    position:absolute!important;
    visibility:visible!important;
    overflow:visible!important;
    width:auto!important;
    /* left/right/top bleiben bewusst von FullCalendar-Inline-Styles gesteuert */
}
.fc-dayGridMonth-view .fc-daygrid-day-events{
    display:block!important;
    overflow:visible!important;
}
.fc-dayGridMonth-view .fc-daygrid-day-frame,
.fc-dayGridMonth-view .fc-daygrid-day-events,
.fc-dayGridMonth-view .fc-daygrid-body,
.fc-dayGridMonth-view .fc-scrollgrid-sync-table{
    overflow:visible!important;
}
.fc-dayGridMonth-view .fc-daygrid-block-event{
    width:auto!important;
    max-width:none!important;
    white-space:nowrap!important;
}
.fc-dayGridMonth-view .fc-daygrid-event-harness{
    overflow:visible!important;
}


/* v1.4.8 - Monatsansicht: keine Ueberlagerung von Ganztags-/Mehrtagesbalken
   Basis bleibt v1.4.6. Diese Regeln oeffnen die DayGrid-Zellen und lassen
   FullCalendar die mehrtaegigen Balken nativ ueber mehrere Tage zeichnen. */
.fc-dayGridMonth-view,
.fc-dayGridMonth-view .fc-scrollgrid,
.fc-dayGridMonth-view .fc-scrollgrid-section,
.fc-dayGridMonth-view .fc-scrollgrid-section > td,
.fc-dayGridMonth-view .fc-scroller,
.fc-dayGridMonth-view .fc-scroller-liquid-absolute,
.fc-dayGridMonth-view .fc-daygrid,
.fc-dayGridMonth-view .fc-daygrid-body,
.fc-dayGridMonth-view .fc-daygrid-body table,
.fc-dayGridMonth-view .fc-scrollgrid-sync-table,
.fc-dayGridMonth-view .fc-daygrid-day,
.fc-dayGridMonth-view .fc-daygrid-day-frame,
.fc-dayGridMonth-view .fc-daygrid-day-events,
.fc-dayGridMonth-view .fc-daygrid-event-harness,
.fc-dayGridMonth-view .fc-daygrid-event-harness-abs{
    overflow:visible!important;
}
.fc-dayGridMonth-view .fc-daygrid-day-frame{
    min-height:118px!important;
    height:auto!important;
}
.fc-dayGridMonth-view .fc-daygrid-day-events{
    display:block!important;
    position:relative!important;
    height:auto!important;
    max-height:none!important;
    min-height:var(--rega-month-events-min-height, 24px)!important;
    padding:0 2px 4px!important;
}
.fc-dayGridMonth-view .fc-daygrid-event-harness-abs{
    position:absolute!important;
    height:auto!important;
    min-height:22px!important;
    z-index:3!important;
}
.fc-dayGridMonth-view .fc-daygrid-event-harness:not(.fc-daygrid-event-harness-abs){
    position:relative!important;
    z-index:4!important;
    margin-top:1px!important;
}
.fc-dayGridMonth-view .fc-daygrid-block-event{
    min-height:22px!important;
    height:22px!important;
    max-height:22px!important;
    width:auto!important;
    max-width:none!important;
    margin:1px 2px!important;
    border:1px solid rgba(255,255,255,.9)!important;
    box-sizing:border-box!important;
}
.fc-dayGridMonth-view .fc-daygrid-event:not(.fc-event-start){
    margin-left:0!important;
}
.fc-dayGridMonth-view .fc-daygrid-event:not(.fc-event-end){
    margin-right:0!important;
}
.fc-dayGridMonth-view .fc-daygrid-dot-event,
.fc-dayGridMonth-view .rega-month-timed-event{
    position:relative!important;
    z-index:6!important;
    margin:1px 2px!important;
    width:calc(100% - 4px)!important;
}
.fc-dayGridMonth-view .fc-daygrid-day-bottom,
.fc-dayGridMonth-view .fc-daygrid-more-link{
    display:none!important;
}

/* v1.5.5 - Monatsansicht: eigener All-Day-Bereich pro Tageszelle
   Nur dayGridMonth: native FullCalendar-AllDay-Elemente werden ausgeblendet
   und oben in der Tageszelle sauber neu dargestellt. Zeit-Termine bleiben darunter. */
.fc-dayGridMonth-view .fc-daygrid-event-harness.rega-month-native-allday-hidden{
    display:none!important;
}
.fc-dayGridMonth-view .rega-month-allday-area{
    display:flex!important;
    flex-direction:column!important;
    gap:2px!important;
    padding:1px 3px 3px!important;
    min-height:0!important;
    box-sizing:border-box!important;
    position:relative!important;
    z-index:5!important;
}
.fc-dayGridMonth-view .rega-month-allday-area.is-empty{
    padding-top:0!important;
    padding-bottom:1px!important;
}
.fc-dayGridMonth-view .rega-month-allday-item{
    border:1px solid rgba(255,255,255,.9)!important;
    border-radius:5px!important;
    height:22px!important;
    min-height:22px!important;
    max-height:22px!important;
    line-height:20px!important;
    padding:0 5px!important;
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    gap:4px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    font-size:12px!important;
    font-weight:600!important;
    cursor:pointer!important;
    width:100%!important;
    text-align:left!important;
}
.fc-dayGridMonth-view .rega-month-allday-item.is-multiday:not(.is-start):not(.is-row-start){
    border-top-left-radius:0!important;
    border-bottom-left-radius:0!important;
    border-left-color:transparent!important;
    margin-left:-4px!important;
    padding-left:9px!important;
}
.fc-dayGridMonth-view .rega-month-allday-item.is-multiday:not(.is-end):not(.is-row-end){
    border-top-right-radius:0!important;
    border-bottom-right-radius:0!important;
    border-right-color:transparent!important;
    margin-right:-4px!important;
    padding-right:9px!important;
}
.fc-dayGridMonth-view .rega-month-allday-item.is-multiday:not(.is-start):not(.is-row-start)::before,
.fc-dayGridMonth-view .rega-month-allday-item.is-multiday:not(.is-end):not(.is-row-end)::after{
    content:""!important;
    display:block!important;
    width:4px!important;
    flex:0 0 4px!important;
}
.fc-dayGridMonth-view .rega-month-allday-item .rega-month-title,
.fc-dayGridMonth-view .rega-month-allday-item .rega-month-persons{
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    min-width:0!important;
}
.fc-dayGridMonth-view .fc-daygrid-day-events{
    padding-top:0!important;
}


/* v1.5.7 - Monatsansicht: All-Day-Lanes stabil, native All-Day-Duplikate weg */
.fc-dayGridMonth-view .fc-daygrid-event-harness:has(.fc-daygrid-block-event){
    display:none!important;
}
.fc-dayGridMonth-view .rega-month-allday-area{
    gap:0!important;
    padding-left:0!important;
    padding-right:0!important;
}
.fc-dayGridMonth-view .rega-month-allday-item{
    margin-top:1px!important;
    margin-bottom:1px!important;
}
.fc-dayGridMonth-view .rega-month-allday-item.is-placeholder{
    visibility:hidden!important;
    pointer-events:none!important;
    border-color:transparent!important;
    background:transparent!important;
}
.fc-dayGridMonth-view .rega-month-allday-item.is-multiday{
    border-radius:0!important;
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
}
.fc-dayGridMonth-view .rega-month-allday-item.is-multiday.is-start:not(.is-row-start){
    margin-left:3px!important;
    width:calc(100% - 3px)!important;
    border-top-left-radius:5px!important;
    border-bottom-left-radius:5px!important;
}
.fc-dayGridMonth-view .rega-month-allday-item.is-multiday.is-end:not(.is-row-end){
    margin-right:3px!important;
    width:calc(100% - 3px)!important;
    border-top-right-radius:5px!important;
    border-bottom-right-radius:5px!important;
}
.fc-dayGridMonth-view .rega-month-allday-item.is-multiday.is-start.is-end{
    margin-left:3px!important;
    margin-right:3px!important;
    width:calc(100% - 6px)!important;
    border-radius:5px!important;
}
.fc-dayGridMonth-view .rega-month-allday-item:not(.is-multiday){
    margin-left:3px!important;
    margin-right:3px!important;
    width:calc(100% - 6px)!important;
    border-radius:5px!important;
}


/* v1.5.7 - Jahresansicht: gleiche Ganztags-Mechanik wie Monatsansicht, Zeit-Termine bleiben als Zaehler */
.fc-multiMonthYear-view .fc-daygrid-event-harness.rega-month-native-allday-hidden{
    display:none!important;
}
.fc-multiMonthYear-view .rega-month-allday-area{
    display:flex!important;
    flex-direction:column!important;
    gap:0!important;
    padding:1px 0 2px!important;
    min-height:0!important;
    box-sizing:border-box!important;
    position:relative!important;
    z-index:5!important;
}
.fc-multiMonthYear-view .rega-month-allday-area.is-empty{
    padding-top:0!important;
    padding-bottom:0!important;
}
.fc-multiMonthYear-view .rega-month-allday-item{
    border:1px solid rgba(255,255,255,.9)!important;
    border-radius:4px!important;
    height:16px!important;
    min-height:16px!important;
    max-height:16px!important;
    line-height:14px!important;
    padding:0 3px!important;
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    gap:2px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    font-size:9px!important;
    font-weight:600!important;
    cursor:pointer!important;
    width:100%!important;
    text-align:left!important;
    margin-top:1px!important;
    margin-bottom:1px!important;
}
.fc-multiMonthYear-view .rega-month-allday-item.is-placeholder{
    visibility:hidden!important;
    pointer-events:none!important;
    border-color:transparent!important;
    background:transparent!important;
}
.fc-multiMonthYear-view .rega-month-allday-item .rega-month-title,
.fc-multiMonthYear-view .rega-month-allday-item .rega-month-persons{
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    min-width:0!important;
}
.fc-multiMonthYear-view .rega-month-allday-item.is-multiday{
    border-radius:0!important;
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
}
.fc-multiMonthYear-view .rega-month-allday-item.is-multiday.is-start:not(.is-row-start){
    margin-left:2px!important;
    width:calc(100% - 2px)!important;
    border-top-left-radius:4px!important;
    border-bottom-left-radius:4px!important;
}
.fc-multiMonthYear-view .rega-month-allday-item.is-multiday.is-end:not(.is-row-end){
    margin-right:2px!important;
    width:calc(100% - 2px)!important;
    border-top-right-radius:4px!important;
    border-bottom-right-radius:4px!important;
}
.fc-multiMonthYear-view .rega-month-allday-item.is-multiday.is-start.is-end{
    margin-left:2px!important;
    margin-right:2px!important;
    width:calc(100% - 4px)!important;
    border-radius:4px!important;
}
.fc-multiMonthYear-view .rega-month-allday-item:not(.is-multiday){
    margin-left:2px!important;
    margin-right:2px!important;
    width:calc(100% - 4px)!important;
    border-radius:4px!important;
}
.fc-multiMonthYear-view .fc-daygrid-day-events{
    padding-top:0!important;
}


/* v1.5.7a - Jahresansicht: Tageszellen wachsen mit Ganztagsbereich plus Zaehler */
.fc-multiMonthYear-view .fc-daygrid-day,
.fc-multiMonthYear-view .fc-daygrid-day-frame{
    min-height:var(--rega-year-cell-min-height, 62px)!important;
    height:auto!important;
    overflow:visible!important;
}
.fc-multiMonthYear-view .fc-daygrid-day-frame{
    display:flex!important;
    flex-direction:column!important;
}
.fc-multiMonthYear-view .fc-daygrid-day-events{
    flex:0 0 auto!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    position:relative!important;
    padding-bottom:2px!important;
}
.fc-multiMonthYear-view .rega-year-count{
    appearance:none!important;
    -webkit-appearance:none!important;
    cursor:pointer!important;
    text-align:left!important;
    box-sizing:border-box!important;
}
.fc-multiMonthYear-view .rega-year-count:hover{
    border-color:#64748b!important;
    box-shadow:0 1px 2px rgba(15,23,42,.15)!important;
}


/* v1.5.7b - Jahresansicht: Zeittermine in der Zelle sicher ausblenden, nur Zaehler + Popup */
.fc-multiMonthYear-view .fc-daygrid-event-harness.rega-year-hide-timed,
.fc-multiMonthYear-view .fc-daygrid-event-harness:has(.rega-month-timed-event),
.fc-multiMonthYear-view .fc-daygrid-event:has(.rega-event-preview-month-timed){
    display:none!important;
}
.rega-year-popover{
    position:fixed;
    z-index:999999;
    width:min(330px, calc(100vw - 24px));
    max-height:min(420px, calc(100vh - 24px));
    overflow:auto;
    background:#fff;
    border:1px solid #cbd5e1;
    border-radius:10px;
    box-shadow:0 12px 36px rgba(15,23,42,.22);
    color:#111827;
    font-family:inherit;
}
.rega-year-popover-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    border-bottom:1px solid #e5e7eb;
    background:#f8fafc;
    font-size:13px;
}
.rega-year-popover-close{
    border:0;
    background:transparent;
    cursor:pointer;
    font-size:22px;
    line-height:1;
    color:#334155;
    padding:0 2px;
}
.rega-year-popover-list{
    padding:6px;
}
.rega-year-popover-item{
    width:100%;
    display:flex;
    align-items:center;
    gap:7px;
    border:0;
    background:#fff;
    color:#111827;
    text-align:left;
    cursor:pointer;
    border-radius:7px;
    padding:7px 8px;
    font-size:13px;
}
.rega-year-popover-item:hover{
    background:#eef2f7;
}
.rega-year-popover-dot{
    width:9px;
    height:9px;
    min-width:9px;
    border-radius:50%;
    display:inline-block;
}
.rega-year-popover-time{
    min-width:74px;
    font-weight:700;
    color:#334155;
    font-size:12px;
}
.rega-year-popover-title{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-weight:600;
}

/* v1.6.0 - persönliche Kalenderfreigaben */
.rega-calendar-section{
    display:flex;
    flex-direction:column;
    gap:7px;
    padding-bottom:10px;
    margin-bottom:10px;
    border-bottom:1px solid #e5e7eb;
}
.rega-calendar-section:last-child{
    border-bottom:0;
    margin-bottom:0;
    padding-bottom:0;
}
.rega-calendar-section-title{
    font-size:11px;
    line-height:1.2;
    font-weight:700;
    color:#6b7280;
    text-transform:uppercase;
    letter-spacing:.04em;
    margin:2px 0 1px;
}
.rega-calendar-row{
    display:flex;
    align-items:center;
    gap:7px;
}
.rega-calendar-row .rega-calendar-item{
    flex:1;
    min-width:0;
}
.rega-calendar-row-shared .rega-calendar-item span:last-child{
    font-size:13px;
}
.rega-share-open-btn{
    border:1px solid #d4d9e1;
    background:#fff;
    color:#1f2937;
    border-radius:8px;
    padding:6px 8px;
    font-size:11px;
    line-height:1.15;
    cursor:pointer;
    white-space:nowrap;
}
.rega-share-open-btn:hover{
    background:#eef2f7;
}
.rega-share-body{
    padding:18px 22px 22px;
}
.rega-share-hint{
    margin:0 0 14px;
    color:#4b5563;
    font-size:14px;
}
.rega-share-users{
    display:flex;
    flex-direction:column;
    gap:8px;
}
.rega-share-user-row{
    display:grid;
    grid-template-columns:1fr 170px;
    gap:12px;
    align-items:center;
    padding:9px 10px;
    border:1px solid #e5e7eb;
    border-radius:10px;
    background:#f9fafb;
}
.rega-share-user-name{
    font-weight:600;
    font-size:14px;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.rega-share-user-row select{
    width:100%;
    border:1px solid #d5d9de;
    border-radius:8px;
    padding:8px 9px;
    background:#fff;
}
.rega-share-loading,
.rega-share-empty{
    color:#6b7280;
    font-size:14px;
    padding:10px 0;
}

/* Ferienkalender PDF-Export */
.rega-vacation-pdf-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.rega-vacation-pdf-btn {
    width: 100%;
    border: 1px solid rgba(29, 115, 216, 0.28);
    background: linear-gradient(135deg, rgba(29,115,216,0.10), rgba(42,157,143,0.10));
    color: #12344f;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.rega-vacation-pdf-btn:hover {
    background: linear-gradient(135deg, rgba(29,115,216,0.16), rgba(42,157,143,0.16));
    border-color: rgba(29, 115, 216, 0.42);
}
.rega-vacation-pdf-hint {
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
    text-align: center;
}
