/**
 * Plugin NICC Custom Login - Estilos
 * Diseño: Elegante Corporativo
 *
 * Paleta:
 *   Azul oscuro:  #0d2847
 *   Azul medio:   #143a6b
 *   Azul corp:    #1a5090
 *   Azul claro:   #2171b5
 *   Dorado:       #f5a623
 *   Dorado claro: #f7c948
 */

/* ============================================
   WRAPPER PRINCIPAL
   ============================================ */
.nicc-login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    font-family: 'DM Sans', sans-serif;
    background: #0a1628;
    overflow: hidden;
}

.nicc-login-wrapper *,
.nicc-login-wrapper *::before,
.nicc-login-wrapper *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   PANEL IZQUIERDO - BRANDING
   ============================================ */
.nicc-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(160deg, #0d2847 0%, #143a6b 40%, #1a5090 70%, #2171b5 100%);
    padding: 3rem;
}

/* Patrón sutil de fondo */
.nicc-left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Resplandor naranja sutil */
.nicc-left-panel::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.08) 0%, transparent 70%);
}

/* Logo */
.nicc-logo-container {
    position: relative;
    z-index: 1;
    margin-bottom: 2.5rem;
    animation: niccFadeInDown 0.8s ease;
}

.nicc-logo-container img {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* Texto de bienvenida */
.nicc-welcome-text {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    animation: niccFadeInDown 0.8s ease 0.2s both;
}

.nicc-welcome-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nicc-welcome-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 320px;
}

/* Línea decorativa dorada */
.nicc-decorative-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #f5a623, #f7c948);
    border-radius: 2px;
    margin: 1.2rem auto;
    animation: niccFadeInDown 0.8s ease 0.3s both;
}

/* ============================================
   PANEL DERECHO - FORMULARIO
   ============================================ */
.nicc-right-panel {
    width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background: #ffffff;
    position: relative;
}

/* Borde lateral con gradiente */
.nicc-right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #f5a623, #2171b5, #0d2847);
}

/* Formulario - reset para que no herede estilos de DokuWiki */
.nicc-right-panel form {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

/* Encabezado del formulario */
.nicc-form-header {
    margin-bottom: 2.5rem;
    animation: niccFadeInUp 0.6s ease 0.4s both;
}

.nicc-form-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    color: #0d2847;
    margin-bottom: 0.4rem;
    border: none;
    padding: 0;
}

.nicc-form-header p {
    color: #7a8a9e;
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   MENSAJES DE ERROR / ÉXITO
   ============================================ */
.nicc-messages {
    margin-bottom: 1.5rem;
    animation: niccFadeInUp 0.4s ease both;
}

.nicc-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.nicc-msg:last-child {
    margin-bottom: 0;
}

.nicc-msg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.nicc-msg-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.nicc-msg-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ============================================
   CAMPOS DEL FORMULARIO
   ============================================ */
.nicc-form-group {
    margin-bottom: 1.5rem;
    animation: niccFadeInUp 0.6s ease calc(0.5s + var(--i, 0) * 0.1s) both;
}

.nicc-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0d2847;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.nicc-form-group input[type="text"],
.nicc-form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e4e9f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    color: #0d2847;
    transition: all 0.3s ease;
    background: #f8fafc;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.nicc-form-group input[type="text"]:focus,
.nicc-form-group input[type="password"]:focus {
    border-color: #2171b5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(33, 113, 181, 0.1);
}

.nicc-form-group input::placeholder {
    color: #b0bec5;
}

/* ============================================
   FILA RECORDARME / OLVIDÉ CONTRASEÑA
   ============================================ */
.nicc-remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    animation: niccFadeInUp 0.6s ease 0.7s both;
}

.nicc-remember-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #5a6a7e;
    cursor: pointer;
}

.nicc-remember-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2171b5;
    cursor: pointer;
}

.nicc-remember-row a {
    font-size: 0.85rem;
    color: #2171b5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nicc-remember-row a:hover {
    color: #f5a623;
}

/* ============================================
   BOTÓN CONECTARSE
   ============================================ */
.nicc-btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    color: #ffffff;
    background: linear-gradient(135deg, #0d2847 0%, #1a5090 50%, #2171b5 100%);
    cursor: pointer;
    transition: all 0.4s ease;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    animation: niccFadeInUp 0.6s ease 0.8s both;
    -webkit-appearance: none;
    appearance: none;
}

/* Efecto shimmer en hover */
.nicc-btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.nicc-btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 40, 71, 0.35);
}

.nicc-btn-login:hover::before {
    left: 100%;
}

.nicc-btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(13, 40, 71, 0.25);
}

/* ============================================
   FOOTER
   ============================================ */
.nicc-footer-text {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.78rem;
    color: #a0aec0;
    animation: niccFadeInUp 0.6s ease 0.9s both;
}

.nicc-footer-text strong {
    color: #0d2847;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes niccFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes niccFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .nicc-login-wrapper {
        flex-direction: column;
    }

    .nicc-left-panel {
        padding: 2rem 1.5rem;
        flex: none;
    }

    .nicc-right-panel {
        width: 100%;
        flex: 1;
    }

    .nicc-logo-container img {
        width: 160px;
    }

    .nicc-welcome-text h1 {
        font-size: 1.6rem;
    }

    .nicc-welcome-text p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nicc-right-panel {
        padding: 2rem 1.5rem;
    }

    .nicc-form-header h2 {
        font-size: 1.4rem;
    }

    .nicc-remember-row {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
}
