/* ===== GLOBAL RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    color: #1a1a1a;
    line-height: 1.5;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 16px;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== HELP BUTTON ===== */
.help-btn {
    background: #f5f5f5;
    color: #666666;
    border: 1px solid #e5e5e5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.help-btn:hover {
    background: #e5e5e5;
    color: #1a1a1a;
}

.help-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.3;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.help-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
}

.tooltip-content a {
    color: #60b2ff;
    text-decoration: none;
}

.tooltip-content a:hover {
    text-decoration: underline;
}

/* ===== DROPDOWN ===== */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e5e5e5;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.dropdown-btn:hover {
    background: #f5f5f5;
}

.dropdown-icon {
    transition: transform 0.2s ease;
}

.dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    min-width: 180px;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

/* ===== MAIN LAYOUT ===== */
.main-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
    min-height: calc(100vh - 56px);
}

.panel-container {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
}

.panel-header {
    background: #ffffff;
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
}

.panel-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.panel-content {
    height: calc(100% - 80px);
    overflow-y: auto;
}

.content-slide {
    padding: 16px;
    min-height: 100%;
    display: none;
    animation: slideIn 0.3s ease;
}

.content-slide.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== NAVIGATION ARROWS ===== */
.slide-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.nav-arrow {
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #666666;
    user-select: none;
}

.nav-arrow:hover:not(.disabled) {
    background: #e5e5e5;
    color: #1a1a1a;
    transform: scale(1.1);
}

.nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.swipe-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
}

.swipe-dot {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: #e5e5e5;
    transition: all 0.2s ease;
}

.swipe-dot.active {
    background: #1a1a1a;
    transform: scaleX(1.2);
}
/* ===== TOUCH INTERACTION ===== */
.touch-zone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    touch-action: pan-y;
}

.nav-arrow {
    position: relative;
    z-index: 10;
}


/* ===== CONTENT CARDS ===== */
.content-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.error-message {
    text-align: center;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    max-width: 100%;
}

.error-message h3 {
    color: #e53e3e;
    margin-bottom: 12px;
    font-size: 18px;
}

.error-message p {
    color: #666666;
    margin-bottom: 16px;
    font-size: 14px;
}

.retry-btn {
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #333333;
}

/* ===== ABOUT CONTENT ===== */
.about-container {
    padding: 0;
}

.about-content {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 24px;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.6;
}

.about-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.about-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 8px;
}

.about-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-top: 16px;
    margin-bottom: 8px;
}

.about-content p {
    margin-bottom: 12px;
    color: #666666;
}

.about-content strong {
    color: #1a1a1a;
    font-weight: 600;
}

.about-content em {
    color: #333333;
    font-style: italic;
}

.about-content code {
    background: #f5f5f5;
    color: #1a1a1a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 13px;
}

.about-content hr {
    border: none;
    height: 1px;
    background: #e5e5e5;
    margin: 24px 0;
}

.about-content li {
    margin-bottom: 8px;
    color: #666666;
    position: relative;
    list-style: none;
    padding-left: 16px;
}

.about-content li:before {
    content: '•';
    color: #1a1a1a;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.about-content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.about-content a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.about-content a:visited {
    color: #6610f2;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 12px;
        height: 48px;
    }

    .logo {
        font-size: 18px;
    }

    .dropdown-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .help-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .help-tooltip {
        max-width: 220px;
        font-size: 11px;
        padding: 6px 10px;
    }

    .main-container {
        padding: 12px;
        min-height: calc(100vh - 48px);
    }

    .panel-header {
        padding: 12px;
    }

    .panel-title {
        font-size: 18px;
    }

    .content-slide {
        padding: 12px;
    }

    .about-content {
        padding: 16px;
    }

    .about-content h1 {
        font-size: 24px;
    }

    .about-content h2 {
        font-size: 18px;
    }

    .about-content h3 {
        font-size: 16px;
    }

    .swipe-dot {
        width: 20px;
        height: 3px;
    }

    .data-table th {
        padding: 14px 8px;
        font-size: 13px;
        min-height: 44px;
    }
    
    .sort-indicator {
        font-size: 12px;
        margin-left: 4px;
    }

    .chart-y-axis {
        flex: 0 0 100px;
    }
    
    .y-axis-label {
        height: 35px;
        font-size: 9px;
        padding: 0 8px;
    }
    
    .chart-bar-row {
        height: 35px;
    }
    
    .chart-bar {
        height: 24px;
        margin: 5px 0;
    }
    
    .chart-bar-value {
        font-size: 9px;
        padding-right: 4px;
    }

    .mobile-wide-table {
        min-width: 600px;
    }
    
    .mobile-wide-table th,
    .mobile-wide-table td {
        min-width: 100px;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .mobile-wide-table th {
        font-size: 12px;
        font-weight: 700;
        background: #f5f5f5;
    }

    .scroll-indicators {
        margin-bottom: 6px;
    }
    
    .scroll-indicator.horizontal {
        height: 4px;
    }
    
    .scroll-indicator {
        opacity: 0.4;
    }
    
    .scroll-indicator.scrolling {
        opacity: 0.8;
    }
.nav-arrow {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-y-axis {
        flex: 0 0 200px;
    }
    
    .y-axis-label {
        height: 45px;
        font-size: 12px;
        padding: 0 16px;
    }
    
    .chart-bar-row {
        height: 45px;
    }
    
    .chart-bar {
        height: 32px;
        margin: 6px 0;
    }
    
    .chart-bar-value {
        font-size: 12px;
    }

    .pie-chart-wrapper {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
    }
    
    .pie-legend {
        max-width: 300px;
    }
}

@media (min-width: 1024px) {
    .cards-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .chart-container {
        padding: 24px;
    }
}16px;
    transition: all 0.2s ease;
}

.content-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.card-text {
    color: #666666;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== SEARCH ===== */
.search-container {
    margin-bottom: 16px;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.search-input:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.search-input::placeholder {
    color: #999999;
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    background: #ffffff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: none;
}

.data-table th {
    background: #f5f5f5;
    color: #1a1a1a;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    overflow-wrap: break-word;
    word-break: break-word;
}

.data-table th:hover {
    background: #e5e5e5;
    border-bottom-color: #1a1a1a;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: top;
    font-size: 14px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.data-table tr:hover {
    background: #fafafa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ===== TABLE SORTING ===== */
.sort-indicator {
    font-size: 14px;
    color: #666;
    margin-left: 6px;
    transition: color 0.2s ease;
    font-weight: bold;
    display: inline-block;
    min-width: 12px;
}

.data-table th:hover .sort-indicator {
    color: #1a1a1a;
}

.sort-indicator.active {
    color: #1a1a1a !important;
}

/* ===== MOBILE TABLE  ===== */
.mobile-scrollable-container {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-wide-table {
    min-width: 800px;
    table-layout: auto;
    width: auto;
}

.mobile-wide-table th,
.mobile-wide-table td {
    min-width: 120px;
    white-space: nowrap;
    padding: 12px 16px;
}

.mobile-wide-table td {
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px;
}

.mobile-wide-table th {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.narrow-table {
    table-layout: fixed;
}

.narrow-table[data-columns="2"] th,
.narrow-table[data-columns="2"] td { width: 50%; }

.narrow-table[data-columns="3"] th,
.narrow-table[data-columns="3"] td { width: 33.333%; }

/* ===== SCROLL INDICATORS ===== */
.scroll-indicators {
    position: relative;
    margin-bottom: 8px;
}

.scroll-indicator {
    position: relative;
    background: #f0f0f0;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-indicator.horizontal {
    height: 6px;
    width: 100%;
    margin-bottom: 4px;
}

.scroll-indicator.scrolling {
    opacity: 1;
}

.scroll-thumb {
    position: absolute;
    background: #666;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.horizontal-thumb {
    height: 100%;
    min-width: 20px;
    top: 0;
}

/* ===== UNIFIED SCROLLBAR STYLING ===== */
.table-container::-webkit-scrollbar,
.mobile-scrollable-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track,
.mobile-scrollable-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb,
.mobile-scrollable-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.mobile-scrollable-container::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ===== CARDS LAYOUT ===== */
.cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
}

.card-field {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.card-field:last-child {
    margin-bottom: 0;
}

.card-field strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* ===== CHARTS ===== */
.chart-container {
    padding: 16px;
}

.chart-container h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    text-align: center;
}

.chart-wrapper {
    display: flex;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    max-height: 600px;
    position: relative;
}

.chart-y-axis {
    flex: 0 0 140px;
    background: #f8f9fa;
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    position: sticky;
    left: 0;
    z-index: 5;
}

.y-axis-label {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 11px;
    color: #666;
    word-break: break-word;
    line-height: 1.2;
}

.chart-plot-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.chart-bar-row {
    height: 40px;
    display: flex;
    align-items: center;
    position: relative;
    background: #fafafa;
}

.chart-bar-row:nth-child(even) {
    background: #f5f5f5;
}

.chart-bar {
    height: 28px;
    margin: 6px 0;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    min-width: 30px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.chart-bar-value {
    font-size: 11px;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
}

/* ===== PIE CHARTS ===== */
.pie-chart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pie-chart {
    max-width: 100%;
    height: auto;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ===== LINKS ===== */
.cell-link {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
}

.cell-link:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.cell-link:visited {
    color: #6610f2;
}

.cell-link::after {
    content: "↗";
    font-size: 0.8em;
    margin-left: 0.25em;
    opacity: 0.6;
    pointer-events: none;
}

/* ===== LOADING & ERROR STATES ===== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e5e5;
    border-left: 3px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: