html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    color: #f4f7fb;
    background: #0b1020;
    overflow-x: hidden;
}

body {
    position: relative;
}

.page-bg {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(8, 14, 28, 0.72), rgba(8, 14, 28, 0.84)),
        url("/images/bkscreen/Franchise1.png") center center / cover no-repeat;
    z-index: 0;
}

.page-shell {
    position: relative;
    z-index: 1;
    max-width: 1480px;
    margin: 0 auto;
    padding: 74px 18px 30px;
}

.site-logo-link {
    position: fixed;
    top: 8px;
    left: 10px;
    z-index: 1200;
    text-decoration: none;
}

.site-logo-wrap {
    width: 1.5cm;
    height: 1.5cm;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.site-logo {
    width: 1.18cm;
    height: 1.18cm;
    object-fit: contain;
    display: block;
}

#franchiseTopBtn {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 1200;
    text-decoration: none;
    color: #ffffff;
    background: rgba(116, 80, 255, 0.26);
    border: 1px solid rgba(180, 166, 255, 0.44);
    backdrop-filter: blur(10px);
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

#franchiseTopBtn:hover {
    background: rgba(132, 97, 255, 0.36);
}

.glass-card {
    background: linear-gradient(180deg, rgba(23, 31, 57, 0.82), rgba(13, 18, 35, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    border-radius: 18px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.title-block h1 {
    margin: 0 0 4px 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.title-block p {
    margin: 0;
    color: #c6d0ea;
    font-size: 13px;
}

.header-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.header-links a {
    text-decoration: none;
    color: #f3f5ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.filter-panel {
    padding: 16px 18px;
    margin-bottom: 16px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.filter-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #c8d2eb;
    font-weight: 700;
}

.filter-item select,
.filter-item button {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 13px;
    padding: 0 12px;
    box-sizing: border-box;
}

.filter-item select option {
    color: #111;
}

.filter-item button {
    cursor: pointer;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(88, 120, 255, 0.72), rgba(126, 86, 255, 0.78));
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.kpi-card {
    padding: 14px 16px;
}

.kpi-label {
    color: #c7d1e9;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 700;
}

.kpi-value {
    font-size: 26px;
    line-height: 1.15;
    font-weight: 800;
    color: #ffffff;
    word-break: break-word;
}

.kpi-small {
    font-size: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-card,
.table-card {
    padding: 16px;
}

.card-header {
    margin-bottom: 10px;
}

.card-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.chart-wrap {
    position: relative;
    width: 100%;
}

.chart-wrap-bar {
    height: 560px;
}

.chart-wrap-line {
    height: 560px;
}

.table-wrap {
    overflow-x: auto;
}

#compareTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 1120px;
}

#compareTable thead th {
    background: rgba(255, 255, 255, 0.08);
    color: #f4f7fb;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    white-space: nowrap;
}

#compareTable tbody td {
    padding: 10px 8px;
    font-size: 12px;
    color: #e7ecfb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    white-space: nowrap;
}

#compareTable tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1200px) {
    .filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .chart-wrap-bar,
    .chart-wrap-line {
        height: 440px;
    }
}

@media (max-width: 700px) {
    .page-shell {
        padding: 72px 12px 22px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .title-block h1 {
        font-size: 22px;
    }

    .kpi-value {
        font-size: 22px;
    }

    .chart-wrap-bar,
    .chart-wrap-line {
        height: 360px;
    }
}