/* ========================================
   LEED - Louisiana Energy and Economic Data
   ======================================== */

/* ========================================
   1. GLOBAL STYLES & RESET
   ======================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Colors */
    --primary-blue: #003d7a;
    --secondary-blue: #0066cc;
    --accent-green: #4caf50;
    --text-dark: #212121;
    --text-medium: #616161;
    --text-light: #9e9e9e;
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --bg-gray: #f5f5f5;
    --border-light: #e0e0e0;
    --border-medium: #bdbdbd;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-size: 15px;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ========================================
   2. HEADER & NAVIGATION
   ======================================== */

header {
    background: var(--bg-white);
    color: var(--text-dark);
    padding: 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
    position: relative;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 30px;
    position: relative;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

header h1 a {
    color: var(--primary-blue);
    text-decoration: none;
}

header h1 a:hover {
    color: var(--secondary-blue);
}

header p {
    display: none;
}

.beta-tag {
    display: inline-block;
    background: #ff9800;
    color: white;
    font-size: 0.5em;
    font-weight: 700;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    vertical-align: super;
    margin-left: 0.5em;
    letter-spacing: 0.05em;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle:checked + .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle:checked + .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-toggle:checked + .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation */
header nav {
    margin: 0;
    padding: 0;
    border: none;
    display: flex;
    gap: 0;
}

header nav a {
    color: var(--text-medium);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

header nav a:hover {
    color: var(--primary-blue);
    background: var(--bg-gray);
    border-bottom-color: var(--accent-green);
}

header nav a.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    font-weight: 600;
}

/* ========================================
   3. MAIN CONTENT & LAYOUT
   ======================================== */

main {
    background: var(--bg-white);
    margin: 0;
    padding: 0;
    min-height: 70vh;
    width: 100%;
    overflow-x: hidden;
}

main > :not(.hero-section):not(.content-section) {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 30px;
}

/* ========================================
   4. TYPOGRAPHY
   ======================================== */

main h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: -0.5px;
}

main h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
}

main h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-blue);
    margin: 0.5rem auto 0 auto;
}

main > :not(.hero-section):not(.content-section) h2 {
    text-align: center;
    margin: 1rem 0 0.5rem 0;
}

main > :not(.hero-section):not(.content-section) h2::after {
    margin: 0.5rem 0 0 0;
}

main h3 {
    font-size: 1.15rem;
    margin: 1rem 0 0.5rem 0;
    color: var(--text-dark);
    font-weight: 600;
}

main p {
    margin: 0.75rem 0;
    font-size: 1rem;
}

main ul, main ol {
    margin: 0.75rem 0 0.75rem 2rem;
    line-height: 1.7;
}

main li {
    margin: 0.4rem 0;
}

main a {
    color: var(--secondary-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.2s;
}

main a:hover {
    border-bottom: 1px solid var(--secondary-blue);
}

main hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 2.5rem 0;
}

main code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #c7254e;
}

main blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 3px solid var(--secondary-blue);
    background: var(--bg-light);
    font-style: italic;
    color: var(--text-medium);
}

main blockquote p {
    margin: 0;
}

/* ========================================
   5. HERO SECTION
   ======================================== */

.hero-section {
    background-color: #003d7a;
    background-image: linear-gradient(135deg, rgba(0,61,122,0.65) 0%, rgba(0,102,204,0.65) 100%), url('../images/hero.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: white;
    padding: 4rem 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    margin: 0;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.hero-section p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.8;
    opacity: 0.95;
}

.hero-section .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-style: italic;
    margin-top: 1.5rem;
}

.hero-description {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.95);
    max-width: 900px;
    margin: 1.5rem auto 0 auto;
}

/* ========================================
   6. CONTENT SECTIONS
   ======================================== */

.content-section {
    padding: 3rem 0 4rem 0;
    background: var(--bg-light);
}

.content-section .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header .meta {
    font-size: 0.95rem;
    color: var(--text-medium);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--text-medium);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.breadcrumb a {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--primary-blue);
}

/* ========================================
   7. CATEGORY GRID & CARDS
   ======================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

.category-card {
    padding: 1.25rem 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 16px rgba(0,61,122,0.15);
    transform: translateY(-4px);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-blue);
    transition: all 0.3s;
}

.category-card:hover .category-icon {
    color: var(--accent-green);
    transform: scale(1.1);
}

.category-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.category-card p {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.5;
}

a.category-card {
    color: inherit;
}

a.category-card:hover {
    text-decoration: none;
    border-bottom: none;
}

.category-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-green);
    margin: 0.5rem 0;
}

/* ========================================
   8. CATEGORY PAGE LAYOUT
   ======================================== */

.category-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.category-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.category-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.category-nav-item:hover {
    background: var(--bg-light);
    border-left-color: var(--accent-green);
    border-bottom: none;
}

.category-nav-item.active {
    background: var(--bg-light);
    border-left-color: var(--primary-blue);
    font-weight: 600;
    color: var(--primary-blue);
}

.category-nav-item .count {
    font-size: 0.813rem;
    color: var(--text-light);
    background: var(--bg-gray);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 30px;
    text-align: center;
}

.category-nav-item.active .count {
    background: var(--primary-blue);
    color: white;
}

.category-main {
    min-width: 0;
}

/* ========================================
   9. SEARCH & FILTERS
   ======================================== */

.search-controls {
    margin: 2rem 0 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.search-controls input,
.search-controls select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    transition: border-color 0.2s;
}

.search-controls input:focus,
.search-controls select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0,61,122,0.1);
}

#results-info {
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-medium);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-style: italic;
    text-align: center;
}

/* ========================================
   10. TABLES
   ======================================== */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0 2rem 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.875rem;
    overflow: hidden;
}

#datasets-table th:nth-child(1),
#datasets-table td:nth-child(1) {
    width: 65%;
}

#datasets-table.has-category-column th:nth-child(1),
#datasets-table.has-category-column td:nth-child(1) {
    width: 60%;
}

#datasets-table.has-category-column th:nth-child(2),
#datasets-table.has-category-column td:nth-child(2) {
    width: 12%;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-light);
    font-size: 0.813rem;
    letter-spacing: 0.5px;
}

td {
    color: var(--text-dark);
}

tr:hover {
    background: var(--bg-light);
}

td strong {
    font-weight: 600;
    color: var(--primary-navy);
}

td small {
    font-size: 0.875rem;
    color: var(--text-medium);
    display: block;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* ========================================
   11. BADGES & TAGS
   ======================================== */

.category-badge {
    display: inline-block;
    color: white;
    padding: 0.3rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0,0,0,0.1);
}

.tags {
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-medium);
    padding: 0.25rem 0.6rem;
    margin: 0.2rem 0.2rem 0.2rem 0;
    border: 1px solid var(--border-light);
    font-size: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   12. BUTTONS
   ======================================== */

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background: var(--secondary-blue);
    border-color: var(--secondary-blue);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.download-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    font-size: 0.813rem;
    font-weight: 600;
    transition: background 0.2s;
    border-radius: 4px;
    border: none;
}

.download-btn:hover {
    background: var(--secondary-blue);
    color: white;
    text-decoration: none;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.button-group {
    display: flex;
    gap: 0.25rem;
}

.download-btn-small {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    min-width: 45px;
    text-align: center;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
}

.download-btn-small i {
    font-size: 0.9em;
}

.download-json-btn {
    background: #2e7d32;
    color: white;
    border: none;
    border-radius: 0;
    min-width: auto;
    padding: 0.4rem 0.5rem;
}

.download-json-btn:hover {
    background: #1b5e20;
}

.preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.5rem;
    background: var(--accent-green);
    color: white;
    border: none;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.2s;
    border-radius: 0;
    cursor: pointer;
    width: 32px;
}

.preview-btn:hover {
    background: #43a047;
}

.preview-btn i {
    font-size: 0.813rem;
}

.submit-btn {
    background: var(--primary-blue);
    color: white;
    padding: 0.875rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

.submit-btn:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,61,122,0.2);
}

.submit-btn i {
    margin-right: 0.5rem;
}

/* ========================================
   13. CHART MODAL
   ======================================== */

.chart-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.chart-modal.active {
    display: block !important;
}

.chart-modal-content {
    background-color: var(--bg-white);
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 2% auto;
}

.chart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
}

.chart-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-dark);
    flex: 1;
}

.chart-modal-header h2::after {
    display: none;
}

.modal-view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-light);
    padding: 4px;
    border-radius: 6px;
}

.modal-view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-medium);
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-view-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.modal-view-btn.active {
    background: var(--bg-white);
    color: var(--primary-blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-medium);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.chart-modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.chart-modal-body {
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    overflow-y: auto;
}

.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

#chartContainer {
    width: 100%;
    min-height: 500px;
    margin-bottom: 1.5rem;
}

#tableContainer {
    width: 100%;
    margin-bottom: 1.5rem;
}

.table-wrapper {
    max-height: 500px;
    overflow: auto;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.data-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-preview-table thead {
    position: sticky;
    top: 0;
    background: var(--bg-light);
    z-index: 1;
}

.data-preview-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-medium);
}

.data-preview-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.data-preview-table tbody tr:hover {
    background: var(--bg-light);
}

.data-preview-table tbody tr:last-child td {
    border-bottom: none;
}

.chart-info {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1.5rem;
}

.chart-description {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.chart-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.chart-info p {
    margin: 5px;
    font-size: 0.9rem;
}

.chart-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-medium);
}

.chart-loading i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   14. DATATABLES STYLING
   ======================================== */

.dataTables_wrapper {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.75rem 0;
}

#datasets-table_wrapper .dataTables_length,
#datasets-table_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

#datasets-table_wrapper .dataTables_info,
#datasets-table_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

#datasets-table_wrapper .dataTables_filter {
    float: right;
}

#datasets-table_wrapper .dataTables_length {
    float: left;
}

.dataTables_wrapper table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
}

.dataTables_wrapper .dataTables_scrollHead {
    overflow: visible !important;
}

.dataTables_wrapper .dataTables_scrollBody {
    overflow: auto !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    margin: 0 0.5rem;
}

.dataTables_wrapper .dt-buttons {
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
    display: flex;
    gap: 0.5rem;
}

.dataTables_wrapper .dt-button {
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dataTables_wrapper .dt-button:hover {
    background: var(--secondary-blue);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.35rem 0.75rem;
    margin: 0 2px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg-light);
    border-color: var(--border-medium);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* DataTables Responsive Controls */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background-color: transparent !important;
    box-shadow: none !important;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    background-color: transparent !important;
    box-shadow: none !important;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
    padding: 0.75rem 1rem;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child ul.dtr-details {
    padding-left: 1rem;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child ul.dtr-details > li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child ul.dtr-details > li:last-child {
    border-bottom: none;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child span.dtr-title {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 100px;
    display: inline-block;
}

#dataTable.dataTable {
    border-collapse: collapse;
    width: 100%;
}

#dataTable.dataTable thead th {
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.75rem !important;
    border-bottom: 2px solid var(--border-medium);
    text-align: left;
    vertical-align: middle;
    box-sizing: border-box;
}

#dataTable.dataTable tbody td {
    padding: 0.75rem !important;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    box-sizing: border-box;
}

#dataTable.dataTable .dt-right {
    text-align: right !important;
}

#dataTable.dataTable thead th.dt-right {
    text-align: right !important;
}

.dataTables_scrollHeadInner,
.dataTables_scrollHeadInner table {
    width: 100% !important;
}

.dataTables_scrollBody table {
    width: 100% !important;
}

#dataTable.dataTable tbody tr:hover {
    background: var(--bg-light);
}

#dataTable.dataTable tbody tr.even {
    background: rgba(0, 0, 0, 0.02);
}

#dataTable.dataTable tbody tr.even:hover {
    background: var(--bg-light);
}

/* ========================================
   15. TREE VIEW
   ======================================== */

.tree-view {
    margin: 2rem 0;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

.tree-item {
    margin: 0;
}

.tree-toggle {
    display: none;
}

.tree-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
    user-select: none;
}

.tree-label:hover {
    background: var(--bg-light);
}

.tree-label .fa-folder-open {
    display: none;
}

.tree-toggle:checked ~ .tree-label .fa-folder {
    display: none;
}

.tree-toggle:checked ~ .tree-label .fa-folder-open {
    display: inline;
}

.category-item > .tree-label {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.category-item > .tree-label:hover {
    background: #e8eaf6;
}

.category-item > .tree-label .fa-folder,
.category-item > .tree-label .fa-folder-open {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.dataset-item > .tree-label {
    background: white;
    border-left: 3px solid var(--accent-green);
    margin: 0.25rem 0 0.25rem 1.5rem;
}

.dataset-item > .tree-label:hover {
    background: var(--bg-light);
}

.dataset-item > .tree-label .fa-file {
    color: var(--accent-green);
}

.tree-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.tree-toggle:checked ~ .tree-children {
    max-height: 10000px;
    transition: max-height 0.5s ease-in;
}

.tree-label .count {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: normal;
}

.tree-label .meta {
    margin-left: auto;
    display: flex;
    gap: 0.25rem;
}

.tree-label .badge {
    background: var(--bg-gray);
    color: var(--text-medium);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.dataset-details {
    padding: 1rem 1.5rem 1rem 3rem;
    background: var(--bg-light);
    margin: 0.5rem 0 0.5rem 1.5rem;
    border-left: 2px solid var(--border-light);
    border-radius: 4px;
}

.dataset-details p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.variables-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.variables-list p {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.variables-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.variables-list li {
    padding: 0.75rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
}

.variables-list li:last-child {
    border-bottom: none;
}

.var-name {
    margin-bottom: 0.25rem;
}

.variables-list code {
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.813rem;
    color: var(--primary-blue);
    font-weight: 600;
    border: 1px solid var(--border-light);
}

.var-display {
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem 0;
    line-height: 1.5;
}

.var-description {
    color: var(--text-medium);
    font-size: 0.813rem;
    font-style: italic;
    margin-top: 0.25rem;
    line-height: 1.5;
}

.download-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.download-links strong {
    font-size: 0.9rem;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    font-size: 0.813rem;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.2s;
}

.download-link:hover {
    background: var(--secondary-blue);
}

.download-link i {
    font-size: 0.75rem;
}

/* ========================================
   16. QUICK START & SUBMIT REQUEST
   ======================================== */

.quick-start-section {
    background: white;
    padding: 2rem 0 3rem 0;
}

.quick-start-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: var(--text-medium);
}

.quick-start-buttons {
    text-align: center;
}

.submit-page {
    background: var(--bg-light);
    padding: 3rem 0 4rem 0;
}

.submit-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}

.submit-title {
    text-align: center;
    margin-bottom: 1rem;
}

.submit-subtitle {
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.submit-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.submit-icon {
    font-size: 4rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.submit-heading {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.submit-heading::after {
    display: none;
}

.submit-description {
    color: var(--text-medium);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.submit-btn-link {
    text-decoration: none;
    display: inline-block;
}

.submit-note {
    margin-top: 2rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.submit-disclaimer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.submit-disclaimer p {
    color: var(--text-medium);
    font-size: 0.875rem;
    margin: 0;
}

.contact-card {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
}

.contact-heading {
    margin-top: 0;
    color: var(--primary-blue);
}

.contact-intro {
    margin-bottom: 1.5rem;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    margin: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.contact-list i {
    color: var(--primary-blue);
    width: 20px;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* ========================================
   17. FORMS
   ======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0,61,122,0.1);
}

.form-group textarea {
    resize: vertical;
}

/* ========================================
   18. FOOTER
   ======================================== */

footer {
    background: var(--bg-gray);
    color: var(--text-medium);
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 0;
    border-top: 1px solid var(--border-light);
}

footer .footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

footer .footer-logos a {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

footer .footer-logos a:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

footer .footer-logo-lsu {
    max-width: 280px;
    height: auto;
    background: transparent;
}

footer .footer-logo-energy-institute {
    max-width: 280px;
    height: auto;
    background: transparent;
}

footer .footer-logo-dce {
    max-width: 120px;
    height: auto;
    background: transparent;
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

footer .footer-links {
    margin-top: 1rem;
}

footer a {
    color: var(--primary-blue);
    text-decoration: none;
}

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

footer .footer-legal-links {
    margin-top: 0.75rem;
    font-size: 0.813rem;
}

footer .footer-legal-links a {
    color: var(--text-medium);
}

footer .footer-legal-links a:hover {
    color: var(--primary-blue);
}

/* ========================================
   19. UTILITY CLASSES
   ======================================== */

.text-muted {
    color: var(--text-medium);
    font-size: 0.85rem;
}

.text-muted i {
    margin-right: 0.25rem;
}

/* ========================================
   19. MOBILE FILTER DRAWER
   ======================================== */

/* Hide mobile filter elements on desktop */
.filter-toggle {
    display: none;
}

.mobile-filter-button {
    display: none;
}

.filter-overlay {
    display: none;
}

.filter-close-btn {
    display: none;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.sidebar-header h3 {
    margin: 0;
    padding: 0;
    border: none;
}

/* ========================================
   20. RESPONSIVE DESIGN
   ======================================== */

/* Tablet styles */
@media (max-width: 992px) {
    .container {
        padding: 0 25px;
    }

    header nav a {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 20px;
    }

    header .container {
        padding: 1rem 20px;
    }

    header h1 {
        font-size: 1.2rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        padding: 5rem 0 2rem 0;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 1000;
    }

    .menu-toggle:checked ~ nav {
        right: 0;
    }

    header nav a {
        padding: 1rem 2rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-light);
        border-left: 3px solid transparent;
        position: relative;
        z-index: 1;
    }

    header nav a:hover,
    header nav a:active {
        background: var(--bg-light);
        border-bottom-color: var(--border-light);
        border-left-color: var(--accent-green);
    }

    main > :not(.hero-section):not(.content-section) {
        padding: 1.5rem 20px;
    }

    main h1 {
        font-size: 1.75rem;
    }

    main h2 {
        font-size: 1.4rem;
        margin: 1.25rem 0 1rem 0;
    }

    main h3 {
        font-size: 1.15rem;
    }

    main p {
        margin: 0.75rem 0;
    }

    .search-controls {
        padding: 1rem;
    }

    .category-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Mobile Filter Button */
    .mobile-filter-button {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.625rem 1rem;
        background: var(--primary-blue);
        color: white;
        border-radius: 6px;
        margin-bottom: 1rem;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.875rem;
        box-shadow: 0 2px 6px rgba(0, 61, 122, 0.2);
        transition: all 0.3s;
        position: sticky;
        top: 0.5rem;
        z-index: 100;
        user-select: none;
    }

    .mobile-filter-button:hover {
        background: var(--secondary-blue);
        box-shadow: 0 3px 8px rgba(0, 61, 122, 0.3);
    }

    .mobile-filter-button i {
        font-size: 1rem;
    }

    .mobile-filter-button .filter-text {
        font-size: 0.813rem;
        opacity: 0.95;
    }

    .mobile-filter-button .active-category {
        margin-left: auto;
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 10px;
        font-weight: 500;
    }

    /* Filter Overlay */
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1998;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .filter-toggle:checked ~ .filter-overlay {
        display: block;
        opacity: 1;
    }

    /* Category Sidebar as Drawer */
    .category-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-white);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 1999;
        padding: 1.5rem;
        margin: 0;
        border: none;
    }

    .filter-toggle:checked ~ .category-layout .category-sidebar {
        right: 0;
    }

    /* Sidebar Header with Close Button */
    .filter-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: var(--bg-light);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.2s;
        color: var(--text-medium);
    }

    .filter-close-btn:hover {
        background: var(--border-light);
        color: var(--text-dark);
    }

    .filter-close-btn i {
        font-size: 1.2rem;
    }

    .sidebar-header {
        margin-bottom: 1.5rem;
    }

    .sidebar-header h3 {
        font-size: 1.25rem;
        color: var(--primary-blue);
    }

    .hero-section {
        padding: 2.5rem 0;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section p {
        font-size: 0.95rem;
    }

    table {
        font-size: 0.813rem;
        display: block;
        overflow-x: auto;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    .download-buttons {
        flex-direction: column;
        gap: 0.4rem;
    }

    .button-group {
        width: 100%;
    }

    .download-btn-small {
        flex: 1;
        min-width: auto;
    }

    .preview-btn {
        width: 32px;
        flex-shrink: 0;
    }

    .chart-modal-content {
        margin: 1rem;
        width: 95%;
        max-height: 95vh;
    }

    .chart-modal-header {
        padding: 1rem;
    }

    .chart-modal-header h2 {
        font-size: 1.2rem;
    }

    .chart-modal-body {
        padding: 1rem;
    }

    #chartContainer {
        min-height: 350px;
    }

    .chart-info {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    footer {
        padding: 2rem 0;
    }

    footer .footer-logos {
        gap: 2rem;
    }

    footer .footer-logo-lsu {
        max-width: 200px;
    }

    footer .footer-logo-energy-institute {
        max-width: 200px;
    }

    footer .footer-logo-dce {
        max-width: 100px;
    }

    footer p {
        font-size: 0.813rem;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    header h1 {
        font-size: 1rem;
    }

    header nav {
        width: 80%;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section p {
        font-size: 0.875rem;
    }

    main h1 {
        font-size: 1.5rem;
    }

    main h2 {
        font-size: 1.25rem;
    }

    .category-card h3 {
        font-size: 1.1rem;
    }

    footer .footer-logos {
        gap: 1.5rem;
    }

    footer .footer-logo-lsu {
        max-width: 160px;
    }

    footer .footer-logo-energy-institute {
        max-width: 160px;
    }

    footer .footer-logo-dce {
        max-width: 80px;
    }

    .tree-label {
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    .tree-label .meta {
        width: 100%;
        margin-left: 2rem;
        margin-top: 0.5rem;
    }

    .dataset-details {
        padding: 1rem;
        margin-left: 0.5rem;
    }

    .download-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .submit-container {
        padding: 0 20px;
    }

    .submit-card {
        padding: 2rem 1.5rem;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 1rem;
    }

    .quick-start-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .quick-start-buttons a {
        margin-left: 0 !important;
    }
}
