* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    display: flex;
    width: 900px;
    min-height: 520px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Panel izquierdo */
.login-brand {
    flex: 1;
    background: #222222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(41, 171, 226, 0.08);
    border-radius: 50%;
    top: -80px;
    left: -80px;
}

.login-brand::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(41, 171, 226, 0.06);
    border-radius: 50%;
    bottom: -60px;
    right: -60px;
}

.brand-logo {
    width: 220px;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.brand-tagline {
    color: #29ABE2;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.brand-divider {
    width: 40px;
    height: 2px;
    background: #29ABE2;
    margin: 16px auto;
    position: relative;
    z-index: 1;
}

.brand-desc {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    text-align: center;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Panel derecho */
.login-form-panel {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    color: #888;
    margin-bottom: 36px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > .input-icon {
    position: absolute;
    left: 14px;
    color: #999;
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 48px 14px 42px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14.5px;
    color: #222;
    background: #f8f9fa;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    outline: none;
    letter-spacing: 0.2px;
}

.input-wrapper input::placeholder {
    color: #b0b0b0;
    font-weight: 400;
}

.input-wrapper input:focus {
    border-color: #29ABE2;
    box-shadow: 0 0 0 4px rgba(41, 171, 226, 0.1);
    background: #fff;
}

.toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 18px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 6px;
    z-index: 2;
}

.toggle-password:hover {
    color: #29ABE2;
    background: rgba(41, 171, 226, 0.06);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #29ABE2;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    margin-top: 12px;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background: #1a90c8;
    box-shadow: 0 4px 16px rgba(41, 171, 226, 0.3);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:disabled {
    background: #a0d8ef;
    cursor: not-allowed;
    box-shadow: none;
}

.error-msg {
    display: none;
    background: #fff5f5;
    border: 1.5px solid #fecaca;
    color: #dc2626;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    margin-top: 16px;
    align-items: center;
    gap: 10px;
}

.error-msg i {
    font-size: 16px;
    flex-shrink: 0;
}

.error-msg.show {
    display: flex;
}

.login-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 11px;
    color: #bbb;
}

.dev-credit {
    margin-top: 6px;
    font-size: 10px;
    color: #ccc;
    letter-spacing: 0.5px;
}

/* Loader */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 700px) {
    .login-wrapper {
        flex-direction: column;
        width: 95%;
        min-height: auto;
    }
    .login-brand {
        padding: 32px 24px;
    }
    .brand-logo {
        width: 160px;
    }
    .login-form-panel {
        padding: 32px 24px;
    }
}
