/* ═══════════════════════════════════════════════════════════════
   BAS Auth — Login + Registration Page
   Brand: Anthracite #24282A, Burgundy #800033, White #FFFFFF
   ═══════════════════════════════════════════════════════════════ */

/* ── Full-page Layout ──────────────────────────────────────── */
.bas-auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px 16px;
    background: #f0f1f2;
    border-radius: 0;
}



/* ── Auth Card ─────────────────────────────────────────────── */
.bas-auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e4e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
    padding: 40px 36px;
    position: relative;
    z-index: 1;
}

/* ── Logo ──────────────────────────────────────────────────── */
.bas-auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.bas-auth-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #800033, #a02050);
    border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(128, 0, 51, 0.3);
}

.bas-auth-logo-icon svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.bas-auth-logo-text {
    display: block;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #24282A;
    text-transform: uppercase;
}

.bas-auth-logo-text span {
    color: #800033;
}

.bas-auth-logo-sub {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #74797d;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ── Main Tabs: Login / Registration ───────────────────────── */
.bas-auth-main-tabs {
    display: flex;
    gap: 0;
    background: #f4f5f6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}

.bas-auth-main-tab {
    flex: 1;
    padding: 11px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #74797d;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.bas-auth-main-tab:hover {
    color: #33383b;
}

.bas-auth-main-tab.active {
    background: #ffffff;
    color: #24282A;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ── Role Tabs: User / Developer / Employee ────────────────── */
.bas-auth-role-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
}

.bas-auth-role-tab {
    flex: 1;
    padding: 9px 10px;
    border: 2px solid #e9ecef;
    background: transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #74797d;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.bas-auth-role-tab:hover {
    border-color: #d9dcdf;
    color: #33383b;
}

.bas-auth-role-tab.active {
    border-color: #800033;
    background: rgba(128, 0, 51, 0.06);
    color: #800033;
}

/* ── Panels ────────────────────────────────────────────────── */
.bas-auth-panel {
    display: none;
}

.bas-auth-panel.active {
    display: block;
    animation: basFadeIn 0.2s ease;
}

@keyframes basFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Form Fields ───────────────────────────────────────────── */
.bas-auth-form {
    margin: 0;
}

.bas-auth-field {
    margin-bottom: 18px;
}

.bas-auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #33383b;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.bas-auth-field label .bas-required {
    color: #800033;
    margin-left: 2px;
}

.bas-auth-field input,
.bas-auth-field select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d9dcdf;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #24282A;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    outline: none;
}

.bas-auth-field input:focus,
.bas-auth-field select:focus {
    border-color: #800033;
    box-shadow: 0 0 0 3px rgba(128, 0, 51, 0.1);
    background: #ffffff;
}

.bas-auth-field input::placeholder {
    color: #adb5bd;
}

.bas-auth-field input.input-error {
    border-color: #9d2636;
    box-shadow: 0 0 0 3px rgba(157, 38, 54, 0.1);
}

.bas-auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Password Strength Indicator ───────────────────────────── */
.bas-auth-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.bas-auth-strength-bar {
    flex: 1;
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    transition: background 0.3s;
}

.bas-auth-strength-bar.filled {
    background: #9d2636;
}

.bas-auth-strength-bar.filled.strength-2 {
    background: #a36a00;
}

.bas-auth-strength-bar.filled.strength-3 {
    background: #315b7d;
}

.bas-auth-strength-bar.filled.strength-4 {
    background: #267a4b;
}

.bas-auth-strength-text {
    font-size: 11px;
    color: #74797d;
    margin-top: 4px;
    font-weight: 500;
}

/* ── Remember Me Row ───────────────────────────────────────── */
.bas-auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bas-auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #33383b;
    cursor: pointer;
    user-select: none;
}

.bas-auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #800033;
    cursor: pointer;
}

/* ── Buttons ───────────────────────────────────────────────── */
.bas-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    gap: 8px;
    letter-spacing: 0.3px;
}

.bas-auth-btn-primary {
    background: linear-gradient(135deg, #800033, #a02050);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(128, 0, 51, 0.25);
}

.bas-auth-btn-primary:hover {
    background: linear-gradient(135deg, #6a0029, #800033);
    box-shadow: 0 4px 16px rgba(128, 0, 51, 0.35);
    transform: translateY(-1px);
}

.bas-auth-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(128, 0, 51, 0.25);
}

.bas-auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Alerts ────────────────────────────────────────────────── */
.bas-auth-alert {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    font-weight: 500;
    line-height: 1.5;
}

.bas-auth-alert-error {
    background: #fbe9ec;
    color: #9d2636;
    border: 1px solid #f0c2cb;
}

.bas-auth-alert-success {
    background: #e9f4ee;
    color: #267a4b;
    border: 1px solid #bedcc9;
}

.bas-auth-alert-info {
    background: #eaf1f7;
    color: #315b7d;
    border: 1px solid #c6dbea;
}

/* ── Links ─────────────────────────────────────────────────── */
.bas-auth-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #74797d;
    text-decoration: none;
    margin-top: 14px;
    transition: color 0.2s;
}

.bas-auth-link:hover {
    color: #800033;
}

.bas-auth-forgot-link {
    margin-top: 6px;
    font-weight: 500;
}

.bas-auth-back-link {
    margin-top: 16px;
    font-weight: 600;
    color: #800033;
}

/* ── Muted / Terms ─────────────────────────────────────────── */
.bas-auth-muted {
    font-size: 12px;
    color: #74797d;
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.5;
}

.bas-auth-terms {
    margin-top: 20px;
    font-size: 11px;
    line-height: 1.6;
    color: #adb5bd;
    text-align: center;
}

/* ── Divider ───────────────────────────────────────────────── */
.bas-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.bas-auth-divider::before,
.bas-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.bas-auth-divider span {
    font-size: 11px;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ── Already Logged In ─────────────────────────────────────── */
.bas-auth-already {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px 16px;
    background: #f0f1f2;
}

.bas-auth-already .bas-auth-card {
    text-align: center;
    max-width: 400px;
}

.bas-auth-already .bas-auth-card p {
    color: #74797d;
    font-size: 14px;
    margin-bottom: 20px;
}

.bas-auth-already .bas-auth-btn {
    margin-bottom: 12px;
}

.bas-auth-already .bas-auth-link {
    margin-top: 0;
}

/* ── Loading Spinner ───────────────────────────────────────── */
.bas-auth-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: basSpin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes basSpin {
    to { transform: rotate(360deg); }
}



/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .bas-auth-page {
        padding: 16px 12px;
    }

    .bas-auth-card {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .bas-auth-logo-text {
        font-size: 17px;
    }

    .bas-auth-main-tab {
        font-size: 13px;
        padding: 10px 10px;
    }

    .bas-auth-role-tab {
        font-size: 11px;
        padding: 8px 6px;
    }

    .bas-auth-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 360px) {
    .bas-auth-card {
        padding: 24px 16px;
    }

    .bas-auth-logo-icon {
        width: 48px;
        height: 48px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ELEMENTOR COMPATIBILITY — Override Elementor's default spacing
   ═══════════════════════════════════════════════════════════════ */

.elementor-widget-wrap .bas-auth-page,
.elementor-section .bas-auth-page,
.elementor-element .bas-auth-page {
    min-height: 80vh;
}

/* Make auth page full-width inside Elementor sections */
.elementor-section > .elementor-container > .elementor-row > .elementor-element > .elementor-widget-wrap > .bas-auth-page,
.elementor-section > .elementor-container > .elementor-element > .elementor-widget-wrap > .bas-auth-page {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: 0;
    padding-right: 0;
}

.elementor-widget .bas-auth-card,
.elementor-widget-container .bas-auth-card {
    margin: 0 auto;
}
