/* Custom Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* General Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--dark-color);
    background: #f5f7fa;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Layout Components */
.container-fluid {
    padding: 0;
}

/* Topbar Styles */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary-color);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    padding: 1rem 0;
    overflow-y: auto;
    z-index: 900;
}

.sidebar .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 6px;
    margin: 0.25rem 0.75rem;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.sidebar .nav-link i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

/* Main Content Styles */
main {
    margin-top: 70px;
    padding: 1.25rem;
    min-height: calc(100vh - 60px);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1rem;
}

/* Form Controls */
.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.form-control-sm,
.form-select-sm {
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
}

/* Table Styles */
.table {
    font-size: 0.875rem;
}

.table th {
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Button Styles */
.btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
        width: 100%;
    }
    
    .offcanvas {
        width: 220px;
    }
}

/* Utility Classes */
.text-muted {
    font-size: 0.8125rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Modal Styles */
.modal-header {
    padding: 0.75rem 1rem;
}

.modal-title {
    font-size: 1rem;
    font-weight: 600;
}

.modal-body {
    padding: 1rem;
}

/* Icon Styles */
.icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

/* Grid Spacing */
.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

/* Input Group */
.input-group {
    font-size: 0.875rem;
}

.input-group-text {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Form Switch */
.form-check-input {
    width: 2.5rem;
    height: 1.25rem;
}

.form-check-label {
    font-size: 0.875rem;
    padding-left: 0.5rem;
}

/* Dashboard Cards */
.dashboard-cards .card {
    padding: 1rem;
}

.dashboard-cards .card-title {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.dashboard-cards .card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

/* Button Styles */
.btn-primary {
    background: var(--primary-color);
    border: none;
}

.btn-primary:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-cards .card {
        margin-bottom: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .dashboard-cards .card-value {
        font-size: 1.25rem;
    }
    
    .table th, .table td {
        padding: 0.75rem 1rem;
    }
}

/* Utility Classes */
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Navbar Styles */
.navbar {
    padding: 1rem 0;
    
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
}

/* Features Section */
.features-section {
    background-color: white;
}

.card {
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* How It Works Section */
.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-weight: bold;
}

/* Footer */
footer {
    background-color: var(--dark-color);
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    font-size: 1.2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section::before {
        width: 100%;
        opacity: 0.05;
    }
    
    .hero-section .col-lg-6 {
        text-align: center;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
    }
}

/* Custom Button Styles */
.btn-primary {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
}

.btn-outline-primary {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
}

/* Custom Card Styles */
.card {
    border-radius: 12px;
}

/* Custom Section Spacing */
section {
    padding: 5rem 0;
}

/* Custom Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.lead {
    font-weight: 400;
    color: var(--secondary-color);
}

/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chat-button i {
    font-size: 24px;
}

.chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 350px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-top: 80px;
}

.chat-container.active {
    display: flex;
}

.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h6 {
    margin: 0;
    font-weight: 600;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
}

.message p {
    padding: 10px 15px;
    border-radius: 18px;
    margin: 0;
    font-size: 14px;
}

.message.received {
    margin-right: auto;
}

.message.received p {
    background-color: #e9ecef;
    border-top-left-radius: 4px;
}

.message.sent {
    margin-left: auto;
}

.message.sent p {
    background-color: var(--primary-color);
    color: white;
    border-top-right-radius: 4px;
}

.chat-input {
    padding: 15px;
    background-color: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    outline: none;
}

.chat-input input:focus {
    border-color: var(--primary-color);
}

.chat-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input button:hover {
    background-color: #0b5ed7;
}

/* Responsive Chat */
@media (max-width: 576px) {
    .chat-container {
        width: 100%;
        height: calc(100vh - 80px);
        bottom: 0;
        right: 0;
        border-radius: 0;
        margin-top: 80px;
    }
    
    .chat-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-button {
        width: 50px;
        height: 50px;
    }
}

/* Hero Image Styles */
.hero-image-container {
    position: relative;
    padding: 20px;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

.trading-stats {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Adjustments for Hero Image */
@media (max-width: 991px) {
    .hero-image-container {
        margin-top: 40px;
    }
    
    .trading-stats {
        position: relative;
        bottom: 0;
        margin-top: 20px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .trading-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-value {
        margin-bottom: 0;
    }
    
    .stat-label {
        text-align: right;
    }
}

/* Top Markets Section */
.top-markets {
    background-color: #f8f9fa;
}

.markets-table {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid #e9ecef;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

.market-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.market-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.market-name {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
}

.market-symbol {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.change {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.change.positive {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.change.negative {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Responsive Markets Table */
@media (max-width: 768px) {
    .market-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .market-icon {
        width: 24px;
        height: 24px;
    }
    
    .table th, .table td {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .markets-table {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .table-responsive {
        padding: 0;
    }
}
/* --- Compact Navbar FBS Style --- */
.navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    font-size: 1rem;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-brand img {
    height: 26px;
    width: auto;
    margin-right: 6px;
}

.navbar-nav {
    gap: 1rem;
}

.navbar-nav .nav-link {
    color: #222;
    font-weight: 500;
    padding: 0.5rem 0.7rem;
    font-size: 0.98rem;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active,
.navbar-nav .show > .nav-link {
    color: #0d6efd;
    background: none;
}

.navbar-nav .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: none;
    min-width: 170px;
    margin-top: 0.3rem;
    font-size: 0.97rem;
}

.navbar-nav .dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: #222;
    transition: background 0.2s, color 0.2s;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
    background: #f1f3f7;
    color: #0d6efd;
}

.dropdown .btn-link {
    color: #222;
    font-weight: 500;
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    font-size: 0.97rem;
}

.dropdown .btn-link:hover,
.dropdown .btn-link:focus {
    color: #0d6efd;
    background: none;
}

.d-flex.align-items-center.gap-2 {
    gap: 0.5rem !important;
}

/* --- Account Buttons --- */
.btn-primary, .btn-outline-primary {
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.97rem;
    padding: 0.4rem 1.1rem;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.btn-primary {
    background: linear-gradient(90deg, #0d6efd 60%, #2563eb 100%);
    border: none;
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(90deg, #2563eb 60%, #0d6efd 100%);
    color: #fff;
}

.btn-outline-primary {
    border: 2px solid #0d6efd;
    color: #0d6efd;
    background: #fff;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* --- Language Selector --- */
#langDropdown {
    font-weight: 500;
    font-size: 0.97rem;
    color: #222;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 0.4rem 0.9rem;
}

#langDropdown i {
    margin-right: 5px;
    color: #0d6efd;
}

.dropdown-menu[aria-labelledby='langDropdown'] {
    min-width: 90px;
    border-radius: 7px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    font-size: 0.97rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .navbar-nav {
        gap: 0.3rem;
    }
    .navbar-nav .nav-link {
        padding: 0.4rem 0.6rem;
    }
    .d-flex.align-items-center.gap-2 {
        gap: 0.3rem !important;
    }
    .navbar-brand span {
        font-size: 1rem !important;
    }
    .navbar-brand img {
        height: 22px;
        margin-right: 4px;
    }
    .btn-primary, .btn-outline-primary {
        font-size: 0.95rem;
        padding: 0.35rem 0.8rem;
    }
}

@media (max-width: 991.98px) {
    main,
    .main-content,
    .container,
    .container-fluid {
        margin-top: 70px !important;
    }
}