/* ==========================================
   AUTH PAGES - STUNNING DARK BLUE/CYAN THEME
   Login, Register, Forgot Password
   ========================================== */

/* ========== KEYFRAME ANIMATIONS ========== */

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

@keyframes authFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes authFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -25px) scale(1.1); }
    66% { transform: translate(-15px, 10px) scale(0.95); }
}

@keyframes authFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.12); }
}

@keyframes authPulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.1), 0 0 60px rgba(0, 212, 255, 0.05); }
    50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.2), 0 0 80px rgba(0, 212, 255, 0.1); }
}

@keyframes authGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes authShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes authBgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes authIconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========== PAGE WRAPPER ========== */

.auth-page-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0e1a 0%, #111827 40%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 80px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ========== ANIMATED BACKGROUND ========== */

.auth-bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.auth-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.auth-bg-orb.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(0, 212, 255, 0.08);
    top: -100px;
    left: -100px;
    animation: authFloat2 18s ease-in-out infinite;
}

.auth-bg-orb.orb-2 {
    width: 350px;
    height: 350px;
    background: rgba(99, 102, 241, 0.07);
    bottom: -80px;
    right: -80px;
    animation: authFloat3 22s ease-in-out infinite;
}

.auth-bg-orb.orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(16, 185, 129, 0.05);
    top: 40%;
    right: 15%;
    animation: authFloat2 15s ease-in-out infinite reverse;
}

.auth-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: authBgPulse 8s ease-in-out infinite;
}

/* ========== AUTH CARD ========== */

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.9), rgba(15, 20, 30, 0.95));
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    overflow: visible;
    animation: authFadeInUp 0.7s ease-out, authPulseGlow 6s ease-in-out infinite;
}

.auth-card-wide {
    max-width: 520px;
}

/* ========== CARD HEADER ========== */

.auth-card-header {
    text-align: center;
    padding: 40px 40px 0;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    text-decoration: none;
}

.auth-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: authIconBounce 3s ease-in-out infinite;
}

.auth-logo-icon svg {
    width: 22px;
    height: 22px;
    stroke: #00d4ff;
}

.auth-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.auth-logo-text span {
    background: linear-gradient(135deg, #00d4ff, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.auth-card-header p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
}

.auth-card-header .auth-error {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 4px;
}

.auth-card-header .auth-warning {
    color: #f59e0b;
    font-size: 0.88rem;
    margin-top: 4px;
    font-weight: 600;
}

.auth-card-header .auth-warning i {
    margin-right: 5px;
}

.auth-card-header .auth-success {
    color: #10b981;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ========== CARD BODY ========== */

.auth-card-body {
    padding: 32px 40px;
}

.auth-form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form-group label i {
    margin-right: 6px;
    color: #00d4ff;
    font-size: 0.8rem;
}

.auth-form-group .form-control,
.auth-card .form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    height: auto !important;
}

.auth-form-group .form-control:focus,
.auth-card .form-control:focus {
    border-color: rgba(0, 212, 255, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    outline: none !important;
}

.auth-form-group .form-control::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.auth-form-group .text-danger,
.auth-form-group .errorlist {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 6px;
    display: block;
}

.auth-form-group .errorlist {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
}

.auth-form-group .errorlist li {
    color: #ef4444;
    font-size: 0.8rem;
}

/* Forgot password link */
.auth-forgot-link {
    text-align: right;
    margin-top: -12px;
    margin-bottom: 20px;
}

.auth-forgot-link a {
    color: #00d4ff;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-forgot-link a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* ========== REFERRAL BONUS BANNER ========== */

.auth-referral-banner {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 18px;
    background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(0,212,255,0.06));
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 12px; padding: 13px 16px;
    animation: fadeInDown 0.4s ease both;
}
.auth-referral-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: rgba(16,185,129,0.12); color: #10b981;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    box-shadow: 0 0 14px rgba(16,185,129,0.15);
}
.auth-referral-text {
    display: flex; flex-direction: column; gap: 2px;
    font-size: 0.82rem;
}
.auth-referral-text strong {
    color: #10b981; font-size: 0.85rem;
}
.auth-referral-text span { color: #94a3b8; }
.auth-referral-text span strong { color: #00d4ff; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== SUBMIT BUTTON ========== */

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #00d4ff, #6366f1);
    background-size: 200% 200%;
    animation: authGradientShift 4s ease infinite;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

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

.auth-submit-btn i {
    margin-right: 8px;
}

/* Shimmer effect on button */
.auth-submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: authShimmer 3s ease-in-out infinite;
}

/* ========== CARD FOOTER ========== */

.auth-card-footer {
    text-align: center;
    padding: 0 40px 32px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.auth-switch-link {
    color: #94a3b8;
    font-size: 0.9rem;
}

.auth-switch-link a {
    color: #00d4ff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-switch-link a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* ========== TERMS CHECKBOX ========== */

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-terms input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.auth-terms input[type="checkbox"]:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.auth-terms input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #00d4ff, #6366f1);
    border-color: transparent;
}

.auth-terms input[type="checkbox"]:checked::after {
    content: "\2713";
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-terms label {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    cursor: pointer;
    margin: 0 !important;
}

.auth-terms label a {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-terms label a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* ========== SUCCESS STATE ========== */

.auth-success-state {
    text-align: center;
    padding: 20px 40px 40px;
}

.auth-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: authIconBounce 2s ease-in-out infinite;
}

.auth-success-icon i {
    font-size: 2rem;
    color: #10b981;
}

.auth-success-state h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.auth-success-state p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ========== EMAIL EXISTS STATE ========== */

.auth-exists-state {
    text-align: center;
    padding: 20px 40px 40px;
}

.auth-exists-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(99, 102, 241, 0.12));
    border: 2px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: authIconBounce 2s ease-in-out infinite;
}

.auth-exists-icon i {
    font-size: 2rem;
    background: linear-gradient(135deg, #00d4ff, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-exists-state h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.auth-exists-state p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.auth-exists-state p strong {
    color: #00d4ff;
    font-weight: 600;
}

.auth-exists-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    max-width: 280px;
    margin: 0 auto;
}

.auth-exists-actions .auth-submit-btn {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

.auth-exists-secondary-btn {
    display: inline-block;
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #00d4ff;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    background: rgba(0, 212, 255, 0.06);
    transition: all 0.3s ease;
}

.auth-exists-secondary-btn:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15);
    color: #38bdf8;
    text-decoration: none;
}

.auth-exists-secondary-btn i {
    margin-right: 8px;
}

.auth-card-header .auth-info-text {
    color: #00d4ff;
    font-size: 0.95rem;
    margin: 0;
}

/* ========== ALERT ========== */

.auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.auth-alert.danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* ========== PASSWORD HELP TEXT ========== */

.auth-card .form-text,
.auth-card small.form-text {
    color: #64748b !important;
    font-size: 0.78rem !important;
    margin-top: 6px;
    display: block;
}

.auth-card .form-text ul {
    padding-left: 16px;
    margin: 4px 0 0;
}

.auth-card .form-text li {
    color: #64748b;
    font-size: 0.78rem;
    margin-bottom: 2px;
}

.auth-help-text {
    color: #64748b !important;
    font-size: 0.78rem !important;
    margin-top: 6px;
    display: block;
    line-height: 1.5;
}

.auth-help-text ul {
    padding-left: 16px;
    margin: 4px 0 0;
    list-style: disc;
}

.auth-help-text li {
    color: #64748b;
    font-size: 0.78rem;
    margin-bottom: 2px;
}

/* ========== INFO/STATUS PAGES ========== */

.auth-info-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: authFloat 3s ease-in-out infinite;
}

.auth-info-icon.email-sent {
    background: rgba(0, 212, 255, 0.12);
}

.auth-info-icon.email-sent i {
    font-size: 1.8rem;
    color: #00d4ff;
}

.auth-info-icon.success {
    background: rgba(16, 185, 129, 0.12);
}

.auth-info-icon.success i {
    font-size: 1.8rem;
    color: #10b981;
}

/* ========== AUTH PAGE FOOTER ========== */

.auth-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    padding: 16px 40px;
    z-index: 100;
}

.auth-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
}

.auth-footer-copyright span {
    color: #00d4ff;
    font-weight: 600;
}

.auth-footer-links {
    display: flex;
    gap: 20px;
}

.auth-footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.auth-footer-links a:hover {
    color: #00d4ff;
    text-decoration: underline;
}

/* ========== MODALS (Terms, Privacy, Legal) ========== */

/* Modal centering - fixed position approach (same as upgrade page) */
.auth-terms-modal,
.auth-legal-modal {
    z-index: 1060 !important;
}

.auth-terms-modal .modal-dialog,
.auth-legal-modal .modal-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    max-width: 800px !important;
    width: 90% !important;
    z-index: 1061 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.auth-terms-modal .modal-content,
.auth-legal-modal .modal-content {
    background: linear-gradient(135deg, #1a1f2e, #0f1419) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    border-radius: 20px !important;
    color: #fff !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 255, 0.08) !important;
}

.auth-terms-modal .modal-header,
.auth-legal-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 24px 28px !important;
}

.auth-terms-modal .modal-title,
.auth-legal-modal .modal-title {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
}

.auth-terms-modal .modal-header small,
.auth-legal-modal .modal-header small {
    color: #64748b !important;
    font-size: 0.82rem;
}

.auth-terms-modal .modal-header .close,
.auth-legal-modal .modal-header .close {
    color: #94a3b8 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    font-size: 1.5rem;
}

.auth-terms-modal .modal-header .close:hover,
.auth-legal-modal .modal-header .close:hover {
    color: #fff !important;
}

.auth-terms-modal .modal-body,
.auth-legal-modal .modal-body {
    padding: 24px 28px !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    color: #cbd5e1 !important;
    font-size: 0.88rem !important;
    line-height: 1.7 !important;
}

.auth-terms-modal .modal-body h6,
.auth-legal-modal .modal-body h6 {
    color: #00d4ff !important;
    font-weight: 600 !important;
    margin-top: 16px !important;
    font-size: 0.92rem !important;
}

.auth-terms-modal .modal-body p,
.auth-legal-modal .modal-body p {
    color: #94a3b8 !important;
    margin-bottom: 12px !important;
}

.auth-terms-modal .modal-body strong,
.auth-legal-modal .modal-body strong {
    color: #e2e8f0 !important;
}

.auth-terms-modal .modal-footer,
.auth-legal-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 16px 28px !important;
}

.auth-terms-modal .modal-footer .btn,
.auth-legal-modal .modal-footer .btn {
    border-radius: 10px;
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    transition: all 0.3s ease;
}

.auth-terms-modal .modal-footer .btn:hover,
.auth-legal-modal .modal-footer .btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

/* Scrollbar for modal */
.auth-terms-modal .modal-body::-webkit-scrollbar,
.auth-legal-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.auth-terms-modal .modal-body::-webkit-scrollbar-track,
.auth-legal-modal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.auth-terms-modal .modal-body::-webkit-scrollbar-thumb,
.auth-legal-modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.2);
    border-radius: 3px;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .auth-page-wrapper {
        padding: 90px 16px 70px;
    }

    .auth-card-header {
        padding: 30px 24px 0;
    }

    .auth-card-body {
        padding: 24px 24px;
    }

    .auth-card-footer {
        padding: 0 24px 24px;
    }

    .auth-card-header h1 {
        font-size: 1.5rem;
    }

    .auth-footer {
        padding: 12px 20px;
    }

    .auth-footer-content {
        flex-direction: column;
        text-align: center;
    }

    .auth-footer-links {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        border-radius: 18px;
    }

    .auth-card-header h1 {
        font-size: 1.3rem;
    }

    .auth-submit-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* =========================
   EXTRA SMALL SCREENS (360px and below)
   Scoped to auth pages only
   ========================= */
@media (max-width: 360px) {
    .auth-page-wrapper {
        padding: 80px 10px 70px;
    }

    .auth-card-header {
        padding: 20px 14px 0;
    }

    .auth-card-body {
        padding: 18px 14px;
    }

    .auth-card-footer {
        padding: 0 14px 18px;
    }

    .auth-card-header h1 {
        font-size: 1.15rem;
    }

    .auth-card-header p {
        font-size: 0.85rem;
    }

    .auth-submit-btn {
        font-size: 0.85rem;
        min-height: 44px;
    }

    .auth-exists-state,
    .auth-success-state {
        padding: 16px 14px 24px;
    }

    .auth-footer {
        padding: 10px 12px;
    }

    .auth-footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .auth-footer-links a {
        font-size: 0.75rem;
    }

    .auth-terms label {
        font-size: 0.8rem;
    }

    .auth-divider span {
        font-size: 0.72rem;
    }
}

/* =========================
   ERROR PAGES  (403 / 404 / 500)
   Scoped strictly under .tp-error
   ========================= */
.tp-error {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 0 16px;
}

.tp-error .card {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(15, 20, 30, 0.98)) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 212, 255, 0.05) !important;
}

.tp-error .card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1) !important;
    padding: 28px 32px !important;
    text-align: center;
}

.tp-error .card-header .title {
    color: #ef4444 !important;
    font-size: clamp(1.1rem, 4vw, 1.7rem) !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.tp-error .card-body {
    padding: 28px 32px !important;
}

.tp-error .card-body p {
    color: #94a3b8 !important;
    font-size: 1rem !important;
    margin: 0 !important;
    text-align: center;
    line-height: 1.6;
}

.tp-error .card-footer {
    background: transparent !important;
    border-top: 1px solid rgba(0, 212, 255, 0.1) !important;
    padding: 24px 32px !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.tp-error .card-footer .btn-primary {
    background: linear-gradient(135deg, #00d4ff, #6366f1) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 36px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    min-height: 44px !important;
    color: #fff !important;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.tp-error .card-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.35) !important;
}

.tp-error .card-footer p {
    color: #64748b !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
}

.tp-error .card-footer .text-primary {
    color: #00d4ff !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tp-error .card-footer .text-primary:hover {
    color: #38bdf8 !important;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .tp-error .card-header,
    .tp-error .card-body,
    .tp-error .card-footer {
        padding: 20px !important;
    }

    .tp-error .card-footer .btn-primary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .tp-error .card-header,
    .tp-error .card-body,
    .tp-error .card-footer {
        padding: 16px !important;
    }
}
