* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(80, 120, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(0, 220, 255, 0.12), transparent 26%),
        linear-gradient(180deg, #071427 0%, #0b1f3d 45%, #11284c 100%);
    color: #eef4ff;
}

body {
    position: relative;
}

.site-logo-link {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 1200;
    display: inline-block;
    text-decoration: none;
}

.site-logo {
    width: 1.5cm;
    height: 1.5cm;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 8px 22px rgba(0,0,0,0.28);
    padding: 4px;
}

#posTopBtn {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    display: inline-block;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(17, 40, 76, 0.95), rgba(38, 79, 145, 0.95));
    border: 1px solid rgba(173, 216, 255, 0.35);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

#posTopBtn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    background: linear-gradient(135deg, rgba(25, 58, 108, 0.98), rgba(61, 118, 205, 0.98));
}

.page-wrap {
    width: min(1400px, calc(100% - 24px));
    margin: 0 auto;
    padding: 80px 0 30px;
}

.page-header {
    margin-top: 26px;
    margin-bottom: 20px;
    padding: 22px 20px 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.18);
}

.page-title {
    margin: 0 0 4px;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #f4f8ff;
}

.page-subtitle {
    margin: 0 0 18px;
    font-size: 13px;
    color: rgba(231, 240, 255, 0.8);
    letter-spacing: 0.08em;
}

.year-filter-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.year-filter-label {
    font-size: 15px;
    font-weight: 700;
    color: #dbeafe;
}

.year-select {
    min-width: 180px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(4, 15, 33, 0.8);
    color: #f8fbff;
    font-size: 15px;
    outline: none;
}

.dashboard-grid {
    display: grid;
    gap: 20px;
}

.card {
    border-radius: 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.20);
    padding: 18px 18px 16px;
}

.card-header {
    margin-bottom: 14px;
}

.card-title {
    margin: 0;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 800;
    color: #f8fbff;
    letter-spacing: 0.03em;
}

.chart-single-wrap {
    height: 420px;
}

.chart-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.chart-panel {
    min-width: 0;
}

.panel-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #dce8ff;
}

.chart-box {
    position: relative;
    height: 360px;
    width: 100%;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 11, 25, 0.35);
    border: 1px solid rgba(255,255,255,0.08);
}

.legend-note {
    margin-top: 10px;
    font-size: 12px;
    color: #d1def8;
    line-height: 1.8;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
}

.legend-badge {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

.badge-blue   { background: #4da3ff; }
.badge-cyan   { background: #58d8ff; }
.badge-green  { background: #4dd37a; }
.badge-lime   { background: #a3e635; }
.badge-orange { background: #ff9a3c; }
.badge-yellow { background: #ffd84d; }

@media (max-width: 980px) {
    .chart-two-col {
        grid-template-columns: 1fr;
    }

    .chart-single-wrap {
        height: 360px;
    }

    .chart-box {
        height: 320px;
    }
}

@media (max-width: 640px) {
    .page-wrap {
        width: min(100%, calc(100% - 14px));
        padding-top: 72px;
    }

    .page-header {
        padding: 18px 14px 16px;
        border-radius: 18px;
    }

    .card {
        padding: 14px 12px 12px;
        border-radius: 18px;
    }

    .chart-single-wrap {
        height: 320px;
    }

    .chart-box {
        height: 280px;
        padding: 6px;
    }

    #posTopBtn {
        font-size: 12px;
        padding: 9px 14px;
    }
}
.range-separator {
    font-size: 18px;
    font-weight: 700;
    color: #dbeafe;
}

.query-btn {
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
    background: linear-gradient(135deg, #2f4f88, #3f67b3);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
}

.query-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}