body {
    background-color: #f8f9fa;
    font-family: 'Roboto', sans-serif;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    font-size: 0.9rem;
    width: 100% !important;
    table-layout: auto;
}

.table th,
.table td {
    padding: 0.5rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.annual-yield {
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

.sorting_1 {
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.3rem;
        min-width: 80px;
    }

    .table-responsive {
        margin: 0 -0.5rem;
    }
}

.modal-body {
    max-height: 80vh;
    overflow-y: auto;
}

tr.shown {
    background-color: #e9ecef;
}

#weeklyStockTable tbody tr:hover,
#monthlyStockTable tbody tr:hover {
    background-color: #f1f3f5;
    cursor: pointer;
}

.highlight-row {
    background-color: #d1e7dd !important;
}

.container {
    max-width: 1200px;
}

.header-logo {
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

.title-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    margin: 1rem auto;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-shadow {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-body {
    background-color: #ffffff;
    padding: 1rem;
}

h4 {
    color: #343a40;
}

.accordion-collapse {
    background-color: #ffffff;
}

.accordion-body {
    background-color: #ffffff;
    padding: 1rem;
}

/* Logo Container */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
}

/* Logo Text Container */
.logo-text-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logo Icon */
.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain; /* Ensure image scales properly */
    border-radius: 50%; /* Optional: maintain circular shape if desired */
    transform: rotate(337deg); /* Match dark theme rotation */
    vertical-align: text-bottom;
}

/* Logo Text */
.logo-text {
    font-weight: 700;
    font-size: 2.5rem;
    color: #343a40;
    margin: 0;
    position: relative;
    display: inline-block;
}

/* Tagline */
.tagline {
    font-weight: 400;
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.2;
    margin-top: -5px; /* Pull tagline closer to logo-text */
}

/* Creator Text */
.creator-text {
    font-size: 0.6rem;
    color: #6c757d;
    position: absolute;
    top: -20px;
    left: 0;
    text-decoration: none;
}

.creator-text:hover {
    text-decoration: underline;
}

.nav-tabs .nav-link {
    font-size: 1rem;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background-color: #ffffff;
    border-bottom-color: transparent;
}

.select2-container .select2-selection--single {
    height: 38px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

.accordion-button {
    font-weight: 500;
}

.calendar-box {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #dee2e6;
    text-align: center;
    padding: 0.3rem;
    vertical-align: top;
    width: 150px;
}

.calendar-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.ticker-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.ticker-link {
    display: inline-block;
    padding: 0.1rem 0.3rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    margin: 0;
    max-width: 45%;
    box-sizing: border-box;
    transition: background-color 0.2s;
}

.bg-declaration {
    background-color: #fff3cd;
}

.bg-ex-record {
    background-color: #f8d7da;
}

.bg-payment {
    background-color: #d4edda;
}

.ticker-link:hover {
    filter: brightness(90%);
    text-decoration: none;
}

.calendar-legend {
    font-size: 0.85rem;
    color: #495057;
}

.legend-item {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.legend-item.hidden {
    opacity: 0.5;
}

.legend-color {
    width: 15px;
    height: 15px;
    display: inline-block;
    margin-right: 0.5rem;
}

.ticker-link.hidden {
    display: none !important;
}

.legend-note {
    align-self: center;
    margin-left: 1rem;
    font-style: italic;
    color: #6c757d;
}

.toggle-icon {
    cursor: pointer;
    margin-right: 5px;
    font-size: 0.9rem;
    vertical-align: middle;
}

.dataTables_wrapper {
    background-color: #f8f9fa;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dt-buttons {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 10px;
}

.dataTables_wrapper > .row:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dt-buttons {
    float: none !important;
}

.dataTables_wrapper .dataTables_length {
    flex: 0 0 auto;
    order: 1;
}

.dataTables_wrapper .dataTables_filter {
    flex: 0 0 auto;
    order: 2;
}

.dataTables_wrapper .dt-buttons {
    flex: 0 0 auto;
    order: 3;
    margin-left: auto;
    text-align: right;
}

.dt-button {
    margin-right: 5px;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    background-color: #007bff;
    color: #fff;
    border-radius: 0.25rem;
}

div.dataTables_length select {
    width: auto;
    display: inline-block;
    margin-right: 10px;
}

/* Hamburger Button */
.hamburger-btn {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #343a40;
    padding: 0.5rem;
}

.hamburger-btn:hover {
    background-color: #e9ecef;
    color: #343a40;
}

.hamburger-btn .bi-list {
    font-size: 1.5rem;
}

/* Offcanvas Menu */
.offcanvas {
    background-color: #ffffff;
    color: #343a40;
    width: 250px; /* Adjust width as needed */
}

.offcanvas-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.offcanvas-title {
    color: #343a40;
}

.offcanvas-body {
    padding: 1rem;
}

.offcanvas .nav-link {
    color: #343a40;
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

.offcanvas .nav-link:hover {
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

/* Ensure header remains centered */
.header-logo .logo-container {
    flex-grow: 1;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.3rem;
        min-width: 80px;
    }

    .table-responsive {
        margin: 0 -0.5rem;
    }

    .logo-text {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.9rem;
        margin-top: -3px;
    }

    .creator-text {
        font-size: 0.5rem;
        top: -15px;
    }

    .logo-text-container {
        gap: 10px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .info-box {
        padding: 0.75rem;
    }

    .info-box p {
        font-size: 0.85rem;
    }

    .development-box p {
        font-size: 0.75rem;
    }

    .disclaimer-box p {
        font-size: 0.65rem;
    }

    .nav-tabs .nav-link {
        font-size: 0.9rem;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 0.2rem;
        font-size: 0.7rem;
        width: 100px;
    }

    .ticker-link {
        font-size: 0.7rem;
        padding: 0.1rem 0.2rem;
        max-width: 45%;
    }

    .detail-button {
        display: none;
    }

    tr.active .detail-button {
        display: inline-block;
    }

    div.dataTables_length select {
        width: 100px;
        margin-right: 5px;
    }

    .dataTables_wrapper > .row:first-child {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dt-buttons {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        order: unset;
    }

    .dataTables_wrapper .dt-buttons {
        margin-left: 0;
        text-align: right;
    }

    .hamburger-btn {
        padding: 0.3rem;
    }

    .hamburger-btn .bi-list {
        font-size: 1.2rem;
    }

    .offcanvas {
        width: 200px;
    }
}

.info-box {
    background-color: #f8f9fa; /* Slightly off-white to match page background but with border for distinction */
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    margin: 1rem auto;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Slightly stronger shadow for prominence */
}

.info-box p {
    font-size: 0.95rem;
    color: #343a40; /* Darker text for better contrast */
    margin: 0;
}

@media (max-width: 768px) {
    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.3rem;
        min-width: 80px;
    }

    .table-responsive {
        margin: 0 -0.5rem;
    }

    .logo-text {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.9rem;
        margin-top: -3px;
    }

    .creator-text {
        font-size: 0.5rem;
        top: -15px;
    }

    .logo-text-container {
        gap: 10px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .info-box {
        padding: 0.75rem; /* Match dark theme for mobile */
    }

    .info-box p {
        font-size: 0.85rem;
    }

    .development-box p {
        font-size: 0.75rem;
    }

    .disclaimer-box p {
        font-size: 0.65rem;
    }

    .nav-tabs .nav-link {
        font-size: 0.9rem;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 0.2rem;
        font-size: 0.7rem;
        width: 100px;
    }

    .ticker-link {
        font-size: 0.7rem;
        padding: 0.1rem 0.2rem;
        max-width: 45%;
    }

    .detail-button {
        display: none;
    }

    tr.active .detail-button {
        display: inline-block;
    }

    div.dataTables_length select {
        width: 100px;
        margin-right: 5px;
    }

    .dataTables_wrapper > .row:first-child {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dt-buttons {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        order: unset;
    }

    .dataTables_wrapper .dt-buttons {
        margin-left: 0;
        text-align: right;
    }

    .hamburger-btn {
        padding: 0.3rem;
    }

    .hamburger-btn .bi-list {
        font-size: 1.2rem;
    }

    .offcanvas {
        width: 200px;
    }
}

.development-box {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin: 0.5rem auto 1rem;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.development-box p {
    font-size: 0.85rem;
    color: #495057;
    margin: 0;
}

.tagline {
    margin-top: 5px;
}

