/* Account Login Shared Styles - FixedERP */
:root {
    --primary: #0284c7;
    --primary-dark: #02699c;
    --accent: #38bdf8;
    --bg-deep: #060b17;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-body: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --container-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --light: #f8f9fa;
    --dark: #343a40;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --gray: #6c757d;
    --gray-light: #e9ecef;
}

/* Variables para Modo Oscuro */
body.dark-mode {
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-body: linear-gradient(135deg, #090d16 0%, #020611 100%);
    --container-bg: #0b0f19;
    --input-bg: #111827;
    --input-border: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background 0.4s ease;
}

.login-container {
    display: flex;
    max-width: 1050px;
    width: 100%;
    min-height: 580px;
    background: var(--container-bg);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(2, 132, 199, 0.1);
    overflow: hidden;
    position: relative;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* INTERRUPTOR MODO OSCURO / CLARO (Elegante y Sutil) */
.theme-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--input-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25);
}

body.dark-mode .theme-toggle-btn {
    background: rgba(17, 24, 39, 0.9);
    border-color: #334155;
    color: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.theme-toggle-btn i {
    position: absolute;
    font-size: 15px;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

body:not(.dark-mode) .sun-icon { opacity: 1; transform: rotate(0deg) scale(1); color: #e28743; }
body:not(.dark-mode) .moon-icon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
body.dark-mode .sun-icon { opacity: 0; transform: rotate(90deg) scale(0.5); }
body.dark-mode .moon-icon { opacity: 1; transform: rotate(0deg) scale(1); color: var(--accent); }

/* SECCIÓN IZQUIERDA (OSCURA CON ANIMACIÓN 3D Y RED HEXAGONAL) */
.brand-section {
    flex: 1;
    background-color: var(--primary);
    color: #ffffff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 16px 0px 0px 16px;
}

#dna-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.overlay-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle at 50% 50%, rgba(6, 11, 23, 0.2) 0%, rgba(6, 11, 23, 0.85) 100%);
}

@keyframes float {
    0% { transform: translateY(0px); box-shadow: 0 0 15px rgba(56, 189, 248, 0.4); }
    50% { transform: translateY(-20px); box-shadow: 0 0 25px rgba(56, 189, 248, 0.6), 0 0 10px #fff; }
    100% { transform: translateY(0px); box-shadow: 0 0 15px rgba(56, 189, 248, 0.4); }
}

.molecular-node {
    position: absolute;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.4);
    animation: float 3s ease-in-out infinite;
    z-index: 2;
}

.node-1 { width: 10px; height: 10px; top: 20%; right: 25%; animation-delay: 0s; }
.node-2 { width: 14px; height: 14px; bottom: 20%; left: 15%; animation-delay: 1s; }
.node-3 { width: 8px; height: 8px; top: 60%; right: 15%; animation-delay: 3s; }

.brand-logo { display: flex; align-items: center; margin-bottom: 20px; z-index: 2; position: relative; gap: 12px; }
.brand-logo svg { width: 100px; height: 106px; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4)); margin-left: -1rem !important; margin-right: -1rem !important; }
.brand-logo-text { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; color: #ffffff; }

.brand-subtitle { font-size: 19px; margin-bottom: 30px; color: #ffffff; z-index: 2; position: relative; font-style: italic; }
.brand-features { list-style: none; z-index: 2; position: relative; }
.brand-features li { margin-bottom: 16px; display: flex; align-items: center; font-size: 14.5px; color: #ffffff; }
.brand-features i { margin-right: 12px; font-size: 16px; width: 28px; height: 28px; border-radius: 6px; background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.2); display: flex; align-items: center; justify-content: center; color: var(--accent); backdrop-filter: blur(4px); }

/* ANIMACIONES RED HEXAGONAL */
@keyframes rotateOuterGrid {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes nodeGlow {
    0%, 100% { r: 4.5px; fill: var(--primary); filter: drop-shadow(0 0 4px var(--primary)); }
    50% { r: 7px; fill: var(--accent); filter: drop-shadow(0 0 12px var(--accent)); }
}

@keyframes pulseLine {
    0%, 100% { stroke-opacity: 0.3; stroke-width: 1.8; }
    50% { stroke-opacity: 1; stroke-width: 3; }
}

.c2-core { animation: rotateOuterGrid 24s linear infinite; transform-origin: 60px 50px; }
.c2-nodes circle { animation: nodeGlow 2.5s ease-in-out infinite alternate; }
.c2-nodes circle:nth-child(2n) { animation-delay: 0.4s; }
.c2-nodes circle:nth-child(3n) { animation-delay: 0.8s; }
.c2-pulselines path { animation: pulseLine 2s ease-in-out infinite alternate; }
.c2-pulselines path:nth-child(2n) { animation-delay: 0.5s; }

/* SECCIÓN DERECHA (FORMULARIO) */
.login-section {
    flex: 1;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--container-bg);
    z-index: 3;
    transition: background 0.4s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.erp-logo {
    font-size: 36px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    transition: color 0.3s;
}

.erp-logo span {
    color: var(--primary);
    font-weight: 700;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
    transition: color 0.3s;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.3s;
}

.login-title {
    font-size: 24px;
    color: var(--text-main);
    margin-bottom: 10px;
    font-weight: 600;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 15px;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-left: 4px solid var(--warning);
    color: #856404;
}

.alert i {
    margin-right: 10px;
    font-size: 18px;
}

.input-group { position: relative; margin-bottom: 20px; }
.form-group { position: relative; margin-bottom: 20px; }

.form-control {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 15px;
    background-color: var(--input-bg);
    transition: 0.3s;
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-control::placeholder { color: #94a3b8; opacity: 1; }

.icon-right { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }
.input-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }

.password-toggle {
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.3s;
    pointer-events: auto;
}

.password-toggle:hover {
    color: var(--primary);
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--primary);
    color: white;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.btn-block {
    width: 100%;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-disabled {
    pointer-events: none;
    opacity: 0.6;
}

.form-footer { text-align: center; margin-top: 25px; }
.forgot-link { color: var(--primary); text-decoration: none; font-size: 14.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: 0.3s; }
.forgot-link:hover { opacity: 0.8; text-decoration: underline; }

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* User Info */
.user-info {
    background-color: rgba(2, 132, 199, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.user-info-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.user-info-value {
    font-weight: 600;
    color: var(--text-main);
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    margin-right: 8px;
    flex: 1;
    background-color: var(--gray-light);
    overflow: hidden;
}

.strength-level {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.strength-weak { background-color: var(--danger); width: 33%; }
.strength-medium { background-color: var(--warning); width: 66%; }
.strength-strong { background-color: var(--success); width: 100%; }

.strength-text {
    font-size: 11px;
    font-weight: 500;
}

/* Dev Mode */
.dev-mode-notice {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: var(--warning);
    color: #000;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
    }

    .login-section {
        padding: 40px 20px;
        position: relative;
    }

    .brand-section {
        min-height: 350px;
        border-radius: 16px 16px 0px 0px;
    }

    .brand-logo {
        flex-direction: column;
        gap: 8px;
    }

    .brand-logo-text {
        font-size: 24px;
    }

    .theme-toggle-btn {
        top: 15px;
        right: 15px;
    }

    .dev-mode-notice {
        bottom: 15px;
        right: 15px;
        z-index: 100;
    }
}
