:root {
    --primary-color: #016481;
    --secondary-color: #1BB1AF;
    --light-bg: #F3F6F9;
    --white: #FFFFFF;
    --text-color: #495057;
    --border-color: #E9EDF4;
}

.login-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}
.login-brand .brand-wordmark {
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.02em;
}
.login-brand .brand-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.14em;
}
.login-form .login-brand .brand-wordmark {
    color: var(--primary-color);
    font-size: 20px;
}
.login-form .login-brand .brand-tagline {
    color: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- Ambient background ---- */
body {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(1, 100, 129, 0.07), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(27, 177, 175, 0.09), transparent 42%),
        var(--light-bg);
}
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(1, 100, 129, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(1, 100, 129, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(circle at 50% 42%, black 5%, transparent 68%);
    mask-image: radial-gradient(circle at 50% 42%, black 5%, transparent 68%);
}
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    opacity: 0.4;
    animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 { width: 360px; height: 360px; background: var(--primary-color); top: -100px; left: -80px; animation-duration: 9s; }
.orb-2 { width: 300px; height: 300px; background: var(--secondary-color); bottom: -80px; right: -60px; animation-duration: 7s; animation-delay: -2.5s; }
.orb-3 { width: 220px; height: 220px; background: var(--secondary-color); top: 45%; right: 8%; animation-duration: 10s; animation-delay: -4s; opacity: 0.26; }

@keyframes orbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(50px, -60px) scale(1.15); }
    50%  { transform: translate(-30px, 30px) scale(0.92); }
    75%  { transform: translate(40px, 40px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes kenBurns {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.18) translate(-2%, -1%); }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes shimmerSweep {
    0% { transform: translateX(-120%) rotate(8deg); }
    100% { transform: translateX(220%) rotate(8deg); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 6px 12px rgba(18, 181, 180, 0.2), 0 2px 4px rgba(18, 181, 180, 0.1); }
    50% { box-shadow: 0 6px 20px rgba(18, 181, 180, 0.45), 0 2px 8px rgba(18, 181, 180, 0.25); }
}

.login-container {
    display: flex;
    background: var(--white);
    border-radius: 16px;
    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.08),
        0 10px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 1000px;
    max-width: 95%;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.login-container:hover {
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.08);
}

.login-banner {
    flex: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.login-banner::before,
.login-banner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    animation: orbFloat 7s ease-in-out infinite;
}
.login-banner::before {
    width: 240px;
    height: 240px;
    background: rgba(255, 255, 255, 0.22);
    top: -70px;
    right: -70px;
}
.login-banner::after {
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.18);
    bottom: -50px;
    left: -50px;
    animation-duration: 8.5s;
    animation-delay: -3s;
}
.login-banner .shimmer {
    content: '';
    position: absolute;
    top: -20%;
    left: 0;
    width: 45%;
    height: 140%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    animation: shimmerSweep 5s ease-in-out infinite;
    animation-delay: 1s;
    pointer-events: none;
    z-index: 1;
}
.login-banner > * {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.login-banner > *:nth-child(2) { animation-delay: 0.15s; }
.login-banner > *:nth-child(3) { animation-delay: 0.3s; }

.login-form {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
    position: relative;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}
.login-form > * {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.login-form > *:nth-child(1) { animation-delay: 0.1s; }
.login-form > *:nth-child(2) { animation-delay: 0.2s; }
.login-form form > *:nth-child(1) { animation-delay: 0.3s; }
.login-form form > *:nth-child(2) { animation-delay: 0.4s; }
.login-form form > *:nth-child(3) { animation-delay: 0.5s; }

.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.login-header h2 {
    color: #1E293B;
    margin-bottom: 6px;
    font-size: 26px;
    font-weight: 800;
}
.login-header p {
    color: #64748B;
}
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}
.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    animation: pulseGlow 2.6s ease-in-out infinite;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, box-shadow 0.2s ease;
}
.btn-login:hover {
    background: var(--secondary-color);
    animation-play-state: paused;
    box-shadow:
        0 10px 22px rgba(18, 181, 180, 0.35),
        0 4px 10px rgba(18, 181, 180, 0.18);
    transform: translateY(-2px) scale(1.025);
}
.btn-login:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #878A99;
}
.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    .login-banner {
        display: none;
    }
}
.brand-logo {
    overflow: hidden;
    border-radius: 14px;
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 20px;
    animation: kenBurns 9s ease-in-out infinite alternate;
}

.password-wrapper {
    position: relative;
    flex-grow: 1;
}

.password-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c6c6c;
}
        .form-control {
            width: 100%;
            padding: 12px 15px;
            background: #F9FAFE;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-color);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
            transition: all 0.25s ease, transform 0.25s ease;
        }
        .form-control:focus {
            transform: translateY(-1px);
        }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .login-container,
    .login-banner,
    .login-banner > *,
    .login-form > *,
    .login-form form > *,
    .brand-logo img,
    .orb,
    .login-banner::before,
    .login-banner::after,
    .login-banner .shimmer,
    .btn-login {
        animation: none !important;
    }
}