/********** Template CSS **********/
:root {
    /* Adjusted palette for better contrast on dark theme */
    --primary: #e11d48;
    /* vivid pink-red */
    --secondary: #12151c;
    /* darker panel */
    --light: #b0b4c4;
    /* lighter text on dark bg */
    --dark: #0b0e14;
    /* app background */
    --surface: #1e222d;
    /* slightly lighter than secondary for cards */
    --accent-glow: rgba(225, 29, 72, 0.15);
}

/* Hide reCAPTCHA badge (v3 invisible) */
.grecaptcha-badge {
    visibility: hidden;
}

body {
    font-family: 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

/* Tabular numbers for price / data columns */
.table td,
.table th {
    font-variant-numeric: tabular-nums;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    transition: .5s;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}


/*** Layout ***/
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--secondary);
    transition: 0.5s;
    z-index: 999;
}

/* Custom scrollbar styling for sidebar - thin and subtle */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(108, 114, 147, 0.2);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 114, 147, 0.4);
}

/* Firefox scrollbar styling */
@supports (scrollbar-width: thin) {
    .sidebar {
        scrollbar-width: thin;
        scrollbar-color: rgba(108, 114, 147, 0.2) transparent;
    }
}

.content {
    margin-left: 250px;
    min-height: 100vh;
    background: var(--dark);
    transition: 0.5s;
}

@media (min-width: 992px) {
    .sidebar {
        margin-left: 0;
    }

    .sidebar.open {
        margin-left: -250px;
    }

    .content {
        width: calc(100% - 250px);
    }

    .content.open {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        margin-left: -250px;
    }

    .sidebar.open {
        margin-left: 0;
    }

    .sidebar .navbar .navbar-nav {
        padding-bottom: 80px;
    }

    .content {
        width: 100%;
        margin-left: 0;
    }
}


/*** Navbar ***/
.sidebar .navbar .navbar-nav .nav-link {
    padding: 6px 20px;
    color: var(--light);
    font-weight: 500;
    border-left: 3px solid var(--secondary);
    border-radius: 0 30px 30px 0;
    outline: none;
    font-size: 1rem;
    /* improved legibility */
}

/* Category Headers */
.nav-category-header {
    padding: 12px 20px 6px 20px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.nav-category-header:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 8px;
}

.nav-category-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-category-text {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(108, 114, 147, 0.6);
    text-transform: uppercase;
}

.nav-category-chevron {
    font-size: 0.65rem;
    color: rgba(108, 114, 147, 0.6);
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-category-header:hover .nav-category-chevron {
    color: rgba(108, 114, 147, 0.8);
}

/* Submenu */
.nav-submenu {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    display: block;
}

.nav-submenu.expanded {
    max-height: 1000px;
    opacity: 1;
    padding: 0;
}

.nav-submenu.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.sidebar .navbar .navbar-nav .nav-link:hover,
.sidebar .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
    background: var(--dark);
    border-color: var(--primary);
}

.sidebar .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border-radius: 40px;
}

.sidebar .navbar .navbar-nav .nav-link:hover i,
.sidebar .navbar .navbar-nav .nav-link.active i {
    background: var(--secondary);
}

.sidebar .navbar .dropdown-toggle::after {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
}

.sidebar .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

.sidebar .navbar .dropdown-item {
    padding-left: 25px;
    border-radius: 0 30px 30px 0;
    color: var(--light);
}

.sidebar .navbar .dropdown-item:hover,
.sidebar .navbar .dropdown-item.active {
    background: var(--dark);
}

.content .navbar .navbar-nav .nav-link {
    margin-left: 25px;
    padding: 12px 0;
    color: var(--light);
    outline: none;
}

.content .navbar .navbar-nav .nav-link:hover,
.content .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.content .navbar .sidebar-toggler,
.content .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border-radius: 40px;
}

.content .navbar .dropdown-item {
    color: var(--light);
}

.content .navbar .dropdown-item:hover,
.content .navbar .dropdown-item.active {
    background: var(--dark);
}

.content .navbar .dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: middle;
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
}

.content .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

@media (max-width: 575.98px) {
    .content .navbar .navbar-nav .nav-link {
        margin-left: 15px;
    }
}


/*** Date Picker ***/
.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}


/*** Testimonial ***/
.progress .progress-bar {
    width: 0px;
    transition: 2s;
}


/*** Testimonial ***/
.testimonial-carousel .owl-dots {
    margin-top: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    border: 5px solid var(--primary);
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    background: var(--dark);
    border-color: var(--primary);
}

.data-refresh-highlight {
    color: #60a5fa;
    /* softer blue */
}

.data-refresh-remove-highlight {
    color: #94a3b8;
    /* neutral slate */
}

/* Trend colors normalized for accessibility */
.trend-upside {
    background-color: #16a34a;
    /* green */
}

.trend-downside {
    background-color: #dc2626;
    /* red */
}

@media (max-width: 767px) {
    .custom-font-size-mobile {
        font-size: 10px;
        /* Adjust the font size as needed */
    }
}

/* Landing Page Redesign Styles */
.landing-hero-section {
    position: relative;
    background: linear-gradient(180deg, var(--secondary) 0%, var(--dark) 100%);
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #b0b4c4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-subtitle {
    font-size: 1.1rem;
    color: var(--light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-icon {
    color: var(--light);
    font-size: 1.2rem;
    margin-right: 15px;
}

.landing-search-input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    padding: 10px 0;
    font-size: 1.1rem;
    outline: none;
}

.landing-search-input::placeholder {
    color: rgba(176, 180, 196, 0.5);
}

.landing-grid-section {
    padding: 40px 0;
}

.section-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--light);
    margin-bottom: 20px;
    display: block;
    font-weight: 600;
    opacity: 0.8;
}

.feature-grid-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.feature-grid-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(145deg, var(--surface), #252a36);
    border-color: rgba(225, 29, 72, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.feature-grid-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--primary);
}

.card-icon {
    font-size: 2rem;
    color: var(--light);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--light);
    line-height: 1.5;
    margin-bottom: 0;
    opacity: 0.8;
}

.card-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    color: var(--light);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.feature-grid-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

.market-ticker-wrap {
    background: var(--secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
}

.feature-category-group {
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .landing-title {
        font-size: 1.8rem;
    }

    .feature-grid-card {
        padding: 20px;
    }
}