/**
 * ===================================================================
 * ESTILOS DO MÓDULO CALENDÁRIO - A.S CRM PRO v7.0.0 Enterprise
 * ===================================================================
 */

/* Container Principal */
.module-calendario {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

/* Cabeçalho do Módulo */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.module-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-header h2 i {
    color: #2563eb;
    background: #eff6ff;
    padding: 10px;
    border-radius: 12px;
}

.module-header .subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

/* Controles do Calendário */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 15px 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #f1f5f9;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.periodo-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    min-width: 220px;
    text-align: center;
    text-transform: capitalize;
}

.controls-center .btn-group {
    display: flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 12px;
    gap: 2px;
}

.controls-center .btn-group .btn {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: transparent;
    transition: all 0.2s;
}

.controls-center .btn-group .btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.controls-right {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    min-width: 160px;
    cursor: pointer;
}

/* Calendário Mensal */
.calendar-month {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f1f5f9;
    border-radius: 12px;
    padding: 5px;
}

.weekday {
    text-align: center;
    font-weight: 700;
    color: #64748b;
    padding: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    min-height: 140px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    background: #f8fafc;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.calendar-day.today {
    background: #eff6ff;
    border-color: #2563eb;
    border-width: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.calendar-day.empty {
    background: #f8fafc;
    border: none;
    cursor: default;
    opacity: 0.5;
}

.day-number {
    font-weight: 800;
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 10px;
}

.calendar-day.today .day-number {
    color: #2563eb;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.event-pill {
    padding: 6px 10px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.event-pill:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.more-events {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-top: auto;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 6px;
}

/* Calendário Semanal */
.calendar-week {
    display: flex;
    flex-direction: column;
}

.week-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.week-day-header {
    text-align: center;
    padding: 15px 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.week-day-header.today {
    background: #eff6ff;
    border-color: #2563eb;
}

.day-name {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.day-number-large {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}

.week-grid {
    display: flex;
    flex-direction: column;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.hour-row {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.hour-label {
    text-align: center;
    padding: 20px 0;
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
}

.hour-cell {
    min-height: 80px;
    border-left: 1px solid #f1f5f9;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.hour-cell:hover {
    background: #f1f5f9;
}

/* Calendário Diário */
.calendar-day-view {
    padding: 10px;
}

.day-view-header {
    margin-bottom: 30px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    padding: 30px;
    border-radius: 20px;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.day-view-header h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.day-view-timeline {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

.timeline-hour {
    font-size: 14px;
    font-weight: 800;
    color: #64748b;
    text-align: right;
}

.timeline-event {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-event:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Modal Estilo Enterprise */
.modal-content {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.modal-header {
    background: #f8fafc;
    padding: 25px 30px;
    border-bottom: 1px solid #f1f5f9;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
}

.modal-body {
    padding: 30px;
}

/* Estilos de Status e Badge */
.badge {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
}

/* Responsividade Enterprise */
@media (max-width: 1200px) {
    .calendar-days {
        grid-template-columns: repeat(7, minmax(100px, 1fr));
        overflow-x: auto;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 20px;
    }
}
