/* ==========================================================================
   AUTHENTICATION THEME SYSTEM (LIGHT & DARK MODE SUPPORT WITH BACKGROUND WALLPAPER)
   ========================================================================== */

:root,
[data-bs-theme="light"] {
    --auth-bg-overlay: linear-gradient(135deg, rgba(248, 250, 252, 0.92) 0%, rgba(226, 232, 240, 0.88) 50%, rgba(241, 245, 249, 0.92) 100%);
    --auth-card-bg: rgba(255, 255, 255, 0.92);
    --auth-card-border: rgba(226, 232, 240, 0.9);
    --auth-card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    --auth-topbar-bg: rgba(255, 255, 255, 0.88);
    --auth-topbar-border: rgba(226, 232, 240, 0.8);
    --auth-footer-bg: rgba(255, 255, 255, 0.88);
    --auth-footer-border: rgba(226, 232, 240, 0.8);
    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --input-text: #0f172a;
    --input-focus-border: #6366f1;
    --input-focus-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    --link-color: #4f46e5;
    --link-hover: #4338ca;
    --badge-or-bg: #ffffff;
    --btn-primary-bg: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --btn-primary-text: #ffffff;
    --btn-primary-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    --hero-title-color: #0f172a;
    --hero-desc-color: #475569;
}

[data-bs-theme="dark"] {
    --auth-bg-overlay: linear-gradient(135deg, rgba(11, 15, 25, 0.92) 0%, rgba(17, 24, 39, 0.9) 50%, rgba(30, 27, 75, 0.92) 100%);
    --auth-card-bg: rgba(17, 24, 39, 0.88);
    --auth-card-border: rgba(255, 255, 255, 0.12);
    --auth-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 30px rgba(99, 102, 241, 0.15);
    --auth-topbar-bg: rgba(17, 24, 39, 0.88);
    --auth-topbar-border: rgba(255, 255, 255, 0.08);
    --auth-footer-bg: rgba(17, 24, 39, 0.88);
    --auth-footer-border: rgba(255, 255, 255, 0.08);
    --text-heading: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.7);
    --input-border: rgba(255, 255, 255, 0.12);
    --input-text: #f8fafc;
    --input-focus-border: #818cf8;
    --input-focus-shadow: 0 0 0 4px rgba(129, 140, 248, 0.25);
    --link-color: #818cf8;
    --link-hover: #a5b4fc;
    --badge-or-bg: #111827;
    --btn-primary-bg: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    --btn-primary-text: #ffffff;
    --btn-primary-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    --hero-title-color: #ffffff;
    --hero-desc-color: #cbd5e1;
}

body {
    background: var(--auth-bg-overlay), url('../images/auth_bg.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-body);
    margin: 0;
    padding: 0 !important;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.www-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.top_section {
    background: var(--auth-topbar-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 0;
    border-bottom: 1px solid var(--auth-topbar-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.04);
}

.logo-img {
    max-height: 32px;
    width: auto;
    object-fit: contain;
}

/* Theme Switch Toggle Button */
.auth-theme-toggle {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-heading);
    padding: 8px 12px;
    border-radius: 50rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-theme-toggle:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.auth-theme-toggle i {
    font-size: 15px;
    color: #6366f1;
}

[data-bs-theme="dark"] .auth-theme-toggle i {
    color: #f59e0b;
}

/* ==========================================================================
   HERO / BANNER COLUMN
   ========================================================================== */
.body_login {
    padding-right: 2rem;
}

.banner-content h2 {
    color: var(--hero-title-color) !important;
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.banner-content p {
    color: var(--hero-desc-color) !important;
    font-size: 1.1rem;
    line-height: 1.6;
}

.app-store-badge {
    transition: transform 0.3s ease, filter 0.3s ease;
    border-radius: 12px;
}

.app-store-badge:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}

/* ==========================================================================
   UNIFIED SPLIT CARD CONTAINER & HERO SIDE
   ========================================================================== */
.auth-split-card {
    background: var(--auth-card-bg) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--auth-card-border) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4) !important;
}

.auth-split-card > .row {
    min-height: 100%;
    align-items: stretch !important;
}

.auth-hero-side {
    background: #0f172a !important;
    min-height: 100% !important;
    height: auto !important;
    align-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.auth-hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.auth-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-position: center 18% !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s ease-in-out, transform 5s ease-out;
    z-index: 0;
}

.auth-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.auth-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.2) 45%, rgba(15, 23, 42, 0.82) 100%) !important;
    z-index: 1;
    pointer-events: none;
}

.auth-hero-tag {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.auth-hero-bottom {
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 18px !important;
    padding: 1rem 1.25rem !important;
    margin-top: auto !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.auth-hero-title {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    color: #ffffff !important;
    margin-bottom: 0.35rem !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.auth-hero-text {
    font-size: 0.825rem !important;
    line-height: 1.5 !important;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.88) !important;
    margin-bottom: 0.6rem !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.auth-dot {
    width: 8px;
    height: 8px;
    border-radius: 50rem;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.auth-dot.active {
    width: 24px;
    background: #ffffff;
}

.auth-form-side {
    background: transparent !important;
    color: var(--text-heading) !important;
}

/* Registration Page (.register_form) spacing & sizing */
.auth-form-side .register_form .form-group,
.auth-form-side .register_form .mb-4 {
    margin-bottom: 1.1rem !important;
}

.auth-form-side .register_form .mb-3 {
    margin-bottom: 0.85rem !important;
}

.auth-form-side .register_form .form-label {
    margin-bottom: 0.35rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

.auth-form-side .register_form .form-control {
    padding: 0.55rem 0.9rem !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
    min-height: 44px !important;
}

.auth-form-side .register_form .btn {
    padding: 0.65rem 1.5rem !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
}

/* ==========================================================================
   AUTHENTICATION CARD & LAYOUT
   ========================================================================== */
.auth-card,
.col-lg-6.p-4.p-sm-5.bg-primary.bg-opacity-10.rounded {
    background: var(--auth-card-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--auth-card-border) !important;
    box-shadow: var(--auth-card-shadow) !important;
    border-radius: 24px !important;
    padding: 2.25rem 2.25rem !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.auth-card:hover,
.col-lg-6.p-4.p-sm-5.bg-primary.bg-opacity-10.rounded:hover {
    transform: translateY(-2px);
}

.auth-card h2,
.auth-card h3,
.auth-card h4,
.col-lg-6.p-4.p-sm-5.bg-primary.bg-opacity-10.rounded h2,
.col-lg-6.p-4.p-sm-5.bg-primary.bg-opacity-10.rounded h3,
.col-lg-6.p-4.p-sm-5.bg-primary.bg-opacity-10.rounded h4 {
    color: var(--text-heading) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.auth-card p,
.auth-card span:not(.badge),
.auth-card small,
.col-lg-6.p-4.p-sm-5.bg-primary.bg-opacity-10.rounded p,
.col-lg-6.p-4.p-sm-5.bg-primary.bg-opacity-10.rounded small {
    color: var(--text-muted);
}

/* ==========================================================================
   FORM CONTROLS & LABELS
   ========================================================================== */
.form-label {
    font-weight: 600;
    color: var(--text-heading) !important;
    margin-bottom: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.form-label i {
    color: var(--link-color);
}

.form-control,
select.form-control {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--input-text) !important;
    border-radius: 12px !important;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.form-control:focus,
select.form-control:focus {
    border-color: var(--input-focus-border) !important;
    box-shadow: var(--input-focus-shadow) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

.input-group {
    border-radius: 12px;
}

.input-group .form-control:first-child,
.input-group select.form-control:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group .form-control:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Select Dropdown styling */
select.form-control {
    cursor: pointer;
    appearance: auto;
}

[data-bs-theme="dark"] select.form-control option {
    background-color: #1e293b;
    color: #f8fafc;
}

/* Checkbox Styling */
.form-check-input {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid var(--input-border) !important;
    background-color: var(--input-bg) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--link-color) !important;
    border-color: var(--link-color) !important;
}

.form-check-label {
    color: var(--text-heading) !important;
    font-weight: 500;
    cursor: pointer;
    margin-left: 6px;
}

/* ==========================================================================
   BUTTONS & LINKS
   ========================================================================== */
.btn-primary {
    background: #4d8fed !important;
    color: var(--btn-primary-text) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: #4d8fed;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
    opacity: 0.95;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.we-account,
a.we-account {
    color: var(--link-color) !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.we-account:hover,
a.we-account:hover {
    color: var(--link-hover) !important;
    text-decoration: underline !important;
}

/* Social Login Buttons */
.social_buttons {
    color: #ffffff !important;
    text-align: center;
    padding: 10px 15px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    font-weight: 600;
    border: none;
}

.bg-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0c59bf 100%) !important;
}

.bg-facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.35);
}

.bg-google {
    background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%) !important;
}

.bg-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 67, 53, 0.35);
}

/* Divider line for social login */
.divider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 4px 16px;
    background: var(--auth-card-bg) !important;
    color: var(--text-muted) !important;
    border-radius: 50rem;
    font-weight: 500;
    font-size: 13px;
    border: 1px solid var(--auth-card-border);
    white-space: nowrap;
}

hr {
    border-color: var(--auth-card-border);
    opacity: 0.6;
}

/* ==========================================================================
   ALERTS & VALIDATIONS
   ========================================================================== */
.alert {
    border-radius: 14px !important;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #10b981 !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
}

.alert-primary {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: var(--link-color) !important;
}

.text-danger {
    color: #ef4444 !important;
    font-size: 13px;
}

/* ==========================================================================
   FOOTER SECTION & MODAL
   ========================================================================== */
.fr_welcome_bottom {
    background: var(--auth-footer-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--auth-footer-border);
    padding: 10px 0;
    margin-top: auto !important;
}

.footer span,
.footer a {
    color: var(--text-muted) !important;
    font-size: 14px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.footer a:hover {
    color: var(--link-color) !important;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 6px 12px !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--link-color) !important;
    background: rgba(99, 102, 241, 0.08);
}

/* Modal styling */
.modal-backdrop {
    z-index: 1050 !important;
}

.modal-backdrop.show {
    opacity: 0.65;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.custom-language-modal {
    z-index: 1060 !important;
}

.custom-language-modal .modal-dialog {
    z-index: 1061 !important;
}

.custom-modal-content {
    background: var(--auth-card-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-card-border) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    color: var(--text-heading) !important;
}

.custom-modal-header {
    border-bottom: 1px solid var(--auth-card-border) !important;
}

.custom-modal-footer {
    border-top: 1px solid var(--auth-card-border) !important;
}

.custom-language-list .list-group-item {
    background: var(--input-bg) !important;
    border: 1px solid var(--auth-card-border) !important;
    color: var(--text-heading) !important;
    border-radius: 12px !important;
    margin-bottom: 8px;
    transition: all 0.25s ease;
    text-decoration: none;
}

.custom-language-list .list-group-item:hover {
    border-color: var(--link-color) !important;
    background: rgba(99, 102, 241, 0.08) !important;
    transform: translateY(-1px);
}

.custom-language-list .active-lang-item {
    border-color: var(--link-color) !important;
    background: rgba(99, 102, 241, 0.12) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2) !important;
}

.custom-language-list .active-lang-item span.fw-medium {
    color: var(--link-color) !important;
    font-weight: 700 !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Custom Page Body Content */
.custom-page-body {
    color: var(--text-body) !important;
    font-size: 15px;
    line-height: 1.8;
}

.custom-page-body h1,
.custom-page-body h2,
.custom-page-body h3,
.custom-page-body h4,
.custom-page-body h5,
.custom-page-body h6,
.custom-page-body strong,
.custom-page-body b,
.custom-page-body .card-title,
.custom-page-body th {
    color: var(--text-heading) !important;
}

.custom-page-body a {
    color: var(--link-color) !important;
    text-decoration: underline;
}

.custom-page-body a:hover {
    color: var(--link-hover) !important;
}

.custom-page-body p,
.custom-page-body li {
    color: var(--text-body) !important;
}

.text-heading {
    color: var(--text-heading) !important;
}

@media (max-width: 991.98px) {
    .body_login {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    .banner-content h2 {
        font-size: 2rem;
    }
}
