/* ClubSync - Login page design (centered card layout)
   Plain CSS3 only - matches register.css color/typography tokens. */

:root {
    --color-primary: #00236f;
    --color-primary-container: #1e3a8a;
    --color-secondary: #0058be;
    --color-secondary-container: #2170e4;
    --color-on-primary: #ffffff;
    --color-surface: #f9f9ff;
    --color-surface-container-lowest: #ffffff;
    --color-on-surface: #151c27;
    --color-on-surface-variant: #444651;
    --color-outline-variant: #c5c5d3;
    --color-error: #ba1a1a;
    --color-error-container: #ffdad6;
    --color-on-error-container: #93000a;
    --radius: 12px;
}

* { box-sizing: border-box; }

body.auth-body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: var(--color-surface);
    color: var(--color-on-surface);
}

.auth-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Left brand panel */
.auth-brand {
    position: relative;
    overflow: hidden;
    padding: 50px 56px;
    color: var(--color-on-primary);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 55%, var(--color-secondary) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
}

.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand::before { 
    width: 350px; height: 350px; 
    top: -120px; left: -100px; 
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
}
.auth-brand::after { 
    width: 450px; height: 450px; 
    bottom: -150px; right: -150px; 
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
}

@keyframes fadeRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand-top, .brand-footer { position: relative; z-index: 1; animation: fadeRight 0.8s ease cubic-bezier(0.2, 0.8, 0.2, 1); }
.brand-tagline { animation: fadeRight 1s ease cubic-bezier(0.2, 0.8, 0.2, 1); animation-delay: 0.1s; }

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.brand-logo svg { flex: 0 0 auto; }

.brand-logo span {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-tagline {
    margin-top: auto;
    margin-bottom: auto;
    padding-bottom: 40px;
}

.brand-tagline h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
    background: linear-gradient(to right, #ffffff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.brand-tagline p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    max-width: 28em;
    font-weight: 400;
}

.brand-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 6px;
}

.brand-footer .links {
    display: flex;
    gap: 10px;
    font-size: 12px;
}

.brand-footer .links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.brand-footer .links a:hover { text-decoration: underline; }
.brand-footer .links .sep { color: rgba(255, 255, 255, 0.4); }

/* Right content area */
.auth-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
}

.auth-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: var(--color-surface-container-lowest);
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 40px -10px rgba(0, 35, 111, 0.12), 0 0 2px rgba(0, 35, 111, 0.1);
    padding: 44px 36px;
    animation: fadeUp 0.8s ease cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px -10px rgba(0, 35, 111, 0.15), 0 0 2px rgba(0, 35, 111, 0.1);
}

.login-card header {
    text-align: center;
    margin-bottom: 26px;
}

.login-card header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 8px;
}

.login-card header p {
    font-size: 14px;
    color: var(--color-on-surface-variant);
    margin: 0;
}

.form-group { margin-bottom: 20px; }

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--color-on-surface-variant);
    margin-bottom: 6px;
}

.label-row label { margin-bottom: 0; }

.forgot-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-secondary);
    text-decoration: none;
}

.forgot-link:hover { text-decoration: underline; }

.input-wrap { position: relative; }

.input-wrap .icon-left {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-secondary-container);
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-on-surface);
    background: #fcfcff;
    border: 1.5px solid var(--color-outline-variant);
    border-radius: var(--radius);
    outline: none;
    transition: all .25s ease;
}

.input-wrap.has-toggle input { padding-right: 48px; }

.input-wrap input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(33, 112, 228, 0.12);
    background: #ffffff;
}

.toggle-visibility {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #757682;
    display: flex;
}

.toggle-visibility:hover { color: var(--color-primary); }
.toggle-visibility svg { width: 20px; height: 20px; }

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--color-on-primary);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 35, 111, 0.25);
    transition: all 0.25s ease;
    margin-top: 6px;
}

.btn-submit svg { width: 18px; height: 18px; }
.btn-submit:hover { 
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 35, 111, 0.35);
    background: linear-gradient(135deg, #001d5e 0%, #004d9b 100%);
}
.btn-submit:active { 
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 35, 111, 0.2); 
}
.btn-submit:disabled { opacity: 0.7; cursor: default; }

.auth-alt-link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--color-on-surface-variant);
}

.auth-alt-link a {
    color: var(--color-secondary);
    font-weight: 700;
    text-decoration: none;
}

.auth-alt-link a:hover { text-decoration: underline; }

.content-footer {
    padding: 16px 20px 28px;
    text-align: center;
}

.content-footer .links {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
}

.content-footer .links a {
    color: var(--color-on-surface-variant);
    text-decoration: none;
}

.content-footer .links a:hover { color: var(--color-secondary); }
.content-footer .links .sep { color: var(--color-outline-variant); }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 14px;
}

.alert ul { margin: 0; padding-left: 18px; }

.alert-error {
    background: var(--color-error-container);
    color: var(--color-on-error-container);
}

.alert-success {
    background: #d7f5e3;
    color: #0a6b3d;
}

@media (min-width: 1024px) {
    .auth-layout { flex-direction: row; }

    .auth-brand {
        flex: 0 0 45%;
        padding: 56px 48px;
        min-height: 100vh;
    }

    .auth-content { flex: 1; }
}
