/* styles.css */

/* カスタムプロパティ（変数）を定義 */
:root {
  --primary-color: #4CAF50;                /* 基本のグリーン */
  --accent-color: #ff4081;                 /* アクセントカラー（ピンク） */
  --background-gradient-start: #2980b9;    /* 背景グラデーション開始色 */
  --background-gradient-end: #8e44ad;      /* 背景グラデーション終了色 */
  --container-bg: rgba(44, 62, 80, 0.85);    /* コンテナの背景（透過ダークカラー） */
  --text-color: #ecf0f1;                   /* 文字色（明るいグレー） */
  --border-color: rgba(236, 240, 241, 0.3);  /* テーブルなどのボーダー用 */
  --hover-primary-color: #45a049;          /* ホバー時のボタン用カラー */
}

/* リセット・共通設定 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;  /* Google FontsなどでRobotoを利用するとさらに良い */
  background: linear-gradient(135deg, var(--background-gradient-start), var(--background-gradient-end));
  color: var(--text-color);
  line-height: 1.6;
}

/* コンテンツを中央揃えにする設定 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 30px auto;
  background: var(--container-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ヘッダー */
header {
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

header h1 {
  margin: 0;
  font-size: 2.5em;
  font-weight: 400;
}

/* ナビゲーションメニュー */
nav {
  margin-top: 20px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
}

nav ul li {
  margin: 0 15px;
  font-size: 1.1em;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

nav ul li a:hover {
  background: var(--primary-color);
}

/* フォーム全体のスタイル */
form {
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
}

form label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

/* テキストボックス・パスワードボックス */
form input[type="text"],
form input[type="password"],
form input[type="number"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: none;
  border-radius: 4px;
}

/* 入力欄フォーカス時の強調 */
form input:focus {
  outline: none;
  box-shadow: 0 0 5px var(--accent-color);
}

/* ボタンのスタイル */
form button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background: var(--hover-primary-color);
}

.mem-button {
  background: #307dba;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

.mem-button:hover {
  background: #b0fafd;
}
.bill-button {
  background: #6bff29;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

.bill-button:hover {
  background: #c6fdb0;
}
/* テーブルのスタイル */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.1);
}
.set-button {
  background: #755df1;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

.set-button:hover {
  background: #c9bfff;
}


/* テーブルのスタイル */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.1);
}
table, th, td {
  border: 1px solid var(--border-color);
}

th, td {
  padding: 12px;
  text-align: left;
}

th {
  background: rgba(0, 0, 0, 0.3);
  font-weight: bold;
}

/* リンクのスタイル */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* レスポンシブ対応（スマートフォンなど） */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }
  
  nav ul li {
    margin: 10px 0;
  }
}

/* ユーティリティクラス */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.alert-success {
  color: #2ecc71;
  font-weight: bold;
}

.alert-error {
  color: #e74c3c;
  font-weight: bold;
}

/* 精算完了イベントの行に背景色を設定 */
.settlement-completed {
  background-color: #d4edda; /* 淡い緑色 */
}
