:root {
    --font-main: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Base override for login page availability */
.login-container {
    position: fixed;
    /* Changed from relative to fixed to overlay everything if needed */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 2000;
    /* High z-index to sit on top of everything */
    background: transparent;
    /* Transparent to show dynamic background behind */
}

/* --- LEFT SIDE NOW OVERLAY --- */
.login-left {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    /* Let clicks pass through to canvas if not on form */
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    background: transparent;
    /* Fully transparent */
    /* backdrop-filter removed for clarity */
    border: none;
    padding: 40px;
    border-radius: 16px;
    /* 1st shadow: blurred white border effect. 2nd: drop shadow */
    box-shadow:
        0 0 5px 1px rgba(255, 255, 255, 0.15),
        0 4px 30px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    /* Re-enable clicks */
}

.login-logo {
    height: 40px;
    margin-bottom: 30px;
    display: block;
}

.login-form-wrapper h2 {
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 24px;
    color: var(--text-main);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.login-form-wrapper input,
.invite-row input,
#createOrgSection input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: var(--font-main);
    transition: all 0.2s;
}

.login-form-wrapper input:focus,
.invite-row input:focus,
#createOrgSection input:focus {
    border-color: var(--score-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.login-form-wrapper button:not(.secondary) {
    width: 100%;
    background: linear-gradient(135deg, var(--score-gold), #d97706);
    color: #111;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    margin-top: 10px;
    box-shadow: none;
    /* Reset app default if any */
}

.login-form-wrapper button:not(.secondary):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.auth-toggle {
    margin-top: 25px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.auth-toggle a {
    color: var(--score-gold);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.error-msg {
    color: var(--danger);
    font-size: 13px;
    min-height: 20px;
    margin-bottom: 10px;
}

/* --- Registration specific --- */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.checkbox-group input {
    width: auto;
}

.checkbox-group label {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

.invite-row {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.invite-row input {
    text-transform: uppercase;
    flex: 1;
    /* Take available widths */
}

.icon-btn.secondary {
    width: auto;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
    margin-top: 0;
}

.icon-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.info-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.input-label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* --- RIGHT SIDE (2/3) --- */
/* --- RIGHT SIDE NOW BACKGROUND --- */
.login-right {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--bg-body);
    /* Match body bg */
    width: 100%;
    height: 100%;
}

.bars-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 5;
    /* Canvas will fill this */
}

canvas#dotsCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Loading Screen Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    border-top-color: var(--score-gold);
    animation: spin 1s ease-in-out infinite;
}

/* Ensure bars are visible during load but behind loader content and on top of loader background */
body.loading-active #barsContainer {
    z-index: 10001 !important;
    display: block !important;
}

/* Hide loading screen when done with a fade out if needed */
.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}