body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        min-height: 100vh;
    }



    .login-img {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 1rem;
    }

    /* PAGE MÁS GRANDE PARA LOGOS MÁS GRANDES */
    .page {
        width: 100%;
        max-width: 900px;
        margin: 0 auto;
    }

    /* CONTENEDOR DE LOGOS Y TÍTULOS - SIN FONDO, SIN HEADER */
    .logos-title-container {
        text-align: center;
        margin-bottom: 2.5rem;
        padding: 0;
        background: transparent;
    }

    .logo-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
        margin-bottom: 1.5rem;
    }

    .logo-item {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* LOGOS MÁS GRANDES */
    .header-brand-img {
        max-height: 130px;
        width: auto;
        object-fit: contain;
    }

    /* CONTENEDOR DEL TÍTULO CENTRAL - SIN FONDO */
    .title-container {
        text-align: center;
        flex: 2;
        background: transparent;
        padding: 0;
        margin: 0;
    }

    /* TÍTULO PRINCIPAL - DIGITALDOCS - MÁS GRANDE Y GRUESO, SIN FONDO */
    .main-title h1 {
        font-size: 3.5rem;
        font-weight: 900 !important;
        letter-spacing: -1px;
        color: white !important;
        margin: 0;
        text-shadow: 0 2px 4px rgba(0,0,0,0.15);
        background: transparent;
    }
    strong, b {
        font-weight: 700;
    }

    /* RAYA BLANCA SEPARADORA - MÁS LARGA Y GRUESA */
    .white-divider {
        width: 180px;
        height: 4px;
        background: white;
        margin: 1rem auto;
        border-radius: 4px;
    }

    /* SUBTÍTULO - SISTEMA DE GESTIÓN DOCUMENTAL - SIN FONDO */
    .subtitle h2 {
        font-size: 1.1rem;
        font-weight: 700;
        color: white !important;
        text-transform: uppercase;
        letter-spacing: 2.5px;
        margin: 0;
        opacity: 0.95;
        background: transparent;
    }

    /* TARJETA DE LOGIN (FONDO BLANCO) */
    .wrap-login100 {
        background: white;
        border-radius: 28px;
        box-shadow: 0 25px 45px -12px rgba(0,0,0,0.25);
        padding: 2.5rem;
    }

    /* TÍTULO DEL FORMULARIO */
    .login100-form-title {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        letter-spacing: -0.3px !important;
        color: #1e293b !important;
        text-align: center;
        display: block;
        margin-bottom: 0.5rem;
    }

    .login100-form-title small {
        font-size: 0.85rem;
        color: #64748b;
        font-weight: 400;
        display: block;
        margin-top: 0.25rem;
    }

    .input100::placeholder {
        color: #a0afc3 !important;
        font-weight: 400 !important;
    }

    /* ENLACE OLVIDÓ CONTRASEÑA */
    .text-end.pt-4 {
        margin-top: -0.5rem;
        margin-bottom: 1.2rem;
    }

    .text-end.pt-4 a {
        font-size: 0.8rem;
        font-weight: 500;
        color: var(--color-sistema);
        text-decoration: none;
    }

    .text-end.pt-4 a:hover {
        text-decoration: underline;
    }

    /* CHECKBOX TÉRMINOS */
    .form-group.text-start.mt-4 {
        margin: 1rem 0 1.5rem;
    }

    .form-check-input {
        border-radius: 5px;
        border: 1.5px solid #cbd5e1;
        cursor: pointer;
    }

    .form-check-input:checked {
        background-color: var(--color-sistema);
        border-color: var(--color-sistema);
    }

    .form-check-label {
        font-size: 0.85rem;
        font-weight: 500;
        color: #334155;
    }

    .form-check-label a {
        color: var(--color-sistema);
        text-decoration: none;
        font-weight: 600;
    }

    .form-check-label a:hover {
        text-decoration: underline;
    }

    /* BOTÓN - COLOR DEL SISTEMA */
    .login100-form-btn {
        background: var(--color-sistema) !important;
        border: none !important;
        border-radius: 40px !important;
        padding: 0.9rem !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        letter-spacing: 0.5px !important;
        color: white !important;
        width: 100%;
        transition: all 0.25s ease !important;
        cursor: pointer;
    }

    .login100-form-btn:hover {
        transform: translateY(-2px);
        background: color-mix(in srgb, var(--color-sistema) 85%, black) !important;
        box-shadow: 0 8px 20px color-mix(in srgb, var(--color-sistema) 40%, transparent) !important;
    }

    /* ============================================= */
    /* NUEVO ESTILO PARA MENSAJES DE ERROR - COMPACTO Y FIJO */
    /* NO SE EXPANDE AUNQUE EL TEXTO SEA LARGO */
    /* ============================================= */
    .error-container {
        width: 100%;
        margin-bottom: 1rem;
        min-height: 0; /* Evita que crezca por defecto */
    }

    .error-message-card {
    background: #FEF2F2;  /* Rojo muy suave de fondo */
    border-left: 3px solid #DC2626;  /* Borde lateral rojo */
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

    /* Tooltip personalizado para mostrar el texto completo */
    .error-message-card:hover::after {
        content: attr(data-full-message);
        position: absolute;
        background: #1e293b;
        color: white;
        font-size: 0.7rem;
        padding: 0.5rem 0.8rem;
        border-radius: 8px;
        white-space: normal;
        max-width: 280px;
        word-wrap: break-word;
        z-index: 1000;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        text-align: center;
        line-height: 1.4;
        pointer-events: none;
    }

    /* Para pantallas pequeñas, ajustar el tooltip */
    @media (max-width: 768px) {
        .error-message-card:hover::after {
            max-width: 240px;
            font-size: 0.65rem;
        }
    }

    .error-message-card i {
        font-size: 0.9rem;  /* Icono pequeño */
        color: #DC2626;
        flex-shrink: 0;
    }

   .error-message-card span {
    font-size: 0.75rem;  /* Letras pequeñas */
    color: #991B1B;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal;     /* Permite saltos de línea - TEXTO COMPLETO */
    word-wrap: break-word;   /* Rompe palabras largas */
    word-break: break-word;  /* Asegura que no se desborde */
    flex: 1;
}

/* Para errores que vienen del backend (messages) - TEXTO COMPLETO */
.error-backend-message {
    background: #FEF2F2;
    border-left: 3px solid #DC2626;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    /* ELIMINADO: overflow: hidden */
    /* ELIMINADO: cursor: pointer */
    /* ELIMINADO: position: relative */
}


    .error-backend-message:hover::after {
        content: attr(data-full-message);
        position: absolute;
        background: #1e293b;
        color: white;
        font-size: 0.7rem;
        padding: 0.5rem 0.8rem;
        border-radius: 8px;
        white-space: normal;
        max-width: 280px;
        word-wrap: break-word;
        z-index: 1000;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        text-align: center;
        line-height: 1.4;
        pointer-events: none;
    }

    .error-backend-message .error-text {
        font-size: 0.7rem;
        color: #991B1B;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .error-backend-message .error-text i {
        font-size: 0.9rem;
        color: #DC2626;
        flex-shrink: 0;
    }

    .error-backend-message .error-text span {
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Mensajes de éxito - mismos límites de altura */
    .error-backend-message[data-type="success"] {
        background: #F0FDF4;
        border-left-color: #22C55E;
    }

    .error-backend-message[data-type="success"] .error-text {
        color: #166534;
    }

    .error-backend-message[data-type="success"] .error-text i {
        color: #22C55E;
    }

    /* Animación sutil de entrada */
    @keyframes fadeSlide {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .error-container,
    .error-message-card,
    .error-backend-message {
        animation: fadeSlide 0.2s ease-out;
    }

    /* RELOJ */
    .clock-footer {
        margin-top: 2rem;
        text-align: center;
    }

    input[name="reloj"] {
        background: rgba(255,255,255,0.95);
        border: none;
        border-radius: 50px;
        padding: 0.6rem 1.2rem;
        font-family: 'Inter', monospace;
        font-size: 0.85rem;
        font-weight: 500;
        color: #1e293b;
        text-align: center;
        display: inline-block;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    @media (max-width: 768px) {
        .page {
            max-width: 100%;
        }
        .header-brand-img {
            max-height: 70px;
        }
        .main-title h1 {
            font-size: 2rem;
        }
        .white-divider {
            width: 120px;
            height: 3px;
        }
        .subtitle h2 {
            font-size: 0.75rem;
            letter-spacing: 1.5px;
        }
        .wrap-login100 {
            padding: 1.5rem;
        }
        .logo-row {
            gap: 0.8rem;
        }
        .error-message-card span,
        .error-backend-message .error-text {
            font-size: 0.65rem;
        }
        .error-message-card,
        .error-backend-message {
            max-height: 40px;
        }
    }

.btn-auth {
    width: auto !important;
    min-width: 200px;
    max-width: 280px;
    padding: 0.9rem 1.8rem !important;
}