/* --- CALENDAR CONTROLS --- */
.calendar-controls-compact {
    padding: 15px 10px; /* Alineado con los bordes visuales */
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--bg-dark);
}

.calendar-controls-compact h3 {
    font-size: 1.2rem;
    text-align: center;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: white;
    padding: 8px 16px;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
}

.nav-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.view-toggles-compact {
    display: flex;
    background: var(--bg-card);
    padding: 0;
    border-radius: 0;
    border: 1px solid var(--border-color);
}

.view-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 0;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.view-tab.active {
    background: var(--primary);
    color: white;
}



/* --- WEEK GRID (PROFESSIONAL) --- */
.week-grid-professional {
    display: grid;
    grid-template-columns: 50px repeat(7, minmax(0, 1fr)) 50px;
    gap: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin: 0;
    overflow: hidden;
}

.week-corner, .week-time-label {
    background: var(--bg-panel);
    padding: 6px 2px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.week-day-header {
    background: var(--bg-panel);
    padding: 6px 2px;
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.1;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.day-name, .day-num {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.week-time-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-slot {
    background: var(--bg-dark);
    min-height: 32px;
    padding: 4px 2px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.6rem;
    position: relative;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.week-slot * {
    max-width: 100%;
}

.badge-partner {
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1 !important;
    text-align: center;
}

.week-grid-professional > *:nth-child(9n) {
    border-right: none;
}

/* Ajustes específicos para móviles */
@media (max-width: 600px) {
    .app-content { 
        padding: 10px 5px 100px !important; 
        overflow-x: auto !important;
    }
    .week-grid-professional { 
        grid-template-columns: 45px repeat(7, 80px) 45px !important; 
        margin: 0 !important; 
        width: fit-content !important;
        min-width: 100% !important;
    }
    .app-header { padding: 10px 15px; }
    .header-logo i { font-size: 1.4rem; }
    .calendar-controls-compact { padding: 10px; gap: 8px; }
    .calendar-controls-compact h3 { font-size: 1.1rem; }
    .week-slot { min-height: 35px !important; font-size: 0.65rem !important; }
    .week-time-label { font-size: 0.7rem !important; width: 45px !important; }
    .week-day-header { padding: 8px 2px !important; }
    .day-num { font-size: 1rem !important; font-weight: 800; }
    .day-name { font-size: 0.7rem !important; text-transform: uppercase; opacity: 0.8; }
}

.week-day-header.today {
    background: rgba(16, 185, 129, 0.1);
    border-bottom: 2px solid var(--primary);
}

.week-day-header.bookable-day {
    color: var(--primary);
}

.week-day-header.locked-day {
    opacity: 0.3;
    filter: grayscale(1);
}

.week-slot.available { color: var(--primary); cursor: pointer; }

.week-slot.booked { background: rgba(255, 255, 255, 0.02); border-left: 3px solid white; }
.week-slot.booked.is-minor { background: rgba(236, 72, 153, 0.05); border-left-color: #ec4899; }
.week-slot.booked.is-guest { background: rgba(245, 158, 11, 0.05); border-left-color: #f59e0b; }
.week-slot.maint { background: rgba(239, 68, 68, 0.05); border-left-color: var(--danger); color: var(--danger); }

.day-row.booked.is-minor { border-left: 4px solid #ec4899; background: rgba(236, 72, 153, 0.03); }

/* Mini Calendario Admin */
.mini-calendar {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.mc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mc-month-year {
    font-weight: 800;
    font-size: 1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mc-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mc-btn:hover { background: var(--primary); border-color: var(--primary); }

.mc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(255,255,255,0.03);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

.mc-day-name {
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 800;
    padding: 10px 0;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-day {
    font-size: 0.9rem;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.mc-day:hover { background: rgba(245, 158, 11, 0.1); color: white; }

.mc-day.active { 
    background: var(--primary) !important; 
    color: white !important; 
    font-weight: 800;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.mc-day.other-month { background: rgba(0,0,0,0.1); color: #334155; pointer-events: none; }

.mc-day.today-circle { 
    color: var(--primary);
    font-weight: 700;
    background: rgba(245, 158, 11, 0.05);
    position: relative;
}

.mc-day.today-circle::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.slot-user {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.slot-user.is-me {
    color: var(--primary);
    font-weight: 800;
}

.badge-partner {
    background: var(--primary);
    color: black;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 2px;
}

.delete-res {
    position: absolute;
    top: 5px;
    right: 5px;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.1rem;
    z-index: 5;
}

.delete-res:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
}



/* --- MONTH GRID --- */
.month-grid-professional {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    margin: 0; /* Ancho total */
    background: var(--bg-panel);
}

.week-selector-btn {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.2s;
}

.week-selector-btn:hover {
    background: var(--primary);
    color: white;
}

.month-day-header {
    background: var(--bg-card);
    padding: 12px 5px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary-light);
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
}

.month-day {
    background: var(--bg-dark);
    min-height: 80px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.month-day:hover:not(.empty) {
    background: var(--bg-panel);
}

.month-day.empty {
    background: rgba(0,0,0,0.1);
    cursor: default;
}

.month-day.today {
    background: rgba(16, 185, 129, 0.05);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.day-number {
    font-size: 0.9rem;
    font-weight: 700;
}

.day-stats {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.stat-badge i {
    font-size: 1rem;
    color: var(--primary);
}

.month-day:hover .stat-badge {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    border-color: var(--primary);
}



/* --- DAY LIST (PROFESSIONAL) --- */
.day-list-professional {
    padding: 5px 15px;
}

.day-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-panel);
    border-radius: 0 var(--radius-md) var(--radius-md) 0; /* Recto en la izquierda */
    margin-bottom: 6px;
    border-left: 4px solid transparent;
}

.day-row.available { border-left-color: var(--primary); cursor: pointer; }
.day-row.booked { border-left-color: white; background: rgba(255, 255, 255, 0.03); }
.day-row.booked.is-minor { border-left-color: #ec4899; background: rgba(236, 72, 153, 0.03); }
.day-row.booked.is-guest { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.03); }
.day-row.maint { border-left-color: var(--danger); color: var(--danger); }

.row-time { width: 50px; font-weight: 700; font-size: 0.9rem; color: var(--text-muted); }
.row-content { flex: 1; padding-left: 10px; }
.row-content strong { display: block; font-size: 0.9rem; }
.row-content span { font-size: 0.75rem; opacity: 0.7; }

/* Ajuste móvil para día */
@media (max-width: 600px) {
    .day-row { padding: 6px 10px; margin-bottom: 4px; }
    .row-time { font-size: 0.8rem; width: 45px; }
    .nav-btn { padding: 6px 10px; font-size: 0.75rem; }
    .row-content strong { font-size: 0.8rem; }
}



.mini-calendar { border-radius: 0 !important; }
.mc-btn { border-radius: 0 !important; }
.mc-day { border-radius: 0 !important; }

/* Responsive text classes for Maintenance */
.txt-mobile {
    display: none !important;
}
.txt-desktop {
    display: inline !important;
}
@media (max-width: 480px) {
    .txt-desktop {
        display: none !important;
    }
    .txt-mobile {
        display: inline-flex !important;
        align-items: center;
        gap: 3px;
    }
}


