/* ================= Auth Layout ================= */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Left side - visual panel */
.auth-visual {
    background: linear-gradient(145deg, var(--primary-darker) 0%, var(--primary-dark) 50%, #1e40af 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    text-align: center;
}

.auth-visual::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(96,165,250,0.2) 0%, transparent 65%);
    border-radius: 50%;
    animation: blob1 12s ease-in-out infinite;
}

.auth-visual::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 65%);
    border-radius: 50%;
    animation: blob2 15s ease-in-out infinite;
}

.auth-visual-mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.auth-visual-content {
    position: relative;
    z-index: 2;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    margin: 0 auto 28px;
}

.auth-visual h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 14px;
    font-weight: 800;
}

.auth-visual p {
    color: rgba(255,255,255,0.65);
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 320px;
}

.auth-features {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 320px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 14px 18px;
    text-align: right;
}

.auth-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent-light);
    flex-shrink: 0;
}

.auth-feature-text strong {
    display: block;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.auth-feature-text span {
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
}

/* Right side - form panel */
.auth-form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    background: var(--white);
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 420px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-form-header {
    margin-bottom: 36px;
}

.auth-form-header h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-form-header p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Form elements */
.input-group { margin-bottom: 22px; }

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark);
    font-size: 0.9rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 14px;
    color: var(--muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.3s;
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 13px 44px 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--r-md);
    font-family: var(--font);
    font-size: 0.95rem;
    background: var(--light);
    color: var(--dark);
    transition: all 0.3s;
    outline: none;
}

.input-with-icon input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-with-icon input:focus ~ .input-icon { color: var(--primary); }

.input-with-icon input::placeholder { color: #b0bec5; }

/* Toggle password */
.toggle-password {
    position: absolute;
    left: 14px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
    transition: color 0.3s;
}
.toggle-password:hover { color: var(--primary); }

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1rem;
    margin-top: 10px;
    border-radius: var(--r-md);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-primary);
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37,99,235,0.4);
}

.btn-login:active { transform: translateY(0); }

.btn-login .btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-login.loading .btn-text { display: none; }
.btn-login.loading .btn-spinner { display: block; }

.error-msg {
    display: none;
    background: #fef2f2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--r-md);
    border-right: 4px solid var(--danger);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 28px;
    transition: color 0.3s;
}

.auth-back:hover { color: var(--primary); }

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

/* ================= Responsive ================= */
@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-form-panel { padding: 40px 24px; padding-top: 100px; min-height: 100vh; }
}
