@charset "utf-8";

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 8px;
    background-color: #0b0f19;
    color: #f1f5f9;
    font-family: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
    overflow: hidden;
}

grid1, grid2, grid3, grid4, grid5, grid6 {
    display: block;
}

.wrapper {
    width: 100%;
    height: calc(100vh - 16px);
}

#panel_group {
    height: inherit;
}

.first-panel.active-panel {
    height: inherit;
    display: grid;
    gap: 8px;
    overflow: hidden;
    grid-template:
        "grid1 grid2 grid3" 1fr 
        "grid4 grid5 grid5" 1fr 
        "grid6 grid6 grid6" 22px 
        / 180px 1fr 1fr;
}

.last-panel.active-panel {
    height: inherit;
    display: grid;
    gap: 8px;
    overflow: hidden;
    grid-template:
        "grid1 grid2" 1fr 
        "grid1 grid3" 1fr 
        "grid6 grid6" 22px 
        / 180px 1fr;
}

grid1, grid4 {
    grid-area: grid1;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    min-width: 0;
    min-height: 0;
}

grid4 {
    grid-area: grid4;
}

grid2 {
    grid-area: grid2;
    min-width: 0;
    min-height: 0;
}

grid3 {
    grid-area: grid3;
    min-width: 0;
    min-height: 0;
}

grid5 {
    grid-area: grid5;
    min-width: 0;
    min-height: 0;
}

grid6 {
    grid-area: grid6;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#cn2, #cn3, #cn5 {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

#cn2a, #cn3a {
    width: calc(100vw - 212px);
    height: calc(50vh - 30px);
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

select {
    background-color: #1e293b;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 11.5px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    cursor: pointer;
    font-family: inherit;
    height: 25px;
}

select:hover {
    background-color: #334155;
    border-color: rgba(255, 255, 255, 0.25);
}

select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

button {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
    font-family: inherit;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

button:active {
    transform: translateY(1px);
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

li {
    cursor: pointer;
    color: #64748b;
    font-size: 11.5px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

li a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

li a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

li:nth-of-type(1) {
    margin-right: auto;
    text-align: left;
    width: 100%;
    justify-content: flex-start;
}

li:nth-of-type(3) {
    cursor: default;
    font-weight: bold;
    margin: 0 20px;
    justify-content: center;
}

li:nth-of-type(5) {
    text-align: right;
    width: 100%;
    justify-content: flex-end;
}

.active-tab {
    opacity: 0.25;
    cursor: not-allowed;
}

li.axis-tab {
    color: #f1f5f9;
    font-weight: 600;
    margin: 0 20px;
    cursor: default;
}

li[name="arrow"] img {
    width: 16px;
    height: 16px;
    filter: invert(1) opacity(0.7);
    transition: opacity 0.2s, transform 0.2s;
}

li[name="arrow"]:not(.active-tab):hover img {
    filter: invert(1) opacity(1);
    transform: scale(1.1);
}

#panel_group>div:not(.active-panel) {
    display: none;
}

.total-view {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 6px;
    margin-top: auto;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.total-view-series {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.total-view-series::-webkit-scrollbar {
    width: 4px;
}

.total-view-series::-webkit-scrollbar-track {
    background: transparent;
}

.total-view-series::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.numeric {
    font-size: 11px;
    font-weight: 600;
    color: #38bdf8;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.series-legend {
    font-size: 10.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.item {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.license {
    cursor: default;
}

/* Z-Index Stacking Context adjustments to bring upper chart tooltips to the front */
.first-panel grid2, .first-panel grid3 {
    position: relative;
    z-index: 10;
}
.first-panel grid5 {
    position: relative;
    z-index: 5;
}

.last-panel grid2 {
    position: relative;
    z-index: 10;
}
.last-panel grid3 {
    position: relative;
    z-index: 5;
}

/* Dynamically raise z-index of hovered chart container to bring its tooltip to the front */
grid2:hover, grid3:hover, grid5:hover {
    z-index: 100 !important;
}
