/* ========================================
   AUTH PAGES - PHYLUM-STYLE DARK DESIGN
   Centered card, dark bg, blue glow
   Stormy Morning: #6A89A7 #BDDDFC #88BDF2 #384959
   ALL selectors scoped under .auth-page for specificity
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Montserrat:wght@400;500;600;700&display=swap');

/* ===== PAGE BASE ===== */
body.auth-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: #0c1117;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background glow */
body.auth-page::before {
    content: '';
    position: fixed;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(136,189,242,0.07) 0%, rgba(56,73,89,0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===== LAYOUT: HIDE LEFT, CENTER CARD ===== */
body.auth-page .auth-container {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

body.auth-page .auth-left-panel {
    display: none !important;
}

/* ===== CARD ===== */
body.auth-page .auth-right-panel {
    width: 100%;
    max-width: 440px;
    background: rgba(17, 24, 33, 0.9);
    border: 1px solid rgba(136, 189, 242, 0.12);
    border-radius: 20px;
    padding: 48px 40px;
    backdrop-filter: blur(24px);
    box-shadow:
        0 0 80px rgba(136, 189, 242, 0.05),
        0 24px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

body.auth-page.register-page .auth-right-panel {
    max-width: 520px;
}

/* ===== FORM HEADER ===== */
body.auth-page .auth-form-header {
    text-align: center;
    margin-bottom: 32px;
}

body.auth-page .auth-form-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

body.auth-page .auth-form-header p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    font-weight: 400;
}

/* ===== ROLE TABS ===== */
body.auth-page .login-role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 28px;
    padding: 5px;
    background: rgba(136, 189, 242, 0.06);
    border: 1px solid rgba(136, 189, 242, 0.12);
    border-radius: 12px;
}

body.auth-page .login-role-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.auth-page .login-role-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

body.auth-page .login-role-tab.active {
    background: #88BDF2;
    color: #0c1117;
}

body.auth-page .login-role-tab.active svg {
    stroke: #0c1117;
}

body.auth-page .login-role-tab:hover:not(.active) {
    color: #e2e8f0;
    background: rgba(136, 189, 242, 0.08);
}

/* ===== FORM ===== */
body.auth-page .auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== FORM GROUP ===== */
body.auth-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

body.auth-page .form-group label,
body.auth-page .form-label {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.2px;
    margin: 0;
    margin-bottom: 2px;
}

body.auth-page .form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.auth-page .form-link {
    font-size: 13px;
    font-weight: 500;
    color: #88BDF2;
    text-decoration: none;
    transition: color 0.2s;
}

body.auth-page .form-link:hover {
    color: #BDDDFC;
}

/* ===== INPUT WRAPPER ===== */
body.auth-page .form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

body.auth-page .form-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    color: #64748b;
    line-height: 1;
    overflow: visible;
}

body.auth-page .form-icon svg {
    width: 16px;
    height: 16px;
    stroke: #64748b;
    flex-shrink: 0;
    display: block;
}

body.auth-page .form-input-wrapper:focus-within .form-icon svg {
    stroke: #88BDF2;
}

/* ===== INPUTS ===== */
body.auth-page .form-input,
body.auth-page .form-group input,
body.auth-page .form-group select,
body.auth-page .form-group textarea {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: rgba(136, 189, 242, 0.06);
    border: 1.5px solid rgba(136, 189, 242, 0.12);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #e2e8f0;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    outline: none;
}

body.auth-page .form-input::placeholder {
    color: #64748b;
}

body.auth-page .form-input:focus,
body.auth-page .form-group input:focus,
body.auth-page .form-group select:focus {
    border-color: #88BDF2;
    box-shadow: 0 0 0 3px rgba(136, 189, 242, 0.1);
    background: rgba(136, 189, 242, 0.08);
}

/* Select styling */
body.auth-page select.form-input {
    appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

body.auth-page select.form-input option {
    background: #111824;
    color: #e2e8f0;
}

body.auth-page input[type="date"].form-input {
    color-scheme: dark;
}

/* ===== TOGGLE PASSWORD ===== */
body.auth-page .form-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    color: #64748b;
    transition: color 0.2s, background 0.2s;
}

body.auth-page .form-toggle-password svg {
    width: 16px;
    height: 16px;
    stroke: #64748b;
}

body.auth-page .form-toggle-password:hover {
    background: rgba(136, 189, 242, 0.1);
}

body.auth-page .form-toggle-password:hover svg {
    stroke: #88BDF2;
}

/* ===== FORM ERROR ===== */
body.auth-page .form-error {
    font-size: 12px;
    color: #f87171;
    font-weight: 500;
    display: none;
}

body.auth-page .form-error.show {
    display: block;
}

/* ===== CHECKBOX ===== */
body.auth-page .form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.auth-page .checkbox-input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid rgba(136, 189, 242, 0.15);
    border-radius: 5px;
    background: rgba(136, 189, 242, 0.06);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}

body.auth-page .checkbox-input:checked {
    background: #88BDF2;
    border-color: #88BDF2;
}

body.auth-page .checkbox-input:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #0c1117;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

body.auth-page .checkbox-label {
    font-size: 13px;
    color: #94a3b8;
    cursor: pointer;
    margin: 0;
}

/* ===== BUTTONS ===== */
body.auth-page .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

body.auth-page .btn-primary {
    background: #88BDF2;
    color: #0c1117;
    box-shadow: none;
}

body.auth-page .btn-primary:hover {
    background: #BDDDFC;
    box-shadow: 0 4px 20px rgba(136, 189, 242, 0.25);
    transform: none;
}

body.auth-page .btn-primary:active {
    transform: scale(0.98);
}

body.auth-page .btn-secondary {
    background: rgba(136, 189, 242, 0.1);
    color: #88BDF2;
    border: 1px solid rgba(136, 189, 242, 0.12);
}

body.auth-page .btn-secondary:hover {
    background: rgba(136, 189, 242, 0.15);
}

body.auth-page .btn-large {
    padding: 14px 28px;
    font-size: 15px;
}

body.auth-page .btn-full {
    width: 100%;
}

body.auth-page .btn-text {
    display: inline;
}

body.auth-page .btn-loader {
    display: none;
}

/* ===== DIVIDER ===== */
body.auth-page .auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 0;
}

body.auth-page .auth-divider::before,
body.auth-page .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(136, 189, 242, 0.12);
}

body.auth-page .auth-divider span {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ===== SOCIAL BUTTONS ===== */
body.auth-page .social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

body.auth-page .social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: rgba(136, 189, 242, 0.06);
    border: 1.5px solid rgba(136, 189, 242, 0.12);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

body.auth-page .social-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

body.auth-page .social-btn:hover {
    background: rgba(136, 189, 242, 0.1);
    border-color: rgba(136, 189, 242, 0.25);
}

/* ===== AUTH FOOTER (in-card) ===== */
body.auth-page .auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(136, 189, 242, 0.1);
    text-align: center;
}

body.auth-page .auth-footer p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 10px 0;
}

body.auth-page .auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

body.auth-page .auth-link {
    font-size: 13px;
    font-weight: 600;
    color: #88BDF2;
    text-decoration: none;
    transition: color 0.2s;
}

body.auth-page .auth-link:hover {
    color: #BDDDFC;
    text-decoration: underline;
}

body.auth-page .auth-footer-sep {
    color: #64748b;
    font-size: 13px;
}

/* ===== REGISTRATION PROGRESS ===== */
body.auth-page .registration-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}

body.auth-page .progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

body.auth-page .progress-number {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(136, 189, 242, 0.06);
    border: 2px solid rgba(136, 189, 242, 0.12);
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    transition: all 0.3s;
}

body.auth-page .progress-step.active .progress-number {
    background: #88BDF2;
    border-color: #88BDF2;
    color: #0c1117;
    box-shadow: 0 0 16px rgba(136, 189, 242, 0.3);
}

body.auth-page .progress-label {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

body.auth-page .progress-step.active .progress-label {
    color: #BDDDFC;
}

body.auth-page .progress-line {
    width: 48px;
    height: 2px;
    background: rgba(136, 189, 242, 0.12);
    margin: 0 8px;
    margin-bottom: 22px;
}

/* ===== REGISTRATION STEPS ===== */
body.auth-page .registration-step {
    display: none;
}

body.auth-page .registration-step.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== FORM ACTIONS ===== */
body.auth-page .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

/* ===== LICENSE OPTIONS ===== */
body.auth-page .license-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.auth-page .license-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(136, 189, 242, 0.06);
    border: 1.5px solid rgba(136, 189, 242, 0.12);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #94a3b8;
    width: 100%;
}

body.auth-page .license-option:hover {
    border-color: rgba(136, 189, 242, 0.3);
}

body.auth-page .license-option input[type="radio"] {
    accent-color: #88BDF2;
}

body.auth-page .license-label {
    font-weight: 500;
}

/* ===== SUCCESS MSG ===== */
body.auth-page .success-message {
    text-align: center;
    padding: 24px 0;
}

body.auth-page .success-icon {
    width: 48px;
    height: 48px;
    background: #88BDF2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    font-weight: 700;
    color: #0c1117;
}

body.auth-page .success-message h3 {
    font-size: 18px;
    color: #fff;
    margin: 0 0 8px;
}

body.auth-page .success-message p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

/* ===== PASSWORD STRENGTH ===== */
body.auth-page .password-strength {
    height: 3px;
    border-radius: 3px;
    background: rgba(136, 189, 242, 0.08);
    overflow: hidden;
    margin-top: 2px;
}

/* ===== FLOATING ELEMENTS ===== */
body.auth-page .floating-support {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
}

body.auth-page .support-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #384959;
    border: 1px solid rgba(136, 189, 242, 0.12);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    line-height: 1;
}

body.auth-page .support-btn:hover {
    background: #6A89A7;
    transform: scale(1.05);
}

body.auth-page .floating-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50px;
    color: white !important;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
    z-index: 1000;
    transition: all 0.2s;
}

body.auth-page .floating-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

body.auth-page .floating-whatsapp svg {
    width: 20px;
    height: 20px;
}

/* ===== SITE FOOTER ON AUTH PAGES ===== */
body.auth-page .footer {
    position: relative;
    z-index: 1;
    background: #0c1117;
    border-top: 1px solid rgba(136, 189, 242, 0.1);
    color: #94a3b8;
}

body.auth-page .footer h4 {
    color: #BDDDFC;
}

body.auth-page .footer p,
body.auth-page .footer a,
body.auth-page .footer li {
    color: #94a3b8;
}

body.auth-page .footer a:hover {
    color: #88BDF2;
}

body.auth-page .footer-bottom {
    border-top: 1px solid rgba(136, 189, 242, 0.08);
}

body.auth-page .footer-bottom p {
    color: #64748b;
}

body.auth-page .social-icon {
    color: #94a3b8;
}

body.auth-page .social-icon:hover {
    color: #88BDF2;
}

/* ===== PHONE CODE SELECTOR ===== */
body.auth-page .phone-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

body.auth-page .phone-row .form-input-wrapper {
    flex: 1;
    min-width: 0;
}

body.auth-page .phone-code-select {
    width: 145px !important;
    min-width: 145px;
    max-width: 145px;
    flex-shrink: 0;
    padding: 12px 24px 12px 12px;
    font-size: 13px;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
    body.auth-page .auth-right-panel {
        padding: 32px 24px;
        border-radius: 16px;
        margin: 0 4px;
    }

    body.auth-page .auth-form-header h2 {
        font-size: 22px;
    }

    body.auth-page .login-role-tabs {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    body.auth-page .social-login {
        grid-template-columns: 1fr;
    }

    body.auth-page .license-options {
        flex-direction: column;
    }

    body.auth-page .progress-line {
        width: 32px;
    }
}
