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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size:28px;
    color: #2c3e50;
}

h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #2c3e50;
}

/* フォーム */
.form-section {
    background-color: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group > label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
}

.form-group input:not([type="radio"]),
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.radio-group {
    display: flex;
    gap:24px;
}

.radio-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: 0;
}

button#addBtn {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 8px;
}

button#addBtn:hover {
    background-color: #2980b9;
}

/* サマリー */
.summary-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius:8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.summary-card span {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.summary-card strong {
    font-size: 22px;
}

.summary-card.income strong { color: #27ae60; }
.summary-card.expense strong { color: #e74c3c; }
.summary-card.balance strong { color: #2c3e50; }

/* 一覧テーブル */
.list-section {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #555;
}

.amount-income { color: #27ae60; font-weight: bold; }
.amount-expense { color: #e74c3c; font-weight: bold; }

.delete-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
}

.delete-btn:hover {
    background-color: #fdecea;
    border-radius: 4px;
}

/* グラフ */
.chart-section {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.chart-container {
    display: flex;
    gap: 24px;
    overflow: hidden;
}

.chart-box {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.chart-box h3 {
    font-size: 16px;
    color: #555;
    margin-bottom: 16px;
}

/* ヘッダーバー */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header-bar span {
    font-size: 14px;
    color: #555;
}

.header-bar button {
    padding: 8px 16px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.header-bar button:hover {
    background-color: #c0392b;
}

/* 一覧ヘッダー */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.list-header h2 {
    margin-bottom: 0;
}

#exportBtn {
    padding: 8px 16px;
    background-color: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor:pointer;
}

#exportBtn:hover {
    background-color: #219a52;
}

/* 一覧コントロール */
.list-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

#monthFilter {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}