/* ============================================
   AUTH MODALS - Modern Split Panel Design
   ============================================ */

/* Override twm-sign-up inherited margin-bottom */
.auth-modal {
    margin-bottom: 0 !important;
}

.auth-modal .modal-dialog {
    max-width: 860px;
    margin: 15px auto;
}

.auth-modal .modal-content {
    border: none !important;
    border-radius: 20px !important;
    border-top: none !important;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    min-height: 540px;
    box-shadow: 0 30px 80px rgba(25, 103, 210, 0.22), 0 8px 32px rgba(0,0,0,0.12);
}

/* ---- Left Gradient Panel ---- */
.auth-panel-left {
    width: 38%;
    background: linear-gradient(150deg, #1f7fe8 0%, #1358c9 45%, #0b3e9c 100%);
    position: relative;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    flex-shrink: 0;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    top: -80px;
    right: -90px;
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    bottom: -50px;
    left: -60px;
}

.auth-deco-dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.10);
}
.auth-deco-dot.d1 { width: 90px; height: 90px; bottom: 120px; right: 20px; }
.auth-deco-dot.d2 { width: 40px; height: 40px; top: 180px; left: 20px; background: rgba(255,255,255,0.15); }
.auth-deco-dot.d3 { width: 14px; height: 14px; top: 100px; right: 40px; background: rgba(255,255,255,0.3); }

.auth-panel-logo {
    max-width: 110px;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 2;
}

.auth-panel-body {
    position: relative;
    z-index: 2;
    color: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
}

.auth-panel-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    backdrop-filter: blur(4px);
}

.auth-panel-icon i {
    font-size: 26px;
    color: #fff;
}

.auth-panel-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.auth-panel-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 0;
    line-height: 1.65;
}

.auth-panel-stats {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.auth-stat-item {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
    flex: 1;
    border: 1px solid rgba(255,255,255,0.15);
}

.auth-stat-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.auth-stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
    display: block;
}

/* ---- Right Form Panel ---- */
.auth-panel-right {
    width: 62%;
    background: #fff;
    padding: 36px 40px 36px 38px;
    overflow-y: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: #64748b;
    font-size: 16px;
    z-index: 10;
    line-height: 1;
    padding: 0;
}

.auth-close-btn:hover { background: #e2e8f0; color: #1e293b; }

.auth-form-header {
    margin-bottom: 22px;
}

.auth-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    line-height: 1.25;
}

.auth-form-subtitle {
    font-size: 13.5px;
    color: #94a3b8;
    margin: 0;
}

/* ---- User Type Toggle ---- */
.auth-type-toggle {
    margin-bottom: 22px;
}

.auth-type-track {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.auth-type-btn {
    background: transparent;
    border: none;
    padding: 7px 18px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.auth-type-btn i {
    font-size: 13px;
}

.auth-type-btn.active {
    background: #fff;
    color: #1967d2;
    box-shadow: 0 2px 8px rgba(25, 103, 210, 0.14);
    font-weight: 600;
}

.auth-type-btn:not(.active):hover {
    color: #334155;
}

/* ---- Floating Label Inputs ---- */
.auth-input-group {
    position: relative;
}

.auth-input {
    width: 100%;
    height: 50px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 14px 6px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background: #f8fafc;
    font-family: inherit;
    display: block;
}

.auth-input:focus {
    border-color: #1967d2;
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.10);
    background: #fff;
}

.auth-input-group label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 14px;
    color: #94a3b8;
    pointer-events: none;
    transition: 0.18s ease all;
    margin: 0;
    font-weight: 400;
    line-height: 1;
}

.auth-input:not(:placeholder-shown) ~ label,
.auth-input:focus ~ label {
    top: 10px;
    transform: none;
    font-size: 10.5px;
    color: #1967d2;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Password field */
.auth-input-password .auth-input {
    padding-right: 42px;
}

.auth-eye-icon {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    z-index: 2;
    transition: color 0.2s;
}

.auth-eye-icon:hover { color: #1967d2; }

/* Select inputs */
.auth-select {
    width: 100%;
    height: 50px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.auth-select:focus {
    border-color: #1967d2;
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.10);
    background-color: #fff;
}

.auth-select option:disabled {
    color: #94a3b8;
}

/* Error messages */
.auth-error {
    font-size: 11.5px;
    color: #ef4444;
    margin-top: 4px;
    display: block;
    padding-left: 2px;
}

/* ---- Checkboxes ---- */
.auth-check-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-check-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: #64748b;
    cursor: pointer;
    margin: 0;
    line-height: 1.5;
}

.auth-check-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #1967d2;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.auth-check-label a {
    color: #1967d2;
    text-decoration: none;
}

.auth-check-label a:hover {
    text-decoration: underline;
}

/* ---- Submit Button ---- */
.auth-submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #1f7fe8 0%, #1358c9 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(25, 103, 210, 0.30);
    letter-spacing: 0.3px;
    font-family: inherit;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(25, 103, 210, 0.42);
    background: linear-gradient(135deg, #2385f0 0%, #1660d8 100%);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* ---- Switch / Link text ---- */
.auth-switch-text {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    text-align: center;
}

.auth-switch-text a {
    color: #1967d2;
    font-weight: 600;
    text-decoration: none;
}

.auth-switch-text a:hover {
    text-decoration: underline;
}

.auth-forgot-link {
    color: #1967d2;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    float: right;
}

.auth-forgot-link:hover {
    text-decoration: underline;
    color: #1358c9;
}

/* ---- Divider ---- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    font-size: 12px;
    margin: 4px 0;
}

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

/* ---- Custom Tab Panes ---- */
.auth-tab-pane {
    display: none;
}

.auth-tab-pane.active {
    display: block;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .auth-modal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .auth-modal .modal-content {
        flex-direction: column;
        min-height: unset;
    }

    .auth-panel-left {
        display: none;
    }

    .auth-panel-right {
        width: 100%;
        padding: 30px 22px 28px;
        max-height: unset;
    }
}

@media (max-width: 480px) {
    .auth-panel-right {
        padding: 26px 18px 24px;
    }

    .auth-form-title {
        font-size: 20px;
    }

    .auth-type-btn {
        padding: 6px 13px;
        font-size: 13px;
    }
}
