body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f2f2f2;
}

.container {
    width: 100%;
    max-width: 350px;      /* ensures perfect mobile width */
    margin: 40px auto;
    padding: 20px;
    min-height: 300px;
}

.login-form, .change-password-form, .contact-form {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.logo-txt {
    text-align: center;
    font-size: 26px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-style: italic;
    font-family: cursive;
    color: brown;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    height: 40px;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.filter-input {
    width: 150px !important;
}
.text-danger {
    color: #c00;
}
.password-reset-txt {
    margin-top: 6px;
    font-size: 14px;
    text-align: right;
}

.submit-btn button {
    width: 100%;
    padding: 12px;
    background: brown;
    color: white;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid brown;
}

.submit-btn button:hover {
    background: #cc9696;
}

.btn-primary {
    background-color: #5fe1dfe0 !important;
    border: 1px solid #5fe1dfe0 !important;
    color: #000000 !important;
}

.btn-primary:hover {
    background-color: #cc9696; !important;
}
.register-link {
    margin-top: 15px;
    text-align: center;
}

.register-link-txt {
    font-size: 14px;
}

.error {
    color: red;
    text-align: center;
    margin-bottom: 15px;
}

.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* Compact top settings */
.settings-bar {
    min-height: 36px;
}

.settings-select {
    width: 72px;
    /*min-width: 70px;*/
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.8rem;
    border: none !important;
    /*border: 1px solid #e0e0e0;*/
    background-color: #fff;
}

.settings-select:focus {
    box-shadow: none;
    border-color: #bbb;
}

.settings-bar i {
    color: brown;
    font-size: larger;
}

th {
    cursor: pointer;
}
/* Extra small device adjustments */
@media (max-width: 480px) {
    .login-form, .change-password-form, .contact-form {
        padding: 20px;
    }
    .logo-txt {
        font-size: 22px;
    }
    .container {
        min-height: 400px;
    }
    .filter-input {
        width: 100% !important;
    }
}

/* Register form box style */
.register-form {
    background: #fff;
    max-width: 350px;
    margin: 40px auto;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.page-title {
    text-align: left;
    margin-bottom: 20px;
}

.login-link {
    margin-top: 15px;
    text-align: center;
}

.login-link-txt {
    font-size: 14px;
}

.reset-form {
    background: #fff;
    max-width: 350px;
    margin: 40px auto;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.message {
    color: #1b21da;
    text-align: center;
    margin-bottom: 12px;
}

.privacy-sub-title, .terms-sub-title, .contact-sub-title {
    font-family: cursive;
    color: #16b1af;
    font-weight: bold;
    font-style: italic;
}

.privacy-text, .terms-text, .contact-text {
    color: #a52a2ac9;
}
.privacy-sub-text {
    color: brown;
}
.privacy-contact-link, .terms-contact-link {
    text-decoration: auto;
    color: #16b1af;
    font-weight: bold;
}

.show-month-select {
    border: none;
    outline: none;
    color: brown;
    font-weight: bold;
}

/* Mobile form spacing */
.transaction-form label { width: 100%; }

.btn-div {
    margin-top: 15px;
    text-align: center;
    display: flex;
    justify-content: center;
    button {
        width: 150px;
        margin: 10px;
    }
}

/* Mobile table scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table th, table td {
    white-space: nowrap;
}

/* Income = 緑 */
.income-row {
    td {
        background-color: #5fe1dfe0  !important;
    }
}

/* Expense = 赤 */
.expense-row {
    td {
        background-color: #4a46460f !important;
    }
}

/* 行にマウスを置いたときの色（薄い影） */
.transaction-row:hover {
    filter: brightness(0.97);
    cursor: pointer;
}

.page-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    font-style: italic;
    font-family: cursive;
    margin-top: 30px;
    color: brown;
}

@media (max-width: 576px) {
    .transaction-form .col-md-3,
    .transaction-form .col-md-4,
    .transaction-form .col-md-6 {
        margin-bottom: 15px;
    }

    .btn-div {
        button {
            width: 45%;
            margin:10px;
        }
    }

    .container {
        min-height: 400px;
    }

    .filter-input {
        width: 100% !important;
    }
}