header {
    color: #fff;
    background-color: #3a7ca5;
    padding: 0px;
}

.navbar-nav {
    background-color: transparent;
}

h1 {
    text-align: center;
    font-size: xx-large;
}

h2 {
    text-align: left;
    font-size: large;   
}
.center-text {
    text-align: center;
}
.right-text {
    text-align: right;
    margin-bottom: 5px;
}
.left-text {
    text-align: left;
}
.gray-text {
    color:#dcdcdc;
}
.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.2); /* 透明な白色 */
    border: 1px solid white; /* 枠線を白色に */
}
#mypage_nav {
    padding: 20px 0px;
}
#topPage_bar {
    padding: 20px 0px;
}
#footer_bar {
    padding: 20px 0px;
}
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
tbody tr:nth-child(odd) {
    background-color: #e9f2fb;
}
tbody tr:nth-child(even) {
    background-color: #ffffff;
}

table {
    border-collapse: separate;
    border-spacing: 2px;
    margin: 0px auto;
}
tr {
    background-color: #3a7ca5;
    padding: 1px;
}

td {
    padding: 1px;
}

th {
    background-color: #3a7ca5;
    color:#fff;
    text-align: center;
    padding: 2px; 
}
label {
    font-weight: bold;
    font-size: 16px;
}

.finance-form-container {
    /* max-width: 600px; */
    margin-left: auto;
    margin-right: auto;
}

.finance-form-container .date-input {
    width: 160px !important; /* override Bootstrap/form-group defaults */
    max-width: none;
    display: inline-block;
    flex: 0 0 auto !important;
}

.finance-form-container .short-input {
    width: 160px !important;
    max-width: none;
    display: inline-block;
    flex: 0 0 auto !important;
}
h2.profile-heading {
    font-size: 24px;
    font-weight: 700;
    color: #3a7ca5;
    text-align: center;
    border-bottom: 2px solid #3a7ca5;
    padding-bottom: 8px;
    margin-bottom: 20px;
  }
.limited-text {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.limited-text1 {
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.limited-text2 {
    width: 50px;  /* 最大幅を設定 */
    white-space: nowrap;  /* テキストの折り返しを禁止 */
    overflow: hidden;  /* はみ出た部分を隠す */
    text-overflow: ellipsis;  /* 省略記号 (...) を表示 */
}
.limited-text3 {
    width: 50px;  /* 最大幅を設定 */
}
.limited-text4 {
    display: -webkit-box;
    -webkit-line-clamp: 3;         /* 最大2行まで表示 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
#budgetYear {
    text-align: right;
    max-width: 100px; /* 例として150pxに設定 */
    width: 100%;
  }

nav ul {
    text-align: center;
    color: #efefd0;
    background-color: #16425b;
}
nav li {
    display: inline-block;
    padding-left: 10px;
}
nav p {
    text-align: center;
    color: white;
    background-color: #1a659e;
    margin-top: 0px;
}
.nav-link.disabled {
  pointer-events: none;
  opacity: 0.5;
}
.dropdown-item.disabled {
  pointer-events: none;
  opacity: 0.5;
}
.card-header {
    width: 100%;
    margin-bottom: 5px;
}

.section-title {
    background-color: #60707B;
}
.navbar-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid white;
  }
.navbar-avatar1 {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 50%;
border: 2px solid rgb(0, 0, 0);
}
.note-link {
    text-align: center;
}

main {
    width: 100%;
    max-width: 700px;
    margin: 60px 0px;
    padding: 10px;
}

/* Header brand: show group name on narrow screens */
.top-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.top-nav-service-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.top-nav-group-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75em;
    line-height: 1;
    border: 1px solid transparent;
    background: rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}
.top-nav-group-name i {
    font-size: 0.85em;
    opacity: 0.7;
}
.brand-group {
    display: none;
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 576px) {
    .brand-title {
        display: none;
    }
    .brand-group {
        display: none;
    }
}

/* Finance floating action button */
.finance-fab {
    position: fixed;
    right: 20px;
    top: 88px;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 999px;
    background: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.7);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.25), 0 2px 6px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    z-index: 1060;
    user-select: none;
    touch-action: none;
    cursor: grab;
}
.finance-fab:active {
    cursor: grabbing;
}
.finance-fab:hover {
    color: #ffffff;
    background: #0b5ed7;
}
.finance-fab:active {
    transform: scale(0.98);
}
.finance-fab-label {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
}
.finance-fab-handle {
    position: absolute;
    left: -14px;
    top: -12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #0d6efd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    opacity: 0.9;
}
@media (max-width: 576px) {
    .finance-fab {
        width: 44px;
        height: 44px;
        right: 16px;
        top: 76px;
    }
    .finance-fab-label {
        font-size: 1rem;
    }
    .finance-fab-handle {
        left: -12px;
        top: -10px;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

/* Finance month close button */
.finance-close-stack {
    position: fixed;
    right: 20px;
    bottom: 120px;
    z-index: 1055;
    display: flex;
    flex-direction: column;
    gap: 10px;
    user-select: none;
    touch-action: none;
}
.finance-close-fab {
    position: relative;
}
.finance-close-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(217, 48, 37, 0.35);
    background: #fff4f3;
    color: #b3261e;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 18px rgba(217, 48, 37, 0.16), 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: grab;
}
.finance-close-button:hover {
    background: #ffe7e5;
    color: #8c1d16;
}
.finance-close-button:active {
    cursor: grabbing;
    transform: scale(0.99);
}
.finance-close-handle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d93025;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    box-shadow: 0 2px 4px rgba(217, 48, 37, 0.3);
}
.finance-close-label {
    white-space: nowrap;
}
@media (max-width: 576px) {
    .finance-close-stack {
        right: 16px;
        bottom: 100px;
    }
    .finance-close-button {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* 初期状態では非表示 */
#income_group, #expense_group, #deduction_group {
    display: none;
}
.login {
    display: flex;
    justify-content: center;
    text-align: center;
    color:#004e89;
    font-weight: 700;
    max-width: 400px;
    margin:20px auto;
}

.auth-container {
    max-width: 900px;
    margin: 20px auto;
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #64748b;
}

.auth-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.auth-tabs {
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8fafc;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    padding-left: 0;
    margin: 0;
}

.auth-tabs .nav-item {
    flex: 0 0 50%;
    max-width: 50%;
    margin: 0;
}

.auth-tabs .nav-link {
    font-weight: 700;
    color: #64748b;
    padding: 16px;
    width: 100%;
    text-align: center;
    border: none;
    display: block;
}

.auth-tabs .nav-link.active {
    color: #1d4ed8;
    border-bottom: 3px solid #1d4ed8;
    background-color: #ffffff;
}

.auth-pane-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-pane-desc {
    color: #64748b;
    margin-bottom: 20px;
}

.service-options {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.service-option {
    border: 1px solid #d0d7e2;
    background-color: #eef2ff;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: #1f2937;
    width: 50%;
    text-align: center;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

.service-options-full {
    flex-direction: row;
}

.service-option.is-active.is-finance {
    background-color: #e9f0ff;
    border-color: #2f6fe4;
    border-width: 3px;
    color: #1e40af;
}

.service-option.is-active.is-myself {
    background-color: #e8f7ef;
    border-color: #7bc89c;
    border-width: 3px;
    color: #166534;
}

.service-option.is-active.is-message {
    background-color: #fff6d6;
    border-color: #f3b11a;
    border-width: 3px;
    color: #9a5c00;
}

.service-option.is-finance {
    background-color: #e9f0ff;
    color: #1e40af;
}

.service-option.is-myself {
    background-color: #e8f7ef;
    color: #166534;
}

.service-option.is-message {
    background-color: #fff6d6;
    color: #9a5c00;
}

.auth-submit {
    background-color: #3f7ee8;
    color: #ffffff;
    border: none;
    width: 100%;
    max-width: 520px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
}

.auth-submit:hover {
    background-color: #2f6fe4;
}

.btn-group-blue {
    background-color: #1d4ed8;
    color: #ffffff;
    border: none;
}

.btn-group-blue:hover {
    background-color: #1e40af;
    color: #ffffff;
}

.btn-group-light {
    background-color: #e9f0ff;
    color: #1d4ed8;
    border: 1px solid #bcd3ff;
}

.btn-group-light:hover {
    background-color: #dbe7ff;
    color: #1d4ed8;
}
.finance-btn-rounded {
    border-radius: 12px;
}
.finance-action-btn {
    background-color: #1d4ed8;
    color: #ffffff;
    border: none;
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.finance-action-btn:hover {
    background-color: #1e40af;
    color: #ffffff;
}
.finance-action-excel {
    margin-left: auto;
}
.finance-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.finance-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}
@media (max-width: 576px) {
    .finance-action-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }
    .finance-action-btn {
        width: 100%;
        flex-direction: column;
        gap: 0.3rem;
        text-align: center;
        padding: 0.6rem 0.5rem;
    }
    .finance-action-text {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    .finance-action-excel {
        margin-left: 0;
    }
}
.finance-search-btn {
    background-color: #1d4ed8;
    color: #ffffff;
    border: none;
}
.finance-search-btn:hover {
    background-color: #1e40af;
    color: #ffffff;
}
.finance-recent-btn {
    background-color: #1d4ed8;
    color: #ffffff;
    border: none;
}
.finance-recent-btn:hover {
    background-color: #1e40af;
    color: #ffffff;
}
.myself-action-btn {
    background-color: #166534;
    color: #dcfce7;
    border: none;
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
    border-radius: 12px;
}
.myself-action-btn:hover {
    background-color: #14532d;
    color: #dcfce7;
}
.recent-input-icon {
    display: inline-block;
    margin-right: 8px;
    vertical-align: -2px;
    color: #1d4ed8;
}
.recent-input-icon-frame {
    fill: #ffffff;
}

@media (min-width: 992px) {
    .dashboard-body {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .dashboard-grid {
        flex: 1 1 auto;
        align-content: stretch;
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    .dashboard-button {
        min-height: 72px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        padding: 0.5rem 0.9rem;
    }
}
@media (max-width: 576px) {
    .dashboard-button {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        row-gap: 0.15rem;
        column-gap: 0.35rem;
        text-align: center;
    }
    .dashboard-icon {
        order: 1;
    }
    .dashboard-suffix {
        order: 2;
    }
    .dashboard-title {
        order: 3;
        flex-basis: 100%;
    }
}
.dashboard-button {
    border-radius: 12px;
    text-align: center;
    padding: 0.5rem 0.9rem;
}
.dashboard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dashboard-icon i {
    margin-right: 0.35rem;
}
.dashboard-title,
.dashboard-suffix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dashboard-title {
    width: 100%;
}
.dashboard-suffix {
    white-space: nowrap;
}

.footer.theme-finance {
    background-color: #e9f2ff;
}

.footer.theme-myself {
    background-color: #e8f7ef;
}

.footer.theme-message {
    background-color: #fff6d6;
}

.footer.theme-finance .text-white,
.footer.theme-finance .text-white a {
    color: #1e40af !important;
}

.footer.theme-myself .text-white,
.footer.theme-myself .text-white a {
    color: #166534 !important;
}

.footer.theme-message .text-white,
.footer.theme-message .text-white a {
    color: #9a5c00 !important;
}

.recent-finance-list .list-group-item {
    gap: 12px;
}

.recent-finance-row {
    justify-content: space-between;
    flex-wrap: nowrap;
}

.recent-finance-main {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-finance-amount {
    flex: 0 0 140px;
    text-align: right;
    white-space: nowrap;
}

.recent-finance-actions {
    flex: 0 0 140px;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .recent-finance-row {
        gap: 8px;
    }

    .recent-finance-main {
        flex: 1 1 auto;
        text-align: left;
    }

    .recent-finance-amount {
        flex: 0 0 90px;
        font-size: 0.9rem;
    }

    .recent-finance-actions {
        flex: 0 0 120px;
        gap: 6px;
    }
}

.input-soft {
    background-color: #e9f1ff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 600;
}

.input-soft:focus {
    background-color: #eef4ff;
    border-color: #2f6fe4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.15);
}

.waku-1 {
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;
    list-style: none;
}

.waku-3 {
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    width: 100%;
    margin-top: 5px;
    margin-bottom: 5px;
}
.waku-4 {
    border: 2px solid #D6D7D8;
    border-radius: 4px;
    height: 30px;
    width: 100%;
    margin: 10px 0px;
    box-sizing: border-box;
}
.waku-5 {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin: 20px auto;
}
.waku-6 {
    display: flex;
    justify-content: center;
}
.waku-7 {
    display: flex;
    justify-content: center;
    text-align: center;
    max-width: 400px;
    margin:20px auto;
}
hr {
    margin: 10px auto;
}
.action-button {
    font-size: 0.875rem;
    padding: 2px 8px;
    white-space: nowrap;
    margin: 2px 2px;
}
.a-button {
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: #465cd7;
    color: #fff;
    font-size: 16px;
    padding: 3px 5px;
}
.a-button:hover {
    background: #465cd7c4;
    color: #fff;
}

.b-button {
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: #d74646;
    color: #fff;
    font-size: 16px;
}
.b-button:hover {
    background: #d74646bc;
}
.b2-button {
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: #46c6d7;
    color: #fff;
    font-size: 16px;
}
.b-button:hover {
    background: #d74646bc;
}

.c-button {
    display: block;
    margin: 20px auto;
    padding: 8px 16px;
    width: 80%;
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: #4676D7;
    color: #fff;
  padding: 8px 16px;
  font-size: 16px;
}

/* Dashboard monthly table header highlights */
.dashboard-monthly thead th.th-cumulative-highlight {
    background-color: #0dcaf0 !important; /* Bootstrap info */
    color: #000000 !important;            /* black text */
    font-weight: 700;
}
/* top-level month and range headers */
.dashboard-monthly thead th.th-period-highlight {
    background-color: #0dcaf0 !important; /* Bootstrap info */
    color: #000000 !important;            /* black text */
    font-weight: 700;
}
.d-button {
    display: block;
    margin: 20px auto;
    padding: 8px 16px;
    width: 80%;
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: #32a028;
    color: #fff;
    padding: 8px 16px;
    font-size: 16px;
}
.e-button {
    display: block;
    margin: 20px auto;
    padding: 8px 16px;
    width: 80%;
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: #585858;
    color: #fff;
    padding: 8px 16px;
    font-size: 16px;
}

.button {
    border:1px solid #004e89;
    color: #004e89;
    background-color: #efefd0;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border-radius: 4px;
    min-height: 44px;
    max-height: 48px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    /* height:60px; */
    line-height:1.2;
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
}
.button:hover {
    background-color: #cfcfae;
    color: white;
}
.lbutton {
    background-color: #9d9d9d;
    border:none;
    color: white
}

.button-1 {
    border:1px solid #004e89;
    color: #004e89;
    background-color: #efefd0; */
    border-radius: 4px;
    min-height: 44px;
    max-height: 48px;
    min-width:160px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    width: 100%;
    padding:10px 30px;
}

.button-3 {

    border:1px solid #004e89;
    color: #004e89;
    background-color: #e9edc9;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border-radius: 4px;
    min-height: 44px;
    max-height: 48px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    /* height:60px; */
    line-height:1.2;
    width: 100%;
    max-width: 200px;
    padding: 10px;
    display: inline-block;
}
.button-3:hover {
    background-color: #cfcfae;
    color: white;
}

.auth-card .button-3.auth-submit {
    background-color: #3f7ee8;
    color: #ffffff;
    border: none;
    width: 90%;
    max-width: 720px;
    padding: 16px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin: 0 auto;
}

.auth-card .button-3.auth-submit:hover {
    background-color: #2f6fe4;
    color: #ffffff;
}
.button-4 {
    border:1px solid #004e89;
    color: #ffffff;
    background-color: #a3a3a3;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border-radius: 4px;
    min-height: 44px;
    max-height: 48px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    /* height:60px; */
    line-height:1.2;
    width: 100%;
    max-width: 200px;
    padding: 10px;
}
.button-5 {
    border:1px solid #ff0000;
    color: #ffffff;
    background-color: #ff0000;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border-radius: 4px;
    min-height: 44px;
    max-height: 48px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    /* height:60px; */
    line-height:1.2;
    width: 100%;
    max-width: 200px;
    padding: 10px;
}
.list {
    display: flex;
    justify-content: space-between;
    width: 380px;
    margin: 10px;
}

.list1 {
    list-style: none;
    padding: 5px;
}

.list2 {
    display: flex;
    justify-content: space-between;
    width: 380px;
    margin: 5px;
}
.list-group-item {
    border: none;
  }
.asset-total-badge {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
}
.asset-total-positive {
    background-color: #e8f5e9;
    color: #1b5e20;
}
.asset-total-positive strong {
    color: inherit;
}
.asset-total-negative {
    background-color: #fdecea;
    color: #b71c1c;
}
.asset-total-negative strong {
    color: inherit;
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-group label {
    width: 120px; /* ラベルの幅を統一 */
    text-align: right; /* 右寄せで揃える */
    margin-right: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    flex: 1; /* 入力欄を伸ばす */
    padding: 5px;
    /* border: 1px solid #ccc; 枠線を薄いグレーに */
    padding: 5px; /* 内側の余白 */
    border-radius: 5px; /* 角を丸く */
}
select {
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 5px;
    background-color: hsl(0, 18%, 97%);
    font-size: 16px;
    cursor: pointer;
    text-align: center;
}
#amount {
    text-align: right;
}
.top {
    color:white;
    font-size:larger;
    font-weight: bold;
}
.logout {
    color:#ff6b35;
}
.top_nav {
    color:#bde0fe;
}

footer {
    text-align: center;
    color: white;
    background-color: #3a7ca5;
    padding-bottom: 5px;
}
footer div {
    padding-top: 5px;
}
#container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
}
#container div {
    width: 200px;
    text-align: center;
    flex-basis: 500px;
}

.navbar-nav .nav-link:hover {
    color: #004e89; 
}

.error-field {
    border: 2px solid red; /* 赤いボーダーを追加 */
    /* background-color: red; */
}

.error-message {
    color: red;
    font-size: 0.9rem;
    margin-top: 4px;
}

.group-link {
text-decoration: none;
color: white;
}

.group-link:hover {
text-decoration: none;
color: white;
}

.info-container {
    position: relative;
    display: inline-block;
}

.info-button {
    /* background-color: #cacaca; */
    color: rgb(143, 143, 143);
    /* border: none; */
    /* padding: 5px 10px; */
    cursor: pointer;
    border-radius: 5px;
}

.info-popup {
    display: none;
    position: absolute;
    top: 35px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding-top: 18px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 5px;
    width: 250px;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.info-container:hover .info-popup {
    display: block;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #3a7ca5;
    color: white;
    border: none;
    padding: 5px 30px 5px 10px;
    border-radius: 4px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='70,100 20,40 120,40' fill='white'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
  }

.offcanvas-menu-custom {
    background-color: #ffffff;
    color: #222;
  }

  .offcanvas-menu-custom .nav-link {
    color: #222;
    padding: 10px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .offcanvas-menu-custom .nav-link:hover {
    text-decoration: none;
    opacity: 0.85;
  }

  .offcanvas-menu-custom .nav-link.disabled {
    color: #ccc !important;
    pointer-events: none;
    background-color: transparent;
  }

  .offcanvas-menu-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
  }

  .offcanvas-menu-custom .offcanvas-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  .offcanvas-menu-custom .offcanvas-body {
    padding: 4px 20px;
  }

  .menu-header {
    background-color: #2f6fe4;
    color: #ffffff;
  }

  .menu-header .offcanvas-title {
    color: #ffffff;
    font-weight: 700;
  }

  .menu-header .btn-close {
    filter: invert(1);
  }

  .menu-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .menu-guide-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .menu-guide-link:hover {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
  }

  .offcanvas-menu-custom .offcanvas-title {
    font-weight: 700;
    font-size: 18px;
  }

  .menu-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    padding: 14px 0;
  }

  .menu-section:last-of-type {
    border-bottom: none;
  }

  .menu-title {
    font-weight: 700;
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .menu-subtitle {
    font-weight: 700;
    font-size: 15px;
    margin-top: 8px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .menu-user-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .menu-user {
    background-color: #ffffff;
    padding: 4px;
    border-radius: 12px;
  }

  .menu-avatar {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
  }

  .menu-user-name {
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .menu-muted {
    color: #6b7280;
    font-size: 12px;
  }

  .menu-badge {
    background-color: #f3c34d;
    color: #1f1f1f;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    margin-left: 6px;
  }

  .menu-pills {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .menu-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d7dce3;
    color: #1f2937;
    background-color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    width: 100%;
    justify-content: flex-start;
  }

  .menu-pill-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .menu-pill-main i {
    width: 18px;
    text-align: center;
  }

  .menu-pill .menu-pill-label {
    font-weight: 600;
  }

  .menu-pill.related-pill {
    justify-content: space-between;
  }

  .menu-item {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .menu-item i {
    color: #e11d48;
    width: 18px;
    text-align: center;
  }

  .menu-item .icon-asset {
    color: #111827;
  }

  .menu-item.is-active.is-finance {
    background-color: #e9f0ff;
    border-right: 4px solid #2f6fe4;
  }

  .menu-item.is-active.is-myself {
    background-color: #e8f7ef;
    border-right: 4px solid #7bc89c;
  }

  .menu-item.is-active.is-message {
    background-color: #fff6d6;
    border-right: 4px solid #f3b11a;
  }

  .related-tag {
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
  }

  .menu-pill.is-active.is-finance {
    background-color: #e9f0ff;
    border-color: #2f6fe4;
    color: #1e40af;
  }

  .menu-pill.is-active.is-myself {
    background-color: #e8f7ef;
    border-color: #7bc89c;
    color: #166534;
  }

  .menu-pill.is-active.is-message {
    background-color: #fff6d6;
    border-color: #f3b11a;
    color: #9a5c00;
  }

  .menu-pill.related-blue {
    background-color: #eef5ff;
    border-color: #9bbcff;
    color: #1e40af;
  }

  .menu-pill.related-green {
    background-color: #e8f7ef;
    border-color: #7bc89c;
    color: #166534;
  }

  .menu-pill.related-yellow {
    background-color: #fff6d6;
    border-color: #f3b11a;
    color: #9a5c00;
  }

  .menu-pill:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
  }

  .menu-list .nav-link {
    padding: 8px 0;
  }

  .menu-logout {
    padding: 16px 0 8px;
  }

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 60px; /* アイコン分のスペースを確保 */
}

.eye-icon {
    position: absolute;
    right: 10px; /* アイコンを右端に配置 */
    top: 50%;
    transform: translateY(-50%); /* 垂直方向に中央に配置 */
    background: none;
    border: none;
    font-size: 20px; /* アイコンのサイズ */
    cursor: pointer;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10; /* ← 高めにすることで overlap 対策 */
    background-color: #f8f9fa;
    text-align: center;
  }

/* 共通 sticky 列スタイル */
.sticky-col, .sticky-col2 {
    box-sizing: border-box;
    }
    
.sticky-col {
    position: sticky;
    left: 0;
    min-width: 110px !important;
    max-width: 110px !important;
    box-sizing: border-box; /* ← これが効く！ */
    z-index: 11;
    white-space: normal;
    word-break: break-word;
    /* background-color: #f8f9fa !important; */
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.05);
}
    
.sticky-col2 {
    position: sticky;
    left: 110px !important; /* ← sticky-col と一致させる */
    min-width: 100px !important;
    box-sizing: border-box;
    z-index: 10;
    white-space: nowrap;
    /* background-color: #f8f9fa !important; */
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.04);
    text-align: right !important;
}

th.sticky-col {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 14; /* 項目を最前面に！ */
    background-color: #3a7ca5 !important;
    color: white;
    text-align: center !important;
}

th.sticky-col2 {
    position: sticky;
    top: 0;
    left: 110px; /* sticky-colの幅と一致 */
    min-width: 100px;
    z-index: 13; /* 項目より低くする！ */
    background-color: #3a7ca5 !important;
    color: white;
    text-align: center !important;
}
.navbar-nav .dropdown-menu .dropdown-item {
    color: #333; /* Dark text color for the items */
}

.navbar-nav .dropdown:hover .dropdown-menu {
    display: block;
}
.navbar-nav .dropdown-menu .dropdown-item:hover {
    background-color: #3a7ca5; /* Darker background on hover */
    color: #fff; /* White text color on hover */
}

/* Ensure the dropdown appears in the off-canvas menu */
.offcanvas-body .dropdown-menu {
    background-color: #f0f8ff;
}
  
.offcanvas-body .dropdown-menu .dropdown-item {
    color: #333;
}
  
.offcanvas-body .dropdown-menu .dropdown-item:hover {
    background-color: #3a7ca5;
    color: #fff;
}

/* ダッシュボードの遷移アニメーション */
.dashboard-page {
    animation: fadeIn 1.0s ease-in-out;
}
table td, table th {
    border: none !important;
}
.dashboard-yearly-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.dashboard-yearly-main {
    max-width: none;
    width: 100%;
    margin: 120px 0;
    padding-left: 8px;
    padding-right: 8px;
}
.dashboard-yearly {
    width: max-content;
    min-width: 100%;
}
.dashboard-yearly th,
.dashboard-yearly td {
    min-width: 70px;
}
.dashboard-yearly th.sticky-col,
.dashboard-yearly td.sticky-col {
    min-width: 110px;
}
.dashboard-yearly th.sticky-col2,
.dashboard-yearly td.sticky-col2 {
    min-width: 100px;
}

.dashboard-calendar-main {
    max-width: none;
    width: 100%;
    margin: 72px 0 16px;
    padding-left: 8px;
    padding-right: 8px;
}

.dashboard-calendar-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-calendar-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

.dashboard-calendar-table th,
.dashboard-calendar-table td {
    border: 1px solid #6a757d !important;
    padding: 4px 6px;
    font-size: 0.9rem;
    vertical-align: middle;
    background-color: #ffffff;
}

.dashboard-calendar-table thead th {
    background-color: #d8e2ea;
    color: #17222a;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-calendar-table thead tr:first-child th:nth-child(n+4):nth-child(-n+7),
.dashboard-calendar-table thead tr:nth-child(2) th:nth-child(-n+8) {
    background-color: #bfd6ee;
}

.dashboard-calendar-table thead tr:first-child th:nth-child(1),
.dashboard-calendar-table thead tr:first-child th:nth-child(2),
.dashboard-calendar-table thead th.memo-head {
    background-color: #ffffff;
}

.dashboard-calendar-table td.day-col,
.dashboard-calendar-table td.weekday-col {
    min-width: 44px;
    text-align: center;
    white-space: nowrap;
}

.dashboard-calendar-table th.memo-head,
.dashboard-calendar-table td.memo-col {
    width: 180px;
    min-width: 180px;
    max-width: 180px;
}

.dashboard-calendar-table td.memo-col {
    padding-top: 2px;
    padding-bottom: 2px;
}

.dashboard-calendar-table .memo-cell-btn {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    min-height: 1.25em;
    text-align: left;
    color: inherit;
    cursor: pointer;
}

.dashboard-calendar-table .memo-cell-btn:focus-visible {
    outline: 2px solid #2d6cdf;
    outline-offset: 1px;
    border-radius: 3px;
}

.dashboard-calendar-table td.memo-col .memo-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
    max-height: calc(1.25em * 3);
}

.dashboard-calendar-table td.memo-col .memo-text.is-empty {
    color: #6c757d;
}

.dashboard-calendar-table td.content-col {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.dashboard-calendar-table th.content-head {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
}

.dashboard-calendar-table td.content-col .content-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
    max-height: calc(1.25em * 3);
}

.dashboard-calendar-table td.amount-col,
.dashboard-calendar-table td.balance-col {
    min-width: 110px;
    text-align: right;
    white-space: nowrap;
}

.dashboard-calendar-table th.balance-head,
.dashboard-calendar-table td.balance-col {
    background-color: #bfd6ee;
}

.dashboard-calendar-table th.payment-group-head {
    min-width: 220px;
}

.dashboard-calendar-table th.payment-head {
    min-width: 110px;
    text-align: center;
    white-space: nowrap;
}

.dashboard-calendar-table td.payment-amount-col {
    min-width: 110px;
    text-align: right;
    white-space: nowrap;
}

.dashboard-calendar-table th.cash-balance-head {
    min-width: 110px;
    text-align: center;
    white-space: nowrap;
}

.dashboard-calendar-table td.cash-balance-col {
    min-width: 110px;
    text-align: right;
    white-space: nowrap;
}

.dashboard-calendar-table th.cash-balance-head,
.dashboard-calendar-table td.cash-balance-col {
    background-color: #f5deb3 !important;
}

.dashboard-calendar-table td.summary-label {
    text-align: center;
}

.dashboard-calendar-table .mid-total-row td {
    background-color: #eef3f7 !important;
}

.dashboard-calendar-table .month-total-row td {
    background-color: #dbe6ef !important;
}

.dashboard-calendar-table tr.today-row td {
    background-color: #dff3df !important;
}

.dashboard-calendar-table td.day-col.is-saturday,
.dashboard-calendar-table td.weekday-col.is-saturday,
.dashboard-calendar-table td.memo-col.is-saturday,
.dashboard-calendar-table td.content-col.is-saturday,
.dashboard-calendar-table td.amount-col.is-saturday,
.dashboard-calendar-table td.balance-col.is-saturday {
    background-color: #eaf4ff;
}

.dashboard-calendar-table td.day-col.is-sunday-holiday,
.dashboard-calendar-table td.weekday-col.is-sunday-holiday,
.dashboard-calendar-table td.memo-col.is-sunday-holiday,
.dashboard-calendar-table td.content-col.is-sunday-holiday,
.dashboard-calendar-table td.amount-col.is-sunday-holiday,
.dashboard-calendar-table td.balance-col.is-sunday-holiday {
    background-color: #fdecec;
}

.dashboard-calendar-table tr:not(.today-row) td.day-col:not(.is-saturday):not(.is-sunday-holiday),
.dashboard-calendar-table tr:not(.today-row) td.weekday-col:not(.is-saturday):not(.is-sunday-holiday),
.dashboard-calendar-table tr:not(.today-row) td.memo-col:not(.is-saturday):not(.is-sunday-holiday) {
    background-color: #ffffff !important;
}

.dashboard-calendar-table th.payment-group-head,
.dashboard-calendar-table th.payment-head {
    background-color: #f5deb3;
}

.dashboard-calendar-toolbar {
    flex-wrap: nowrap;
}

.dashboard-calendar-control-form {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
}

.dashboard-calendar-show-btn {
    white-space: nowrap;
    min-width: 58px;
}

.dashboard-carry-label {
    white-space: nowrap;
}

.dashboard-carry-input {
    width: 120px;
    min-width: 120px;
}

.dashboard-carry-save-btn {
    white-space: nowrap;
    min-width: 58px;
}

.dashboard-calendar-title {
    min-width: 0;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-calendar-created {
    white-space: nowrap;
    flex: 0 0 auto;
}

li{
    list-style:none;
}

#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* 他の要素の上に表示 */
    background-color: #fff; /* 背景色を指定しないと下が透けます */
    /* padding: 10px; */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 影で浮かせると自然 */
}

.top-nav-bar {
    background-color: #fdf6e6;
    color: #2c2c2c;
    padding: 8px 0;
}

#top-nav.theme-finance .top-nav-bar {
    background-color: #e9f2ff;
    color: #1f2937;
}

#top-nav.theme-myself .top-nav-bar {
    background-color: #e8f7ef;
    color: #1f2937;
}

#top-nav.theme-message .top-nav-bar {
    background-color: #fff6d6;
    color: #1f2937;
}

.top-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    position: relative;
}

.top-nav-left,
.top-nav-center,
.top-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-nav-left {
    min-width: 0;
}

.top-nav-center {
    flex: 1;
    justify-content: center;
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
}

.top-nav-right {
    min-width: 0;
    justify-content: flex-end;
    gap: 12px;
}

.top-nav-brand {
    font-weight: 700;
    font-size: 20px;
    color: #2c2c2c;
    text-decoration: none;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.top-nav-brand-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

#top-nav.theme-finance .top-nav-brand,
#top-nav.theme-finance .top-nav-service-label,
#top-nav.theme-finance .top-nav-field-label,
#top-nav.theme-finance .top-nav-icon,
#top-nav.theme-finance .menu-toggle i {
    color: #1f2937;
}

#top-nav.theme-finance .top-nav-icon {
    border-color: #bcd3ff;
    background-color: #ffffff;
}

#top-nav.theme-myself .top-nav-brand,
#top-nav.theme-myself .top-nav-service-label,
#top-nav.theme-myself .top-nav-field-label,
#top-nav.theme-myself .top-nav-icon,
#top-nav.theme-myself .menu-toggle i {
    color: #1f2937;
}

#top-nav.theme-myself .top-nav-icon {
    border-color: #7bc89c;
    background-color: #ffffff;
}

#top-nav.theme-message .top-nav-brand,
#top-nav.theme-message .top-nav-service-label,
#top-nav.theme-message .top-nav-field-label,
#top-nav.theme-message .top-nav-icon,
#top-nav.theme-message .menu-toggle i {
    color: #1f2937;
}

#top-nav.theme-message .top-nav-icon {
    border-color: #f3b11a;
    background-color: #ffffff;
}

.top-nav-service-label {
    font-weight: 700;
    color: #c45a00;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
    text-decoration: none;
}

.top-nav-service-label:hover {
    text-decoration: none;
    opacity: 0.85;
}

#top-nav.theme-finance .top-nav-service-label {
    color: #1e40af;
}

#top-nav.theme-myself .top-nav-service-label {
    color: #166534;
}

#top-nav.theme-message .top-nav-service-label {
    color: #9a5c00;
}

#top-nav.theme-finance .top-nav-group-name {
    color: #1e40af;
    border-color: rgba(30, 64, 175, 0.25);
    background: rgba(30, 64, 175, 0.12);
}

#top-nav.theme-myself .top-nav-group-name {
    color: #166534;
    border-color: rgba(22, 101, 52, 0.25);
    background: rgba(22, 101, 52, 0.12);
}

#top-nav.theme-message .top-nav-group-name {
    color: #9a5c00;
    border-color: rgba(154, 92, 0, 0.25);
    background: rgba(154, 92, 0, 0.12);
}

#top-nav.theme-finance .top-nav-brand {
    color: #1e40af;
}

#top-nav.theme-myself .top-nav-brand {
    color: #166534;
}

#top-nav.theme-message .top-nav-brand {
    color: #9a5c00;
}

.menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #2c2c2c;
    background-color: transparent;
}

.menu-toggle i {
    color: #2c2c2c;
    font-size: 20px;
}

#top-nav.theme-finance .menu-toggle {
    border-color: #bcd3ff;
    background-color: #ffffff;
}

#top-nav.theme-myself .menu-toggle {
    border-color: #7bc89c;
    background-color: #ffffff;
}

#top-nav.theme-message .menu-toggle {
    border-color: #f3b11a;
    background-color: #ffffff;
}

.myself-nav-wrap {
    display: inline-block;
    min-width: 200px;
    max-width: 260px;
}

.myself-nav-select {
    border-color: #166534;
    background-color: #e8f7ef;
    color: #166534;
    font-weight: 600;
}

.myself-nav-select:focus {
    border-color: #166534;
    box-shadow: 0 0 0 0.2rem rgba(22, 101, 52, 0.2);
}

.resume-nav-wrap {
    display: inline-block;
    min-width: 200px;
    max-width: 260px;
}

.resume-nav-select {
    border-color: #3a7ca5;
    background-color: #eaf4fb;
    color: #3a7ca5;
    font-weight: 600;
}

.resume-nav-select:focus {
    border-color: #3a7ca5;
    box-shadow: 0 0 0 0.2rem rgba(58, 124, 165, 0.2);
}

.nav-guide-row {
    margin-top: 0;
    margin-bottom: 12px;
}

.mylist-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #166534;
    background-color: #e8f7ef;
    border: 1px solid #7bc89c;
}

.top-nav-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-nav-field-label {
    font-size: 12px;
    color: #4a4a4a;
    white-space: nowrap;
}

.top-nav-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #d6d0c5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2c2c2c;
    text-decoration: none;
    background-color: #fff;
}

.top-nav-icon:hover {
    color: #2c2c2c;
    text-decoration: none;
    background-color: #f3efe6;
}

@media (max-width: 768px) {
    .top-nav-bar {
        padding: 4px 0;
    }

    .top-nav-center {
        position: static;
        flex: 1;
        pointer-events: auto;
    }

    .top-nav-brand {
        display: inline-flex;
        font-size: 18px;
    }

    .top-nav-inner {
        gap: 6px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
    }

    .top-nav-icon {
        width: 32px;
        height: 32px;
    }
}

#calendar {
    background-color: #eef4f7;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.fc .fc-daygrid-day-top {
    font-weight: bold;
    color: #4f6c7a;
    font-size: 0.95rem;
}

.fc .fc-toolbar-title {
    padding: 0 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: #3f5b66;
}

.fc .fc-button {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}
.fc .fc-button-primary {
    color: #4f6c7a;
    background-color: #e2edf2;
    border: none;
}

.fc .fc-button-primary:hover {
    background-color: #d6e3e9;
    color: #3f5b66;
}
.fc .fc-col-header-cell-cushion {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
}
.fc .fc-col-header-cell {
    background-color: #4f6c7a;
}
.fc .fc-col-header-cell-cushion {
    padding: 6px 0;
}
.fc .fc-daygrid-body tr:nth-child(even) .fc-daygrid-day {
    background-color: #e4edf1;
}
.fc .fc-daygrid-body tr:nth-child(odd) .fc-daygrid-day {
    background-color: #ffffff;
}

/* Highlight today on all FullCalendar views */
.fc .fc-day-today {
    background-color: #4f6c7a !important;
}
.fc .fc-day-today * {
    color: white !important;
}
.fc .fc-daygrid-day.fc-day-today {
    background-color: #4f6c7a !important;
}

.fc .fc-daygrid-day.fc-day-selected {
    position: relative;
    background-color: #d18b5a !important;
    border-radius: 4px;
    box-shadow: inset 0 0 0 2px #fff;
}

.fc .fc-daygrid-day.fc-day-selected * {
    color: #ffffff !important;
}

/* Style the FullCalendar "Today" button in the toolbar */
.fc .fc-toolbar .fc-today-button {
    background-color: #4f6c7a !important;
    color: white !important;
    border: none !important;
    border-radius: 4px;
}
.fc .fc-today-button:disabled {
  background-color: #6b8a98 !important;
  color: white !important;
  opacity: 1 !important;
  cursor: default;
}

.fc .fc-daygrid-event {
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}
/* public/css/main.css などに追加 */
.nav-tabs .nav-link.history-active {
  border: 1px solid #4caf50;
  border-bottom: none;
  background-color: #e6f4ea;
  color: #4caf50 !important;
}
.history-category-active {
  border: 1px solid #4caf50;
  border-bottom: none;
  background-color: #e6f4ea;
  color: #4caf50 !important;
}

/* histoiryコメント部分の表示制限 */
.content-preview {
max-height: 6.5em; /* 約5行分（1行あたり約1.3em） */
overflow: hidden;
position: relative;
}

.content-preview::after {
content: '...';
position: absolute;
bottom: 0;
right: 0;
background: linear-gradient(to right, transparent, white);
padding-left: 10px;
}

.content-full {
display: none;
}

.truncate-text {
display: block;
max-height: 6.5em;
overflow: hidden;
position: relative;
line-height: 1.3em;
}

.truncate-text::after {
content: '...';
position: absolute;
bottom: 0;
right: 0;
background: linear-gradient(to right, transparent, white);
padding-left: 10px;
}
.category-label-box {
  display: inline-block;
  min-width: 200px;
  padding: 8px 12px;
  border-radius: 5px;
  color: white;
}

.section-title {
    border-bottom: 3px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-weight: bold;
}

@keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
}

@media (max-width: 768px) {  /* 画面幅 768px 以下 (スマホサイズ) */
    .hide-on-mobile {
        display: none;
    }

    .info-popup {
        left: 100%;  
        transform: translateX(-100%);
        max-width: 90vw; /* 画面の90%以内に収める */
        white-space: normal; /* テキストを折り返す */
    }

    .limited-text3 {
        width: 48px;  /* 最大幅を設定 */
    }
    main {
        padding: 10px;
    }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        width: 100%;
        table-layout: auto;
    }

    .dashboard-calendar-table th,
    .dashboard-calendar-table td {
        font-size: 0.78rem;
        padding: 3px 4px;
    }

    .dashboard-calendar-table td.content-col {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }

    .dashboard-calendar-table th.content-head {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }

    .dashboard-calendar-table th.memo-head,
    .dashboard-calendar-table td.memo-col {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
    }

    .dashboard-calendar-table th.payment-head,
    .dashboard-calendar-table td.payment-amount-col {
        min-width: 96px;
    }

    .dashboard-calendar-table th.cash-balance-head,
    .dashboard-calendar-table td.cash-balance-col {
        min-width: 96px;
    }

    .dashboard-carry-input {
        width: 96px;
        min-width: 96px;
    }

}

@media (max-width: 670px) {  /* 画面幅 768px 以下 (スマホサイズ) */
    main {
        padding: 10px;
    }
}

/* MyDiary calendar */
.diary-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.diary-calendar-card,
.diary-list-card {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(31, 56, 86, 0.08);
  padding: 20px;
}

.diary-calendar-card {
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
}

.diary-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.diary-month {
  font-weight: 600;
  color: #273b5c;
  font-size: 1.1rem;
}

.diary-nav-btn {
  border: none;
  background: #eef2f7;
  color: #6b7c93;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.diary-nav-btn:hover {
  background: #e1e8f2;
  transform: translateY(-1px);
}

.diary-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 0.78rem;
  color: #9aa6b2;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.diary-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.diary-empty-cell {
  height: 36px;
}

.diary-day {
  border: none;
  background: transparent;
  color: #334a6d;
  font-weight: 500;
  border-radius: 999px;
  height: 36px;
  width: 36px;
  justify-self: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.diary-day:hover {
  background: #e8eff8;
}

.diary-day.is-today {
  border: 1px solid #93a8c7;
}

.diary-day.is-selected {
  background: #2f6ad9;
  color: #ffffff;
}

.diary-selected-date {
  font-weight: 600;
  color: #273b5c;
  margin-bottom: 12px;
}

.diary-section {
  padding: 12px 0 6px;
  border-top: 1px solid #edf1f6;
}

.diary-section:first-of-type {
  border-top: none;
}

.diary-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a5b74;
  margin-bottom: 10px;
}

.diary-group {
  margin-bottom: 12px;
}

.diary-group-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5b74;
  margin-bottom: 8px;
  display: inline-flex;
}

.diary-tag-group {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #e6edf7;
  color: #2f4a6d;
}

.diary-entry {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f9fc;
  margin-bottom: 10px;
  text-align: left !important;
}

.diary-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.diary-line-first {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.diary-line-first .diary-tags {
  margin-bottom: 0;
}

.diary-tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #e6edf7;
  color: #2f4a6d;
}

.diary-tag-event {
  background: #e7f2ff;
  color: #2f6ad9;
}

.diary-tag-category {
  background: #f0f2f6;
  color: #556377;
}

.diary-month-tags {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #d7dde7;
}

.diary-month-tags-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #3e556d;
  margin-bottom: 8px;
}

.diary-tag-month-top {
  background: #e6f4e8;
  color: #2e6b3f;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 12px;
}

.diary-tag-month-sub {
  background: #f1f3f6;
  color: #6a7280;
  font-size: 0.72rem;
  padding: 2px 8px;
}

.diary-tag-count {
  font-size: 0.72em;
  color: inherit;
  opacity: 0.8;
}

.diary-month-tag-btn {
  border: none;
  cursor: pointer;
}

.diary-tag-remove {
  margin-left: 6px;
  font-weight: 700;
  opacity: 0.7;
}

.diary-tag-remove:hover {
  opacity: 1;
}

.diary-month-tag-btn:focus-visible {
  outline: 2px solid rgba(46, 107, 63, 0.4);
  outline-offset: 2px;
}

.diary-keyword-link-box {
  background: #f8fafc;
  border: 1px solid #d7dde7;
}

.diary-tag-highlight {
  background: #fff3a3;
  padding: 0 2px;
  border-radius: 2px;
}

.diary-tag-modal-entry {
  padding: 10px 0;
  border-bottom: 1px solid #e6e9ef;
}

.diary-tag-modal-entry:last-child {
  border-bottom: none;
}

.diary-tag-modal-date {
  font-size: 0.78rem;
  color: #6c7a89;
  margin-bottom: 4px;
}

.diary-tag-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2f3b4a;
  margin-bottom: 6px;
}

.diary-tag-modal-content {
  white-space: pre-wrap;
  font-size: 0.88rem;
  color: #3b4654;
}

.diary-tag-modal-summary {
  font-size: 0.82rem;
  color: #536170;
  margin-bottom: 6px;
}

.diary-tag-keyword {
  background: #e6f4e8;
  color: #2e6b3f;
  font-weight: 600;
  padding: 2px 10px;
}

.diary-tag-item {
  background: #f2f4f8;
  color: #516072;
}

.diary-tag-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.diary-keyword-map {
  position: relative;
  min-height: 360px;
  border-radius: 16px;
  border: 1px dashed #cfd7e3;
  background: radial-gradient(circle at top left, #f7fbf8 0%, #eef3f7 50%, #f8f9fb 100%);
  overflow: hidden;
}

.diary-keyword-node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(230, 244, 232, 0.9);
  color: #2e6b3f;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(40, 60, 80, 0.08);
}

.diary-keyword-node.is-highlight {
  background: #fff3a3;
  color: #4c3b00;
  box-shadow: 0 8px 18px rgba(120, 98, 0, 0.2);
}

.diary-keyword-remove {
  font-weight: 700;
  line-height: 1;
}

.diary-rank-number {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2f3b4a;
  min-width: 2.2rem;
  text-align: right;
}

.diary-rank-tag {
  font-size: 1rem;
  padding: 4px 12px;
}

.diary-settings-tabs {
  border-bottom: 2px solid #d1d8e4;
}

.diary-settings-tabs .nav-link {
  border: 2px solid transparent;
  border-bottom: none;
  color: #516072;
  font-weight: 700;
  padding: 10px 18px;
  background: #f2f4f8;
  margin-right: 6px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.diary-settings-tabs .nav-link.active {
  background: #ffffff;
  color: #2f3b4a;
  border-color: #4A6A7A;
  box-shadow: 0 -2px 8px rgba(52, 78, 97, 0.12);
}

.diary-settings-tabs .nav-link:focus-visible {
  outline: 2px solid rgba(74, 106, 122, 0.4);
  outline-offset: 2px;
}

.diary-tag-cf.is-income {
  background: #e7f6ee;
  color: #1f7a4a;
}

.diary-tag-cf.is-saving {
  background: #e7f1ff;
  color: #2a5fa8;
}

.diary-tag-cf.is-deduction {
  background: #fff2e3;
  color: #a35a00;
}

.diary-tag-cf.is-expense {
  background: #ffe9e9;
  color: #b3261e;
}

.diary-entry-body {
  display: block;
  text-align: left !important;
  align-items: start;
}

.diary-entry-body > * + * {
  margin-top: 4px;
}

.diary-entry-title {
  font-weight: 600;
  color: #2c3e57;
  font-size: 0.9rem;
  text-align: left !important;
  justify-self: stretch;
}

.diary-meal-group {
  margin-bottom: 16px;
}

.diary-meal-group-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5b74;
  margin-bottom: 8px;
}

.diary-meal-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.diary-meal-card {
  height: 100%;
}

.diary-meal-top-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.diary-meal-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #e8edf5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #7b8798;
}

.diary-meal-set-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.diary-meal-thumb-set {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.diary-meal-thumb-empty {
  border: 1px dashed #d1d8e2;
}

.diary-meal-name {
  font-weight: 600;
  color: #2c3e57;
  font-size: 0.95rem;
}

.diary-meal-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diary-meal-comment {
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #f7f9fc;
  border: 1px dashed #d7dde7;
}

.diary-meal-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.diary-meal-comment-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a5b74;
}

.diary-meal-comment-body {
  white-space: pre-wrap;
  font-size: 0.88rem;
  color: #2c3e57;
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid #e6edf7;
}

.diary-meal-comment-body.is-empty {
  color: #7b8798;
}


.diary-tag-genre {
  background: #e7f2ff;
  color: #2f6ad9;
}

.diary-tag-kind {
  background: #f0f2f6;
  color: #556377;
}

@media (max-width: 1100px) {
  .diary-meal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diary-meal-set-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .diary-meal-grid {
    grid-template-columns: 1fr;
  }

  .diary-meal-set-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.diary-entry-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.diary-entry-content {
  color: #2c3e57;
  font-size: 0.9rem;
}

.diary-content-preview {
  text-align: left;
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  max-height: calc(1.5em * 3);
  margin: 0;
  text-indent: 0;
  justify-self: stretch;
  align-self: start;
  width: 100%;
  text-align: left !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

.diary-entry-body * {
  text-align: left !important;
}

.diary-content-text {
  text-align: left !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  justify-self: stretch;
  width: 100%;
}

.diary-content-preview:focus {
  outline: 2px solid rgba(47, 106, 217, 0.35);
  outline-offset: 2px;
}

.diary-entry-meta {
  color: #6c7a8f;
  font-size: 0.78rem;
}

.diary-rate {
  display: flex;
  gap: 3px;
}

.diary-star {
  color: #ccd5e2;
  font-size: 0.95rem;
}

.budget-summary-card {
  background: #f7f9fc;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid #edf1f6;
}

.budget-summary-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.budget-summary-title {
  font-weight: 600;
  color: #2c3e57;
  font-size: 0.95rem;
}

.budget-summary-rate {
  font-weight: 700;
  color: #2c3e57;
  font-size: 0.95rem;
}

.budget-summary-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #e6edf7;
  color: #2f4a6d;
}

.budget-summary-tag.is-over {
  background: #ffe6e6;
  color: #d93025;
}

.finance-tone-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #edf1f6;
  box-shadow: 0 14px 28px rgba(31, 56, 86, 0.08);
}

.finance-tone-header {
  background-color: #4A6A7A;
}

.finance-top-card {
  border-radius: 18px;
  overflow: hidden;
}
.budget-summary-rate.is-over,
.budget-item-rate.is-over {
  color: #d93025;
}

.budget-summary-subtitle {
  font-size: 0.78rem;
  color: #6c7a8f;
  margin-bottom: 8px;
}

.budget-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a5b74;
  margin: 6px 0;
}

.budget-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.budget-cards-normal {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.budget-item-card {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  width: 100%;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
}

.budget-item-card.is-normal {
  padding: 5px 10px;
  font-size: 0.72rem;
  border-radius: 999px;
}

.budget-item-card.is-normal .budget-item-name {
  font-size: 0.73rem;
  font-weight: 600;
}

.budget-item-card.is-normal .budget-item-rate,
.budget-item-card.is-normal .budget-item-amount {
  font-size: 0.66rem;
}

.budget-item-name {
  color: #2c3e57;
  font-weight: 600;
  font-size: 0.85rem;
}

.budget-item-rate {
  font-weight: 600;
  color: #2c3e57;
}

.budget-item-amount {
  color: #6c7a8f;
}

.budget-item-card.is-over {
  background: #fff1f1;
  border-color: #f3c6c6;
}

.budget-item-card.is-over .budget-item-name,
.budget-item-card.is-over .budget-item-rate {
  color: #d93025;
}
.budget-item-card.is-clickable {
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.budget-item-card.is-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(24, 39, 75, 0.12);
}

.recent-finance-card {
  background: #f7f9fc;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid #edf1f6;
}
.finance-close-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.finance-close-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #e6edf7;
  box-shadow: 0 10px 18px rgba(31, 56, 86, 0.06);
}
.finance-close-card-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #3a4a63;
  font-size: 0.85rem;
}
.finance-close-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.finance-close-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #d6dde9;
  background: #f5f7fb;
  color: #41506a;
}
.finance-close-tag.is-done {
  border-color: rgba(20, 112, 67, 0.35);
  background: #eaf6ef;
  color: #0f6b3f;
}
.finance-close-tag.is-pending {
  border-color: rgba(217, 48, 37, 0.25);
  background: #fff4f3;
  color: #b3261e;
}
.finance-close-tag.is-clickable {
  cursor: pointer;
  border: 1px solid rgba(20, 112, 67, 0.45);
  background: #eaf6ef;
}
.finance-close-tag.is-clickable:hover {
  filter: brightness(0.98);
}
.finance-close-tag.is-clickable:active {
  transform: scale(0.98);
}
.finance-close-tag.is-clickable:focus-visible {
  outline: 2px solid rgba(20, 112, 67, 0.35);
  outline-offset: 2px;
}

.service-group-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-group-row {
  border: 1px solid #eef1f6;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fafbff;
}
.service-group-title {
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}
.service-group-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service-group-check {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e4e9f2;
}
.service-member-grid {
  display: grid;
  gap: 12px;
}
.service-member-card {
  border: 1px solid #e7ecf4;
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
}
.service-member-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #374151;
}
.service-member-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: #2a4e8a;
}

.finance-tone-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #edf1f6;
  box-shadow: 0 14px 28px rgba(31, 56, 86, 0.08);
}

.finance-tone-header {
  background-color: #4A6A7A;
}

@media (max-width: 1100px) {
  .budget-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .budget-cards-normal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .budget-cards {
    grid-template-columns: 1fr;
  }
  .budget-cards-normal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finance-close-cards {
    grid-template-columns: 1fr;
  }
}

.diary-star.is-filled {
  color: #f2b544;
}

.diary-empty {
  padding: 10px 0 6px;
  color: #8a97a8;
  font-size: 0.85rem;
}

.diary-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: #2f6ad9;
  color: #ffffff;
  font-size: 1.6rem;
  box-shadow: 0 14px 28px rgba(47, 106, 217, 0.35);
  z-index: 1080;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.diary-fab:active {
  cursor: grabbing;
  transform: scale(0.98);
}

.diary-modal .modal-content {
  border-radius: 18px;
  border: none;
  box-shadow: 0 22px 40px rgba(31, 56, 86, 0.18);
}

.diary-modal .modal-header {
  border-bottom: 1px solid #eef2f7;
}

.diary-modal .modal-footer {
  border-top: 1px solid #eef2f7;
}

@media (max-width: 992px) {
  .diary-layout {
    grid-template-columns: 1fr;
  }
}
