/* Combined CSS from style.css (Login/Signup Base + Dashboard Additions) */
:root {
    --primary-font: 'Poppins', sans-serif;
    --heading-font: 'Orbitron', sans-serif;
    --text-color: #e0e0e0;
    --text-muted-color: #8a8f9f;
    --primary-color: #00aeff;
    --primary-hover-color: #008cdd;
    --dark-bg: #0f101c;
    --panel-bg: rgba(20, 22, 40, 0.85);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(0, 174, 255, 0.3);
    --input-focus-border: var(--primary-color);
    --input-placeholder-color: var(--text-muted-color);
    --card-border-color: rgba(0, 174, 255, 0.2);
    --link-color: var(--primary-color);
    --link-hover-color: #61dafb;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;

    /* Bitget-inspired (Figure Traders) Theme */
    --bitget-bg: #000000;
    --bitget-text: #ffffff;
    --bitget-muted: #8a8f9f;
    --bitget-teal: #00aeff;
    --bitget-input-bg: #1e1e1e;
    --bitget-button-bg: #ffffff;
    --bitget-button-text: #000000;
    --bitget-border: #333333;

    /* --- Modern Dashboard Design Tokens --- */
    --dash-primary: #00aeff;
    --dash-primary-rgb: 0, 174, 255;
    --dash-bg: #0f101c;
    --dash-card-bg: rgba(255, 255, 255, 0.05);
    --dash-border: rgba(255, 255, 255, 0.1);
    --dash-radius: 16px;
    --dash-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --dash-glass: rgba(255, 255, 255, 0.03);
    --dash-glass-border: rgba(255, 255, 255, 0.08);
}

body {
    font-family: var(--primary-font);
    background-color: var(--dark-bg);
    color: var(--text-color);
    /* Default text color for the body */
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ensure all general text elements inherit body color or have a light color */
p,
span,
small,
div,
li,
th,
td,
label,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: inherit;
    /* Inherit from parent, ultimately from body if not overridden */
}

.text-muted {
    /* Bootstrap override for better visibility */
    color: var(--text-muted-color) !important;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover-color);
}


/* --- Bitget-style Login Page Specifics --- */
.bitget-auth-body {
    background-color: var(--bitget-bg);
    color: var(--bitget-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bitget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 10;
}

.bitget-logo-container img {
    max-height: 40px;
    width: auto;
}

.bitget-nav-right .globe-btn {
    background: none;
    border: none;
    color: var(--bitget-text);
    font-size: 1.2rem;
    cursor: pointer;
}

.bitget-auth-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 100px;
    /* Space for waves */
    z-index: 5;
}

.bitget-auth-content {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.bitget-auth-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.bitget-auth-content .subtitle {
    font-size: 0.9rem;
    color: var(--bitget-muted);
    text-align: center;
    margin-bottom: 30px;
}

.bitget-auth-content .subtitle a {
    color: var(--bitget-teal);
    font-weight: 500;
}

.bitget-form-group {
    margin-bottom: 24px;
}

.bitget-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--bitget-text);
}

.bitget-input-wrapper {
    position: relative;
}

.bitget-input {
    width: 100%;
    background-color: var(--bitget-input-bg);
    border: 1px solid var(--bitget-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--bitget-text);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.bitget-input:focus {
    outline: none;
    border-color: var(--bitget-teal);
}

.bitget-input::placeholder {
    color: #555;
}

.bitget-checkbox-group {
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--bitget-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bitget-checkbox-group input {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--bitget-teal);
}

.bitget-checkbox-group a {
    color: var(--bitget-text);
    text-decoration: underline;
}

.bitget-submit-btn {
    width: 100%;
    background-color: var(--bitget-button-bg);
    color: var(--bitget-button-text);
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.bitget-submit-btn:hover {
    opacity: 0.9;
}

/* Custom validation styling for Bitget theme */
.was-validated .bitget-input:invalid {
    border-color: var(--error-color) !important;
}

.was-validated .bitget-input:valid {
    border-color: rgba(40, 167, 69, 0.4);
}

.bitget-input-wrapper .invalid-feedback {
    display: none;
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 5px;
}

.was-validated .bitget-input:invalid~.invalid-feedback,
.was-validated .bitget-checkbox-group input:invalid~.invalid-feedback {
    display: block;
}

.bitget-checkbox-group .invalid-feedback {
    margin-left: 0;
    margin-top: 5px;
    width: 100%;
}

.bitget-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--bitget-muted);
    font-size: 0.85rem;
}

.bitget-divider::before,
.bitget-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--bitget-border);
}

.bitget-divider:not(:empty)::before {
    margin-right: .5em;
}

.bitget-divider:not(:empty)::after {
    margin-left: .5em;
}

.bitget-social-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.bitget-social-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--bitget-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--bitget-text);
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.bitget-social-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--bitget-text);
}

.bitget-social-btn.google i {
    color: #DB4437;
}

.bitget-social-btn.apple i {
    color: #ffffff;
}

.bitget-social-btn.telegram i {
    color: #0088cc;
}

.bitget-wallet-btn {
    width: 100%;
    background: none;
    border: 1px solid var(--bitget-border);
    border-radius: 8px;
    padding: 12px;
    color: var(--bitget-text);
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.bitget-wallet-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.bitget-wallet-btn img {
    width: 20px;
    height: 20px;
}

/* --- Wavy Background Styles --- */
.bitget-waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    min-height: 100px;
    max-height: 200px;
    pointer-events: none;
    z-index: 1;
}

.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* Support for original auth wrapper if still used */
.auth-wrapper {
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.auth-terms .form-check-label {
    line-height: 1.5;
    color: var(--text-color);
    /* Text color for terms label */
}

.password-strength-meter {
    height: 8px;
    background-color: var(--input-bg);
    border-radius: 4px;
    margin-top: -15px;
    margin-bottom: 20px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background-color: var(--error-color);
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    display: block;
    font-size: 0.75rem;
    text-align: right;
    margin-top: 4px;
    color: var(--input-placeholder-color);
}

.background-shapes {
    position: fixed;
    /* Changed to fixed to cover viewport during scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    /* Ensure it's behind all content */
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
    animation-play-state: running;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-color), transparent 70%);
    top: 10%;
    left: 5%;
    animation-duration: 25s;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--link-hover-color), transparent 70%);
    top: 60%;
    left: 80%;
    animation-duration: 30s;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #ff00e0, transparent 70%);
    top: 30%;
    left: 40%;
    animation-duration: 20s;
    animation-delay: 2s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #ae00ff, transparent 70%);
    top: 75%;
    left: 15%;
    animation-duration: 35s;
    animation-delay: 7s;
}

.shape-5 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, #00f2c3, transparent 70%);
    top: 50%;
    left: 50%;
    animation-duration: 28s;
    animation-delay: 3s;
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px) scale(1);
    }

    25% {
        transform: translateY(-30px) translateX(20px) scale(1.05);
    }

    50% {
        transform: translateY(20px) translateX(-30px) scale(1);
    }

    75% {
        transform: translateY(-10px) translateX(40px) scale(0.95);
    }

    100% {
        transform: translateY(0px) translateX(0px) scale(1);
    }
}

/* --- Dashboard Specific Styles --- */
.dashboard-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    background-color: transparent;
    /* Body has dark-bg */
}

.sidebar {
    width: 260px;
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    border-right: 1px solid var(--card-border-color);
    color: #fff;
    transition: margin-left 0.3s;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.toggled {
    margin-left: -260px;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--card-border-color);
    position: relative;
    /* For close button positioning */
}

.sidebar-logo-text {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.sidebar-close-btn {
    color: var(--text-muted-color);
    background: none;
    border: none;
    font-size: 1.5rem;
    /* Make X larger */
    line-height: 1;
    padding: 0.25rem 0.5rem;
}

.sidebar-close-btn:hover {
    color: #fff;
}

.sidebar .components {
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
    /* Enable scrolling for nav items */
}

.sidebar ul li a {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
    color: var(--text-color);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
}

.sidebar ul li.active>a,
.sidebar ul li.active>a:hover {
    color: #fff;
    background: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar ul li.active>a i,
.sidebar ul li a:hover i {
    color: #fff;
}

.sidebar ul li a i {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.sidebar .ctAs {
    padding: 20px;
    border-top: 1px solid var(--card-border-color);
}

.sidebar .ctAs a.logout-link {
    color: #ff6b6b;
}

.sidebar .ctAs a.logout-link:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
    border-left-color: #ff4757;
}

.main-content {
    width: 100%;
    /* Default to full width */
    padding: 0;
    transition: margin-left 0.3s;
    position: relative;
    z-index: 1;
}

/* Adjust main content when sidebar is visible on larger screens */
@media (min-width: 992px) {

    /* lg breakpoint */
    .main-content {
        margin-left: 260px;
        width: calc(100% - 260px);
    }

    .sidebar.toggled {
        /* This state should not occur on lg+ if toggle button is hidden */
        margin-left: -260px;
        /* Keep it hidden if somehow toggled */
    }

    .main-content.toggled {
        /* When sidebar is toggled off on lg+ (if a toggle existed) */
        margin-left: 0;
        width: 100%;
    }
}


.top-navbar {
    background-color: var(--panel-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border-color);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

.current-section-title {
    font-family: var(--heading-font);
    font-weight: 600;
    color: #fff;
}

#sidebarCollapse {
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    color: #fff;
}

/* Ensure toggle is visible */
#sidebarCollapse:focus {
    box-shadow: none;
}

.dropdown-menu-dark .dropdown-item {
    color: var(--text-color);
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.content-section {
    min-height: calc(100vh - 70px);
}

/* Adjust based on top-navbar height */
.summary-card {
    background-color: var(--panel-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border-color);
    height: 100%;
}

.main-balance-card h2 {
    font-family: var(--heading-font);
    color: #fff;
}

.main-balance-card h2 .small {
    font-family: var(--primary-font);
    font-size: 0.9rem;
}

.main-balance-card h6,
.quick-stats-card h6 {
    color: var(--text-muted-color);
}

/* Ensure muted color for these headings */
.quick-stats-card span {
    color: var(--text-color);
}

/* Ensure quick stats text is light */
.quick-stats-card .fw-semibold.text-white {
    color: #fff !important;
}

/* Ensure specific white text remains white */


.content-panel {
    background-color: var(--panel-bg);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border-color);
    margin-bottom: 25px;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--card-border-color);
}

.panel-title {
    font-family: var(--heading-font);
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0;
}

.panel-body {
    padding: 20px;
    color: var(--text-color);
}

/* Ensure panel body text is light */
.panel-body p {
    color: var(--text-color);
}

/* Ensure paragraphs in panel body are light */
.panel-body .text-muted {
    color: var(--text-muted-color) !important;
}

/* Override for muted text in panel */

/* Support chat bubbles (user/admin) */
.support-chat-msg {
    display: flex;
    align-items: flex-end;
    width: 100%;
    gap: 10px;
    margin-bottom: 12px;
}

.support-chat-msg .avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
}

.support-chat-msg .bubble {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 78%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    background: #fff;
    color: #0f101c;
    border: 1px solid rgba(0, 0, 0, .08);
}

.support-chat-msg .bubble-text {
    white-space: pre-wrap;
    line-height: 1.35;
}

.support-chat-msg .bubble-meta {
    margin-top: 6px;
    font-size: 12px;
    text-align: right;
    opacity: .75;
}

/* --- Modern User Panel Overrides --- */
.dashboard-wrapper {
    background-color: var(--dash-bg);
}

.modern-card {
    background: var(--dash-card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--dash-glass-border);
    border-radius: var(--dash-radius);
    padding: 24px;
    box-shadow: var(--dash-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(var(--dash-primary-rgb), 0.3);
}

.modern-panel {
    background: var(--dash-glass);
    border-radius: var(--dash-radius);
    border: 1px solid var(--dash-glass-border);
    overflow: hidden;
}

/* Asset Vertical Cards (from user mockup) */
.asset-v-card {
    width: 100%;
    min-height: 280px;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.asset-v-card:hover {
    transform: scale(1.03);
}

.asset-v-card i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.asset-v-card .asset-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 5px;
    opacity: 0.8;
}

.asset-v-card .asset-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: auto;
}

.asset-v-card .asset-sub-value {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 5px;
}

.bg-bitcoin {
    background: linear-gradient(135deg, #f7931a, #ffab40);
}

.bg-ripple {
    background: linear-gradient(135deg, #00aeff, #0072ff);
}

.bg-tether {
    background: linear-gradient(135deg, #26a17b, #50c878);
}

.bg-stellar {
    background: linear-gradient(135deg, #7b1fa2, #9c27b0);
}

.bg-sirin {
    background: linear-gradient(135deg, #f44336, #ff7043);
}

/* Sidebar & Navbar Modernization */
.sidebar {
    background: rgba(15, 16, 28, 0.95) !important;
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--dash-border);
}

.sidebar ul li a {
    border-radius: 12px;
    margin: 5px 15px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.sidebar ul li.active>a {
    background: rgba(var(--dash-primary-rgb), 0.15) !important;
    color: var(--dash-primary) !important;
    font-weight: 600;
    border-left: none;
}

.sidebar ul li.active>a i {
    color: var(--dash-primary) !important;
}

.top-navbar {
    background: rgba(15, 16, 28, 0.8) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--dash-border);
    padding: 15px 30px;
}

.current-section-title {
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.support-chat-msg.user {
    justify-content: flex-end;
}

.support-chat-msg.user .avatar {
    order: 2;
}

.support-chat-msg.user .bubble {
    order: 1;
    background: #fff !important;
    color: #0f101c !important;
    border-color: rgba(0, 0, 0, .08) !important;
    border-radius: 16px 16px 6px 16px;
}

.support-chat-msg.user .bubble .bubble-meta {
    color: #6c7487;
}

.support-chat-msg.agent {
    justify-content: flex-start;
}

.support-chat-msg.agent .avatar {
    order: 1;
}

.support-chat-msg.agent .bubble {
    background: #1677ff !important;
    color: #fff !important;
    border-color: rgba(0, 0, 0, 0) !important;
    border-radius: 16px 16px 16px 6px;
}

.support-chat-msg.agent .bubble .bubble-meta {
    color: rgba(255, 255, 255, .9);
}

.support-chat-msg.ai .bubble {
    background: #f1f2f6 !important;
    color: #0f101c !important;
    border-color: rgba(0, 0, 0, .08) !important;
}

.support-chat-meta {
    font-size: .75rem;
    color: var(--text-muted-color);
    margin-top: 6px;
}


.activity-list .list-group-item {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    padding: 12px 0;
    color: var(--text-color);
}

.activity-list .list-group-item:last-child {
    border-bottom: none;
}

.activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 0.9rem;
}

.activity-icon.received {
    background-color: rgba(var(--bs-success-rgb), 0.2);
    color: var(--bs-success);
}

.activity-icon.sent {
    background-color: rgba(var(--bs-danger-rgb), 0.2);
    color: var(--bs-danger);
}

.activity-icon.system {
    background-color: rgba(var(--bs-warning-rgb), 0.2);
    color: var(--bs-warning);
}

.crypto-table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.crypto-table thead th {
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--card-border-color) !important;
    font-family: var(--heading-font);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted-color);
    padding: 12px 15px;
}

.crypto-table tbody td {
    border-color: rgba(255, 255, 255, 0.08) !important;
    padding: 15px;
    vertical-align: middle;
    color: var(--text-color);
}

/* Ensure table cell text is light */
.crypto-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.crypto-table img.rounded-circle {
    border: 1px solid var(--card-border-color);
}

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--card-border-color);
    --bs-table-color: var(--text-color);
}

.crypto-modal .modal-content {
    background-color: var(--panel-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border-color);
    border-radius: 12px;
    color: var(--text-color);
}

.crypto-modal .modal-header {
    border-bottom: 1px solid var(--card-border-color);
}

.crypto-modal .modal-header .modal-title {
    font-family: var(--heading-font);
    color: #fff;
}

.crypto-modal .modal-footer {
    border-top: 1px solid var(--card-border-color);
}

.crypto-modal .form-control-custom,
.crypto-modal .form-select.form-control-custom {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-color) !important;
}

.crypto-modal .form-control-custom:focus,
.crypto-modal .form-select.form-control-custom:focus {
    border-color: var(--input-focus-border) !important;
    box-shadow: 0 0 0 3px rgba(0, 174, 255, 0.2) !important;
}

.crypto-modal .form-group-floating .form-control-custom:focus+label,
.crypto-modal .form-group-floating .form-control-custom:not(:placeholder-shown)+label {
    background-color: var(--panel-bg) !important;
}

.crypto-modal .form-select.form-control-custom+label {
    background-color: var(--input-bg) !important;
}

.crypto-modal .form-select.form-control-custom:focus+label,
.crypto-modal .form-select.form-control-custom:valid+label {
    background-color: var(--panel-bg) !important;
}

.crypto-modal .copy-btn {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--primary-color);
}

.crypto-modal .copy-btn:hover {
    background-color: rgba(0, 174, 255, 0.2);
}

.crypto-modal .form-label {
    color: var(--text-color);
}

/* Ensure modal labels are light */
.crypto-modal small {
    color: var(--text-muted-color);
}

/* Ensure small text in modals is light muted */

/* Force native select controls to render dark-themed dropdowns where supported */
.crypto-modal,
.crypto-modal .modal-content,
.crypto-modal .form-select.form-control-custom {
    color-scheme: dark;
}

/* Ensure select dropdown options in crypto modal are dark themed */
.crypto-modal .form-select.form-control-custom option {
    background-color: var(--dark-bg) !important;
    color: var(--text-color) !important;
}

/* For some browsers (e.g., Firefox) that use optgroup styling */
.crypto-modal .form-select.form-control-custom optgroup {
    background-color: var(--dark-bg) !important;
    color: var(--text-color) !important;
}

/* Strengthen select element base styling for consistency */
.crypto-modal .form-select.form-control-custom {
    background-color: var(--dark-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--input-border) !important;
}


/* Specific styles for live rates table cells */
.live-rates-table .rate-positive {
    color: var(--success-color);
}

.live-rates-table .rate-negative {
    color: var(--error-color);
}

.live-rates-table .asset-name-group .text-muted {
    color: var(--text-muted-color) !important;
}

/* Ensure ticker is muted */

/* Profile Page Specific Styles */
.profile-header-card {
    background: linear-gradient(135deg, rgba(0, 174, 255, 0.2) 0%, rgba(0, 174, 255, 0.05) 100%), var(--panel-bg);
    /* Adjusted to use primary color with alpha */
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid var(--card-border-color);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--input-bg);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    font-size: 3rem;
    font-weight: 600;
    border: 3px solid var(--primary-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-name {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.profile-email {
    font-size: 1rem;
    color: var(--text-muted-color);
    margin-bottom: 1rem;
}

.profile-edit-btn {
    font-size: 0.9rem;
}

.profile-section .panel-title {
    font-size: 1.1rem;
    /* Slightly smaller for sub-sections */
}

.profile-section .form-label {
    color: var(--text-muted-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.profile-section .form-control-custom[readonly] {
    background-color: rgba(128, 128, 128, 0.1);
    /* Using grey for readonly */
    cursor: not-allowed;
}

.two-factor-status {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.two-factor-status.enabled {
    background-color: rgba(40, 167, 69, 0.15);
    /* Using success color with alpha */
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: var(--success-color);
}

.two-factor-status.disabled {
    background-color: rgba(255, 193, 7, 0.15);
    /* Using warning color with alpha */
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: var(--warning-color);
}


@media (max-width: 991.98px) {

    /* lg breakpoint and down */
    .sidebar {
        margin-left: -260px;
        /* Hidden by default */
    }

    .sidebar.toggled {
        margin-left: 0;
        /* Shown when toggled */
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .auth-container {
        margin: 20px;
        padding: 25px 20px;
    }

    .bitget-header {
        padding: 15px 20px;
    }

    .bitget-logo-container img {
        max-height: 32px;
    }
}

@media (min-width: 992px) {

    /* lg breakpoint and up */
    #sidebarCollapse {
        display: none;
        /* Hide the hamburger toggle on larger screens */
    }

    .sidebar-close-btn {
        display: none;
        /* Hide the X button in sidebar on larger screens */
    }
}

@media (max-width: 768px) {
    .summary-card {
        padding: 20px;
    }

    .main-balance-card h2 {
        font-size: 2rem;
    }

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

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .bitget-auth-content h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .top-navbar {
        padding: 0.5rem 1rem;
    }

    .content-panel,
    .summary-card {
        padding: 15px;
    }

    .panel-title,
    .main-balance-card h6,
    .quick-stats-card h6 {
        font-size: 0.9rem;
    }

    .crypto-table {
        font-size: 0.85rem;
    }

    .crypto-table td,
    .crypto-table th {
        padding: 10px 8px;
    }

    .crypto-table img.rounded-circle {
        width: 24px;
    }

    .auth-container {
        padding: 20px 15px;
    }

    .form-control-custom {
        padding: 12px 15px;
    }

    .form-group-floating label {
        top: 13px;
        left: 15px;
    }

    .form-control-custom:focus+label,
    .form-control-custom:not(:placeholder-shown)+label {
        top: -9px;
        left: 10px;
    }

    .profile-header-card {
        padding: 1.5rem;
    }

    .bitget-auth-content {
        padding: 10px;
    }

    .bitget-auth-content h1 {
        font-size: 1.5rem;
    }

    .bitget-header {
        padding: 10px 15px;
    }
}

/* --- Modern Alert Styling (Glassmorphism) --- */
.alert-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    width: auto;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.alert {
    pointer-events: auto;
    background: rgba(20, 22, 40, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.alert.fade.show {
    opacity: 1;
}

.alert.fade {
    opacity: 0;
    transform: translateX(50px);
}

.alert-success {
    border-left: 5px solid #00c853;
    background: rgba(0, 200, 83, 0.15);
}

.alert-danger {
    border-left: 5px solid #ff1744;
    background: rgba(255, 23, 68, 0.15);
}

.alert-warning {
    border-left: 5px solid #ffea00;
    background: rgba(255, 234, 0, 0.1);
    color: #fff !important;
}

.alert-info {
    border-left: 5px solid #00b0ff;
    background: rgba(0, 176, 255, 0.15);
}

.alert .btn-close {
    filter: invert(1);
    opacity: 0.5;
    margin-left: auto;
    padding: 0;
    position: static;
    font-size: 0.8rem;
}

.alert .btn-close:hover {
    opacity: 1;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 576px) {
    .alert-container {
        top: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }

    .alert {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}