/* ClubSync - Auth pages (register/login) design system
   Converted from the Figma "Create your account" design.
   Plain CSS3 only - no Tailwind/build step, matches the approved
   Core PHP + HTML5 + CSS3 technology constraint. */

: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-surface-container: #e7eefe;
    --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;
    --radius-pill: 9999px;
}

* { 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: 32px 24px;
    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;
}

.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    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-features { 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 img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    object-fit: contain;
}

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

.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: 16px;
    line-height: 1.6;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    max-width: 32em;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.brand-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.brand-feature-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-feature-icon svg { width: 20px; height: 20px; }

.brand-feature-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0 0 2px;
}

.brand-feature-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
    margin: 0;
}

/* Right form panel */
.auth-form-panel {
    background: var(--color-surface-container-lowest);
    padding: 32px 20px 48px;
    display: flex;
    justify-content: center;
    animation: fadeUp 0.8s ease cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
}

.auth-form-wrap {
    width: 100%;
    max-width: 448px;
}

.auth-form-wrap header {
    margin-bottom: 28px;
    text-align: center;
}

.auth-form-wrap header h2 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
    color: var(--color-on-surface);
}

.auth-form-wrap header p {
    font-size: 15px;
    color: var(--color-on-surface-variant);
    margin: 0;
}

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

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

.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: 12px 16px 12px 40px;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-on-surface);
    background: var(--color-surface-container-lowest);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

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

.input-wrap input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(33, 112, 228, 0.15);
}

.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; }

.password-strength { margin-top: 8px; }

.strength-track {
    width: 100%;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--color-surface-container);
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 6%;
    border-radius: var(--radius-pill);
    background: var(--color-outline-variant);
    transition: width .2s ease, background-color .2s ease;
}

.strength-label {
    font-size: 12px;
    color: var(--color-on-surface-variant);
    margin: 4px 0 0;
}

.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 22px;
}

.terms-row input {
    margin-top: 3px;
    width: 16px;
    height: 16px;
}

.terms-row label {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-on-surface-variant);
    margin: 0;
}

.terms-row a {
    color: var(--color-secondary);
    font-weight: 700;
    text-decoration: none;
}

.terms-row a:hover { text-decoration: underline; }

.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--color-on-primary);
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: background-color .15s, transform .1s;
}

.btn-submit svg { width: 18px; height: 18px; }
.btn-submit:hover { background: var(--color-primary-container); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.7; cursor: default; }

.auth-alt-link {
    text-align: center;
    margin-top: 16px;
    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; }

.auth-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-outline-variant);
    text-align: center;
}

.auth-footer p {
    font-size: 12px;
    color: rgba(68, 70, 81, 0.6);
    margin: 0 0 8px;
}

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

.auth-footer .links a {
    color: rgba(0, 88, 190, 0.7);
    text-decoration: none;
}

.auth-footer .links a:hover { text-decoration: underline; }

.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 100px;
    }

    .auth-form-panel {
        flex: 1;
        padding: 56px 48px;
        align-items: center;
    }

    .auth-form-wrap header,
    .auth-footer { text-align: left; }

    .auth-footer .links { justify-content: flex-start; }
}
