/* Container */
.acm-container, .acm-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header & Search */
.acm-header-section {
    display: block;
    margin-bottom: 20px;
    width: 100%;
}
.acm-search-box {
    flex-grow: 0;
    max-width: 500px;
    margin: 50px auto 50px;
}
.acm-search-form {
    display: flex;
    width: 100%;
}
.acm-search-field {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    flex-grow: 1;
    font-size: 14px;
}
.acm-search-submit {
    padding: 10px 20px;
    background: #3c50fa;
    color: #fff;
    border: 1px solid #3c50fa;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s, border-color 0.3s;
}
.acm-search-submit:hover {
    background: #5b6aff;
    border-color: #5b6aff;
}

.acm-breadcrumb {
    max-width: 1200px;
    margin: 10px auto 20px;
    font-size: 14px;
    color: #666;
}
.acm-breadcrumb a { color: #3c50fa; text-decoration: none; }
.acm-breadcrumb .sep { margin: 0 6px; color: #999; }

/* A-Z Filter */
.acm-az-filter {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    justify-content: center;
}
.acm-az-filter a {
    text-decoration: none;
    padding: 6px 12px;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s;
}
.acm-az-filter a:hover, .acm-az-filter a.active {
    background: #3c50fa;
    color: #fff;
    border-color: #3c50fa;
}

/* Table */
.acm-table-responsive {
    overflow-x: auto;
}
.acm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8 !important;
}
.acm-table th, .acm-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e4e8 !important;
    border-right: 1px solid #e1e4e8 !important;
}
.acm-table th:last-child, .acm-table td:last-child { border-right: 0 !important; }
.acm-table th {
    background: #3c50fa;
    font-weight: 600;
    color: #fff;
    text-transform: none;
    font-size: 14px;
    letter-spacing: 0;
    text-align: center;
}
.acm-table tr:hover {
    background: #f8f9fa;
}
.acm-code-col {
    width: 100px;
    text-align: center;
}
.acm-table a {
    text-decoration: none;
    color: inherit;
}
.acm-table a:hover {
    color: #3c50fa;
}

.acm-center {
    text-align: center;
}
.acm-table td.acm-center { text-align: center !important; }
.acm-table td.acm-code-col { text-align: center !important; }

/* Dark mode table override - immediate override */
body.style-for-dark .acm-table {
    background: #2d2d2d !important;
    border-color: #444 !important;
}
body.style-for-dark .acm-table th,
body.style-for-dark .acm-table td {
    background: #2d2d2d !important;
    color: #fff !important;
    border-color: #444 !important;
}
body.style-for-dark .acm-table tr:hover {
    background: #383838 !important;
}

/* Dark mode detail table override - immediate override */
body.style-for-dark .acm-detail-table {
    background: #2d2d2d !important;
    border-color: #444 !important;
}
body.style-for-dark .acm-detail-table th,
body.style-for-dark .acm-detail-table td {
    background: #2d2d2d !important;
    color: #fff !important;
    border-color: #444 !important;
}
body.style-for-dark .acm-detail-table tr:hover th,
body.style-for-dark .acm-detail-table tr:hover td {
    background: #383838 !important;
}

/* Dark mode for details grid and single column layout */
body.style-for-dark .acm-details-grid,
body.style-for-dark .acm-single-column-layout {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

body.style-for-dark .acm-details-grid *,
body.style-for-dark .acm-single-column-layout * {
    background-color: transparent !important;
    color: #fff !important;
    border-color: #444 !important;
}

/* Ensure all content within these containers uses theme-appropriate dark colors */
body.style-for-dark .acm-details-grid .acm-card,
body.style-for-dark .acm-single-column-layout .acm-card {
    background: #2d2d2d !important;
    border: 1px solid #444 !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.3) !important;
}

body.style-for-dark .acm-details-grid .acm-card-title,
body.style-for-dark .acm-single-column-layout .acm-card-title {
    background: #2d2d2d !important;
    color: #fff !important;
    border-bottom: 1px solid #444 !important;
}

body.style-for-dark .acm-details-grid .acm-content,
body.style-for-dark .acm-single-column-layout .acm-content {
    color: #ccc !important;
    background: transparent !important;
}

body.style-for-dark .acm-details-grid .acm-content p,
body.style-for-dark .acm-details-grid .acm-content li,
body.style-for-dark .acm-single-column-layout .acm-content p,
body.style-for-dark .acm-single-column-layout .acm-content li {
    color: #ccc !important;
    background: transparent !important;
}

/* Ensure all links within containers are visible */
body.style-for-dark .acm-details-grid a,
body.style-for-dark .acm-single-column-layout a {
    color: #5b6aff !important;
    text-decoration: none !important;
}

body.style-for-dark .acm-details-grid a:hover,
body.style-for-dark .acm-single-column-layout a:hover {
    color: #7b8aff !important;
    text-decoration: underline !important;
}

/* Ensure all table elements in dark mode have correct styling */
body.style-for-dark .acm-detail-table,
body.style-for-dark .acm-table {
    background: #2d2d2d !important;
    border: 1px solid #444 !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.3) !important;
}

body.style-for-dark .acm-detail-table th,
body.style-for-dark .acm-detail-table td,
body.style-for-dark .acm-table th,
body.style-for-dark .acm-table td {
    background: #2d2d2d !important;
    color: #fff !important;
    border-color: #444 !important;
    padding: 12px 15px !important;
}

body.style-for-dark .acm-detail-table tr:hover th,
body.style-for-dark .acm-detail-table tr:hover td,
body.style-for-dark .acm-table tr:hover th,
body.style-for-dark .acm-table tr:hover td {
    background: #383838 !important;
    color: #fff !important;
}

/* Header section in dark mode */
body.style-for-dark .acm-single-header {
    background: #2d2d2d !important;
    border: 1px solid #444 !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.3) !important;
}

body.style-for-dark .acm-header-code {
    color: #fff !important;
    border-right-color: #444 !important;
}

body.style-for-dark .acm-code-label {
    color: #999 !important;
}

body.style-for-dark .acm-title-cn {
    color: #fff !important;
}

body.style-for-dark .acm-title-en {
    color: #999 !important;
}

/* Ensure all card titles in dark mode have correct styling */
body.style-for-dark .acm-card-title {
    color: #fff !important;
    border-bottom: 1px solid #444 !important;
    background: #2d2d2d !important;
}

body.style-for-dark .acm-card-title:after {
    background: #5b6aff !important;
}

/* Ensure content text in dark mode is readable */
body.style-for-dark .acm-content,
body.style-for-dark .acm-content p,
body.style-for-dark .acm-content li {
    color: #ccc !important;
    background: transparent !important;
}

/* Ensure search field in dark mode is consistent */
body.style-for-dark .acm-search-field {
    background: #2d2d2d !important;
    border-color: #444 !important;
    color: #ccc !important;
}

body.style-for-dark .acm-search-field::placeholder {
    color: #999 !important;
}

/* Ensure pagination in dark mode is consistent */
body.style-for-dark .acm-pagination .page-numbers {
    background: #2d2d2d !important;
    border-color: #444 !important;
    color: #ccc !important;
}

body.style-for-dark .acm-pagination .current {
    background: #3c50fa !important;
    border-color: #3c50fa !important;
    color: #fff !important;
}

body.style-for-dark .acm-pagination a.page-numbers:hover {
    background: #3c50fa !important;
    border-color: #3c50fa !important;
    color: #fff !important;
}

/* Ensure A-Z filter in dark mode is consistent */
body.style-for-dark .acm-az-filter {
    background: #2d2d2d !important;
    border-color: #444 !important;
}

body.style-for-dark .acm-az-filter a {
    background: #383838 !important;
    border-color: #444 !important;
    color: #ccc !important;
}

body.style-for-dark .acm-az-filter a:hover,
body.style-for-dark .acm-az-filter a.active {
    background: #3c50fa !important;
    border-color: #3c50fa !important;
    color: #fff !important;
}
body.style-for-dark .acm-details-grid .acm-card-title,
body.style-for-dark .acm-single-column-layout .acm-card-title {
    color: #fff !important;
    border-bottom: 1px solid #444 !important;
}
body.style-for-dark .acm-details-grid .acm-content,
body.style-for-dark .acm-single-column-layout .acm-content {
    color: #ccc !important;
}
body.style-for-dark .acm-details-grid .acm-content p,
body.style-for-dark .acm-single-column-layout .acm-content p,
body.style-for-dark .acm-details-grid .acm-content li,
body.style-for-dark .acm-single-column-layout .acm-content li {
    color: #ccc !important;
}

.entry-head { display: none !important; }

/* Theme entry head: no override here */

/* Pagination */
.acm-pagination {
    margin-top: 30px;
    text-align: center;
}
.acm-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    margin: 0 4px;
    text-decoration: none;
    color: #333;
    background: #fff;
    border-radius: 4px;
}
.acm-pagination .current {
    background: #3c50fa;
    color: #fff;
    border-color: #3c50fa;
}
.acm-pagination a.page-numbers:hover {
    background: #3c50fa;
    color: #fff;
    border-color: #3c50fa;
}

/* Single Page Details */
.acm-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.acm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}
.acm-main {
    min-width: 0;
    max-width: 100%;
}
.acm-side {
    width: 100%;
    justify-self: start;
}
@media (max-width: 992px) {
    .acm-layout { grid-template-columns: 1fr; }
    .acm-side { width: 100%; }
}


/* Header Section Style matching 5688 */
.acm-single-header {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center; /* Vertically center content */
    box-sizing: border-box;
    width: 100%;
}
.acm-header-code {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    padding-right: 30px;
    flex: 0 0 50%;
    width: 50%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.acm-header-logo {
    flex: 0 0 50%;
    width: 50%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-right: 30px;
    box-sizing: border-box;
}
.acm-header-logo img,
.acm-header-logo svg {
    max-height: 80px;
    width: auto;
}
.acm-code-label {
    font-size: 42px;
    color: #898585;
}
.acm-code-value {
    color: #ff6600;
}
.acm-header-info {
    flex: 0 0 50%;
    width: 50%;
    padding-left: 30px;
    box-sizing: border-box;
}
.acm-title-en {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-weight: normal;
}
.acm-title-cn {
    font-size: 36px;
    color: #333;
    margin: 0 0 5px;
    font-weight: 600;
}

/* Content Layout - Single Column Vertical Stack */
.acm-details-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Card Style */
.acm-card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 100%; /* Full width */
    box-sizing: border-box;
}
.acm-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px;
    padding-top: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    position: relative;
    line-height: 1.4;
    z-index: 1;
}
.acm-card-title:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #0073aa;
    z-index: 0;
}

/* Table Style matching 5688 */
.acm-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-top: 1px solid #e1e4e8;
    border-left: 1px solid #e1e4e8;
    table-layout: fixed; /* Fix layout for equal columns */
}
.acm-detail-table tr {
    height: 3.5em;
}
.acm-detail-table th, .acm-detail-table td {
    padding: 0 15px; /* Reduce vertical padding to let height control alignment */
    border-bottom: 1px solid #e1e4e8;
    border-right: 1px solid #e1e4e8;
    font-size: 14px;
    vertical-align: middle;
    text-align: left; /* Ensure left alignment */
    width: 25%; /* Force 4 columns to be equal width */
    height: 3.5em; /* Ensure cells inherit the row height */
    box-sizing: border-box; /* Include padding in height calculation */
}
.acm-detail-table th {
    background-color: #f9f9f9;
    color: #666;
    font-weight: normal;
}
.acm-detail-table td {
    color: #333;
    font-weight: bold;
    text-align: center;
}
.acm-detail-table tr:hover td,
.acm-detail-table tr:hover th {
    background-color: #f0f6fa;
    transition: background-color 0.2s ease;
}

/* Map Embed */
.acm-map-embed {
    margin-top: 0;
    width: 100%; /* Force full width */
    line-height: 0; /* Remove vertical gap */
}
.acm-map-embed iframe {
    width: 100% !important; /* Force iframe to be full width */
    max-width: 100% !important;
    display: block; /* Remove inline gap */
    border: none;
    border-radius: 4px;
    height: 450px; /* Default height */
}

/* Map Card Specifics */
.acm-card-map {
    overflow: hidden;
}

.acm-card-map .acm-map-embed {
    margin: 0;
    width: 100%;
    line-height: 0;
}

.acm-card-map .acm-map-embed iframe {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    border: none;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 768px) {
    .acm-details-grid {
        grid-template-columns: 1fr;
    }
    .acm-single-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .acm-header-code {
        margin-right: 0;
        padding-right: 0;
        border-right: none;
        margin-bottom: 15px;
        flex: 0 0 100%;
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark),
body.dark-theme,
body.dark-mode,
body.is-dark-theme,
body.theme-dark,
body.dark,
body.style-for-dark,
html.dark-theme,
html.dark-mode,
html.is-dark-theme,
html.theme-dark,
html.dark,
.wp-dark-mode-active,
.dark-mode-active,
.is-dark-mode,
.dark-background,
body[data-theme="dark"],
html[data-theme="dark"] {
    /* A-Z Filter */
    .acm-az-filter {
        background: #1e1e1e !important;
        border-color: #333 !important;
    }
    .acm-az-filter a {
        color: #ccc !important;
        border-color: #444 !important;
        background: #2d2d2d !important;
    }
    .acm-az-filter a:hover, .acm-az-filter a.active {
        background: #3c50fa !important;
        color: #fff !important;
        border-color: #3c50fa !important;
    }
    
    /* Table */
    .acm-table {
        background: #2d2d2d !important;
        border: 1px solid #444 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
        color: #fff !important;
    }
    .acm-table thead,
    .acm-table tbody,
    .acm-table tr {
        background: #2d2d2d !important;
        color: #fff !important;
    }
    .acm-table th, .acm-table td {
        border-bottom: 1px solid #444 !important;
        border-right: 1px solid #444 !important;
        background: #2d2d2d !important;
        color: #fff !important;
        padding: 15px;
    }
    .acm-table th {
        background: #3c50fa !important;
        color: #fff !important;
        font-weight: 600;
    }
    .acm-table tr:hover {
        background: #383838 !important;
        color: #fff !important;
    }
    .acm-table tr:hover td,
    .acm-table tr:hover th {
        background: #383838 !important;
        color: #fff !important;
    }
    .acm-table a {
        color: #fff !important;
        text-decoration: none !important;
    }
    .acm-table a:hover {
        color: #5b6aff !important;
    }
    .acm-table strong {
        color: #fff !important;
    }
    .acm-table small {
        color: #999 !important;
    }
    .acm-table .acm-code-col {
        background: #2d2d2d !important;
        color: #fff !important;
    }
    .acm-table .acm-center {
        background: #2d2d2d !important;
        color: #fff !important;
    }
    .acm-table-responsive {
        background: #2d2d2d !important;
        padding: 1px;
        border-radius: 4px;
    }
    
    /* Breadcrumb */
    .acm-breadcrumb {
        color: #999 !important;
    }
    .acm-breadcrumb .sep {
        color: #666 !important;
    }
    
    /* Pagination */
    .acm-pagination {
        color: #ccc !important;
    }
    .acm-pagination .page-numbers {
        border-color: #444 !important;
        color: #ccc !important;
        background: #2d2d2d !important;
    }
    .acm-pagination .current {
        background: #3c50fa !important;
        color: #fff !important;
        border-color: #3c50fa !important;
    }
    .acm-pagination a.page-numbers:hover {
        background: #3c50fa !important;
        color: #fff !important;
        border-color: #3c50fa !important;
    }
    
    /* Single Page Header */
    .acm-single-header {
        background: #2d2d2d !important;
        box-shadow: 0 0 10px rgba(0,0,0,0.3) !important;
    }
    .acm-header-code {
        color: #fff !important;
        border-right-color: #444 !important;
    }
    .acm-code-label {
        color: #999 !important;
    }
    .acm-title-en {
        color: #999 !important;
    }
    .acm-title-cn {
        color: #fff !important;
    }
    
    /* Card */
    .acm-card {
        background: #2d2d2d !important;
        box-shadow: 0 0 10px rgba(0,0,0,0.3) !important;
        border: 1px solid #444 !important;
    }
    .acm-card-title {
        color: #fff !important;
        border-bottom: 1px solid #444 !important;
        background: #2d2d2d !important;
    }
    .acm-card-title:after {
        background: #5b6aff !important;
    }
    
    /* Detail Table */
    .acm-card .acm-detail-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        border-top: 1px solid #444 !important;
        border-left: 1px solid #444 !important;
        background: #2d2d2d !important;
        color: #fff !important;
        table-layout: fixed;
    }
    .acm-card .acm-detail-table th, 
    .acm-card .acm-detail-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #444 !important;
        border-right: 1px solid #444 !important;
        font-size: 14px;
        vertical-align: middle;
        text-align: left;
        width: 25%;
        background: #2d2d2d !important;
        color: #fff !important;
    }
    .acm-card .acm-detail-table th {
        background-color: #383838 !important;
        color: #fff !important;
        font-weight: 500;
    }
    .acm-card .acm-detail-table td {
        color: #fff !important;
        font-weight: 500;
    }
    .acm-card .acm-detail-table tr:hover td,
    .acm-card .acm-detail-table tr:hover th {
        background-color: #383838 !important;
        color: #fff !important;
        transition: background-color 0.2s ease;
    }
    
    /* Ensure all table elements have correct colors */
    body.style-for-dark .acm-detail-table,
    body.style-for-dark .acm-card,
    body.dark-theme .acm-detail-table,
    body.dark-theme .acm-card,
    body.dark-mode .acm-detail-table,
    body.dark-mode .acm-card {
        background: #2d2d2d !important;
        color: #fff !important;
    }
    body.style-for-dark .acm-detail-table th,
    body.style-for-dark .acm-detail-table td,
    body.dark-theme .acm-detail-table th,
    body.dark-theme .acm-detail-table td,
    body.dark-mode .acm-detail-table th,
    body.dark-mode .acm-detail-table td {
        background: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    /* Additional dark mode styles for main content area */
    body.style-for-dark .acm-single-header,
    body.dark-theme .acm-single-header,
    body.dark-mode .acm-single-header {
        background: #2d2d2d !important;
        color: #fff !important;
    }
    
    body.style-for-dark .acm-single-container,
    body.dark-theme .acm-single-container,
    body.dark-mode .acm-single-container {
        background: transparent !important;
    }
    
    body.style-for-dark .acm-details-grid,
    body.dark-theme .acm-details-grid,
    body.dark-mode .acm-details-grid {
        background: transparent !important;
    }
    
    /* Ensure all text within containers is light color */
    body.style-for-dark .acm-single-header *,
    body.dark-theme .acm-single-header *,
    body.dark-mode .acm-single-header *,
    body.style-for-dark .acm-card *,
    body.dark-theme .acm-card *,
    body.dark-mode .acm-card * {
        color: #fff !important;
    }
    
    /* Except for specific elements that should be darker */
    body.style-for-dark .acm-title-en,
    body.dark-theme .acm-title-en,
    body.dark-mode .acm-title-en {
        color: #999 !important;
    }
    
    /* General dark mode styles for all plugin elements */
    body.style-for-dark [class^="acm-"]:not(.acm-code-value),
    body.dark-theme [class^="acm-"]:not(.acm-code-value),
    body.dark-mode [class^="acm-"]:not(.acm-code-value) {
        background-color: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    /* Ensure plugin content area blends with theme */
    body.style-for-dark .entry-content,
    body.dark-theme .entry-content,
    body.dark-mode .entry-content {
        background: transparent !important;
    }
    
    /* JustNews theme specific styles */
    body.style-for-dark .acm-single-container,
    body.style-for-dark .acm-container {
        background: transparent !important;
    }
    
    /* Ensure all tables are dark - highest priority */
    body.style-for-dark table,
    body.style-for-dark table *,
    body.style-for-dark .acm-table,
    body.style-for-dark .acm-table *,
    body.style-for-dark .acm-detail-table,
    body.style-for-dark .acm-detail-table *,
    body.style-for-dark .entry-content table,
    body.style-for-dark .entry-content table *,
    body.style-for-dark article table,
    body.style-for-dark article table *,
    body.style-for-dark .post table,
    body.style-for-dark .post table *,
    body.style-for-dark .content-area table,
    body.style-for-dark .content-area table *,
    body.style-for-dark .main-content table,
    body.style-for-dark .main-content table *,
    body.style-for-dark .site-content table,
    body.style-for-dark .site-content table *,
    body.style-for-dark .wrap table,
    body.style-for-dark .wrap table *,
    body.style-for-dark .container table,
    body.style-for-dark .container table * {
        background-color: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    /* Specific table elements */
    body.style-for-dark table tr,
    body.style-for-dark table tr *,
    body.style-for-dark table td,
    body.style-for-dark table td *,
    body.style-for-dark table th,
    body.style-for-dark table th *,
    body.style-for-dark table thead,
    body.style-for-dark table thead *,
    body.style-for-dark table tbody,
    body.style-for-dark table tbody *,
    body.style-for-dark table tfoot,
    body.style-for-dark table tfoot * {
        background-color: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    /* Ensure responsive table container is dark */
    body.style-for-dark .acm-table-responsive {
        background: #2d2d2d !important;
        border: 1px solid #444 !important;
    }
    
    /* Ensure table inside card is dark */
    body.style-for-dark .acm-card .acm-detail-table {
        background: #2d2d2d !important;
        border-color: #444 !important;
    }
    body.style-for-dark .acm-card .acm-detail-table th,
    body.style-for-dark .acm-card .acm-detail-table td {
        background: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    /* Search Field */
    body.style-for-dark .acm-search-field {
        background: #2d2d2d !important;
        border-color: #444 !important;
        color: #ccc !important;
    }
    body.style-for-dark .acm-search-field::placeholder {
        color: #999 !important;
    }
    
    /* Content */
    body.style-for-dark .acm-content {
        color: #ccc !important;
    }
    body.style-for-dark .acm-content p,
    body.style-for-dark .acm-content li,
    body.style-for-dark .acm-content h1,
    body.style-for-dark .acm-content h2,
    body.style-for-dark .acm-content h3,
    body.style-for-dark .acm-content h4,
    body.style-for-dark .acm-content h5,
    body.style-for-dark .acm-content h6 {
        color: #ccc !important;
    }
    
    /* Empty State */
    body.style-for-dark .acm-table td:empty,
    body.style-for-dark .acm-table td[colspan] {
        color: #999 !important;
    }
    
    /* Additional table styles for JustNews dark mode */
    body.style-for-dark .acm-table tr,
    body.style-for-dark .acm-table thead,
    body.style-for-dark .acm-table tbody,
    body.style-for-dark .acm-table tfoot {
        background-color: #2d2d2d !important;
        color: #fff !important;
    }
    
    /* Ensure table cells have correct background and text color */
    body.style-for-dark .acm-table td,
    body.style-for-dark .acm-table th {
        background-color: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    /* Ensure card background is dark */
    body.style-for-dark .acm-card {
        background-color: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    /* Ensure detail table is properly styled */
    body.style-for-dark .acm-card .acm-detail-table {
        background-color: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    body.style-for-dark .acm-card .acm-detail-table tr,
    body.style-for-dark .acm-card .acm-detail-table td,
    body.style-for-dark .acm-card .acm-detail-table th {
        background-color: #2d2d2d !important;
        color: #fff !important;
        border-color: #444 !important;
    }
}
