  body { background-color: #f4f6f9; font-family: 'Segoe UI', sans-serif; }
  .navbar { background-color: #0f4c81; }
  .card { border-radius: 10px; border: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
  .btn-action { margin-right: 5px; margin-bottom: 5px; }
  .spinner-container { text-align: center; padding: 40px; display: none; }
  .section-title { background-color: #e9ecef; padding: 8px 12px; border-radius: 5px; margin-top: 15px; font-weight: bold; color: #495057; }
  .day-subtitle { font-size: 1rem; color: #198754; font-weight: bold; margin-top: 15px; margin-bottom: 5px; padding-left: 5px; border-left: 4px solid #198754; }
  .table-inputs { table-layout: fixed; width: 100%; min-width: 850px; margin-bottom: 0; }
  .table-inputs th { font-size: 0.8rem; color: #6c757d; text-align: center; padding-bottom: 8px; border-bottom: 1px solid #dee2e6; }
  .table-inputs td { padding: 4px; vertical-align: middle; }
  .table-inputs input, .table-inputs select, .table-inputs textarea { font-size: 0.85rem; width: 100%; }
  .input-moneda { text-align: right; font-weight: 500; color: #198754; }
  .scroll-mobile { border: 1px solid #e9ecef; border-radius: 5px; background: #fff; margin-bottom: 1rem; overflow-x: auto; }
  
  .badge-estado { font-size: 0.85rem; padding: 6px 10px; border-radius: 6px; border: 1px solid rgba(0,0,0,0.1); display: inline-block; width: 100%; text-align: center; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
  .estado-revision { background-color: #ffc107; color: #664d03; text-shadow: none; } 
  .estado-aprobacion { background-color: #0dcaf0; color: #055160; text-shadow: none; } 
  .estado-aprobado { background-color: #198754; color: #fff; } 
  .estado-denegado { background-color: #dc3545; color: #fff; } 
  .estado-devuelto { background-color: #fd7e14; color: #fff; } 
  
  .page-item.active .page-link { background-color: #0f4c81; border-color: #0f4c81; }
  .page-link { color: #0f4c81; cursor: pointer; }
  
  @media (max-width: 768px) { .dashboard-buttons button { margin-bottom: 5px; width: 100%; } }

  /* --- ESTILOS PARA LA PORTADA --- */
  .hero-section { background: linear-gradient(135deg, #0f4c81 0%, #1a73e8 100%); padding: 60px 0 120px 0; border-bottom-left-radius: 50% 10%; border-bottom-right-radius: 50% 10%; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
  .logos-container { background-color: rgba(255, 255, 255, 0.95); padding: 15px 35px; border-radius: 100px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); display: inline-flex; align-items: center; justify-content: center; gap: 25px; flex-wrap: wrap; }
  .logos-container img { height: 75px; width: auto; object-fit: contain; transition: transform 0.3s ease; mix-blend-mode: multiply; }
  .logos-container img:hover { transform: scale(1.05); }
  .text-shadow { text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }

  @media (max-width: 768px) {
    .logos-container { border-radius: 20px; padding: 15px; }
    .logos-container img { height: 55px; }
    .hero-section { padding: 40px 0 100px 0; border-bottom-left-radius: 30% 5%; border-bottom-right-radius: 30% 5%; }
  }

  /* --- ESTILOS ICONOGRAFÍA MANUAL --- */
  .icono-leyenda { font-size: 1.3rem; margin-right: 10px; vertical-align: middle; display: inline-block; width: 30px; text-align: center; }

  /* --- ESTILOS: TRAZABILIDAD Y SEMÁFORO KPI --- */
  .trazabilidad-fechas { font-size: 0.75rem; color: #495057; line-height: 1.4; }
  .trazabilidad-fechas i { margin-right: 5px; width: 15px; text-align: center; display: inline-block; }
  
  .kpi-card { border-left: 6px solid #ccc; transition: transform 0.2s; }
  .kpi-card:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; }
  .kpi-verde { border-left-color: #198754; }  
  .kpi-rojo { border-left-color: #dc3545; }   
  .kpi-amarillo { border-left-color: #ffc107; } 

  /* --- COLORES FASES DEL EVENTO --- */
  .table-violet { background-color: #e2d9f3 !important; }
  .table-violet th { color: #5a32a3 !important; }
  .btn-outline-violet { color: #6f42c1; border-color: #6f42c1; }
  .btn-outline-violet:hover { background-color: #6f42c1; color: white; }

  /* --- NUEVOS ESTILOS PARA FLECHAS DE ORDEN --- */
  .col-mover { width: 35px; text-align: center; vertical-align: middle !important; padding: 2px !important; }
  .btn-mover { color: #adb5bd; cursor: pointer; transition: all 0.2s; padding: 1px 0; border-radius: 4px; background: transparent; border: 1px solid transparent; margin: 1px auto; display: block; width: 28px; text-align: center; font-size: 1.2rem; line-height: 1; }
  .btn-mover:hover { background: #e9ecef; color: #0f4c81; border-color: #ced4da; }
/* --- SISPO v2.0: CAMPANA DE ALERTAS Y BANDEJA DE AVISOS --- */
  .btn-campana { position: relative; }
  .badge-pulso {
    position: absolute; top: -4px; right: -4px;
    font-size: 0.68rem; padding: 3px 6px;
    animation: pulsoAlerta 1.8s infinite;
  }
  @keyframes pulsoAlerta {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.75); }
    70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
  }
  .alerta-item {
    border-left: 4px solid #0f4c81;
    transition: background-color 0.15s ease;
    cursor: pointer;
  }
  .alerta-item:hover { background-color: #f8f9fa; }
  .alerta-item.nivel-danger { border-left-color: #dc3545; background-color: #fff5f5; }
  .alerta-item.nivel-warning { border-left-color: #fd7e14; background-color: #fff9f2; }
  .alerta-item.nivel-info { border-left-color: #0dcaf0; background-color: #f2fcff; }
  .alerta-item.nivel-primary { border-left-color: #0f4c81; background-color: #f2f7fc; }

  /* --- SELECTOR DE MÓDULOS MULTI-ROL --- */
  .nav-modulos .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 0.88rem;
  }
  .nav-modulos .nav-link:hover { color: #fff; background: rgba(255,255,255,0.12); }
  .nav-modulos .nav-link.active {
    background-color: #ffffff !important;
    color: #0f4c81 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }

  /* --- REQUISITOS DE CONTRASEÑA --- */
  .req-clave { font-size: 0.78rem; }
  .req-clave .ok { color: #198754; font-weight: 600; }
  .req-clave .pend { color: #6c757d; }

  /* --- HOJA DOCUMENTO OFICIAL HTML IMPRIMIBLE --- */
  .hoja-documento-oficial {
    max-width: 920px;
    padding: 32px 36px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: #212529;
  }
  .doc-header-logos img {
    height: 58px;
    width: auto;
    object-fit: contain;
  }
  .doc-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    margin-bottom: 16px;
  }
  .doc-tabla th, .doc-tabla td {
    border: 1px solid #ced4da;
    padding: 6px 8px;
    vertical-align: top;
  }
  .doc-tabla thead th {
    background-color: #0f4c81;
    color: #ffffff;
    text-align: center;
  }
  .doc-seccion-titulo {
    background-color: #e9ecef;
    border-left: 4px solid #0f4c81;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 0.92rem;
    margin: 16px 0 8px 0;
  }
  @media (max-width: 768px) {
    .hoja-documento-oficial { padding: 16px; }
  }
/* --- ESTILOS SOLICITUD DE ANTICIPO Y FIRMAS ELECTRÓNICAS --- */
  .ant-tabla { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-bottom: 12px; }
  .ant-tabla th, .ant-tabla td { border: 1px solid #ced4da; padding: 6px 8px; vertical-align: top; }
  .ant-tabla th { background-color: #f1f5f9; color: #212529; text-align: left; }
  .ant-tabla thead th { background-color: #0f4c81; color: #ffffff; text-align: center; }
  .firmas-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  @media (max-width: 768px) {
    .firmas-grid { grid-template-columns: 1fr; }
  }
/* --- FASE 5: LÍNEA DE TIEMPO Y EVALUACIÓN DE LOGROS --- */
  .timeline-sispo {
    position: relative;
    padding-left: 30px;
    margin: 10px 0;
  }
  .timeline-sispo::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: #dee2e6;
    border-radius: 3px;
  }
  .timeline-item {
    position: relative;
    margin-bottom: 16px;
  }
  .timeline-dot {
    position: absolute;
    left: -26px;
    top: 12px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #adb5bd;
    background: #6c757d;
  }
  .timeline-dot.dot-validada { background: #198754; box-shadow: 0 0 0 2px #198754; }
  .timeline-dot.dot-enviada { background: #0dcaf0; box-shadow: 0 0 0 2px #0dcaf0; }
  .timeline-dot.dot-devuelta { background: #dc3545; box-shadow: 0 0 0 2px #dc3545; }
  .timeline-dot.dot-pendiente { background: #fd7e14; box-shadow: 0 0 0 2px #fd7e14; }
  .escala-btn-group .btn { min-width: 44px; font-weight: 700; }
/* --- FASE 6: VISOR OFICIAL DE PLANES OPERATIVOS Y CULTOS --- */
  .doc-alerta-sobregiro {
    background: #fff0f0;
    border: 1.5px solid #dc3545;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 10px 0;
    color: #842029;
    font-size: 0.85rem;
  }
  .doc-caja-obs {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 12px 0;
    font-size: 0.83rem;
  }
  .firmas-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
  }
  .doc-pie-oficial {
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
    color: #64748b;
  }
  @media (max-width: 768px) {
    .firmas-grid-3 { grid-template-columns: 1fr; }
  }

  /* --- FORMULARIOS DINÁMICOS Y CÓMODOS (CULTOS Y EVENTOS) --- */
  .bloque-form-sispo {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .bloque-form-titulo {
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #0f4c81;
    margin-bottom: 10px;
  }
  .item-dinamico-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0f4c81;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
  }
  .item-dinamico-card:hover {
    box-shadow: 0 3px 10px rgba(15, 76, 129, 0.08);
    border-color: #cbd5e1;
  }
  .item-dinamico-card.fase-antes { border-left-color: #198754; }
  .item-dinamico-card.fase-dia { border-left-color: #0d6efd; }
  .item-dinamico-card.fase-despues { border-left-color: #6f42c1; }
  .item-dinamico-card.fase-culto { border-left-color: #0f4c81; padding: 8px 10px; margin-bottom: 8px; }
  .btn-orden-mini {
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #495057;
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.78rem;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .btn-orden-mini:hover { background: #e9ecef; color: #0f4c81; }
  .tabs-fases-evento {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 14px;
  }
  .tabs-fases-evento .nav-link {
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
  }
  .tabs-fases-evento .nav-link.active {
    background: #0f4c81;
    color: #ffffff;
    border-color: #0f4c81;
    box-shadow: 0 2px 6px rgba(15, 76, 129, 0.2);
  }
  .tabs-fases-evento .nav-link.tab-antes.active { background: #198754; border-color: #198754; }
  .tabs-fases-evento .nav-link.tab-despues.active { background: #6f42c1; border-color: #6f42c1; }
  .tabs-fases-evento .nav-link .badge { font-size: 0.7rem; }
  .cabecera-programa-culto {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    padding: 0 10px 6px 10px;
  }

  /* --- CABECERA OFICIAL CON LOGO 1 EN ESQUINA (VISOR Y PDF) --- */
  .doc-header-oficial {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 2px solid #0f4c81;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }
  .doc-header-logo-esq {
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
  .doc-header-logo-esq img {
    max-height: 64px;
    max-width: 120px;
    width: auto;
    object-fit: contain;
  }
  .doc-header-centro {
    flex: 1 1 auto;
    text-align: center;
  }
  .doc-header-meta {
    flex: 0 0 170px;
    text-align: right;
    font-size: 0.78rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 9px;
    line-height: 1.45;
  }
  @media (max-width: 768px) {
    .doc-header-oficial { flex-direction: column; text-align: center; }
    .doc-header-logo-esq { flex: none; justify-content: center; }
    .doc-header-meta { flex: none; width: 100%; text-align: center; }
  }