@charset "UTF-8";
/* homeヘッダー */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 40px;
  border-bottom: 1px solid #a7a7a7;
  background-color: white;
}
header .title {
  font-size: 1.3em;
  font-weight: bold;
  color: #333;
}
header .logo {
  margin-right: auto;
}
header .logo img {
  max-height: 90px;
  border-radius: 5px;
}
header .auth-actions a {
  margin-left: 15px;
  padding: 8px 18px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s, color 0.2;
}
header .auth-actions a.primary-btn {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
header .auth-actions a.primary-btn:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}
header .auth-actions a.secondary-btn {
  background-color: #474646;
  color: white;
  border-color: #474646;
}
header .auth-actions a.secondary-btn:hover {
  background-color: #8d8d8d;
  border-color: #8d8d8d;
}

/* home画面 */
.home-container {
  display: flex;
  flex-direction: column;
  /* min-height: 100vh; */
  background-color: rgb(231, 223, 211);
}

.home-main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 40px;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  min-height: 100vh;
  /* 背景画像 */
  background-image: url("/images/homepage.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  overflow: hidden;
}

.home-content {
  margin-left: 50px;
  padding-left: 50px;
}
.home-content h1 {
  font-size: 2.8em;
  color: #ffebeb;
  margin-bottom: 20px;
  line-height: 1.3;
}
.home-content .description {
  font-size: 1.1em;
  font-weight: 300;
  color: #ffebeb;
  margin-bottom: 30px;
  line-height: 1.6;
}
.home-content .cta-btn {
  display: inline-block;
  width: 8em;
  padding: 12px 25px;
  background-color: #28a745;
  color: #333;
  border: none;
  border-radius: 6px;
  font-size: 1.2em;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s;
}
.home-content .cta-btn:hover {
  background-color: #218838;
}

@media (max-width: 768px) { /* レスポンシブ対応 */
  .home-header {
    padding: 15px 20px;
    flex-direction: column;
  }
  .home-header .logo {
    max-height: 90px;
    margin: auto;
  }
  .auth-actions {
    margin-right: 20px;
  }
  .home-main {
    flex-direction: column;
    text-align: center;
    padding: 30px 10px;
    width: 95%;
    min-height: 300px;
    padding-bottom: 50px;
  }
  .home-content {
    height: 400px;
    padding-right: 50px;
    margin-right: 50px;
    width: 400px;
  }
  .home-content h1 {
    font-size: 2em;
  }
}
/* homeのスライダー */
.swiper-container {
  flex: 1;
  position: relative;
  height: 600px;
  border-radius: 20px;
  overflow: hidden;
  margin-right: 5em;
}

.swiper-wrapper {
  text-align: center;
  font-size: 18px;
  background: #e9ecef;
}

.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
  color: #fff;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  width: 60px !important;
  height: 60px !important;
  margin-top: -20px !important;
}
.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 20px !important;
}

.swiper-pagination {
  bottom: 30px !important;
}

.swiper-pagination-bullet {
  background: #151515;
  opacity: 0.7;
}

.swiper-pagination-bullet-active {
  background: #007bff;
  opacity: 1;
}

@media (max-width: 767px) { /* レスポンシブ対応(スライダー) */
  .swiper-container {
    height: 150px;
    width: 400px;
    margin-left: 80px;
  }
  .swiper-button-next,
  .swiper-button-prev {
    width: 45px !important;
    height: 45px !important;
    margin-top: -23px !important;
  }
  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 18px !important;
  }
}
/* 二段目 */
.home-secondary {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 40px;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  min-height: 100vh;
  /* 背景画像 */
  background-image: url("/images/home_graph.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  overflow: hidden;
}
.home-secondary .content {
  width: 100%;
  height: 600px;
  display: flex;
  padding: 30px;
  margin: 70px;
}
.home-secondary .content .left-item {
  width: 100%;
  height: 100%;
  margin: 40px;
  flex: 2;
}
.home-secondary .content .left-item img {
  display: block;
  width: 100%;
  height: 100%;
}
.home-secondary .content .right-item {
  color: rgb(255, 255, 255);
  font-size: 2.4em;
  font-weight: 600;
  padding: 140px 50px 80px 50px;
  margin: 40px;
  flex: 1;
}

@media (max-width: 768px) { /*レスポンシブ対応(2段目)*/
  .home-secondary {
    flex-direction: column;
    text-align: center;
    padding: 30px 10px;
    width: 95%;
    min-height: 500px;
    padding-bottom: 50px;
  }
  .home-secondary .content {
    flex-direction: column;
    padding: 0px;
    height: 500px;
  }
  .home-secondary .content .left-item {
    margin: 0px;
    padding: 0px;
    padding-top: 10px;
  }
  .home-secondary .content .right-item {
    color: #5d5d5d;
    padding-top: 50px;
    font-size: 1.8em;
    text-align: center;
    padding-top: 0px;
    margin-top: 50px;
    text-align: left;
  }
}
/* フッター */
footer {
  background-color: #333;
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer .footer-content {
  flex-grow: 1;
  display: flex;
}
footer .footer-content .title {
  color: white;
  margin: 0 0 10px 0;
  font-size: 1.1em;
}
footer .footer-content .home-logo {
  flex-shrink: 0;
  margin-left: auto;
}
footer .footer-content .home-logo img {
  max-height: 100px;
  border-radius: 5px;
}

/* ログイン画面等 */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  padding: 20px;
  background-color: #f0f2f5;
  text-align: center;
}
.auth-container .auth-card {
  background-color: white;
  padding: 30px 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
  text-align: left;
}
.auth-container .auth-card h2 {
  text-align: center;
  color: #333;
  margin-bottom: 25px;
}
.auth-container .auth-card .auth-form {
  margin-bottom: 30px;
}
.auth-container .auth-card .auth-links {
  margin-top: 25px;
  text-align: center;
  font-size: 0.9em;
}
.auth-container .auth-card .auth-links a {
  color: #007bff;
  text-decoration: none;
  margin: 0 5px;
}
.auth-container .auth-card .auth-links a:hover {
  text-decoration: underline;
}

.auth-form-group {
  margin-bottom: 30px;
}
.auth-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #495057;
}
.auth-form-group .auth-form-control {
  width: 100%;
  margin-top: -2px;
  padding: 12px 15px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 1em;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.auth-form-group .auth-form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.actions input[type=submit] {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
  text-decoration: none;
}
.actions input[type=submit]:hover {
  background-color: #0056b3;
}

/* Deviseのエラーメッセージ */
#error_explanation {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

#error_explanation h2 {
  font-size: 1.1em;
  margin-top: 0;
  margin-bottom: 5px;
  text-align: left;
}

#error_explanation ul {
  margin-bottom: 0;
  padding-left: 20px;
  text-align: left;
}

.back {
  display: block;
  margin-top: 20px;
}

/* 全体の基本設定 */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
}

/* ヘッダー */
.dashboard-header {
  background-color: #343a40;
  color: white;
  padding: 8px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  box-sizing: border-box;
}
.dashboard-header .header-left-items {
  display: flex;
  align-items: center;
}
.dashboard-header .header-left-items .logo {
  font-weight: bold;
  font-size: 1.4em;
  max-height: 60px;
  border-radius: 5px;
}
.dashboard-header .header-left-items .title {
  font-weight: bold;
  font-size: 2em;
  color: white;
  margin-left: 30px;
  text-shadow: 1px 1px 0 #000, 2px 2px 2px rgb(128, 113, 113);
}
.dashboard-header .header-right-items {
  display: flex;
  align-items: center;
}
.dashboard-header .header-right-items #hamburger-menu {
  background: none;
  border: none;
  padding: 0;
  width: 35px;
  height: 25px;
  position: relative;
  cursor: pointer;
}
.dashboard-header .header-right-items #hamburger-menu .line {
  display: block;
  background-color: white;
  height: 4px;
  width: 100%;
  border-radius: 3px;
  position: absolute;
  left: 0;
}
.dashboard-header .header-right-items #hamburger-menu .line-1 {
  top: 0;
}
.dashboard-header .header-right-items #hamburger-menu .line-2 {
  top: 50%;
  transform: translateY(-50%);
}
.dashboard-header .header-right-items #hamburger-menu .line-3 {
  bottom: 0;
}

/* メイン画面 */
.dashboard-main {
  padding: 20px;
}

.month-display {
  display: flex;
  justify-content: center;
  max-width: 250px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.2em;
  font-weight: bold;
}

.dashboard-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

/* PC画面でのグリッドレイアウト */
@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.dashboard-section {
  background-color: white;
  border: 1px solid;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* セクション内のリストテンプレ */
}
.dashboard-section h3 {
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
  color: #495057;
}
.dashboard-section p {
  font-weight: bold;
}
.dashboard-section .dashboard-list {
  list-style: none;
  width: fit-content;
  margin: 0 auto;
  padding-left: 0;
}
.dashboard-section .dashboard-list .dashboard-item {
  display: flex;
  align-items: center;
  margin: 30px 20px;
  font-size: 1.1em;
}

/* 支出ランキングセクション */
.category-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin-right: 18px;
  margin-left: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  color: #555;
}

/* 天気予報セクション */
.weather-tokyo, .weather-osaka, .weather-fukuoka {
  width: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
}
.weather-tokyo .telop, .weather-osaka .telop, .weather-fukuoka .telop {
  color: #262626;
  font-weight: bold;
  width: 200px;
  margin-right: 20px;
}
.weather-tokyo .max-temp, .weather-osaka .max-temp, .weather-fukuoka .max-temp {
  color: #ff4500; /* 例：オレンジレッド */
  font-weight: bold; /* 少し太字にするとより目立ちます */
  width: 200px;
}
.weather-tokyo .min-temp, .weather-osaka .min-temp, .weather-fukuoka .min-temp {
  color: #1e90ff;
  font-weight: bold;
  width: 200px;
}

/* 最近の取引セクション */
.recent-transaction {
  padding-bottom: 10px;
  border-bottom: 1px solid #dbdbdb;
}
.recent-transaction .transaction-info {
  margin-left: 40px;
  font-weight: bold;
}
.recent-transaction .expense-item {
  color: #dc3545;
}
.recent-transaction .income-item {
  color: #28a745;
}

.edit-button {
  display: block;
  width: fit-content;
  margin: 10px auto 0 auto;
  padding: 12px;
  background-color: #846b44;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.1em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s;
}
.edit-button:hover {
  background-color: #7f735f;
}

/* ナビゲーションメニュー */
.dashboard-nav {
  position: fixed;
  left: -300px;
  top: 0;
  width: 220px;
  height: 100%;
  background-color: #495057;
  color: white;
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 1002;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}
.dashboard-nav.open {
  left: 0;
}
.dashboard-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dashboard-nav li {
  margin-bottom: 15px;
}
.dashboard-nav a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 10px;
  border-radius: 4px;
}
.dashboard-nav a:hover {
  background-color: #5a6268;
}

.nav-user-info {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #6c757d;
  text-align: center;
}
.nav-user-info span {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 20px;
}
.nav-user-info button {
  background-color: #495057;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 80%;
}
.nav-user-info button:hover {
  background-color: #5a6268;
}

.nav-menu {
  flex-grow: 1;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.overlay.open {
  opacity: 1;
  visibility: visible;
}

.transaction-form-container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 25px;
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.transaction-form-container h1 {
  margin-bottom: 25px;
  color: #495057;
  text-align: center;
}

.type-selector {
  display: flex;
  gap: 50px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  justify-content: center;
}
.type-selector input[type=radio] {
  display: none;
}
.type-selector label {
  padding: 10px 150px;
  border: 1px solid #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  font-weight: normal;
  margin-bottom: 0;
}
.type-selector input[type=radio]:checked + label {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.form-container {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 1fr;
}

.form-group {
  margin-bottom: 40px;
  text-align: center;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #495057;
}

/* 入力欄共通スタイル */
.form-control {
  width: 60%;
  height: 60px;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 1.3em;
}

.form-select {
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 10px;
}

.form-control-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-button {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
  margin-bottom: 50px;
}

.submit-button {
  flex: 1;
  margin: 30px 20px 0 20px;
  padding: 12px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 30px;
}
.submit-button:hover {
  background-color: #218838;
}

.cancel-button {
  flex: 1;
  margin: 30px 20px 0 20px;
  padding: 12px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 30px;
  text-align: center;
  text-decoration: none;
}
.cancel-button:hover {
  background-color: #5a6268;
}

.delete {
  text-align: center;
}

.delete-button {
  width: 200px;
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #ff0606;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.3em;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
}
.delete-button:hover {
  background-color: #fb3c3c;
}

.error-messages {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.error-messages ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.logo {
  margin-right: auto;
}
.logo img {
  max-height: 200px;
  border-radius: 5px;
}

@media (max-width: 767px) {
  .transaction-form-container {
    max-width: 500px;
    padding: 25px 30px;
  }
  .type-selector label {
    padding: 10px 50px;
  }
  .form-container {
    display: block;
  }
  .form-container .form-group {
    margin-bottom: 20px;
  }
  .form-control {
    width: 80%;
    height: 50px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1.25em;
  }
  .form-button {
    gap: 0;
  }
  .delete-button {
    width: 100px;
  }
}
.transactions-index-container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 25px;
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.transactions-index-container h1 {
  margin-bottom: 25px;
  color: #333;
  text-align: center;
  font-size: 1.8em;
}

.filter-area {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 25px;
  border: 1px solid #e9ecef;
}
.filter-area h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2em;
  color: #333;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
}
.filter-group label {
  margin-bottom: 5px;
  font-size: 0.9em;
  color: #333;
}

.filter-control {
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.95em;
}

.filter-button {
  padding: 8px 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.95em;
  height: 38px;
}
.filter-button:hover {
  background-color: #0056b3;
}

.transactions-table {
  width: 100%;
  margin-top: 20px;
}
.transactions-table th,
.transactions-table td {
  border: 1px solid #dee2e6;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.95em;
}
.transactions-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
}
.transactions-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}
.transactions-table tbody tr:hover {
  background-color: #f1f1f1;
}
.transactions-table .amount-income {
  color: #28a745;
  font-weight: bold;
}
.transactions-table .amount-expense {
  color: #dc3545;
  font-weight: bold;
}
.transactions-table .actions a {
  color: #007bff;
  text-decoration: none;
  margin-right: 10px;
}
.transactions-table .actions a:hover {
  text-decoration: underline;
}
.transactions-table .actions a:delete {
  color: #dc3545;
}

.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 10px 0;
  margin-top: 20px;
  border-top: 1px solid #eee;
  background-color: #dfdfdf;
}
.pagination .page, .pagination .prev, .pagination .next, .pagination .first, .pagination .last, .pagination .gap {
  margin: 0 4px;
}
.pagination .page a, .pagination .page span, .pagination .prev a, .pagination .prev span, .pagination .next a, .pagination .next span, .pagination .first a, .pagination .first span, .pagination .last a, .pagination .last span, .pagination .gap a, .pagination .gap span {
  display: block;
  padding: 4px 8px;
  color: #007bff;
  background-color: #e2e2e2;
  text-decoration: none;
  border: 1px solid #888888;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2;
}
.pagination .page a:hover, .pagination .page span:hover, .pagination .prev a:hover, .pagination .prev span:hover, .pagination .next a:hover, .pagination .next span:hover, .pagination .first a:hover, .pagination .first span:hover, .pagination .last a:hover, .pagination .last span:hover, .pagination .gap a:hover, .pagination .gap span:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}
.pagination .current a, .pagination .current span {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
  cursor: default;
}
.pagination .current a:hover, .pagination .current span:hover {
  background-color: #007bff;
  border-color: #007bff;
}
.pagination .disabled a, .pagination .disabled span {
  color: #6c757d;
  pointer-events: none;
  border-color: #dee2e6;
}
.pagination .disabled a:hover, .pagination .disabled span:hover {
  background-color: transparent;
}
.pagination .gap span {
  border: none;
  padding: 8px 0px;
}
.pagination .gap span:hover {
  background-color: transparent;
}

.no-transactions {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  font-style: italic;
}

@media (max-width: 767px) {
  .table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  th,
  td {
    writing-mode: horizontal-tb;
    white-space: nowrap;
  }
}
.reports-container {
  max-width: 1500px;
  margin: 30px auto;
  padding: 25px;
  background-color: #f4f7f9;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.report-type-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  width: 100%;
}
.report-type-tabs a {
  position: relative;
  width: 50%;
  text-align: center;
  padding: 12px 10px;
  text-decoration: none;
  color: #666;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.3s, border-bottom-color 0.3s;
  box-sizing: border-box;
}
.report-type-tabs a:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 65%;
  transform: translateY(-50%);
  height: 80%;
  border-left: 1px solid #e0e0e0;
}
.report-type-tabs a.active, .report-type-tabs a:hover {
  color: #007bff;
  border-bottom-color: #007bff;
}

.report-period-selector {
  text-align: center;
  margin-bottom: 25px;
  padding: 10px 0;
}
.report-period-selector .arrow-btn {
  background: none;
  border: none;
  font-size: 2em;
  color: #007bff;
  cursor: pointer;
  padding: 5px 20px;
  text-decoration: none;
}
.report-period-selector .arrow-btn:hover {
  color: #0056b3;
}
.report-period-selector .current-period {
  position: relative;
  bottom: 5px;
  font-size: 1.1em;
  font-weight: 500;
  color: #333;
}

.report-content-area {
  display: flex;
  gap: 30px;
}
.report-content-area .budget-allocation-block {
  flex: 1;
  flex-basis: 180px;
  background-color: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.report-content-area .budget-allocation-block h4 {
  margin-top: 15px;
  margin-bottom: 15px;
  font-size: 1.2em;
  color: #333;
  text-align: center;
}
.report-content-area .budget-allocation-block .chart-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 20px auto;
  margin-top: 10px;
  min-height: 350px;
}
.report-content-area .budget-comparison-block {
  flex: 2;
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
}
.report-content-area .budget-comparison-block p {
  text-align: center;
}
.report-content-area .income-details-block, .report-content-area .overall-summary-block {
  flex: 1;
  flex-basis: 180px;
  background-color: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.report-content-area .income-details-block h4, .report-content-area .overall-summary-block h4 {
  margin-top: 15px;
  margin-bottom: 15px;
  font-size: 1.2em;
  color: #333;
  text-align: center;
}
.report-content-area .income-details-block .income-details-list, .report-content-area .overall-summary-block .income-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.report-content-area .income-details-block .income-details-item, .report-content-area .overall-summary-block .income-details-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  gap: 200px;
  border-bottom: 1px solid #f0f0f0;
}
.report-content-area .income-details-block .income-details-item:last-child, .report-content-area .overall-summary-block .income-details-item:last-child {
  border-bottom: none;
  margin-bottom: 80px;
}
.report-content-area .income-details-block .income-details-item .category-name, .report-content-area .overall-summary-block .income-details-item .category-name {
  font-weight: 500;
  color: #333;
  font-size: 1em;
}
.report-content-area .income-details-block .income-details-item .amount, .report-content-area .overall-summary-block .income-details-item .amount {
  font-weight: bold;
  color: #28a745;
  font-size: 1em;
}
.report-content-area .income-details-block .total-income, .report-content-area .overall-summary-block .total-income {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 200px;
  padding-top: 20px;
  margin-top: 10px;
  margin-bottom: 20px;
  border-top: 1px solid #e0e0e0;
  font-weight: bold;
  font-size: 1.1em;
}
.report-content-area .income-details-block .total-income .label, .report-content-area .overall-summary-block .total-income .label {
  color: #333;
}
.report-content-area .income-details-block .total-income .amount, .report-content-area .overall-summary-block .total-income .amount {
  color: #28a745;
}
.report-content-area .income-details-block .overall-summary-list, .report-content-area .overall-summary-block .overall-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.report-content-area .income-details-block .overall-summary-item, .report-content-area .overall-summary-block .overall-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 0;
  gap: 180px;
  border-bottom: 1px solid #f0f0f0;
}
.report-content-area .income-details-block .overall-summary-item .category-name, .report-content-area .overall-summary-block .overall-summary-item .category-name {
  font-weight: 500;
  color: #333;
  font-size: 1em;
}
.report-content-area .income-details-block .overall-summary-item .amount, .report-content-area .overall-summary-block .overall-summary-item .amount {
  font-weight: bold;
  color: #28a745;
  font-size: 1em;
}
.report-content-area .income-details-block .overall-summary-item2, .report-content-area .overall-summary-block .overall-summary-item2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 0;
  gap: 180px;
  border-bottom: 1px solid #f0f0f0;
}
.report-content-area .income-details-block .overall-summary-item2:last-child, .report-content-area .overall-summary-block .overall-summary-item2:last-child {
  border-bottom: none;
  margin-bottom: 80px;
}
.report-content-area .income-details-block .overall-summary-item2 .category-name, .report-content-area .overall-summary-block .overall-summary-item2 .category-name {
  font-weight: 500;
  font-size: 1em;
}
.report-content-area .income-details-block .overall-summary-item2 .amount, .report-content-area .overall-summary-block .overall-summary-item2 .amount {
  font-weight: bold;
  font-size: 1em;
}
.report-content-area .income-details-block .overall-summary-item2 .amount.negative, .report-content-area .overall-summary-block .overall-summary-item2 .amount.negative {
  color: #dc3545;
}
.report-content-area .income-details-block .total-income-expense, .report-content-area .overall-summary-block .total-income-expense {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 200px;
  padding-top: 20px;
  margin-top: 100px;
  margin-bottom: 20px;
  border-top: 1px solid #e0e0e0;
  font-weight: bold;
  font-size: 1.1em;
}
.report-content-area .income-details-block .total-income-expense .label, .report-content-area .overall-summary-block .total-income-expense .label {
  color: #333;
}
.report-content-area .income-details-block .total-income-expense .amount, .report-content-area .overall-summary-block .total-income-expense .amount {
  color: #28a745;
}
.report-content-area .income-details-block .total-income-expense .amount.negative, .report-content-area .overall-summary-block .total-income-expense .amount.negative {
  color: #dc3545;
}

.category-budget-report-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-budget-report-item {
  display: flex;
  align-items: center;
  padding: 5px 15px;
  border-bottom: 1px solid #f0f0f0;
}
.category-budget-report-item:last-child {
  border-bottom: none;
}
.category-budget-report-item .category-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin-right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  color: #555;
}
.category-budget-report-item .category-main-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  margin-right: 15px;
}
.category-budget-report-item .category-name {
  font-weight: 600;
  color: #333;
  font-size: 1em;
  margin-bottom: 1px;
}
.category-budget-report-item .remaining-budget {
  font-size: 0.85em;
  color: #28a745;
}
.category-budget-report-item .remaining-budget.negative {
  color: #dc3545;
}
.category-budget-report-item .budget-bar-container {
  flex-basis: 550px;
  height: 30px;
  background-color: #e9ecef;
  border-radius: 20px;
  overflow: hidden;
}
.category-budget-report-item .budget-bar-container .budget-bar-fill {
  height: 100%;
  background-color: #007bff;
  border-radius: 1px;
  transition: width 0.5s ease-out;
}
.category-budget-report-item .budget-bar-container .budget-bar-fill.over-budget {
  background-color: #ffc107;
}
.category-budget-report-item .actual-amount-diplay {
  font-weight: bold;
  font-size: 1em;
  color: #222;
  margin-bottom: 2px;
}
.category-budget-report-item .details-link {
  margin-left: 40px;
  margin-bottom: 4px;
  color: #adb5bd;
  font-size: 2em;
  text-decoration: none;
}

@media (max-width: 767px) {
  .reports-container {
    padding: 25px 15px;
  }
  .report-content-area {
    flex-direction: column;
  }
  .category-budget-report-item {
    padding: 12px 8px;
  }
  .category-budget-report-item .category-icon {
    width: 32px;
    height: 32px;
    font-size: 1.3em;
    margin-right: 12px;
  }
  .category-budget-report-item .category-main-info {
    margin-right: 10px;
  }
  .category-budget-report-item .category-name {
    font-size: 0.9em;
  }
  .category-budget-report-item .actual-amount-display {
    font-size: 0.9em;
  }
  .category-budget-report-item .remaining-budget {
    font-size: 0.8em;
  }
  .category-budget-report-item .budget-bar-area {
    flex-basis: 100px;
    height: 8px;
  }
  .category-budget-report-item .details-link {
    font-size: 1.2em;
    margin-left: 20px;
  }
}
.budgets-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 40px;
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.budgets-container h1 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
  text-align: center;
  font-size: 1.8em;
}

.budget-period-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}
.budget-period-selector .arrow-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  color: #007bff;
  cursor: pointer;
  padding: 5px 15px;
  text-decoration: none;
}
.budget-period-selector .arrow-btn:hover {
  color: #0056b3;
}
.budget-period-selector .current-period {
  font-size: 1.2em;
  font-weight: 500;
  color: #333;
}

.budget-form {
  margin-bottom: 40px;
  margin-right: 20px;
  text-align: center;
}
.budget-form .budget-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* レスポンシブなグリッド */
  gap: 20px;
}
.budget-form .budget-field-group {
  display: flex;
  align-items: center;
  gap: 20px;
}
.budget-form .budget-field-group label {
  flex-basis: 120px;
  flex-shrink: 0;
  font-weight: 500;
  text-align: right;
  font-size: 1em;
}
.budget-form .budget-field-group .input-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  position: relative;
}
.budget-form .budget-field-group .currency-unit {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
}
.budget-form .budget-field-group .budget-amount-input {
  width: 100%;
  height: 30px;
  padding: 9px 12px 9px 25px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1.2em;
  text-align: right;
}
.budget-form .actions {
  display: block;
  text-align: center;
  margin: 30px auto;
  width: 50%;
}
.budget-form .actions .submit-button {
  padding: 12px 30px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}
.budget-form .actions .submit-button:hover {
  background-color: #218838;
}

@media (max-width: 767px) {
  .budgets-container {
    height: 900px;
  }
}
.flash-messages {
  margin: 0px 0px;
}

.flash {
  padding: 15px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.95em;
}

/* notice (緑色系) */
.flash-notice {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

/* alert (赤色系) */
.flash-alert {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.dashboard-main {
  background-image: url("/images/uribo-random.png");
}

.dashboard-main {
  background-size: contain;
}
