/**
 * Auth layout: login, forgot password, reset password.
 * BEM: .auth-header, .auth-main, .auth-card
 */

@import 'app.css';
@import 'components/button.css';
@import 'components/form.css';
@import 'components/alert.css';

.auth-header {
    background: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-header a {
    color: #fff;
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
}

.auth-header__logo {
    display: flex;
    align-items: center;
}

.auth-header__logo-img {
    max-height: 2.25rem;
    object-fit: contain;
}

.auth-header__logo-fallback {
    display: none;
    font-weight: 600;
    font-size: 1.25rem;
}

.auth-header__locale {
    display: flex;
    gap: 0;
    align-items: center;
}

.auth-header__locale-btn {
    padding: 0.15rem 0.4rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.25rem;
    color: #adb5bd;
    background: #343a40;
    border: 1px solid #343a40;
    margin-left: -1px;
    line-height: 1.2;
}

.auth-header__locale-btn:first-child {
    margin-left: 0;
    border-radius: 999px 0 0 999px;
}

.auth-header__locale-btn:last-child {
    border-radius: 0 999px 999px 0;
}

.auth-header__locale-btn:hover {
    background: #495057;
    color: #dee2e6;
    border-color: #495057;
}

.auth-header__locale-btn--active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.auth-header__locale-btn--active:hover {
    background: var(--color-primary-hover);
    color: #fff;
    border-color: var(--color-primary-hover);
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 100vh;
    flex-direction: column;
    background: #f8f9fa;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.auth-card__title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
}

.auth-card__subtitle {
    margin: 0 0 1.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-align: center;
}

.auth-links {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
}

.auth-links a {
    color: #6b7280;
    text-decoration: none;
}

.auth-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap__icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    pointer-events: none;
}

.auth-input-wrap .form-control {
    padding-left: 2.75rem;
}

.auth-input-wrap--password .form-control {
    padding-right: 2.75rem;
}

.auth-input-wrap__toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-input-wrap__toggle:hover {
    color: var(--color-text-muted);
}

.auth-input-wrap__toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 1rem;
}

.auth-form .btn--primary {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.375rem;
}

.auth-form .form-group--checkbox {
    margin-bottom: 1rem;
}

.auth-form .form-group--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.auth-form .form-group--checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
}

.auth-form .invalid-feedback--block {
    margin-top: 0.5rem;
}
