/* ════════════════════════════════════════════════
   PREMIUM AUTH MODALS — split panel + effects
   Include AFTER style.css in base.html
═══════════════════════════════════════════════════ */

/* ── Modal sizing & shell ───────────────────────── */
.auth-dialog {
    max-width: 820px !important;
    margin: auto;
}

.auth-modal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
}

.auth-split {
    display: grid;
    grid-template-columns: 38% 62%;
    background: #fff;
    border: 1px solid #1A1A1A;
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 107, 0, 0.08);
    position: relative;
    overflow: hidden;
    animation: authModalIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* Backdrop with blur */
.modal-backdrop.show {
    opacity: 0.75 !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Close button — floats top-right of whole modal */
.auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    border-radius: 0;
}
.auth-close:hover {
    background: #FF6B00;
    border-color: #FF6B00;
    color: #fff;
    transform: rotate(90deg);
}

/* ── LEFT PANEL — Dark, atmospheric ─────────────── */
.auth-panel-left {
    position: relative;
    padding: 40px 36px 32px;
    background: linear-gradient(160deg, #0a0a0a 0%, #141414 60%, #1a1a1a 100%);
    color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Orange radial glow that slowly drifts */
.auth-bg-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.25) 0%, transparent 65%);
    top: -120px;
    left: -120px;
    pointer-events: none;
    animation: authGlowFloat 12s ease-in-out infinite;
    filter: blur(10px);
}
@keyframes authGlowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, 60px) scale(1.15); }
}

/* Secondary glow */
.auth-panel-left::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: authGlowFloat 15s ease-in-out infinite reverse;
    filter: blur(15px);
}

/* Subtle grid pattern */
.auth-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 107, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 0, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Brand */
.auth-brand {
    position: relative;
    z-index: 2;
    margin-bottom: 28px;
    animation: authFadeUp 0.6s ease 0.1s both;
}
.auth-brand-text {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.auth-brand-dot {
    color: #FF6B00;
    display: inline-block;
    animation: authBrandPulse 2s ease-in-out infinite;
}
@keyframes authBrandPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.2); }
}

/* Main content area */
.auth-panel-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-panel-title {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.8px;
    color: #fff;
    margin: 0 0 24px 0;
    animation: authFadeUp 0.6s ease 0.2s both;
}
.auth-orange { color: #FF6B00; }
.auth-italic {
    font-style: italic;
    color: rgba(255, 255, 255, 0.4);
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
    -webkit-text-fill-color: transparent;
}

/* Glass testimonial card */
.auth-testimonial {
    position: relative;
    padding: 20px 18px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 2px solid #FF6B00;
    margin-bottom: 24px;
    animation: authFadeUp 0.6s ease 0.35s both;
}
.auth-quote-mark {
    position: absolute;
    top: -8px;
    left: 14px;
    font-family: 'Syne', sans-serif;
    font-size: 52px;
    font-weight: 800;
    color: #FF6B00;
    line-height: 1;
    opacity: 0.4;
}
.auth-quote {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 14px 0;
    font-style: italic;
}
.auth-author {
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-author-av {
    width: 32px;
    height: 32px;
    background: #FF6B00;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    flex-shrink: 0;
}
.auth-author-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.auth-author-role {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.3px;
    margin-top: 1px;
}

/* Benefits */
.auth-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-benefits li {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: authFadeUp 0.5s ease both;
}
.auth-benefits li:nth-child(1) { animation-delay: 0.45s; }
.auth-benefits li:nth-child(2) { animation-delay: 0.55s; }
.auth-benefits li:nth-child(3) { animation-delay: 0.65s; }
.auth-benefits li:nth-child(4) { animation-delay: 0.75s; }
.auth-check {
    color: #FF6B00;
    font-weight: 800;
    font-size: 11px;
    width: 16px;
    height: 16px;
    border: 1.5px solid #FF6B00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Foot rating */
.auth-panel-foot {
    position: relative;
    z-index: 2;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: authFadeUp 0.6s ease 0.85s both;
}
.auth-stars {
    color: #FF6B00;
    font-size: 13px;
    letter-spacing: 1px;
}
.auth-rate {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

/* ── RIGHT PANEL — Form ─────────────────────────── */
.auth-panel-right {
    padding: 40px 36px 32px;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

.auth-form-head {
    margin-bottom: 24px;
    animation: authFadeUp 0.5s ease 0.15s both;
}
.auth-form-title {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #1A1A1A;
    letter-spacing: -0.5px;
    margin: 0 0 4px 0;
    position: relative;
    display: inline-block;
}
.auth-form-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 32px;
    height: 2px;
    background: #FF6B00;
    animation: authLineGrow 0.5s ease 0.4s both;
}
@keyframes authLineGrow {
    from { width: 0; }
    to   { width: 32px; }
}
.auth-form-sub {
    font-size: 13px;
    color: #888;
    margin: 12px 0 0 0;
}

/* Honeypot */
.auth-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Form fields */
.auth-form { display: flex; flex-direction: column; gap: 14px; }

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

.auth-field {
    display: flex;
    flex-direction: column;
    animation: authFieldIn 0.5s ease both;
    opacity: 0;
}
@keyframes authFieldIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Stagger fields */
.auth-form .auth-field:nth-of-type(1),
.auth-form .auth-row-2  { animation: authFieldIn 0.5s ease 0.25s both; }
.auth-form .auth-field:nth-of-type(2) { animation-delay: 0.32s; }
.auth-form .auth-field:nth-of-type(3) { animation-delay: 0.39s; }
.auth-form .auth-field:nth-of-type(4) { animation-delay: 0.46s; }
.auth-form .auth-field:nth-of-type(5) { animation-delay: 0.53s; }

.auth-label {
    font-size: 10px;
    letter-spacing: 1.8px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1A1A1A;
    margin-bottom: 7px;
    display: block;
}
.auth-label-opt {
    color: #aaa;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: none;
    font-size: 10px;
    margin-left: 4px;
}

.auth-input {
    width: 100%;
    height: 44px;
    border: 1.5px solid #E0E0E0;
    background: #FAFAFA;
    padding: 0 14px;
    font-size: 14px;
    font-family: 'Cabinet Grotesk', sans-serif;
    color: #1A1A1A;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    position: relative;
}
.auth-input::placeholder { color: #bbb; }

/* Premium focus state — background + border + subtle lift */
.auth-input:focus {
    border-color: #FF6B00;
    background: #FFF8F3;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.08);
}

/* Error state — shake + red */
.auth-input.auth-input--error {
    border-color: #ef4444;
    background: #fef2f2;
    animation: authShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes authShake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-3px); }
    40%, 60% { transform: translateX(3px); }
}

.auth-hint {
    font-size: 11px;
    color: #aaa;
    margin-top: 5px;
    letter-spacing: 0.2px;
}

/* Password wrap with eye icon */
.auth-pwd-wrap {
    position: relative;
}
.auth-pwd-wrap .auth-input {
    padding-right: 44px;
}
.auth-eye {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 0;
}
.auth-eye:hover { color: #FF6B00; }
.auth-eye svg { display: block; }

/* Password strength */
.auth-pwd-strength {
    margin-top: 8px;
}
.auth-pwd-bar {
    height: 3px;
    background: #f0f0f0;
    overflow: hidden;
    position: relative;
}
.auth-pwd-fill {
    height: 100%;
    width: 0;
    background: #ef4444;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}
.auth-pwd-fill[data-strength="1"] { width: 25%; background: #ef4444; }
.auth-pwd-fill[data-strength="2"] { width: 50%; background: #f59e0b; }
.auth-pwd-fill[data-strength="3"] { width: 75%; background: #FF6B00; }
.auth-pwd-fill[data-strength="4"] { width: 100%; background: #22c55e; }

.auth-pwd-label {
    font-size: 10.5px;
    color: #888;
    margin-top: 5px;
    letter-spacing: 0.3px;
    transition: color 0.3s;
}

/* Tab toggle (for login) */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #ececec;
    margin-bottom: 18px;
    position: relative;
}
.auth-tab {
    flex: 1;
    padding: 10px 0 12px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Syne', sans-serif;
    cursor: pointer;
    transition: color 0.25s;
    position: relative;
    z-index: 2;
}
.auth-tab.auth-tab--active { color: #FF6B00; }
.auth-tab-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50%;
    height: 2px;
    background: #FF6B00;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.auth-tab-indicator[data-pos="phone"] { transform: translateX(100%); }

/* Errors box */
.auth-errors {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    padding: 10px 14px;
    color: #1A1A1A;
    font-size: 12.5px;
    letter-spacing: 0.2px;
    margin-top: 4px;
}

/* Submit button with shimmer */
.auth-submit {
    position: relative;
    width: 100%;
    height: 50px;
    background: #FF6B00;
    border: 2px solid #FF6B00;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.auth-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%);
    transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.auth-submit:hover::before { left: 100%; }
.auth-submit:hover {
    background: #1A1A1A;
    border-color: #1A1A1A;
    color: #FF6B00;
}
.auth-submit:hover .auth-submit-arrow {
    transform: translateX(4px);
}
.auth-submit:active { transform: scale(0.98); }
.auth-submit-text { position: relative; z-index: 2; }
.auth-submit-arrow {
    position: relative;
    z-index: 2;
    font-size: 16px;
    transition: transform 0.3s;
}
.auth-submit-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.8s linear infinite;
}
.auth-submit.auth-submit--loading .auth-submit-text { opacity: 0.6; }
.auth-submit.auth-submit--loading .auth-submit-arrow { display: none; }
.auth-submit.auth-submit--loading .auth-submit-spinner { display: block; }
.auth-submit.auth-submit--loading { pointer-events: none; }
@keyframes authSpin { to { transform: rotate(360deg); } }

/* Trust line */
.auth-trust {
    text-align: center;
    margin-top: 14px;
    font-size: 11px;
    color: #888;
    letter-spacing: 0.4px;
}
.auth-lock {
    color: #22c55e;
    margin-right: 4px;
}

/* Forgot link */
.auth-forgot {
    text-align: right;
    margin-top: -6px;
    margin-bottom: 4px;
}
.auth-forgot button {
    background: none;
    border: none;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    letter-spacing: 0.3px;
    padding: 0;
    transition: color 0.2s;
    font-family: 'Cabinet Grotesk', sans-serif;
}
.auth-forgot button:hover { color: #FF6B00; }

/* Switch (bottom link) */
.auth-switch {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 13px;
    color: #888;
}
.auth-link {
    color: #FF6B00;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid #FF6B00;
    transition: all 0.2s;
}
.auth-link:hover {
    color: #fff;
    background: #FF6B00;
    padding: 2px 4px;
    border-bottom-color: transparent;
}

/* Forgot password mini-form */
.auth-forgot-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    animation: authFadeUp 0.4s ease both;
}
.auth-forgot-title {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 6px;
    font-family: 'Syne', sans-serif;
}
.auth-forgot-desc {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}
.auth-back-btn {
    width: 100%;
    height: 36px;
    background: none;
    border: none;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: color 0.2s;
}
.auth-back-btn:hover { color: #FF6B00; }

/* Shared fade-up animation */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* intl-tel-input — keep working inside .auth-form */
.auth-form .iti { width: 100% !important; display: block !important; }
.auth-form .iti input,
.auth-form .iti input[type=tel] {
    width: 100% !important;
    height: 44px !important;
    border: 1.5px solid #E0E0E0 !important;
    border-radius: 0 !important;
    background: #FAFAFA !important;
    font-size: 14px !important;
    color: #1A1A1A !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    padding-left: 95px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.auth-form .iti input:focus {
    border-color: #FF6B00 !important;
    background: #FFF8F3 !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.08) !important;
    outline: none !important;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
    .auth-dialog { max-width: calc(100% - 24px) !important; }
    .auth-split { grid-template-columns: 1fr; }
    .auth-panel-left {
        padding: 28px 24px 24px;
        order: 2;
    }
    .auth-panel-right {
        padding: 28px 24px 24px;
        order: 1;
    }
    .auth-panel-title { font-size: 22px; margin-bottom: 18px; }
    .auth-testimonial { padding: 16px 14px; margin-bottom: 18px; }
    .auth-benefits { gap: 8px; }
    .auth-benefits li { font-size: 11.5px; }
    .auth-panel-foot { margin-top: 18px; padding-top: 14px; }
    .auth-form-title { font-size: 20px; }
    .auth-row-2 { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 480px) {
    .auth-panel-left { padding: 24px 20px 20px; }
    .auth-panel-right { padding: 24px 20px 20px; }
    .auth-form-head { margin-bottom: 18px; }
}