/* Auth pages — extends landing design system */

.auth-body {
    background: linear-gradient(180deg, var(--color-light) 0%, var(--color-white) 100%);
    min-height: 100vh;
}

.auth-header {
    padding: 1.25rem 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.auth-header .navbar {
    padding: 0;
}

.auth-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-header__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.auth-header__back:hover {
    color: var(--color-primary);
}

.auth-main {
    padding: 3rem 0 5rem;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 80px);
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

/* Info column */
.auth-info {
    height: 100%;
    padding: 3.5rem 2.5rem;
    background: linear-gradient(160deg, var(--color-dark) 0%, #334155 100%);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-info__badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    margin-bottom: 1.5rem;
    background: rgba(37, 99, 235, 0.25);
    color: #93C5FD;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: fit-content;
}

.auth-info__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.auth-info__text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.auth-info__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-info__list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-info__list li:first-child {
    border-top: none;
    padding-top: 0;
}

.auth-info__list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: #93C5FD;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Form column */
.auth-form-wrapper {
    padding: 3.5rem 3rem;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-header__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.auth-form-header__text {
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.auth-errors-alert {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-sm);
    color: #991B1B;
    font-size: 0.9rem;
}

.auth-errors-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.auth-errors-alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.auth-errors-alert li {
    margin-bottom: 0.15rem;
}

.auth-label {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.auth-label__required {
    color: #DC2626;
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.auth-input-group__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 1rem;
    z-index: 4;
    pointer-events: none;
}

.auth-input {
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.auth-input.is-invalid {
    border-color: #DC2626;
    padding-right: 3rem;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.auth-input-group__toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    padding: 0.25rem;
    cursor: pointer;
    z-index: 4;
    transition: color var(--transition);
    line-height: 1;
}

.auth-input-group__toggle:hover {
    color: var(--color-primary);
}

.auth-input-group .invalid-feedback {
    position: absolute;
    bottom: -1.35rem;
    left: 0;
    font-size: 0.8rem;
}

.auth-input-group--textarea .auth-input--textarea {
    padding: 0.75rem 1rem;
    resize: vertical;
    min-height: 100px;
}

.auth-field {
    position: relative;
    padding-bottom: 0.25rem;
}

.auth-field:has(.invalid-feedback) {
    margin-bottom: 1.75rem !important;
}

/* Password strength */
.auth-password-strength {
    margin-top: 0.75rem;
}

.auth-password-strength__bar {
    height: 4px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.auth-password-strength__fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
    background-color: #DC2626;
}

.auth-password-strength__fill--weak {
    width: 25%;
    background-color: #DC2626;
}

.auth-password-strength__fill--fair {
    width: 50%;
    background-color: #F59E0B;
}

.auth-password-strength__fill--good {
    width: 75%;
    background-color: #2563EB;
}

.auth-password-strength__fill--strong {
    width: 100%;
    background-color: var(--color-success);
}

.auth-password-strength__label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.auth-password-strength__rules {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
}

.auth-password-strength__rules li {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--transition);
}

.auth-password-strength__rules li i {
    font-size: 0.5rem;
    transition: color var(--transition);
}

.auth-password-strength__rules li.is-valid {
    color: var(--color-success);
}

.auth-password-strength__rules li.is-valid i::before {
    content: "\F26B";
    font-family: "bootstrap-icons";
    font-size: 0.75rem;
}

.auth-submit {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.auth-form-footer {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.auth-form-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

.auth-form-footer a:hover {
    color: var(--color-primary-hover);
}

/* Role selection page */
.auth-role-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.auth-role-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.auth-role-header__badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    margin-bottom: 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-role-header__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.auth-role-header__text {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.auth-role-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    background: var(--color-white);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.auth-role-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3.5rem 2.5rem;
    min-height: 420px;
}

.auth-role-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.auth-role-card--create:hover {
    border-color: rgba(37, 99, 235, 0.35);
}

.auth-role-card--join:hover {
    border-color: rgba(22, 163, 74, 0.35);
}

.auth-role-card__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    font-size: 2.75rem;
    margin-bottom: 2rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.auth-role-card:hover .auth-role-card__icon-wrap {
    transform: scale(1.08);
}

.auth-role-card__icon-wrap--primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.06));
    color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.auth-role-card__icon-wrap--success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(22, 163, 74, 0.06));
    color: var(--color-success);
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.15);
}

.auth-role-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.auth-role-card__description {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    flex-grow: 1;
    max-width: 340px;
}

.auth-role-card__btn {
    margin-top: auto;
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-role-card:hover .auth-role-card__btn {
    transform: translateY(-2px);
}

/* Dashboard */
.dashboard-header__user {
    display: flex;
    align-items: center;
}

.dashboard-header__name {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.dashboard-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.dashboard-welcome {
    margin-bottom: 2.5rem;
}

.dashboard-welcome__badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    margin-bottom: 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dashboard-welcome__title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.dashboard-welcome__text {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 0;
}

.dashboard-stat-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.dashboard-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.dashboard-stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.dashboard-stat-card__icon--primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.dashboard-stat-card__icon--success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--color-success);
}

.dashboard-stat-card__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.dashboard-stat-card__value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0;
    line-height: 1.5;
}

.dashboard-info-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.dashboard-info-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

.dashboard-info-card__text {
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* Registration type page (legacy) */
.auth-type-page {
    max-width: 900px;
    margin: 0 auto;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2.5rem;
    position: relative;
    animation: slideDown 0.5s ease;
}

.auth-alert--success {
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.25);
}

.auth-bootstrap-alert {
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
}

.auth-alert__icon {
    font-size: 1.75rem;
    color: var(--color-success);
    flex-shrink: 0;
}

.auth-alert__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.25rem;
}

.auth-alert__text {
    color: var(--color-text);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.auth-alert__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color var(--transition);
}

.auth-alert__close:hover {
    color: var(--color-dark);
}

.auth-type-header {
    text-align: center;
    margin-bottom: 3rem;
}

.auth-type-header__badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    margin-bottom: 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-type-header__title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

.auth-type-header__text {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto;
}

.auth-type-card {
    height: 100%;
    padding: 2.5rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

.auth-type-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.auth-type-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.auth-type-card__icon--primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.auth-type-card__icon--success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--color-success);
}

.auth-type-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

.auth-type-card__text {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .auth-info {
        padding: 2.5rem 2rem;
    }

    .auth-form-wrapper {
        padding: 2.5rem 2rem;
    }

    .auth-main {
        padding: 1.5rem 0 3rem;
        align-items: flex-start;
    }

    .auth-main > .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .auth-card {
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 575.98px) {
    .auth-header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .auth-form-wrapper {
        padding: 1.75rem 1.25rem;
    }

    .auth-info {
        padding: 2rem 1.25rem;
    }

    .auth-info__title {
        font-size: 1.5rem;
    }

    .auth-form-header__title {
        font-size: 1.35rem;
    }

    .auth-submit {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .auth-password-strength__rules {
        grid-template-columns: 1fr;
    }

    .auth-header__back span {
        display: none;
    }

    .auth-role-card__body {
        padding: 2.5rem 1.5rem;
        min-height: auto;
    }

    .auth-role-card__icon-wrap {
        width: 80px;
        height: 80px;
        font-size: 2.25rem;
        margin-bottom: 1.5rem;
    }
}

.legal-page {
    max-width: 820px;
    margin: 2rem auto 3rem;
    padding: 2rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(30, 41, 59, 0.06);
}

.legal-page__header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.legal-page__badge {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.legal-page__title {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-dark);
}

.legal-page__updated {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.legal-page__section {
    margin-bottom: 1.75rem;
}

.legal-page__section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-dark);
}

.legal-page__section p {
    margin: 0 0 0.75rem;
    line-height: 1.7;
    color: var(--color-text);
}

.legal-page__section ul {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.7;
    color: var(--color-text);
}

.legal-page__section li + li {
    margin-top: 0.35rem;
}

.legal-page__section a {
    color: var(--color-primary);
    text-decoration: none;
}

.legal-page__section a:hover {
    text-decoration: underline;
}

.legal-page__footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 767.98px) {
    .legal-page {
        margin: 1rem auto 2rem;
        padding: 1.25rem;
    }

    .legal-page__title {
        font-size: 1.6rem;
    }
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background: var(--color-white);
    color: var(--color-text);
    font-weight: 600;
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.auth-google-btn:hover {
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
    color: var(--color-text);
    transform: translateY(-1px);
}

.auth-google-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
