/* Kalos Comercial - Estilos globales con tema Vesper */

html, body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
}

h1:focus {
    outline: none;
}

:root {
    --vesper-purple: #582C83;
    --vesper-gold: #EAAA00;
    --vesper-purple-dark: #3d1d5c;
    --vesper-purple-light: #7a45a8;
    --vesper-purple-xlight: #f0eaf8;
    --vesper-gold-light: #ffd84d;
    --vesper-text: #1e1a2e;
    --vesper-text-muted: #5c5672;
}

/* ========== LOGIN PAGE ========== */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #582C83 0%, #3d1d5c 50%, #1A0A33 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(234, 170, 0, 0.15) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-brand {
    text-align: center;
    z-index: 1;
    position: relative;
}

.brand-icon {
    margin-bottom: 1.5rem;
}

.brand-title {
    color: #FFFFFF;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 300;
    margin-top: 0.5rem;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #FAFAFA;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: #FFFFFF !important;
    border-radius: 12px !important;
}

.login-title {
    color: #582C83;
    font-weight: 700 !important;
    margin-bottom: 0.25rem !important;
}

.login-subtitle-text {
    color: #666666;
}

.login-btn {
    height: 48px;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    border-radius: 8px !important;
}

.login-footer {
    text-align: center;
}

.text-muted {
    color: #999999 !important;
}

/* ========== RESPONSIVE LOGIN ========== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        min-height: 200px;
        flex: 0;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .login-right {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem;
    }
}

/* ========== DIALOGS VESPER ========== */
.mud-dialog .mud-dialog-title {
    background: linear-gradient(135deg, #582C83 0%, #7a45a8 100%);
    color: #FFFFFF !important;
    font-weight: 600;
    padding: 14px 24px;
}

.mud-dialog .mud-dialog-title .mud-typography {
    color: #FFFFFF !important;
}

.mud-dialog .mud-dialog-actions {
    border-top: 2px solid #EAAA00;
    padding: 12px 24px;
}

/* ========== PAGE TITLES VESPER ========== */
.vesper-page-title {
    color: #582C83 !important;
    font-weight: 700 !important;
    padding-bottom: 10px;
    border-bottom: 3px solid #EAAA00;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px !important;
}

.vesper-page-title .mud-icon-root {
    color: #EAAA00 !important;
}

/* ========== TABLE HEADERS VESPER ========== */
.mud-table:not(.mud-simple-table) .mud-table-head {
    background: linear-gradient(135deg, #582C83 0%, #7a45a8 100%);
}

.mud-table:not(.mud-simple-table) .mud-table-head .mud-table-cell {
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: 0.8rem;
    border-bottom: 2px solid #EAAA00 !important;
    background: linear-gradient(135deg, #582C83 0%, #7a45a8 100%) !important;
}

/* ========== MUDPAPER VESPER ========== */
.vesper-paper {
    border-top: 3px solid #582C83;
    border-radius: 8px !important;
}

/* ========== HOME CARDS VESPER ========== */
.vesper-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 12px !important;
    cursor: pointer;
}

.vesper-card:hover {
    border-color: #EAAA00;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(88, 44, 131, 0.2) !important;
}

.vesper-card .mud-card-content {
    padding: 24px 16px;
}

/* ========== HOME USER INFO ========== */
.vesper-user-info {
    border-top: 3px solid #582C83;
    border-radius: 8px !important;
}

.vesper-user-info td:first-child {
    color: #582C83;
    font-weight: 600;
    width: 140px;
}

/* ========== SECTION HEADER VESPER ========== */
.vesper-section-header {
    color: #582C83 !important;
    font-weight: 600 !important;
}

/* ========== KPI CARDS ========== */
.vesper-kpi-card {
    border-radius: 12px !important;
    transition: all 0.3s ease;
    border-left: 4px solid #582C83;
}

.vesper-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 44, 131, 0.15) !important;
}

/* ========== CORREOS MODULE (Outlook-style) ========== */
.vesper-correo-panel {
    height: calc(100vh - 140px);
    overflow-y: auto;
}

.vesper-correo-folder {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
    margin: 2px 4px;
}

.vesper-correo-folder:hover {
    background: rgba(88, 44, 131, 0.06);
}

.vesper-correo-folder-active {
    background: #f0eaf8 !important;
    color: #582C83 !important;
    font-weight: 600;
}

.vesper-correo-folder-active .mud-icon-root {
    color: #582C83 !important;
}

.vesper-correo-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.vesper-correo-item:hover {
    background: #fafafa;
}

.vesper-correo-item-unread {
    background: #f0eaf8;
    border-left: 3px solid #582C83;
}

.vesper-correo-item-unread:hover {
    background: #e8ddf5;
}

.vesper-correo-item-selected {
    background: #EDE7F6 !important;
    border-left: 3px solid #EAAA00;
}

.vesper-correo-toolbar {
    border-bottom: 1px solid #eee;
    padding: 8px 16px;
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.vesper-correo-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
}

.vesper-correo-body p {
    margin-bottom: 0.8rem;
}

.vesper-correo-body ul {
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.vesper-correo-compose-field {
    border-bottom: 1px solid #eee;
    padding: 4px 16px;
}

/* ========== BLAZOR ERROR BOUNDARY ========== */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Ha ocurrido un error."
}

/* ========================================
   Syncfusion SfSchedule — Tema Vesper
   ======================================== */

/* Header / Toolbar — fondo purpura, botones transparentes */
.e-schedule .e-schedule-toolbar,
.e-schedule .e-schedule-toolbar .e-toolbar-items,
.e-schedule .e-schedule-toolbar .e-toolbar-item,
.e-schedule .e-toolbar .e-toolbar-items {
    background: #582C83 !important;
    background-color: #582C83 !important;
}
/* Botones: fondo transparente para que se vea el texto blanco */
.e-schedule .e-schedule-toolbar .e-tbar-btn,
.e-schedule .e-schedule-toolbar .e-btn,
.e-schedule .e-toolbar .e-tbar-btn {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
/* Todo el texto e iconos en blanco */
.e-schedule .e-schedule-toolbar *,
.e-schedule .e-schedule-toolbar .e-tbar-btn,
.e-schedule .e-schedule-toolbar .e-tbar-btn .e-tbar-btn-text,
.e-schedule .e-schedule-toolbar .e-btn .e-tbar-btn-text,
.e-schedule .e-schedule-toolbar .e-btn-icon,
.e-schedule .e-schedule-toolbar .e-icons,
.e-schedule .e-toolbar .e-tbar-btn .e-icons,
.e-schedule .e-toolbar .e-tbar-btn .e-tbar-btn-text,
.e-schedule .e-schedule-toolbar .e-date-range .e-tbar-btn-text {
    color: white !important;
}
/* Vista activa en dorado */
.e-schedule .e-schedule-toolbar .e-active-view .e-tbar-btn,
.e-schedule .e-schedule-toolbar .e-active-view .e-tbar-btn-text {
    color: #EAAA00 !important;
    font-weight: 600;
}
/* Boton "Hoy" con borde */
.e-schedule .e-schedule-toolbar .e-today .e-tbar-btn-text {
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 4px;
    padding: 2px 8px;
}

/* Dia actual */
.e-schedule .e-month-view .e-current-date .e-date-header {
    background: #582C83 !important;
    color: white !important;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    display: inline-block;
}

/* Celdas del mes — dejar que Syncfusion maneje el layout, solo estilo visual */

/* Cabecera dias de la semana */
.e-schedule .e-month-view .e-header-cells {
    color: #582C83 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Fondo fin de semana */
.e-schedule .e-month-view .e-other-month {
    color: #9d97b0 !important;
}

/* Evento hover */
.e-schedule .e-appointment:hover {
    opacity: 0.85;
}

/* Quick info popup */
.e-schedule .e-quick-popup-wrapper .e-popup-header {
    background: #582C83 !important;
}
.e-schedule .e-quick-popup-wrapper .e-subject {
    color: white !important;
}
.e-schedule .e-quick-popup-wrapper .e-popup-footer .e-event-details,
.e-schedule .e-quick-popup-wrapper .e-popup-footer .e-event-edit {
    color: #582C83 !important;
}

/* Editor dialog */
.e-schedule .e-schedule-dialog .e-dlg-header {
    color: #582C83 !important;
    font-family: Georgia, serif;
}
.e-schedule .e-schedule-dialog .e-primary {
    background: #582C83 !important;
    border-color: #582C83 !important;
}

/* ==================== Marca de agua Vesper (solo pagina Data /reportes) ==================== */
.vesper-watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.vesper-watermark-line {
    display: block;
    font-family: 'Segoe UI', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: rgba(88, 44, 131, 0.10);
    letter-spacing: 3px;
    white-space: nowrap;
    transform: rotate(-20deg);
    user-select: none;
    -webkit-user-select: none;
    text-shadow: 0 0 1px rgba(88, 44, 131, 0.04);
}

.vesper-watermark-line.top    { margin-top: 60px; }
.vesper-watermark-line.middle { margin: auto 0; }
.vesper-watermark-line.bottom { margin-bottom: 60px; }

@media print {
    .vesper-watermark-overlay { display: none !important; }
}
