body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    padding: 20px;
    background-color: #f4f7f9;
}

h2 {
    color: #2c3e50;
    border-left: 5px solid #28a745;
    padding-left: 10px;
}

#site-nav {
    text-align: center;
    padding: 15px 0;
    margin-bottom: 20px;
}
.nav-link {
    display: inline-block;
    margin: 0 5px;
    padding: 10px 18px;
    background: #fff;
    text-decoration: none;
    color: #666;
    border-radius: 25px;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.nav-link.active {
    background: #28a745;
    color: white;
}

.table-container {
    overflow-x: auto;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-height: 85vh;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

th,
td {
    border: 1px solid #e9ecef;
    padding: 10px;
    text-align: right;
    min-width: 110px;
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #f8f9fa !important;
    font-weight: bold;
    text-align: left;
    min-width: 160px;
    border-right: 2px solid #dee2e6;
}

th {
    background-color: #f1f3f5;
    position: sticky;
    top: 0;
    z-index: 5;
}
th.sticky-col {
    z-index: 15;
}

/* カテゴリ見出し */
.category-header {
    background-color: #e2e6ea;
    font-weight: bold;
}

/* 合計・残高行の装飾 */
.subtotal-income-row {
    background-color: #e8f5e9;
    font-weight: bold;
}
.subtotal-expense-row {
    background-color: #ffebee;
    font-weight: bold;
}
.balance-row {
    background-color: #e3f2fd;
    font-weight: bold;
    font-size: 1.1em;
}

input {
    width: 90%;
    padding: 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    font-size: 0.95rem;
}
input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
}
/* 既存のCSSに追加・修正 */
.unit-label {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    padding-bottom: 5px;
}

/* 入力欄の幅を少し調整（桁数が減るので） */
input {
    width: 80%;
    padding: 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    font-size: 1rem;
}

/* 合計値や残高のテキストが「万円」であることを強調 */
[id^='total_'],
[id^='grand_'] {
    font-family: 'Consolas', 'Monaco', monospace; /* 数字を揃えやすくする */
}
