/* ─────────────────────────────────────────────
   Login Page – Modern Dark Theme
   Matches Master.html / style.css design system
───────────────────────────────────────────── */
:root {
    --bg-primary:    #0f1117;
    --bg-secondary:  #1a1d27;
    --bg-card:       #1e2133;
    --bg-card-hover: #252840;
    --accent:        #6c63ff;
    --accent-light:  #8b84ff;
    --accent-teal:   #00d9c0;
    --text-primary:  #e8eaf0;
    --text-muted:    #7c82a0;
    --border:        rgba(255,255,255,.07);
    --radius:        14px;
    --shadow:        0 8px 32px rgba(0,0,0,.4);
    --transition:    .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.cursor-pointer{
    cursor: pointer;
}
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── LAYOUT ────────────────────────────────── */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── LEFT: FORM PANEL ──────────────────────── */
.login-panel-form {
    width: 45%;
    min-width: 380px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    padding: 32px 48px;
    position: relative;
    z-index: 1;
    border-right: 1px solid var(--border);
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-form-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
    padding: 40px 0;
}

.company-section {
    text-align: center;
    margin-bottom: 28px;
}

.company-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}

.company-name {
    font-size: .85rem;
    color: var(--text-muted);
    margin: 0;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.login-subtitle {
    font-size: .9rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ── INPUTS ────────────────────────────────── */
.input-group-login {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color var(--transition);
    overflow: hidden;
}

.input-group-login:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}

.input-group-login.input-error {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248,113,113,.18);
}

.input-group-login.input-error .input-icon {
    color: #f87171;
}

.input-icon {
    padding: 0 14px;
    color: var(--text-muted);
    font-size: .9rem;
    flex-shrink: 0;
}

.login-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 8px;
    font-size: .95rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

.login-input::placeholder { color: var(--text-muted); }

.toggle-pwd {
    background: none;
    border: none;
    outline: none;
    color: var(--text-muted);
    padding: 0 14px;
    cursor: pointer;
    font-size: .9rem;
    transition: color var(--transition);
}

.toggle-pwd:hover { color: var(--text-primary); }

/* ── BUTTON ────────────────────────────────── */
.btn-login {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: .97rem;
    font-weight: 600;
    padding: 14px 24px;
    cursor: pointer;
    transition: opacity var(--transition), transform .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover  { opacity: .88; transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

/* ── FORM CHECK ────────────────────────────── */
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-label {
    color: var(--text-muted);
    font-size: .87rem;
}

/* ── VERSION BADGE ─────────────────────────── */
.version-badge {
    font-size: .75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

/* ── SAVED USERS ───────────────────────────── */
.contenedor .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    transition: background var(--transition);
}

.contenedor .card:hover { background: var(--bg-card-hover); }

.imgUser {
    border-radius: 30px;
    height: 44px;
}

/* ── RIGHT: BRAND PANEL ────────────────────── */
.login-panel-brand {
    flex: 1;
    background: var(--bg-primary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-panel-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(108,99,255,.12), rgba(0,217,192,.07));
    z-index: 0;
}

.brand-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,99,255,.18) 0%, transparent 65%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
    max-width: 460px;
}

.brand-icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    margin: 0 auto 24px;
    box-shadow: 0 0 40px rgba(108,99,255,.35);
    overflow: hidden;
    padding: 10px;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: .95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 36px;
}

.brand-quote {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: left;
}

.quote-text {
    font-size: .9rem;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.6;
}

.quote-author {
    font-size: .82rem;
    color: var(--accent-light);
    font-weight: 500;
}

/* ── LOADING OVERLAY ───────────────────────── */
.LoadCapaBlack {
    position: fixed;
    z-index: 9999999999999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.LoadCapaContenido {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
}

.load-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.load-text {
    font-size: .88rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: .03em;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── MODAL ─────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    z-index: 99999999;
    width: 100vw; height: 100vh;
    background-color: #000;
}

.modal {
    position: fixed;
    top: 0; left: 0;
    z-index: 99999999999;
    display: none;
    width: 100%; height: 100%;
    overflow-x: hidden; overflow-y: auto;
    outline: 0;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.modal-content .form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.modal-content .form-control::placeholder { color: var(--text-muted); }

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 768px) {
    .login-panel-brand { display: none; }
    .login-panel-form {
        width: 100%;
        min-width: unset;
        padding: 24px 24px;
    }
}