/***************************************************************************************************
 * Copyright (C) 2026 by WallyHackenslacker wallyhackenslacker@noreply.git.hackenslacker.space      *
 *                                                                                                  *
 * Permission to use, copy, modify, and/or distribute this software for any purpose with or without *
 * fee is hereby granted.                                                                           *
 *                                                                                                  *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS     *
 * SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE  *
 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES      *
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,        *
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE *
 * OF THIS SOFTWARE.                                                                                *
 ****************************************************************************************************/

:root {
    --bg-base: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #000000;
    --text-primary: #000000;
    --text-secondary: #000000;
    --text-muted: #000000;
    --border-color: #000000;
    --accent-color: #000000;
    --accent-hover: #000000;
    --selection-bg: #000000;
    --selection-text: #ffffff;
    --border-width: 4px;
}

[data-theme="dark"] {
    --bg-base: #000000;
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --bg-tertiary: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #ffffff;
    --border-color: #ffffff;
    --accent-color: #ffffff;
    --accent-hover: #ffffff;
    --selection-bg: #ffffff;
    --selection-text: #000000;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-base: #000000;
        --bg-primary: #000000;
        --bg-secondary: #000000;
        --bg-tertiary: #ffffff;
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --text-muted: #ffffff;
        --border-color: #ffffff;
        --accent-color: #ffffff;
        --accent-hover: #ffffff;
        --selection-bg: #ffffff;
        --selection-text: #000000;
    }
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 700;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg-base);
    background-image: __BACKGROUND_IMAGE_CUSTOM__;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.2;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border: var(--border-width) solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.theme-toggle .icon-auto {
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle .icon-auto::before,
.theme-toggle .icon-auto::after {
    position: absolute;
    font-size: 24px;
    line-height: 1;
}

.theme-toggle .icon-auto::before {
    content: 'L';
    clip-path: inset(0 50% 0 0);
}

.theme-toggle .icon-auto::after {
    content: 'D';
    clip-path: inset(0 0 0 50%);
}

/* Card Style */
.card {
    background: var(--bg-primary);
    border: var(--border-width) solid var(--border-color);
    margin-bottom: 30px;
}

.card-header {
    padding: 20px;
    border-bottom: var(--border-width) solid var(--border-color);
    background: var(--bg-primary);
}

.card-title {
    font-size: 30px;
    font-weight: 900;
    text-transform: uppercase;
}

.card-content {
    padding: 20px;
}

.summaries-content {
    padding: 0;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    border: var(--border-width) solid var(--border-color);
    text-transform: uppercase;
}

.filter-label:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.filter-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: var(--border-width) solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    position: relative;
}

.filter-label input[type="checkbox"]:checked {
    background: var(--text-primary);
}

.filter-label input[type="checkbox"]:checked::after {
    content: 'X';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 900;
    color: var(--bg-primary);
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 20px;
    border: var(--border-width) solid var(--border-color);
    min-width: 200px;
}

.stat-value {
    font-size: 48px;
    font-weight: 900;
}

.stat-label {
    font-size: 16px;
    text-transform: uppercase;
}

/* Charts */
.charts-wrapper {
    display: grid;
    grid-auto-columns: minmax(300px, 450px);
    grid-template-columns: repeat(auto-fill, minmax(300px, 450px));
    grid-gap: 30px;
    justify-content: center;
}

.chart-container {
    padding: 20px;
    border: var(--border-width) solid var(--border-color);
}

.chart-title {
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
}

@media (max-width: 700px) {
    .charts-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .chart-container {
        max-width: 100%;
        width: 100%;
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 900;
    text-transform: uppercase;
    border: var(--border-width) solid var(--border-color);
    flex: 1;
    text-align: center;
}

.tab.active {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.tab-content {
    border: var(--border-width) solid var(--border-color);
    border-top: none;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 15px;
    text-align: left;
    border-bottom: var(--border-width) solid var(--border-color);
    text-transform: uppercase;
    font-size: 14px;
}

td {
    padding: 15px;
    border-bottom: 2px solid var(--border-color);
}

tr:hover td {
    background: var(--selection-bg);
    color: var(--selection-text);
}

.color-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid var(--border-color);
}

.service-badge {
    padding: 2px 8px;
    border: 2px solid var(--border-color);
    margin-left: 10px;
    text-transform: uppercase;
}

.category-badge {
    padding: 2px 8px;
    background: var(--text-primary);
    color: var(--bg-primary);
    margin-left: 5px;
    text-transform: uppercase;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 20px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-left: var(--border-width) solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-primary);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border: var(--border-width) solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    opacity: 0;
    visibility: hidden;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.scroll-top-arrow {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 20px solid currentColor;
}

/* Others row expansion */
.others-row {
    cursor: pointer;
}

.others-row td:first-child::before {
    content: '\25B6';
    display: inline-block;
    margin-right: 10px;
    font-size: 14px;
    transition: transform 0.2s ease;
    vertical-align: middle;
}

.others-row.expanded td:first-child::before {
    transform: rotate(90deg);
}

.others-detail {
    display: none;
    background: var(--bg-secondary);
}

.others-detail.visible {
    display: table-row;
}

.others-detail td {
    padding-left: 48px;
}
