:root {
    --bg-primary: #f5f7ff;
    --bg-secondary: #e0f2ff;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-light: #3b82f6;
    --surface: #ffffff;
    --surface-border: rgba(148, 163, 184, 0.28);
    --surface-highlight: rgba(37, 99, 235, 0.06);
    --text-light: #1e293b;
    --text-muted: rgba(71, 85, 105, 0.78);
    --input-border: rgba(148, 163, 184, 0.4);
    --input-focus: rgba(37, 99, 235, 0.18);
    --shadow-color: rgba(15, 23, 42, 0.12);
    font-family: 'Inter', sans-serif;
}

body.auth-body {
    background:
        radial-gradient(circle at top left, rgba(191, 219, 254, 0.55), transparent 58%),
        radial-gradient(circle at bottom right, rgba(147, 197, 253, 0.45), transparent 60%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    padding: 2.5rem 1.5rem;
    color: var(--text-light);
}

body.auth-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 70%);
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}

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

.auth-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(0);
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
    animation: float 14s ease-in-out infinite;
}

.auth-shape.shape-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.35), transparent 70%);
    top: -160px;
    left: -140px;
}

.auth-shape.shape-2 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25), transparent 70%);
    bottom: -160px;
    right: -130px;
    animation-delay: 2s;
}

.auth-shape.shape-3 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.32), transparent 70%);
    top: 80px;
    right: 15%;
    animation-delay: 4s;
}

.login-card {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(14px);
    border-radius: 28px;
    padding: 3rem 2.8rem;
    box-shadow: 0 32px 60px var(--shadow-color), 0 16px 32px rgba(37, 99, 235, 0.08);
    border: 1px solid var(--surface-border);
    color: var(--text-light);
    animation: fadeIn 0.8s ease-in-out;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--surface-highlight), transparent 65%);
    pointer-events: none;
}

.login-card .logo {
    width: 82px;
    height: 82px;
    object-fit: cover;
    background: rgba(226, 232, 240, 0.5);
    
    box-shadow: 0 12px 28px rgba(148, 163, 184, 0.35);
    border: 2px solid rgba(59, 130, 246, 0.24);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    text-align: left;
}

.brand-text {
    flex: 1;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.18);
}

.login-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

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

.login-card .form-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: rgba(30, 41, 59, 0.75);
    margin-bottom: 0.45rem;
}

.position-relative {
    position: relative;
}

.form-control {
    border-radius: 14px;
    padding-left: 48px;
    padding-right: 48px;
    border: 1px solid var(--input-border);
    background: rgba(248, 250, 252, 0.95);
    color: var(--text-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-control::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--input-focus);
    background: #ffffff;
    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 46px;
    color: rgba(100, 116, 139, 0.8);
    font-size: 0.95rem;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 44px;
    border: none;
    background: transparent;
    color: rgba(100, 116, 139, 0.8);
    font-size: 0.95rem;
    padding: 0;
    transition: color 0.2s ease;
}

.toggle-password:hover,
.toggle-password:focus {
    color: var(--accent-strong);
}

.btn-primary {
    border-radius: 14px;
    font-weight: 600;
    padding: 0.78rem;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    border: none;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 24px 46px rgba(37, 99, 235, 0.36);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.alert {
    border-radius: 14px;
    border: none;
    font-size: 0.92rem;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.alert .btn-close {
    filter: none;
}

.progress-thin {
    height: 0.35rem;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 50px;
}

.login-footer .reset_pass {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.login-footer .reset_pass::before {
    font-family: 'FontAwesome';
    content: '\\f2f5';
    font-size: 0.85rem;
}

.login-footer .reset_pass:hover,
.login-footer .reset_pass:focus {
    color: var(--accent);
    text-decoration: underline;
}

.login-footer p {
    color: var(--text-muted);
}

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

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(18px);
    }
    100% {
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    body.auth-body {
        padding: 2rem 1.25rem;
    }

    .login-card {
        padding: 2.4rem 2rem;
    }

    .brand-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .input-icon,
    .toggle-password {
        top: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shape {
        animation: none;
    }

    .login-card,
    .btn-primary {
        transition: none;
    }
}
