/**
 * PlayGo public auth screens
 */

body.auth-page {
    --brand-primary: #00A7D8;
    --brand-primary-dim: #007CA8;
    --brand-secondary: #0066FF;
    --brand-accent: #E93767;
    --bg-base: #F4F7FB;
    --bg-surface: #FFFFFF;
    --bg-elevated: #F8FAFD;
    --bg-hover: #EEF4FA;
    --text-primary: #172033;
    --text-secondary: #46556A;
    --text-muted: #7A8798;
    --border-subtle: #DDE7F1;
    --border-strong: #C7D5E5;
    --gradient-primary: linear-gradient(135deg, #00D4FF 0%, #0066FF 100%);
    --shadow-lg: 0 24px 70px rgba(23, 32, 51, 0.16);
    --shadow-glow: 0 12px 28px rgba(0, 166, 216, 0.22);

    min-height: 100vh;
    background: linear-gradient(145deg, #F7FAFD 0%, #EEF4FA 48%, #E8F7FB 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: var(--font-sans);
}

.auth-shell {
    width: min(960px, 100%);
}

.auth-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
    min-height: 560px;
    background: var(--bg-surface);
    border: 1px solid rgba(199, 213, 229, 0.9);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    background: linear-gradient(155deg, #FFFFFF 0%, #F1FAFE 52%, #EAF3FF 100%);
    border-right: 1px solid var(--border-subtle);
}

.auth-brand::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background-image:
        linear-gradient(rgba(0, 102, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 255, 0.055) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 86%);
    pointer-events: none;
}

.auth-brand-main,
.auth-brand-footer {
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: block;
    width: min(280px, 92%);
    height: auto;
    margin-bottom: 34px;
    filter: drop-shadow(0 10px 22px rgba(0, 102, 255, 0.14));
}

.auth-brand h1 {
    font-family: var(--font-display);
    font-size: 2.15rem;
    line-height: 1.06;
    margin: 0 0 12px;
    color: var(--text-primary);
    letter-spacing: 0;
}

.auth-brand p {
    max-width: 360px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
}

.auth-brand-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.auth-brand-footer i {
    color: var(--brand-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px;
    background: #FFFFFF;
}

.auth-form-header {
    margin-bottom: 26px;
}

.auth-form-header h2 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1.2;
    margin: 0 0 8px;
    color: var(--text-primary);
    letter-spacing: 0;
}

.auth-form-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
}

.auth-page .alert {
    font-size: 0.88rem;
    margin-bottom: 18px;
}

.auth-page .input-group {
    border-radius: var(--radius-sm);
}

.auth-page .input-group-text {
    width: 46px;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-right: none;
    color: var(--text-muted);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.auth-page .input-group .form-control {
    min-height: 48px;
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-primary);
}

.auth-page .input-group .form-control::placeholder {
    color: #94A3B8;
}

.auth-page .input-group .form-control:focus {
    background: #FFFFFF;
    color: var(--text-primary);
}

.auth-page .input-group:focus-within .input-group-text {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.auth-page .form-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
}

.auth-link-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.auth-link-row a {
    color: var(--brand-primary-dim);
    font-weight: 500;
}

.auth-link-row a:hover {
    color: var(--brand-primary);
}

.auth-footer {
    margin-top: 14px;
    text-align: center;
    color: #7A8798;
    font-size: 0.76rem;
}

@media (max-width: 860px) {
    body.auth-page {
        padding: 16px;
        align-items: flex-start;
    }

    .auth-panel {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-brand {
        min-height: 260px;
        padding: 30px;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .auth-logo {
        width: min(240px, 86%);
        margin-bottom: 24px;
    }

    .auth-brand h1 {
        font-size: 1.72rem;
    }

    .auth-form {
        padding: 30px;
    }
}

@media (max-width: 460px) {
    body.auth-page {
        padding: 0;
    }

    .auth-panel {
        border-radius: 0;
        border-left: none;
        border-right: none;
        min-height: 100vh;
    }

    .auth-brand {
        min-height: 230px;
        padding: 26px 22px;
    }

    .auth-form {
        padding: 28px 22px 32px;
    }
}
