.work-calendar-module{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.work-calendar-header{
    background:white;
    border-radius:18px;
    padding:24px;
    box-shadow:0 6px 18px rgba(15,23,42,0.06);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
}

.work-calendar-header h1{
    margin:0 0 8px 0;
    color:#0f172a;
}

.work-calendar-header p{
    margin:0;
    color:#64748b;
}

.work-calendar-tabs{
    background:white;
    border-radius:18px;
    padding:14px 18px;
    box-shadow:0 6px 18px rgba(15,23,42,0.06);
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.work-calendar-tabs button{
    border:none;
    border-radius:12px;
    padding:12px 16px;
    background:#e5e7eb;
    color:#334155;
    font-weight:800;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:8px;
}

.work-calendar-tabs button.active{
    background:linear-gradient(135deg, #2563eb, #1d4ed8);
    color:white;
}

.work-calendar-card{
    background:white;
    border-radius:18px;
    padding:24px;
    box-shadow:0 6px 18px rgba(15,23,42,0.06);
}

.work-calendar-card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-bottom:16px;
}

.work-calendar-card-header h2{
    margin:0;
    color:#0f172a;
}

.work-calendar-card-header button{
    border:none;
    border-radius:12px;
    padding:12px 16px;
    background:#2563eb;
    color:white;
    font-weight:800;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:8px;
}

.work-calendar-card p{
    color:#64748b;
    margin:0;
}

.work-calendar-month-nav{

    display:flex;
    align-items:center;
    gap:14px;
}

.work-calendar-month-nav h2{

    margin:0;
    min-width:220px;
}

.work-calendar-month-nav button{

    width:40px;
    height:40px;

    border:none;

    border-radius:10px;

    background:#e5e7eb;

    cursor:pointer;
}
.calendar-grid-wrapper{
    position:relative;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    background:white;
    border-radius:16px;
    border:1px solid #e2e8f0;
}

.calendar-grid{
    width:max-content;
    min-width:100%;
    border-collapse:separate;
    border-spacing:0;
    box-shadow:none;
    margin-top:0;
}

.calendar-grid th,
.calendar-grid td{
    border-right:1px solid #e5e7eb;
    border-bottom:1px solid #e5e7eb;
    padding:0;
    height:52px;
    min-width:42px;
    text-align:center;
    vertical-align:middle;
}

.calendar-grid th{
    background:#f8fafc;
    color:#0f172a;
    font-size:12px;
    font-weight:800;
}

.calendar-grid th span{
    display:block;
    font-size:10px;
    color:#64748b;
    margin-bottom:3px;
}

.calendar-grid th strong{
    display:block;
    font-size:13px;
}

.calendar-grid th:first-child,
.calendar-grid td:first-child{
    position:sticky !important;
    left:0 !important;
    z-index:20;
    min-width:190px;
    width:190px;
    padding:0 16px;
    text-align:left;
    background:white;
    font-weight:800;
    border-right:2px solid #cbd5e1;
}

.calendar-grid th:first-child{
    z-index:30;
    background:#f8fafc;
}

.calendar-grid .calendar-saturday{
    background:#f8fafc;
}

.calendar-grid .calendar-sunday{
    background:#fee2e2;
    color:#991b1b;
}

.calendar-work-cell{
    background:white;
}

.calendar-work-block{
    height:28px;
    width:100%;
    background:#bbf7d0;
    border-radius:0;
    position:relative;
    z-index:2;
}

.calendar-work-cell:first-child .calendar-work-block{
    border-radius:10px 0 0 10px;
}

.calendar-grid td:hover{
    background:#eff6ff;
}

.calendar-grid td:hover .calendar-work-block{
    background:#86efac;
}

.calendar-split-grid{
    display:flex;
    width:100%;
    max-width:100%;
    overflow:hidden;
    border:1px solid #e2e8f0;
    border-radius:16px;
    background:white;
}

.calendar-fixed-column{
    width:220px;
    min-width:220px;
    border-right:2px solid #cbd5e1;
    background:white;
    z-index:2;
}

.calendar-scroll-column{
    flex:1;
    overflow-x:auto;
    overflow-y:hidden;
}

.calendar-split-grid table{
    margin-top:0;
    box-shadow:none;
    border-radius:0;
    border-collapse:separate;
    border-spacing:0;
}

.calendar-fixed-column table{
    width:220px;
}

.calendar-scroll-column table{
    width:max-content;
    min-width:100%;
}

.calendar-split-grid th,
.calendar-split-grid td{
    height:52px;
    padding:0;
    border-right:1px solid #e5e7eb;
    border-bottom:1px solid #e5e7eb;
    text-align:center;
    vertical-align:middle;
}

.calendar-fixed-column th,
.calendar-fixed-column td{
    width:220px;
    padding:0 16px;
    text-align:left;
    font-weight:800;
}

.calendar-scroll-column th,
.calendar-scroll-column td{
    min-width:42px;
    width:42px;
}

.calendar-scroll-column th span{
    display:block;
    font-size:10px;
    color:#64748b;
    margin-bottom:3px;
}

.calendar-scroll-column th strong{
    display:block;
    font-size:13px;
}

.calendar-saturday{
    background:#f8fafc;
}

.calendar-sunday{
    background:#fee2e2;
    color:#991b1b;
}

.calendar-work-cell{
    background:transparent;
}

.calendar-work-block{
    height:28px;
    width:100%;
    background:#bbf7d0;
    border-radius:0;
}

.calendar-scroll-column td:hover{
    background:#eff6ff;
}

.calendar-scroll-column td:hover .calendar-work-block{
    background:#86efac;
}

.calendar-scroll-column td.calendar-sunday:hover .calendar-work-block{
    background:#86efac;
}
.calendar-scroll-column td.calendar-saturday{
    background:#f8fafc;
}

.calendar-scroll-column td.calendar-sunday{
    background:#fee2e2;
}

.calendar-scroll-column td{
    position:relative;
}

.calendar-scroll-column td.calendar-saturday{
    background:#f8fafc;
}

.calendar-scroll-column td.calendar-sunday{
    background:#fee2e2;
}

.calendar-scroll-column td.calendar-sunday .calendar-work-block{
    background:#bbf7d0;
}

.calendar-modal-overlay{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;

    width:100vw !important;
    height:100vh !important;

    background:rgba(15,23,42,0.68) !important;

    display:flex !important;
    justify-content:center !important;
    align-items:center !important;

    z-index:999999 !important;

    padding:20px;
    box-sizing:border-box;
}

.calendar-modal{
    width:720px;
    max-width:94vw;
    max-height:90vh;
    margin:auto;
    background:white;
    border-radius:22px;
    overflow:hidden;
    box-shadow:0 30px 80px rgba(15,23,42,0.35);
    display:flex;
    flex-direction:column;
}

.calendar-modal-header{

    padding:20px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    border-bottom:1px solid #e2e8f0;
}

.calendar-modal-header button{

    border:none;
    background:none;

    font-size:18px;

    cursor:pointer;
}

.calendar-modal-body{
    padding:20px;
}

.calendar-employee-list{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
}

.calendar-hours-row{

    display:flex;

    gap:20px;
}

.calendar-modal-overlay{
    position:fixed !important;
    inset:0 !important;
    width:100vw !important;
    height:100vh !important;
    background:rgba(15,23,42,0.68) !important;
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    z-index:999999 !important;
    padding:20px;
    box-sizing:border-box;
}

.calendar-modal{
    width:720px;
    max-width:94vw;
    max-height:90vh;
    background:white;
    border-radius:22px;
    overflow:hidden;
    box-shadow:0 30px 80px rgba(15,23,42,0.35);
    display:flex;
    flex-direction:column;
}

.calendar-modal-header{
    padding:22px 26px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid #e2e8f0;
}

.calendar-modal-header h2{
    margin:0;
    color:#0f172a;
    display:flex;
    align-items:center;
    gap:10px;
}

.calendar-modal-header button{
    width:38px;
    height:38px;
    border:none;
    border-radius:10px;
    background:#f1f5f9;
    color:#0f172a;
    font-size:18px;
    cursor:pointer;
}

.calendar-modal-body{
    padding:24px 26px;
    overflow:auto;
}

.calendar-modal-body h3{
    margin:0 0 14px 0;
    color:#0f172a;
}

.calendar-employee-list{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:10px 18px;
}

.calendar-employee-list label,
.calendar-checkbox-row{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 12px;
    border-radius:10px;
    background:#f8fafc;
    font-weight:700;
    cursor:pointer;
}

.calendar-hours-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.calendar-hours-row label{
    display:block;
    font-size:12px;
    font-weight:800;
    color:#64748b;
    margin-bottom:6px;
}

.calendar-hours-row input{
    width:100%;
    box-sizing:border-box;
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:12px 14px;
    background:#f8fafc;
}

.calendar-modal-body hr{
    border:none;
    border-top:1px solid #e2e8f0;
    margin:20px 0;
}

.calendar-modal-footer{
    padding:18px 26px;
    border-top:1px solid #e2e8f0;
    display:flex;
    justify-content:flex-end;
    gap:12px;
    background:#f8fafc;
}

.calendar-primary-button,
.calendar-secondary-button{
    border:none;
    border-radius:12px;
    padding:12px 18px;
    font-weight:800;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:8px;
}

.calendar-primary-button{
    background:#2563eb;
    color:white;
}

.calendar-secondary-button{
    background:#e5e7eb;
    color:#334155;
}

.calendar-modal .calendar-employee-list{
    display:flex !important;
    flex-direction:column !important;
    grid-template-columns:none !important;
    gap:10px !important;
}

.calendar-modal .calendar-employee-list label{
    width:100%;
    box-sizing:border-box;
}

#toast-container{
    position:fixed;
    top:20px;
    right:20px;
    z-index:1000000;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.work-calendar-toast{
    min-width:320px;
    max-width:500px;

    padding:14px 18px;

    border-radius:14px;

    background:#16a34a;
    color:white;

    font-weight:700;

    box-shadow:0 15px 40px rgba(0,0,0,0.25);

    display:flex;
    align-items:center;
    gap:10px;

    animation:toastSlideIn 0.25s ease;
}

@keyframes toastSlideIn{

    from{
        opacity:0;
        transform:translateX(40px);
    }

    to{
        opacity:1;
        transform:translateX(0);
    }
}

.calendar-company-day{
    background:#fef3c7 !important;
    color:#92400e !important;
}

.calendar-company-day-marker{
    width:10px;
    height:10px;
    border-radius:999px;
    background:#f59e0b;
    margin:auto;
    position:relative;
    z-index:3;
}

.calendar-company-day .calendar-work-block{
    position:relative;
    z-index:2;
    opacity:0.75;
}
.calendar-entry-work{
    background:#bbf7d0 !important;
}

.calendar-entry-vacation{
    background:#fde68a !important;
}

.calendar-entry-sick{
    background:#fecaca !important;
}

.calendar-entry-unavailable{
    background:#d1d5db !important;
}
.calendar-modal-body label{
    display:block;
    font-size:12px;
    font-weight:800;
    color:#64748b;
    margin-bottom:6px;
    text-transform:uppercase;
    letter-spacing:0.04em;
}

.calendar-modal-body select,
.calendar-modal-body textarea{
    width:100%;
    box-sizing:border-box;
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:12px 14px;
    background:#f8fafc;
    color:#0f172a;
    font-size:14px;
    font-weight:600;
    outline:none;
}

.calendar-modal-body select:focus,
.calendar-modal-body textarea:focus{
    border-color:#2563eb;
    background:white;
    box-shadow:0 0 0 4px rgba(37,99,235,0.12);
}

.calendar-modal-body textarea{
    min-height:90px;
    resize:vertical;
    font-family:Arial;
}

.calendar-modal-body p{
    margin:0;
    padding:12px 14px;
    background:#f8fafc;
    border-radius:12px;
    color:#0f172a;
    line-height:1.5;
}

.calendar-employee-name{
    font-weight:900;
    color:#0f172a;
    margin-bottom:4px;
}

.calendar-employee-summary{
    font-size:11px;
    font-weight:700;
    color:#64748b;
    white-space:nowrap;
}

.calendar-resource-booked{
    background:#bfdbfe !important;
}

.calendar-resource-service{
    background:#fed7aa !important;
}

.calendar-resource-breakdown{
    background:#fecaca !important;
}

.calendar-resource-unavailable{
    background:#d1d5db !important;
}

.calendar-modal-body input{
    width:100%;
    box-sizing:border-box;
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:12px 14px;
    background:#f8fafc;
    color:#0f172a;
    font-size:14px;
    font-weight:600;
    outline:none;
}

.calendar-modal-body input:focus{
    border-color:#2563eb;
    background:white;
    box-shadow:0 0 0 4px rgba(37,99,235,0.12);
}

.calendar-events-layer{
    position:absolute;
    left:3px;
    right:3px;
    bottom:3px;
    z-index:20;
    display:flex;
    justify-content:center;
    gap:2px;
}

.calendar-event-marker{
    min-width:18px;
    max-width:34px;
    height:14px;
    padding:0 3px;
    border-radius:999px;
    background:#2563eb;
    color:white;
    font-size:8px;
    font-weight:900;
    line-height:14px;
    text-align:center;
    overflow:hidden;
    white-space:nowrap;
    box-shadow:0 1px 4px rgba(15,23,42,0.25);

    cursor:pointer;
    pointer-events:auto;
}

.calendar-resource-event-marker{
    background:#7c3aed;
}