/**
 * Thanos Economic Data - Modern Design System
 * Clean, professional CSS for financial data display
 *
 * @package Thanos_Economic_Data
 * @version 2.0.0
 */

/* ==========================================================================
   CSS Variables - Design Tokens
   ========================================================================== */

:root {
    /* Primary Colors */
    --thanos-primary: #2563eb;
    --thanos-primary-dark: #1d4ed8;
    --thanos-primary-light: #3b82f6;

    /* Status Colors */
    --thanos-success: #10b981;
    --thanos-success-light: #d1fae5;
    --thanos-danger: #ef4444;
    --thanos-danger-light: #fee2e2;
    --thanos-warning: #f59e0b;
    --thanos-warning-light: #fef3c7;

    /* Neutral Colors */
    --thanos-gray-50: #f9fafb;
    --thanos-gray-100: #f3f4f6;
    --thanos-gray-200: #e5e7eb;
    --thanos-gray-300: #d1d5db;
    --thanos-gray-400: #9ca3af;
    --thanos-gray-500: #6b7280;
    --thanos-gray-600: #4b5563;
    --thanos-gray-700: #374151;
    --thanos-gray-800: #1f2937;
    --thanos-gray-900: #111827;

    /* Shadows */
    --thanos-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --thanos-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --thanos-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --thanos-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --thanos-radius-sm: 4px;
    --thanos-radius: 8px;
    --thanos-radius-lg: 12px;

    /* Font */
    --thanos-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --thanos-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;

    /* Transitions */
    --thanos-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Container
   ========================================================================== */

.thanos-data-container {
    font-family: var(--thanos-font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--thanos-gray-800);
    margin: 0;
    padding: 0;
}

.thanos-data-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   Card Component
   ========================================================================== */

.thanos-card {
    background: #fff;
    border-radius: var(--thanos-radius);
    box-shadow: var(--thanos-shadow);
    border: 1px solid var(--thanos-gray-200);
    overflow: hidden;
}

.thanos-card-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--thanos-gray-50), #fff);
    border-bottom: 1px solid var(--thanos-gray-200);
}

.thanos-card-header h3,
.thanos-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--thanos-gray-800);
}

.thanos-card-body {
    padding: 0;
}

/* ==========================================================================
   Modern Tables
   ========================================================================== */

.thanos-table,
.table,
.table-radius,
.table-bordered {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

/* Table Header */
.thanos-table thead th,
.table thead th,
.table-radius thead th {
    background: linear-gradient(180deg, var(--thanos-gray-50) 0%, var(--thanos-gray-100) 100%);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--thanos-gray-700);
    border-bottom: 2px solid var(--thanos-gray-200);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.thanos-table thead th:first-child,
.table thead th:first-child,
.table-radius thead th:first-child {
    border-top-left-radius: var(--thanos-radius);
}

.thanos-table thead th:last-child,
.table thead th:last-child,
.table-radius thead th:last-child {
    border-top-right-radius: var(--thanos-radius);
}

/* Table Body */
.thanos-table tbody td,
.table tbody td,
.table-radius tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--thanos-gray-100);
    vertical-align: middle;
    transition: background-color var(--thanos-transition);
}

.thanos-table tbody tr:hover,
.table tbody tr:hover,
.table-radius tbody tr:hover,
.table-hover tbody tr:hover {
    background-color: var(--thanos-gray-50);
}

.thanos-table tbody tr:last-child td,
.table tbody tr:last-child td,
.table-radius tbody tr:last-child td {
    border-bottom: none;
}

/* Alternating Row Colors */
.thanos-table tbody tr:nth-child(even),
.table tbody tr:nth-child(even),
.table-radius tbody tr:nth-child(even) {
    background-color: var(--thanos-gray-50);
}

.thanos-table tbody tr:nth-child(even):hover,
.table tbody tr:nth-child(even):hover,
.table-radius tbody tr:nth-child(even):hover {
    background-color: var(--thanos-gray-100);
}

/* Table Bordered Style */
.table-radius {
    border: 1px solid var(--thanos-gray-200);
    border-radius: var(--thanos-radius);
    overflow: hidden;
    box-shadow: var(--thanos-shadow-sm);
}

.table-bordered {
    border: 1px solid var(--thanos-gray-200);
}

.table-bordered td,
.table-bordered th {
    border: 1px solid var(--thanos-gray-200);
}

/* Table Responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--thanos-radius);
}

/* ==========================================================================
   Currency & Value Display
   ========================================================================== */

/* Currency Badge */
.thanos-currency {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.thanos-currency-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 4px 8px;
    background: var(--thanos-primary);
    color: #fff;
    border-radius: var(--thanos-radius-sm);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.thanos-currency-name {
    font-weight: 400;
    color: var(--thanos-gray-500);
    font-size: 13px;
}

/* Price/Value Styling */
.thanos-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: var(--thanos-font-mono);
}

.gvd {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Price Change Indicators
   ========================================================================== */

.text-green,
.price-up,
.thanos-change-up,
span.u {
    color: var(--thanos-success) !important;
    font-weight: 500;
}

.text-red,
.price-down,
.thanos-change-down,
span.d {
    color: var(--thanos-danger) !important;
    font-weight: 500;
}

/* Change with Arrow */
.thanos-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--thanos-radius-sm);
    font-size: 13px;
    font-weight: 500;
}

.thanos-change-up {
    background: var(--thanos-success-light);
}

.thanos-change-down {
    background: var(--thanos-danger-light);
}

.thanos-change::before {
    font-size: 10px;
}

.thanos-change-up::before {
    content: "▲";
}

.thanos-change-down::before {
    content: "▼";
}

/* Glyphicon replacements with CSS */
span.u::before,
span.d::before {
    display: inline-block;
    margin-right: 4px;
    font-size: 10px;
}

span.u::before {
    content: "▲";
}

span.d::before {
    content: "▼";
}

/* Legacy glyphicon compatibility */
.glyphicon {
    display: inline-block;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}

.glyphicon-arrow-up::before {
    content: "▲";
    color: var(--thanos-success);
}

.glyphicon-arrow-down::before {
    content: "▼";
    color: var(--thanos-danger);
}

/* ==========================================================================
   Currency Flags (Emoji-based)
   ========================================================================== */

.thanos-flag {
    display: inline-block;
    margin-right: 6px;
    font-size: 16px;
    line-height: 1;
}

/* Fallback for old flag classes - using emoji */
.USD::before, .EUR::before, .GBP::before, .JPY::before, .AUD::before,
.CAD::before, .CHF::before, .CNY::before, .HKD::before, .SGD::before,
.KRW::before, .THB::before, .TWD::before, .INR::before, .MYR::before,
.IDR::before, .RUB::before, .SEK::before, .NOK::before, .DKK::before,
.NZD::before, .SAR::before, .AED::before, .KWD::before, .VND::before {
    display: inline-block;
    margin-right: 6px;
    font-size: 14px;
}

.USD::before { content: "🇺🇸"; }
.EUR::before { content: "🇪🇺"; }
.GBP::before { content: "🇬🇧"; }
.JPY::before { content: "🇯🇵"; }
.AUD::before { content: "🇦🇺"; }
.CAD::before { content: "🇨🇦"; }
.CHF::before { content: "🇨🇭"; }
.CNY::before { content: "🇨🇳"; }
.HKD::before { content: "🇭🇰"; }
.SGD::before { content: "🇸🇬"; }
.KRW::before { content: "🇰🇷"; }
.THB::before { content: "🇹🇭"; }
.TWD::before { content: "🇹🇼"; }
.INR::before { content: "🇮🇳"; }
.MYR::before { content: "🇲🇾"; }
.IDR::before { content: "🇮🇩"; }
.RUB::before { content: "🇷🇺"; }
.SEK::before { content: "🇸🇪"; }
.NOK::before { content: "🇳🇴"; }
.DKK::before { content: "🇩🇰"; }
.NZD::before { content: "🇳🇿"; }
.SAR::before { content: "🇸🇦"; }
.AED::before { content: "🇦🇪"; }
.KWD::before { content: "🇰🇼"; }
.VND::before { content: "🇻🇳"; }

/* ==========================================================================
   Text Alignment & Utilities
   ========================================================================== */

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

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

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

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

.text-muted {
    color: var(--thanos-gray-500) !important;
}

/* ==========================================================================
   Info Text & Labels
   ========================================================================== */

.donvi {
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    font-style: italic;
    color: var(--thanos-primary);
    margin-bottom: 8px;
    padding: 6px 12px;
    background: var(--thanos-gray-50);
    border-radius: var(--thanos-radius-sm);
    display: inline-block;
    float: right;
}

.source {
    text-align: right;
    font-size: 12px;
    margin-top: 12px;
    color: var(--thanos-gray-500);
    font-style: italic;
}

/* Update timestamp */
.thanos-update-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--thanos-gray-500);
    margin-bottom: 12px;
}

.thanos-update-time::before {
    content: "🕐";
    font-size: 14px;
}

.thanos-update-time strong {
    color: var(--thanos-gray-700);
}

/* ==========================================================================
   Price Line Indicator (Visual Bar)
   ========================================================================== */

.price-line {
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--thanos-success), var(--thanos-danger));
    margin-top: 6px;
    border-radius: 2px;
    width: 60px;
    position: relative;
    overflow: hidden;
}

.price-line small {
    display: block;
    height: 100%;
    background: var(--thanos-success);
    position: absolute;
    left: 0;
    top: 0;
}

/* ==========================================================================
   Giá Cà Phê Styles
   ========================================================================== */

.bang-gia-ca-phe {
    position: relative;
}

.bang-gia-ca-phe table tr td {
    vertical-align: middle;
}

.bang-gia-ca-phe table tr td:nth-child(2) {
    font-weight: 600;
}

.bang-gia-ca-phe table tr th {
    text-align: right;
}

.bang-gia-ca-phe small {
    display: block;
    font-size: 12px;
    color: var(--thanos-gray-500);
}

/* Coffee Domestic Table */
#cf_tn .title {
    text-align: center;
    font-weight: 600;
}

#cf_tn td {
    font-size: 14px;
}

#cf_tn .main-price {
    font-weight: 700;
    font-size: 15px;
}

#cf_tn .diff-price {
    font-weight: 600;
}

/* Sticky/Embed Table Styles */
.tbl_style_embed,
.tbl_sticky {
    font-size: 14px;
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    background: #fff;
    border-radius: var(--thanos-radius);
    overflow: hidden;
    box-shadow: var(--thanos-shadow);
}

.tbl_style_embed tr:first-child th,
.tbl_sticky tr th {
    background: linear-gradient(180deg, var(--thanos-gray-50), var(--thanos-gray-100));
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.tbl_style_embed tr th,
.tbl_style_embed tr td,
.tbl_sticky tr th,
.tbl_sticky tr td {
    padding: 12px 16px;
}

.tbl_style_embed tr td,
.tbl_sticky tr td {
    border-bottom: 1px solid var(--thanos-gray-100);
}

.tbl_sticky td.price-main {
    font-size: 15px;
    font-weight: 700;
}

.tbl_sticky td.price-change {
    font-weight: 600;
}

.tbl_sticky td.price {
    font-weight: 500;
}

/* ==========================================================================
   Lãi Suất Styles
   ========================================================================== */

.bang-lai-suat {
    width: 100%;
}

.bang-lai-suat table {
    width: 100%;
}

.bang-lai-suat th,
.bang-lai-suat td {
    padding: 12px 16px;
}

/* ==========================================================================
   Calculator Styles
   ========================================================================== */

.thanos-calculator {
    background: #fff;
    border-radius: var(--thanos-radius);
    box-shadow: var(--thanos-shadow);
    padding: 24px;
}

.thanos-calculator .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.thanos-calculator .col-sm-12 {
    width: 100%;
    padding: 0 12px;
}

.thanos-calculator .form-group {
    margin-bottom: 16px;
}

.thanos-calculator label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--thanos-gray-700);
    margin-bottom: 6px;
}

.thanos-calculator .form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--thanos-gray-800);
    background: #fff;
    border: 1px solid var(--thanos-gray-300);
    border-radius: var(--thanos-radius-sm);
    transition: border-color var(--thanos-transition), box-shadow var(--thanos-transition);
}

.thanos-calculator .form-control:focus {
    outline: none;
    border-color: var(--thanos-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.thanos-calculator .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--thanos-radius-sm);
    cursor: pointer;
    transition: all var(--thanos-transition);
    border: none;
}

.thanos-calculator .btn-primary {
    background: var(--thanos-primary);
    color: #fff;
}

.thanos-calculator .btn-primary:hover {
    background: var(--thanos-primary-dark);
}

.thanos-calculator .btn-danger {
    background: var(--thanos-danger);
    color: #fff;
}

.thanos-calculator .btn-danger:hover {
    background: #dc2626;
}

.thanos-calculator .result-box {
    background: var(--thanos-gray-50);
    border-radius: var(--thanos-radius);
    padding: 20px;
    margin-top: 16px;
}

.thanos-calculator .result-label {
    font-size: 13px;
    color: var(--thanos-gray-500);
    margin-bottom: 4px;
}

.thanos-calculator .result-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--thanos-primary);
}

@media (min-width: 768px) {
    .thanos-calculator .col-md-6 {
        width: 50%;
    }
    .thanos-calculator .col-md-7 {
        width: 58.333%;
    }
    .thanos-calculator .col-md-5 {
        width: 41.666%;
    }
}

/* ==========================================================================
   Business Lookup Styles
   ========================================================================== */

.thanos-business-lookup-form {
    max-width: 600px;
    margin: 0 auto 24px;
}

.thanos-business-search {
    display: flex;
    gap: 12px;
}

.thanos-business-search input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--thanos-gray-200);
    border-radius: var(--thanos-radius);
    font-size: 15px;
    transition: border-color var(--thanos-transition);
}

.thanos-business-search input[type="text"]:focus {
    outline: none;
    border-color: var(--thanos-primary);
}

.thanos-business-search button {
    padding: 12px 24px;
    background: var(--thanos-primary);
    color: #fff;
    border: none;
    border-radius: var(--thanos-radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--thanos-transition);
}

.thanos-business-search button:hover {
    background: var(--thanos-primary-dark);
}

.thanos-business-detail {
    background: #fff;
    border: 1px solid var(--thanos-gray-200);
    border-radius: var(--thanos-radius);
    overflow: hidden;
    box-shadow: var(--thanos-shadow);
}

.thanos-business-detail .detail-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--thanos-gray-50), #fff);
    border-bottom: 1px solid var(--thanos-gray-200);
}

.thanos-business-detail .detail-header h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--thanos-gray-800);
}

.thanos-business-detail .tax-id {
    color: var(--thanos-gray-500);
    font-family: var(--thanos-font-mono);
    font-size: 14px;
}

.thanos-business-detail .detail-body {
    padding: 24px;
}

.thanos-business-detail .detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--thanos-gray-100);
}

.thanos-business-detail .detail-row:last-child {
    border-bottom: none;
}

.thanos-business-detail .detail-label {
    width: 35%;
    color: var(--thanos-gray-500);
    font-size: 13px;
}

.thanos-business-detail .detail-value {
    width: 65%;
    font-weight: 500;
    color: var(--thanos-gray-800);
}

.thanos-business-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.thanos-business-status.active {
    background: var(--thanos-success-light);
    color: #065f46;
}

.thanos-business-status.inactive {
    background: var(--thanos-danger-light);
    color: #991b1b;
}

/* Business Detail Sections */
.thanos-business-detail .detail-section {
    margin-bottom: 20px;
}

.thanos-business-detail .detail-section:last-child {
    margin-bottom: 0;
}

.thanos-business-detail .section-title {
    color: var(--thanos-primary);
    border-bottom: 2px solid var(--thanos-primary);
    padding-bottom: 8px;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
}

.thanos-business-detail .detail-body {
    padding: 20px 24px;
}

/* ==========================================================================
   Loading & Error States
   ========================================================================== */

.thanos-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--thanos-gray-500);
    font-size: 14px;
}

.thanos-loading::before {
    content: "";
    width: 24px;
    height: 24px;
    border: 3px solid var(--thanos-gray-200);
    border-top-color: var(--thanos-primary);
    border-radius: 50%;
    animation: thanos-spin 0.8s linear infinite;
    margin-right: 12px;
}

@keyframes thanos-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.thanos-skeleton {
    background: linear-gradient(90deg,
        var(--thanos-gray-100) 0%,
        var(--thanos-gray-200) 50%,
        var(--thanos-gray-100) 100%
    );
    background-size: 200% 100%;
    animation: thanos-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--thanos-radius-sm);
}

@keyframes thanos-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.thanos-error,
.thanos-no-data {
    padding: 20px 24px;
    background: var(--thanos-danger-light);
    border: 1px solid #fecaca;
    border-radius: var(--thanos-radius);
    color: #991b1b;
    font-size: 14px;
    text-align: center;
}

.thanos-error::before {
    content: "⚠️";
    margin-right: 8px;
}

.thanos-license-required {
    padding: 24px;
    background: var(--thanos-warning-light);
    border: 1px solid #fcd34d;
    border-radius: var(--thanos-radius);
    color: #92400e;
    text-align: center;
}

.thanos-license-required::before {
    content: "🔒";
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
}

/* ==========================================================================
   Highcharts Overrides
   ========================================================================== */

.highcharts-title,
.highcharts-credits {
    display: none !important;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Mobile First Breakpoints */
@media screen and (max-width: 640px) {
    .thanos-table thead th,
    .table thead th,
    .thanos-table tbody td,
    .table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .donvi {
        float: none;
        display: block;
        text-align: center;
        margin-bottom: 12px;
    }

    .thanos-currency-code {
        min-width: 40px;
        padding: 3px 6px;
        font-size: 11px;
    }

    .thanos-business-search {
        flex-direction: column;
    }

    .thanos-business-detail .detail-row {
        flex-direction: column;
        gap: 4px;
    }

    .thanos-business-detail .detail-label,
    .thanos-business-detail .detail-value {
        width: 100%;
    }

    .thanos-business-detail .section-title {
        font-size: 14px;
    }

    .thanos-business-detail .detail-body {
        padding: 16px;
    }

    .thanos-calculator {
        padding: 16px;
    }

    .thanos-calculator .col-md-7,
    .thanos-calculator .col-md-5,
    .thanos-calculator .col-md-6 {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .thanos-table thead th,
    .table thead th,
    .thanos-table tbody td,
    .table tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .thanos-card-header {
        padding: 12px 16px;
    }

    .thanos-card-header h3,
    .thanos-card-header h4 {
        font-size: 14px;
    }
}

/* ==========================================================================
   Visibility Classes
   ========================================================================== */

.visible-xs {
    display: none !important;
}

.hidden-xs {
    display: block !important;
}

@media (max-width: 767px) {
    .visible-xs {
        display: block !important;
    }
    .hidden-xs {
        display: none !important;
    }
}

/* ==========================================================================
   Vàng Sinh Điện Styles (Gold Display)
   ========================================================================== */

.table-bordered > thead > tr > th.sinhdien,
.table-bordered > tbody > tr > td.sinhdien {
    background: linear-gradient(135deg, #a50f00, #c91400);
    border: 1px solid #7a0b00;
    color: #ffcd43;
    text-align: center;
    font-size: clamp(14px, 2vw, 20px);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .thanos-data-container {
        box-shadow: none;
    }

    .thanos-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .thanos-table tbody tr:hover,
    .table tbody tr:hover {
        background: transparent !important;
    }

    .thanos-loading,
    .thanos-error {
        display: none;
    }
}

/* ==========================================================================
   Dark Mode Ready (CSS Variables)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /*
     * Uncomment below for automatic dark mode support
     * Or implement with a .dark-mode class toggle
     */
    /*
    :root {
        --thanos-gray-50: #18181b;
        --thanos-gray-100: #27272a;
        --thanos-gray-200: #3f3f46;
        --thanos-gray-300: #52525b;
        --thanos-gray-400: #71717a;
        --thanos-gray-500: #a1a1aa;
        --thanos-gray-600: #d4d4d8;
        --thanos-gray-700: #e4e4e7;
        --thanos-gray-800: #f4f4f5;
        --thanos-gray-900: #fafafa;
    }

    .thanos-card,
    .thanos-table,
    .table {
        background: #1f1f23;
    }
    */
}

/* ==========================================================================
   Table Ads 160 (Legacy webgia.com)
   ========================================================================== */

.table-ads-160 {
    width: 100%;
    border-collapse: collapse;
}

.table-ads-160 thead th {
    background: linear-gradient(180deg, var(--thanos-gray-50), var(--thanos-gray-100));
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    color: var(--thanos-gray-700);
    border-bottom: 2px solid var(--thanos-gray-200);
    text-transform: uppercase;
}

.table-ads-160 tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--thanos-gray-100);
}

.table-ads-160 tbody tr:hover {
    background-color: var(--thanos-gray-50);
}

/* ==========================================================================
   Additional Helper Classes
   ========================================================================== */

.center_align {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.bg-success {
    background-color: var(--thanos-success-light) !important;
}

.bg-danger {
    background-color: var(--thanos-danger-light) !important;
}

.bg-warning {
    background-color: var(--thanos-warning-light) !important;
}

/* Entry Content Override */
.entry-content .thanos-data-container table {
    margin: 0;
}

.entry-content table thead {
    display: table-header-group !important;
}

/* ==========================================================================
   Gia Tieu (giatieu.com) Styles
   ========================================================================== */

.gia-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border-radius: var(--thanos-radius);
    overflow: hidden;
    box-shadow: var(--thanos-shadow);
}

.gia-table thead th {
    background: linear-gradient(180deg, var(--thanos-gray-50), var(--thanos-gray-100));
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--thanos-gray-700);
    border-bottom: 2px solid var(--thanos-gray-200);
}

.gia-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--thanos-gray-100);
}

.gia-table tbody tr:hover {
    background-color: var(--thanos-gray-50);
}

.home-gnd {
    margin: 0;
}

.home-gnd .gia-table {
    margin: 0;
}

/* ==========================================================================
   Chogia.vn Styles (Gold & Pepper)
   ========================================================================== */

.w100p {
    width: 100%;
}

.w100p.CNT,
.CNT {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--thanos-gray-200);
    border-radius: var(--thanos-radius);
    overflow: hidden;
}

.w100p.CNT thead th,
.CNT thead th {
    background: linear-gradient(180deg, var(--thanos-gray-50), var(--thanos-gray-100));
    padding: 12px 16px;
    font-weight: 600;
    color: var(--thanos-gray-700);
    border-bottom: 2px solid var(--thanos-gray-200);
}

.w100p.CNT tbody td,
.CNT tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--thanos-gray-100);
}

.w100p.CNT tbody tr:hover,
.CNT tbody tr:hover {
    background-color: var(--thanos-gray-50);
}

.lastestGoldTable,
.lastestGoldTable table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.lastestGoldTable thead th {
    background: linear-gradient(180deg, var(--thanos-gray-50), var(--thanos-gray-100));
    padding: 12px 16px;
    font-weight: 600;
    color: var(--thanos-gray-700);
    border-bottom: 2px solid var(--thanos-gray-200);
}

.lastestGoldTable tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--thanos-gray-100);
}

.lastestGoldTable tbody tr:hover {
    background-color: var(--thanos-gray-50);
}

/* ==========================================================================
   Entry Content Tables (Generic)
   ========================================================================== */

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--thanos-gray-200);
    margin-bottom: 16px;
}

.entry-content table thead th,
.entry-content table th {
    background: linear-gradient(180deg, var(--thanos-gray-50), var(--thanos-gray-100));
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--thanos-gray-700);
    border-bottom: 2px solid var(--thanos-gray-200);
    border: 1px solid var(--thanos-gray-200);
}

.entry-content table tbody td,
.entry-content table td {
    padding: 10px 16px !important;
    border: 1px solid var(--thanos-gray-200);
    font-size: 14px;
    color: var(--thanos-gray-800);
}

.entry-content table tbody tr:hover {
    background-color: var(--thanos-gray-50);
}

/* ==========================================================================
   TablePress Plugin Styles
   ========================================================================== */

.tablepress {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border-radius: var(--thanos-radius);
    overflow: hidden;
    box-shadow: var(--thanos-shadow);
}

.tablepress thead th {
    background: linear-gradient(180deg, var(--thanos-gray-50), var(--thanos-gray-100));
    padding: 12px 16px;
    font-weight: 600;
    color: var(--thanos-gray-700);
    border-bottom: 2px solid var(--thanos-gray-200);
}

.tablepress tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--thanos-gray-100);
}

.tablepress tbody tr:hover {
    background-color: var(--thanos-gray-50);
}

/* ==========================================================================
   M-B-30 Container (vangsinhdien.com.vn)
   ========================================================================== */

.m-b-30 {
    margin-bottom: 30px;
}

.m-b-30 table {
    width: 100%;
    border-collapse: collapse;
}

.m-b-30 .table-bordered {
    border: 1px solid var(--thanos-gray-300);
}

/* ==========================================================================
   Additional Flag Classes
   ========================================================================== */

/* Support for image-based flags if needed */
.flag-icon {
    display: inline-block;
    width: 20px;
    height: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 6px;
    vertical-align: middle;
}

/* PHP flag classes */
.PHP::before { content: "🇵🇭"; display: inline-block; margin-right: 6px; }
.LAK::before { content: "🇱🇦"; display: inline-block; margin-right: 6px; }
.MMK::before { content: "🇲🇲"; display: inline-block; margin-right: 6px; }
.KHR::before { content: "🇰🇭"; display: inline-block; margin-right: 6px; }
.BND::before { content: "🇧🇳"; display: inline-block; margin-right: 6px; }
.CZK::before { content: "🇨🇿"; display: inline-block; margin-right: 6px; }
.PLN::before { content: "🇵🇱"; display: inline-block; margin-right: 6px; }
.HUF::before { content: "🇭🇺"; display: inline-block; margin-right: 6px; }
.TRY::before { content: "🇹🇷"; display: inline-block; margin-right: 6px; }
.ZAR::before { content: "🇿🇦"; display: inline-block; margin-right: 6px; }
.EGP::before { content: "🇪🇬"; display: inline-block; margin-right: 6px; }
.BRL::before { content: "🇧🇷"; display: inline-block; margin-right: 6px; }
.MXN::before { content: "🇲🇽"; display: inline-block; margin-right: 6px; }

/* ==========================================================================
   Xang Dau (Petrol/Oil) Styles
   ========================================================================== */

.bang-xang-dau,
.petrol-price-table {
    width: 100%;
}

.bang-xang-dau table,
.petrol-price-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.bang-xang-dau thead th,
.petrol-price-table thead th {
    background: linear-gradient(180deg, var(--thanos-gray-50), var(--thanos-gray-100));
    padding: 12px 16px;
    font-weight: 600;
    color: var(--thanos-gray-700);
    border-bottom: 2px solid var(--thanos-gray-200);
}

.bang-xang-dau tbody td,
.petrol-price-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--thanos-gray-100);
}

/* ==========================================================================
   Dau Tho (Crude Oil) Styles
   ========================================================================== */

.bang-dau-tho,
.crude-oil-table {
    width: 100%;
}

.bang-dau-tho table,
.crude-oil-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* ==========================================================================
   Misc Additional Styles
   ========================================================================== */

/* Row background alternating */
.odd {
    background-color: #fff;
}

.even {
    background-color: var(--thanos-gray-50);
}

/* Tooltip styles */
[data-toggle="tooltip"] {
    cursor: help;
    border-bottom: 1px dotted var(--thanos-gray-400);
}

/* Link styles inside tables */
table a {
    color: var(--thanos-primary);
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}

/* No wrap for currency codes */
.nowrap,
.text-nowrap {
    white-space: nowrap;
}

/* Bold text helper */
.font-bold,
.fw-bold {
    font-weight: 600 !important;
}

/* Small text */
.small,
small {
    font-size: 12px;
    color: var(--thanos-gray-500);
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   Calculator Form (tinhlaitietkiem) Specific Styles
   ========================================================================== */

.thanos-calculator p {
    color: var(--thanos-gray-600);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.thanos-calculator .table {
    margin-bottom: 0;
}

.thanos-calculator .table td {
    vertical-align: middle;
    padding: 12px 16px;
}

.thanos-calculator .form-inline {
    display: block;
}

.thanos-calculator .form-inline input.form-control {
    display: inline-block;
    width: auto;
    min-width: 150px;
    padding: 8px 12px;
}

.thanos-calculator .form-inline select.form-control {
    display: inline-block;
    width: auto;
    padding: 8px 12px;
}

.thanos-calculator #ccls_tlai {
    font-size: 28px !important;
    font-weight: 700;
    color: var(--thanos-success);
}

.thanos-calculator .h2 {
    font-size: 24px;
    font-weight: 700;
}

/* ==========================================================================
   TKSIC Styles (Giá sầu riêng from tksic.vn)
   ========================================================================== */

.thanos-tksic-table {
    margin-bottom: 16px;
}

.thanos-tksic-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border-radius: var(--thanos-radius);
    overflow: hidden;
    box-shadow: var(--thanos-shadow);
}

.thanos-tksic-table table thead th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    padding: 12px 16px;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    text-align: left;
}

.thanos-tksic-table table tbody td {
    padding: 10px 16px !important;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px !important;
    color: #111827 !important;
}

.thanos-tksic-table table tbody tr:hover {
    background-color: #f9fafb;
}

.thanos-tksic-table table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.thanos-tksic-table table tbody tr:nth-child(even):hover {
    background-color: #f3f4f6;
}

.thanos-tksic-table img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Kim Chung & Kim Long Specific Styles
   ========================================================================== */

.thanos-gold-price .w100p.CNT,
.thanos-gold-price .lastestGoldTable {
    margin-top: 12px;
}

/* Gold price table specific styling */
.thanos-gold-price table {
    width: 100%;
    border-collapse: collapse;
}

.thanos-gold-price thead th {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 2px solid #f59e0b;
}

.thanos-gold-price tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #fef3c7;
}

.thanos-gold-price tbody tr:hover {
    background-color: #fffbeb;
}

/* ==========================================================================
   Interest Comparison Table Styles
   ========================================================================== */

.thanos-interest-comparison {
    overflow-x: auto;
}

.thanos-interest-comparison table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    font-size: 13px;
}

.thanos-interest-comparison thead th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    padding: 12px 10px;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    text-align: center;
    white-space: nowrap;
}

.thanos-interest-comparison thead th:first-child {
    text-align: left;
}

.thanos-interest-comparison tbody td {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    text-align: center;
}

.thanos-interest-comparison tbody td:first-child {
    text-align: left;
    font-weight: 500;
}

.thanos-interest-comparison tbody tr:hover {
    background-color: #f9fafb;
}

/* ==========================================================================
   TradingView Widget Styles (Crude Oil)
   ========================================================================== */

.tradingview-widget-container {
    height: 100%;
    width: 100%;
}

.tradingview-widget-container iframe {
    border: none;
    display: block;
    width: 100%;
    height: 100%;
}

.section-head {
    font-size: 18px;
    font-weight: 600;
    color: var(--thanos-gray-800);
    margin: 15px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--thanos-warning);
}

.bn-bg {
    background: #fff;
    border-radius: var(--thanos-radius);
    overflow: hidden;
    box-shadow: var(--thanos-shadow);
}

/* ==========================================================================
   Row and Column Grid (Bootstrap-like)
   ========================================================================== */

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.row::after {
    content: "";
    display: table;
    clear: both;
}

.col-xs-6 {
    width: 50%;
    padding: 0 15px;
    float: left;
}

.col-xs-12 {
    width: 100%;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .col-sm-12 {
        width: 100%;
        padding: 0 15px;
    }
}

@media (min-width: 992px) {
    .col-md-5 {
        width: 41.666667%;
        padding: 0 15px;
    }
    .col-md-6 {
        width: 50%;
        padding: 0 15px;
    }
    .col-md-7 {
        width: 58.333333%;
        padding: 0 15px;
    }
    .col-md-9 {
        width: 75%;
        padding: 0 15px;
    }
}

/* ==========================================================================
   Highstock Chart Container
   ========================================================================== */

#bieu_do_sjc {
    width: 100%;
    min-height: 500px;
    background: #fff;
    border-radius: var(--thanos-radius);
    box-shadow: var(--thanos-shadow);
    margin-top: 20px;
}

.h-head {
    font-size: 20px;
    font-weight: 600;
    color: var(--thanos-gray-800);
    margin-bottom: 16px;
}

.h-head small {
    font-size: 14px;
    font-weight: 400;
    color: var(--thanos-gray-500);
}

/* ==========================================================================
   Kitco Gold Widget Styles
   ========================================================================== */

.bn-kitco-gold {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
}

.bn-kitco-gold iframe {
    border: none;
    max-width: 100%;
}

@media (max-width: 768px) {
    .bn-kitco-gold {
        display: block;
    }
    .bn-kitco-gold iframe {
        width: 100%;
        margin-bottom: 12px;
    }
}
