/* =========================================
   1. BRAND VARIABLES & RESET
   ========================================= */
:root {
    --m-red: #ed1c24;
    --m-red-soft: #fef2f2;
    --m-blue: #2563eb;
    --m-blue-soft: #eff6ff;
    --m-text-dark: #0f172a;
    --m-text-muted: #64748b;
    --m-border: #e2e8f0;
    --m-bg: #f8fafc;
    --m-shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --m-shadow-lg: 0 10px 25px rgba(0,0,0,0.04);
}

/* Layout Utilities */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* =========================================
   2. SIDEBAR & FILTER COMPONENTS
   ========================================= */
.side-filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--m-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.side-filter-btn:hover {
    background: white;
    color: var(--m-red);
}

.side-filter-btn.active {
    background: var(--m-red-soft);
    color: var(--m-red);
    box-shadow: var(--m-shadow-sm);
}

.count-pill {
    font-size: 9px;
    background: #f1f5f9;
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 20px;
}

.side-filter-btn.active .count-pill {
    background: var(--m-red);
    color: white;
}

/* =========================================
   3. CALENDAR ARCHITECTURE (GRID)
   ========================================= */
.calendar-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--m-shadow-lg);
    border: 1px solid var(--m-border);
    overflow: hidden;
    width: 100%;
}

.cal-grid-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--m-border); /* Creates the 1px grid lines */
    gap: 1px;
    width: 100%;
    border-top: 1px solid var(--m-border);
}

.cal-day-label {
    background: #fcfcfc;
    padding: 14px;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    color: var(--m-text-muted);
}

.cal-day-cell {
    background: #fff;
    min-height: 140px; 
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-day-cell.is-today { background-color: #fffcf0 !important; }

.cal-day-num {
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 6px;
    color: var(--m-text-dark);
}

.cal-day-cell.is-today .cal-day-num {
    background: var(--m-red);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   4. EVENT PILLS (MISSION & CORPORATE)
   ========================================= */
.cal-event-chip {
    display: block;
    width: 100%;
    text-align: left;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    transition: transform 0.1s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: none;
    cursor: pointer;
}

.cal-event-chip:hover { transform: scale(1.02); }

.cal-event-chip.mission {
    background: var(--m-red-soft);
    color: #b91c1c;
    border-left: 3px solid var(--m-red);
}

.cal-event-chip.corporate {
    background: var(--m-blue-soft);
    color: #1d4ed8;
    border-left: 3px solid var(--m-blue);
}

/* =========================================
   5. ROBUST ENTERPRISE MODAL
   ========================================= */
.ent-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.ent-modal {
    background: #fff;
    border-radius: 28px;
    width: min(550px, 95%);
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
    overflow: hidden;
    /* Animation states */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.opacity-0 { opacity: 0; }
.scale-95 { transform: scale(0.95); }
.opacity-100 { opacity: 1; }
.scale-100 { transform: scale(1); }

/* Modal Content Styling */
.ent-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.05em;
}
.badge-mission { background: var(--m-red-soft); color: var(--m-red); }
.badge-corporate { background: var(--m-blue-soft); color: var(--m-blue); }

.modal-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: #0f172a;
    color: white !important;
    border-radius: 14px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.modal-cta-btn:hover {
    background: var(--m-red);
    box-shadow: 0 10px 15px -3px rgba(237, 28, 36, 0.3);
    transform: translateY(-1px);
}

.icon-pill {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s;
    color: var(--m-text-muted);
}

.icon-pill:hover { background: var(--m-bg); color: var(--m-red); }
