body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f8fafc;
    color: #1e293b;
}

.main-container {
    width: 100%;
    box-sizing: border-box;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 10px;
}

h1 {
    color: #0f172a;
    font-size: 22px;
    margin: 0;
}

.btn-refresh {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

.btn-refresh:hover {
    background: #059669;
}

h3 {
    font-size: 16px;
    margin: 0 0 15px 0;
    color: #334155;
}

.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.tab-btn {
    background: #e2e8f0;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.tab-btn.active {
    background: #2563eb;
    color: #ffffff;
}

.panel {
    display: none;
}

.panel.active {
    display: block;
}

.controls {
    background: #ffffff;
    padding: 15px;
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

select, input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    background: #ffffff;
}

.btn-date-nav {
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.btn-date-nav:hover {
    background: #cbd5e1;
}

/* マルチセレクターカード */
.selector-card {
    background: #ffffff;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 15px;
}

.section-label {
    font-size: 14px;
    font-weight: bold;
    color: #475569;
    display: block;
    margin-bottom: 10px;
}

.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.checkbox-label input {
    cursor: pointer;
}

/* 2連スライダー */
.slider-card {
    background: #ffffff;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 10px;
}

.btn-reset-slider {
    background: #64748b;
    color: white;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
}

.range-slider-container {
    position: relative;
    width: 100%;
    height: 30px;
}

.range-slider-container input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    background: none;
    margin: 0;
}

.range-slider-container input[type="range"]::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
}

.range-slider-container::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 6px;
    background: #cbd5e1;
    top: 6px;
    left: 0;
    border-radius: 3px;
    z-index: 0;
}

.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.chart-card {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.canvas-wrapper {
    position: relative;
    height: 340px;
    width: 100%;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

.table-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

th {
    background: #f1f5f9;
    padding: 8px 12px;
    border-bottom: 2px solid #e2e8f0;
    color: #475569;
    position: sticky;
    top: 0;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.file-row {
    background: #ffffff;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.btn-download {
    background: #475569;
    color: #ffffff;
    text-decoration: none;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
}