/*--------------------------------------------------------------
# BOQ Portal Auth Pages
# Depends on: style.css
--------------------------------------------------------------*/

:root {
    --auth-primary: var(--accent-color);
    --auth-primary-dark: var(--accent-hover);
    --auth-primary-soft: var(--accent-soft);
    --auth-bg: #f7fbfe;
    --auth-dark: #0c1630;
    --auth-dark-soft: #14233f;
    --auth-text: var(--default-color);
    --auth-heading: var(--heading-color);
    --auth-border: var(--border-color);
    --auth-surface: var(--surface-color);
    --auth-muted: #f8fafc;
    --auth-danger: #dc3545;
    --auth-radius-xl: 30px;
    --auth-radius-lg: 22px;
    --auth-radius-md: 16px;
    --auth-radius-sm: 12px;
    --auth-shadow: 0 28px 70px rgba(15, 23, 42, 0.09);
    --auth-transition: 0.25s ease;
}

/*--------------------------------------------------------------
# Layout
--------------------------------------------------------------*/

.auth-login-page,
.auth-register-page,
.auth-password-page,
.auth-reset-page,
.auth-otp-page {
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
    padding: 124px 16px 96px;
    background:
        radial-gradient(circle at top right, rgba(80, 197, 255, 0.12), transparent 28%),
        radial-gradient(circle at bottom left, rgba(80, 197, 255, 0.08), transparent 26%),
        linear-gradient(180deg, #f8fafc 0%, #eef7fb 100%);
}

.auth-shell {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.auth-shell-wide {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.auth-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-xl);
    box-shadow: var(--auth-shadow);
}

.auth-wrap::before {
    content: "";
    position: absolute;
    top: -90px;
    right: -70px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(80, 197, 255, 0.12), transparent 70%);
    pointer-events: none;
}

/*--------------------------------------------------------------
# Left Panel
--------------------------------------------------------------*/

.auth-side-col {
    min-height: 100%;
}

.auth-side {
    position: relative;
    min-height: 100%;
    height: 100%;
    padding: 44px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    background:
        radial-gradient(circle at top right, rgba(80, 197, 255, 0.24), transparent 30%),
        radial-gradient(circle at bottom left, rgba(80, 197, 255, 0.14), transparent 28%),
        linear-gradient(160deg, var(--auth-dark) 0%, var(--auth-dark-soft) 100%);
}

.auth-side>* {
    position: relative;
    z-index: 1;
}

.auth-side-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    min-height: 36px;
    padding: 7px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(80, 197, 255, 0.16);
    border: 1px solid rgba(80, 197, 255, 0.30);
    color: #e7f7ff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-side h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(2rem, 3.4vw, 2.55rem);
    font-weight: 800;
    line-height: 1.12;
}

.auth-side-text {
    max-width: 520px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.96rem;
    line-height: 1.8;
}

.auth-side-list {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.auth-side-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.auth-side-item i {
    margin-top: 3px;
    color: #7bd3ff;
    font-size: 1rem;
    flex: 0 0 auto;
}

.auth-side-item span {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.94rem;
    line-height: 1.65;
}

.auth-side-note,
.auth-register-highlight {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 15px 16px;
    border-radius: var(--auth-radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.65;
}

.auth-side-note i {
    margin-top: 2px;
    color: #7bd3ff;
}

.auth-side-actions {
    margin-top: 22px;
}

.auth-side-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    border-radius: var(--auth-radius-sm);
    border: 1px solid #ffffff;
    background: #ffffff;
    color: var(--auth-heading);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.16);
    transition: var(--auth-transition);
}

.auth-side-btn:hover {
    background: #f8fafc;
    color: var(--auth-heading);
    transform: translateY(-1px);
}

/*--------------------------------------------------------------
# Auth Card
--------------------------------------------------------------*/

.auth-card {
    position: relative;
    z-index: 1;
    padding: 40px 36px;
    background: transparent;
}

.auth-card-head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.auth-card-head-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.auth-card-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: var(--auth-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-primary-soft);
    color: var(--auth-primary-dark);
    font-size: 1.15rem;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 11px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(80, 197, 255, 0.10);
    border: 1px solid rgba(80, 197, 255, 0.18);
    color: #1c5875;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-card-head h2 {
    margin: 0 0 8px;
    color: var(--auth-heading);
    font-size: 1.62rem;
    font-weight: 800;
    line-height: 1.25;
}

.auth-card-head p {
    margin: 0;
    color: var(--auth-text);
    font-size: 0.95rem;
    line-height: 1.72;
}

.auth-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: var(--auth-radius-sm);
    border: 1px solid var(--auth-border);
    background: #ffffff;
    color: var(--auth-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--auth-transition);
}

.auth-back-btn:hover {
    background: var(--auth-muted);
    border-color: rgba(80, 197, 255, 0.24);
    color: var(--auth-heading);
}

/*--------------------------------------------------------------
# Form Elements
--------------------------------------------------------------*/

.auth-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--auth-heading);
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-label span {
    color: var(--auth-danger);
}

.auth-input-wrap {
    display: flex;
    align-items: center;
    min-height: 52px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: #ffffff;
    overflow: hidden;
    transition: var(--auth-transition);
}

.auth-input-wrap:hover {
    border-color: rgba(80, 197, 255, 0.34);
}

.auth-input-wrap:focus-within {
    border-color: rgba(80, 197, 255, 0.70);
    box-shadow: 0 0 0 4px rgba(80, 197, 255, 0.12);
}

.auth-input-wrap.auth-input-error {
    border-color: var(--auth-danger);
}

.auth-input-wrap.auth-input-error:focus-within {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.10);
}

.auth-input-wrap>i {
    width: 46px;
    flex: 0 0 46px;
    text-align: center;
    color: #98a2b3;
    font-size: 0.96rem;
}

.auth-input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px 0 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--auth-heading);
    font-size: 0.95rem;
}

.auth-input::placeholder {
    color: #98a2b3;
}

.auth-select {
    appearance: none;
    cursor: pointer;
}

.invalid-feedback,
.auth-error-text {
    margin-top: 7px;
    color: var(--auth-danger);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.45;
}

.auth-help-text {
    margin-top: 9px;
    color: var(--auth-text);
    font-size: 0.86rem;
    line-height: 1.55;
}

/*--------------------------------------------------------------
# Password Toggle
--------------------------------------------------------------*/

.auth-password-wrap .auth-input {
    padding-right: 0;
}

.auth-password-toggle {
    width: 46px;
    min-height: 52px;
    border: 0;
    background: transparent;
    color: #98a2b3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--auth-transition);
}

.auth-password-toggle:hover {
    color: var(--auth-primary-dark);
}

.auth-password-toggle:focus {
    outline: none;
}

/*--------------------------------------------------------------
# Buttons and Links
--------------------------------------------------------------*/

.auth-actions {
    margin-top: 24px;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: var(--auth-radius-sm);
    border: 1px solid transparent;
    font-size: 0.94rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--auth-transition);
}

.auth-btn-primary {
    width: 100%;
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(80, 197, 255, 0.24);
}

.auth-btn-primary:hover {
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

.auth-footer-text {
    margin-top: 18px;
    text-align: center;
    color: var(--auth-text);
    font-size: 0.94rem;
    line-height: 1.7;
}

.auth-footer-text a,
.auth-inline-link,
.auth-switch-links a,
.auth-help-text a {
    color: var(--auth-primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.auth-footer-text a:hover,
.auth-inline-link:hover,
.auth-switch-links a:hover,
.auth-help-text a:hover {
    color: var(--auth-primary);
}

/*--------------------------------------------------------------
# Login / Register Helpers
--------------------------------------------------------------*/

.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--auth-text);
    font-size: 0.92rem;
    font-weight: 600;
}

.auth-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.auth-link-btn {
    padding: 0;
    border: 0;
    background: transparent;
}

.auth-register-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-register-strip-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(80, 197, 255, 0.08);
    border: 1px solid rgba(80, 197, 255, 0.14);
    color: #1c5875;
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-register-strip-item i {
    color: var(--auth-primary-dark);
}

.auth-register-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--auth-radius-md);
    background: #f8fbfd;
    border: 1px solid rgba(80, 197, 255, 0.14);
    color: var(--auth-text);
    font-size: 0.9rem;
    line-height: 1.65;
}

.auth-register-note i {
    color: var(--auth-primary-dark);
    margin-top: 2px;
}

/*--------------------------------------------------------------
# Register Specific
--------------------------------------------------------------*/

.auth-register-wrap {
    border-radius: 32px;
}

.auth-register-side {
    background:
        radial-gradient(circle at top right, rgba(80, 197, 255, 0.25), transparent 30%),
        linear-gradient(165deg, #0f172a 0%, #16324b 56%, #1d4866 100%);
}

.auth-register-highlights {
    display: grid;
    gap: 14px;
    margin-top: 8px;
}

.auth-register-highlight i {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(80, 197, 255, 0.14);
    color: #7bd3ff;
}

.auth-register-highlight strong {
    display: block;
    color: #ffffff;
    font-size: 0.93rem;
    margin-bottom: 2px;
}

.auth-register-highlight span {
    display: block;
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.88rem;
    line-height: 1.6;
}

/*--------------------------------------------------------------
# Modal
--------------------------------------------------------------*/

.auth-choice-modal .modal-dialog {
    max-width: 620px;
    padding: 16px;
}

.auth-modal-content {
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.auth-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 26px 26px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.auth-modal-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--auth-primary-dark);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-modal-header h3 {
    margin: 0 0 8px;
    font-size: 1.32rem;
    font-weight: 800;
}

.auth-modal-header p {
    margin: 0;
    color: var(--auth-text);
    line-height: 1.7;
}

.auth-modal-close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: #ffffff;
    color: var(--auth-heading);
}

.auth-modal-body {
    padding: 22px 26px 26px;
}

.auth-reset-options {
    display: grid;
    gap: 14px;
}

.auth-reset-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: var(--auth-radius-lg);
    border: 1px solid var(--auth-border);
    background: #ffffff;
    text-decoration: none;
    transition: var(--auth-transition);
}

.auth-reset-option:hover {
    border-color: rgba(80, 197, 255, 0.45);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

.auth-reset-option-featured {
    border-color: rgba(80, 197, 255, 0.30);
    background: linear-gradient(180deg, rgba(80, 197, 255, 0.06) 0%, #ffffff 100%);
}

.auth-reset-option-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 16px;
    background: rgba(80, 197, 255, 0.12);
    color: var(--auth-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-reset-option-content {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-reset-option-content h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.auth-reset-option-content p {
    margin: 0;
    color: var(--auth-text);
    font-size: 0.93rem;
    line-height: 1.7;
}

.auth-reset-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(80, 197, 255, 0.14);
    color: var(--auth-primary-dark);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-reset-option-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.auth-reset-option-arrow {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-muted);
    color: var(--auth-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/*--------------------------------------------------------------
# SELECT FIELD WRAP
--------------------------------------------------------------*/

.auth-select-wrap {
    position: relative;
}

.auth-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 46px;
    cursor: pointer;
}

.auth-select-arrow {
    position: absolute;
    right: 16px;
    color: rgba(65, 64, 66, 0.65);
    pointer-events: none;
    font-size: 0.95rem;
}

/*--------------------------------------------------------------
# OTP
--------------------------------------------------------------*/

.auth-otp-wrap {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.auth-otp-box {
    width: 100%;
    height: 58px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: #ffffff;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--auth-heading);
    outline: none;
    transition: var(--auth-transition);
}

.auth-otp-box:focus {
    border-color: rgba(80, 197, 255, 0.70);
    box-shadow: 0 0 0 4px rgba(80, 197, 255, 0.12);
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/

@media (max-width: 1199.98px) {
    .auth-page {
        padding-top: 116px;
        padding-bottom: 90px;
    }

    .auth-wrap {
        max-width: 780px;
        margin: 0 auto;
    }

    .auth-card {
        padding: 34px 28px;
    }
}

@media (max-width: 767.98px) {
    .auth-page {
        padding: 106px 14px 82px;
    }

    .auth-wrap {
        border-radius: 22px;
    }

    .auth-card {
        padding: 26px 20px;
    }

    .auth-card-head {
        gap: 14px;
        margin-bottom: 20px;
    }

    .auth-card-head-main {
        gap: 14px;
    }

    .auth-card-icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        border-radius: 14px;
    }

    .auth-card-head h2 {
        font-size: 1.34rem;
    }

    .auth-label,
    .auth-input,
    .auth-btn {
        font-size: 0.9rem;
    }

    .auth-otp-box {
        height: 52px;
        font-size: 1.02rem;
    }
}

@media (max-width: 575.98px) {
    .auth-page {
        padding: 98px 12px 76px;
    }

    .auth-wrap {
        border-radius: 18px;
    }

    .auth-card {
        padding: 22px 16px;
    }

    .auth-card-head {
        flex-direction: column;
        gap: 12px;
        padding-top: 48px;
    }

    .auth-card-head-main {
        width: 100%;
        gap: 12px;
    }

    .auth-back-btn {
        position: absolute;
        top: 0;
        right: 0;
        min-height: 38px;
        padding: 0 12px;
        font-size: 0.85rem;
    }

    .auth-card-head h2 {
        font-size: 1.2rem;
    }

    .auth-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-register-strip {
        gap: 8px;
    }

    .auth-register-strip-item {
        font-size: 0.78rem;
    }

    .auth-register-note {
        padding: 12px 14px;
        font-size: 0.86rem;
    }

    .auth-modal-header,
    .auth-modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .auth-reset-option {
        align-items: flex-start;
        padding: 16px;
    }

    .auth-reset-option-arrow {
        display: none;
    }

    .auth-otp-wrap {
        gap: 7px;
    }

    .auth-otp-box {
        height: 48px;
        font-size: 0.98rem;
    }
}

@media (max-width: 399.98px) {
    .auth-back-btn {
        width: 36px;
        padding: 0;
    }

    .auth-back-btn span {
        display: none;
    }

    .auth-card-head-main {
        flex-direction: column;
    }

    .auth-card-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .auth-otp-box {
        height: 44px;
        font-size: 0.92rem;
    }
}