/* ============================================
   CrazyTour Auth Pages — Premium Light Theme
   Font: Poppins + Lucide Icons
   Pages: Login / Register / Forgot Password
   ============================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1877F2;
    --primary-hover: #1565d8;
    --primary-glow: rgba(24,119,242,.12);
    --primary-glow-strong: rgba(24,119,242,.18);
    --bg: #f8f9fc;
    --card: #ffffff;
    --input-bg: #f3f4f6;
    --text: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border: #dbeafe;
    --border-input: #e5e7eb;
    --border-focus: #1877F2;
    --radius: 0px;
    --radius-btn: 14px;
    --radius-input: 14px;
    --shadow-card: 0 10px 30px rgba(37,99,235,.12);
    --shadow-btn: 0 6px 20px rgba(24,119,242,.3);
    --transition: all .25s cubic-bezier(.4,0,.2,1);
}

body.auth-page {
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== SITE HEADER ===== */
.auth-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.auth-site-header-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
    white-space: nowrap;
}

.auth-site-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
}

.auth-site-logo i {
    width: 32px;
    height: 32px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #1565d8);
    border-radius: 8px;
    padding: 6px;
}

.auth-site-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-header-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.auth-header-btn-outline {
    background: transparent;
    border: 1px solid var(--border-input);
    color: var(--text);
}

.auth-header-btn-outline:hover {
    background: var(--input-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.auth-header-btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
}

.auth-header-btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24,119,242,.25);
}

@media (max-width: 480px) {
    .auth-site-header-inner { padding: 0 12px; height: 52px; }
    .auth-site-logo { font-size: 13px; gap: 8px; }
    .auth-site-logo img { width: 28px; height: 28px; }
    .auth-site-logo i { width: 28px; height: 28px; padding: 5px; }
    .auth-header-btn { height: 32px; padding: 0 10px; font-size: 12px; }
}

@media (max-width: 360px) {
    .auth-site-header-inner { padding: 0 8px; }
    .auth-header-btn { height: 30px; padding: 0 8px; font-size: 11px; }
}

/* ===== AUTH CARD ===== */
.auth-card {
    width: 420px;
    max-width: 95%;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    padding: 32px;
    position: relative;
    animation: authFadeUp .5s ease forwards;
}

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

/* ===== LOGO AREA ===== */
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 16px;
    margin: 0 auto 14px;
    display: block;
}

.auth-logo-fallback {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #1565d8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 8px 24px rgba(24,119,242,.25);
}

.auth-logo-fallback i { color: #fff; width: 28px; height: 28px; }

.auth-logo h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 6px;
}

.auth-logo .auth-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== ERROR / SUCCESS BOXES ===== */
.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-btn);
    padding: 12px 16px;
    margin-bottom: 18px;
}

.auth-error ul { list-style: none; padding: 0; }
.auth-error li {
    color: #dc2626;
    font-size: 13px;
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.auth-error li i { width: 14px; height: 14px; flex-shrink: 0; }

.auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-btn);
    padding: 12px 16px;
    margin-bottom: 18px;
    color: #16a34a;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-success i { width: 16px; height: 16px; flex-shrink: 0; }

/* ===== FORM GROUP ===== */
.auth-group {
    margin-bottom: 16px;
}

.auth-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

/* ===== PREMIUM INPUT ===== */
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #6b7280;
    transition: var(--transition);
    pointer-events: none;
    z-index: 1;
}

.auth-input-wrap:focus-within i {
    color: var(--primary);
}

.auth-input {
    width: 100%;
    height: 54px;
    padding: 0 16px 0 48px;
    background: var(--input-bg);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-input);
    color: var(--text);
    font-size: 15px;
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
    font-weight: 400;
    outline: none;
    transition: var(--transition);
}

.auth-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.auth-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
    background: var(--card);
}

.auth-input:focus + i,
.auth-input:focus ~ i {
    color: var(--primary);
}

/* ===== PASSWORD TOGGLE ===== */
.auth-pass-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.auth-pass-toggle:hover { color: var(--text-muted); }
.auth-pass-toggle i { width: 18px; height: 18px; position: static; pointer-events: auto; }

/* ===== PASSWORD STRENGTH ===== */
.auth-strength {
    height: 3px;
    border-radius: 2px;
    background: #e5e7eb;
    margin-top: 8px;
    overflow: hidden;
}

.auth-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all .3s ease;
}

.auth-strength-bar.weak { width: 33%; background: #ef4444; }
.auth-strength-bar.medium { width: 66%; background: #f59e0b; }
.auth-strength-bar.strong { width: 100%; background: #22c55e; }

/* ===== FORGOT LINK ===== */
.auth-forgot {
    text-align: right;
    margin-top: 4px;
    margin-bottom: 18px;
}

.auth-forgot a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

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

/* ===== SUBMIT BUTTON ===== */
.auth-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
    background: var(--primary-hover);
}

.auth-btn:active {
    transform: scale(.98);
}

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

.auth-btn .btn-text { position: relative; z-index: 1; }

.auth-btn .loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin .6s linear infinite;
}

.auth-btn.loading .btn-text { display: none; }
.auth-btn.loading .loading-spinner { display: inline-block; }

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

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

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

.auth-divider span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ===== GOOGLE BUTTON ===== */
.auth-google {
    width: 100%;
    height: 54px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-btn);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    text-decoration: none;
}

.auth-google:hover {
    background: #f0f6ff;
    box-shadow: 0 4px 16px rgba(24,119,242,.15);
}

.auth-google:active { transform: scale(.98); }
.auth-google svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ===== PHONE GROUP (Register) ===== */
.auth-phone-group {
    display: flex;
    gap: 0;
}

.auth-phone-prefix {
    height: 52px;
    padding: 0 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-input);
    border-right: none;
    border-radius: var(--radius-input) 0 0 var(--radius-input);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.auth-phone-prefix i { width: 14px; height: 14px; }

.auth-phone-group .auth-input {
    border-radius: 0 var(--radius-input) var(--radius-input) 0;
    padding-left: 14px;
}

/* ===== REFERRAL TOGGLE ===== */
.auth-referral-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
    margin-bottom: 14px;
    transition: var(--transition);
    user-select: none;
    border: none;
    background: none;
    padding: 0;
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
}

.auth-referral-toggle:hover { color: var(--text-muted); }
.auth-referral-toggle i { width: 16px; height: 16px; transition: transform .3s; }
.auth-referral-toggle.open i { transform: rotate(45deg); }

.auth-referral-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, opacity .3s ease;
    opacity: 0;
}

.auth-referral-fields.show {
    max-height: 120px;
    opacity: 1;
}

/* ===== BOTTOM LINK ===== */
.auth-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-bottom a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

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

/* ===== BANNED ACCOUNT ===== */
.auth-banned-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.auth-banned-icon i { width: 36px; height: 36px; color: #dc2626; }

.auth-banned-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 6px;
}

.auth-banned-sub {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}

.auth-banned-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Sora', 'Noto Sans Bengali', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.auth-banned-btn:hover { background: #b91c1c; transform: translateY(-1px); }
.auth-banned-btn i { width: 18px; height: 18px; }

/* ===== TERMS ===== */
.auth-terms {
    text-align: center;
    margin-top: 18px;
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== BACK LINK (Forgot Password) ===== */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 20px;
    transition: var(--transition);
}

.auth-back:hover { color: var(--primary); }
.auth-back i { width: 18px; height: 18px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    body.auth-page { padding: 12px; }
    .auth-card { padding: 22px 18px; }
    .auth-input { height: 50px; font-size: 14px; padding-left: 44px; }
    .auth-input-wrap i { width: 18px; height: 18px; left: 14px; }
    .auth-btn { height: 50px; font-size: 14px; }
}

@media (max-width: 360px) {
    .auth-card { padding: 18px 14px; }
    .auth-input { font-size: 13px; padding-left: 40px; }
    .auth-input-wrap i { left: 12px; width: 16px; height: 16px; }
}

/* ===== BANDED BANNER (Login Page) ===== */
.auth-banned-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-btn);
    padding: 28px 20px;
    text-align: center;
}

/* ===== AUTH DARK MODE ===== */
[data-theme="dark"] body.auth-page,
.dark body.auth-page,
[data-theme="dark"] .auth-page,
.dark .auth-page {
    background: #111827 !important;
}
[data-theme="dark"] .auth-card,
.dark .auth-card {
    background: #1f2937 !important;
    border-color: #374151 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.3) !important;
}
[data-theme="dark"] .auth-card p,
.dark .auth-card p { color: #9ca3af !important; }
[data-theme="dark"] .auth-input,
.dark .auth-input {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}
[data-theme="dark"] .auth-input:focus,
.dark .auth-input:focus {
    border-color: #2563eb !important;
    background: #1f2937 !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,.15) !important;
}
[data-theme="dark"] .auth-input::placeholder,
.dark .auth-input::placeholder { color: #6b7280 !important; }
[data-theme="dark"] .auth-google,
.dark .auth-google {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}
[data-theme="dark"] .auth-google:hover,
.dark .auth-google:hover { background: #374151 !important; }
[data-theme="dark"] .auth-error,
.dark .auth-error {
    background: rgba(239,68,68,.12) !important;
    border-color: rgba(239,68,68,.3) !important;
}
[data-theme="dark"] .auth-error li,
.dark .auth-error li { color: #fca5a5 !important; }
[data-theme="dark"] .auth-divider::before,
.dark .auth-divider::before,
[data-theme="dark"] .auth-divider::after,
.dark .auth-divider::after { background: #374151 !important; }
[data-theme="dark"] .auth-banned-icon,
.dark .auth-banned-icon { background: rgba(239,68,68,.12) !important; }
[data-theme="dark"] .auth-banned-card,
.dark .auth-banned-card {
    background: rgba(239,68,68,.08) !important;
    border-color: rgba(239,68,68,.2) !important;
}
[data-theme="dark"] .auth-banned-title,
.dark .auth-banned-title { color: #f1f5f9 !important; }
[data-theme="dark"] .auth-site-header,
.dark .auth-site-header {
    background: rgba(17,24,39,.95) !important;
    border-color: #374151 !important;
}
[data-theme="dark"] .auth-site-logo,
.dark .auth-site-logo { color: #e5e7eb !important; }
[data-theme="dark"] .auth-header-btn-outline,
.dark .auth-header-btn-outline {
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}
[data-theme="dark"] .auth-header-btn-outline:hover,
.dark .auth-header-btn-outline:hover {
    background: #374151 !important;
    border-color: #2563eb !important;
    color: #60a5fa !important;
}
[data-theme="dark"] .auth-strength,
.dark .auth-strength { background: #4b5563 !important; }
[data-theme="dark"] .auth-phone-prefix,
.dark .auth-phone-prefix {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #9ca3af !important;
}
[data-theme="dark"] .auth-success,
.dark .auth-success {
    background: rgba(34,197,94,.12) !important;
    border-color: rgba(34,197,94,.3) !important;
    color: #4ade80 !important;
}
