/* =========================================
   ESTILOS GENERALES Y FONDOS
   ========================================= */
body, md-content.contenido {
    background-color: #f8fafc !important; 
    font-family: 'Roboto', sans-serif;
    color: #334155;
}

.calendario-container {
    padding: 30px 20px;
    max-width: 1250px;
    margin: auto;
    position: relative;
}

/* =========================================
   BARRA SUPERIOR (NAVBAR MODERNA)
   ========================================= */
.navbar-moderna {
    background-color: #ffffff !important; 
    color: #0f172a !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important; 
    height: 70px;
    min-height: 70px;
    z-index: 50;
}

.navbar-moderna .md-toolbar-tools {
    height: 70px;
    padding: 0 20px;
}

/* Logo y Título */
.logo-container {
    cursor: pointer;
}

.logo-icon {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.logo-icon md-icon {
    color: #ffffff !important;
    margin: 0 !important;
    font-size: 22px;
}

.logo-text {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

/* Enlaces de navegación */
.nav-links {
    display: flex;
    gap: 4px;
}

.nav-btn {
    text-transform: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #475569 !important;
    border-radius: 8px !important;
    padding: 0 16px !important;
    margin: 0 !important;
    height: 42px;
    line-height: 42px;
    transition: all 0.2s ease;
}

.nav-btn md-icon {
    font-size: 20px !important;
    color: #94a3b8 !important;
    margin-right: 6px !important;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.nav-btn:hover md-icon {
    color: #2563eb !important;
}

.nav-btn.active {
    background-color: #eff6ff !important;
    color: #2563eb !important;
}

.nav-btn.active md-icon {
    color: #2563eb !important;
}

.btn-menu-mobile {
    color: #0f172a !important;
}

/* =========================================
   TARJETAS BASE (CARDS)
   ========================================= */
md-card {
    border-radius: 12px !important; 
    border: 1px solid #e2e8f0 !important; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    background-color: #ffffff !important;
    margin-bottom: 24px;
    overflow: hidden;
}

/* =========================================
   FILTROS Y BOTÓN GENERAR
   ========================================= */
md-input-container label {
    color: #64748b !important;
}

md-select {
    font-weight: 500;
    color: #0f172a;
}

.boton-generar {
    border-radius: 8px;
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 0 24px;
    background-color: #2563eb !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2) !important;
}

.boton-generar:hover {
    background-color: #1d4ed8 !important;
}

.boton-generar md-icon {
    vertical-align: middle;
    margin-right: 6px;
    margin-bottom: 2px;
}

/* =========================================
   RESUMEN (ESTADÍSTICAS)
   ========================================= */
.resumen-card md-card-content {
    padding: 24px !important;
}

.estadistica {
    text-align: center;
    padding: 15px;
}

.estadistica h3 {
    margin: 0;
    font-size: 32px;
    color: #2563eb;
    font-weight: 800;
}

.estadistica span {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   TABLA DE CALENDARIO (Limpia y Funcional)
   ========================================================================== */
.mes-card {
    margin-bottom: 40px;
}

.mes-header {
    text-align: center;
    padding: 16px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.mes-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.dia-columna {
    display: flex;
    flex-direction: column;
}

.center-col {
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

.dia-header {
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dia-fila {
    border-bottom: 1px solid #f1f5f9;
    min-height: 52px;
}

.dia-columna .dia-fila:last-child {
    border-bottom: none;
}

.fecha-celda {
    width: 55px;
    font-weight: 700;
    text-align: center;
    font-size: 16px;
    color: #0f172a;
    padding: 12px 0;
    border-right: 1px solid #f1f5f9;
}

.predicador-celda {
    padding: 0 12px;
}

.predicador-celda md-autocomplete,
.predicador-celda md-autocomplete-wrap {
    box-shadow: none !important;
    background: transparent !important;
    height: 48px;
}

.predicador-celda input {
    height: 48px;
    padding: 0 8px;
    font-size: 15px;
    color: #0f172a;
    border: none !important;
    background: transparent !important;
}

/* =========================================
   BOTONES FLOTANTES (FAB) CORREGIDOS
   ========================================= */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los botones en su propia columna */
    gap: 16px; /* Separación clara entre botones */
}

/* Botón Principal (Guardar) - Forzado a ser un círculo perfecto */
.md-button.md-fab.fab-principal {
    background-color: #2563eb !important; 
    color: #ffffff !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4) !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

.md-button.md-fab.fab-principal md-icon {
    color: #ffffff !important;
    font-size: 28px !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

.md-button.md-fab.fab-principal:hover {
    transform: scale(1.08);
    background-color: #1d4ed8 !important;
}

/* Botones Secundarios (Imprimir y PDF) - Círculos perfectos más pequeños */
.md-button.md-fab.md-mini.fab-secundario {
    background-color: #ffffff !important;
    color: #475569 !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

.md-button.md-fab.md-mini.fab-secundario md-icon {
    color: #475569 !important;
    font-size: 22px !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

.md-button.md-fab.md-mini.fab-secundario:hover {
    background-color: #f8fafc !important;
    color: #2563eb !important;
    transform: scale(1.08);
}

.md-button.md-fab.md-mini.fab-secundario:hover md-icon {
    color: #2563eb !important;
}

/* Tooltips limpios */
md-tooltip .md-background {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    padding: 6px 12px;
}

/* =========================================
   IMPRESIÓN (Ocultar elementos innecesarios)
   ========================================= */
@media print {
    md-autocomplete button { display: none !important; }
    .fab-container, .filtro-card, .navbar-moderna, md-toolbar { display: none !important; }
    body, md-content.contenido { background-color: white !important; }
    .calendario-container { padding: 0 !important; }
    .mes-card { 
        box-shadow: none !important; 
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        page-break-inside: avoid; 
        margin-bottom: 20px !important;
    }
    .mes-header, .dia-header { background-color: #f5f5f5 !important; color: #000 !important; }
    .center-col, .dia-header, .fecha-celda, .dia-fila { border-color: #000 !important; }
}

/* =========================================
   COMPORTAMIENTO RESPONSIVE (Móviles)
   ========================================= */
@media (max-width: 599px) {
    .center-col {
        border-left: none;
        border-right: none;
        border-top: 4px solid #e2e8f0;
        border-bottom: 4px solid #e2e8f0;
    }
    .dia-header {
        background-color: #f8fafc;
        text-align: center;
    }
    .fecha-celda {
        background-color: #f8fafc;
        border-right: 1px solid #e2e8f0;
    }
    .fab-container {
        bottom: 20px;
        right: 20px;
    }
}