* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 14px;
  background: #f5f5f5;
  color: #333;
}

/* ナビゲーション */
.navbar {
  background: #212529;
  color: #fff;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
}

.navbar .brand {
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  margin-right: 24px;
  white-space: nowrap;
}

.navbar .nav-list {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}

.navbar .nav-list a,
.navbar .nav-list button {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: block;
}

.navbar .nav-list a:hover,
.navbar .nav-list button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.navbar .nav-list a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  padding: 8px;
  cursor: pointer;
}

/* メインコンテンツ */
main {
  padding: 24px 16px;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

/* ボタン */
.btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.btn-primary { background: #0d6efd; color: #fff; }
.btn-primary:hover { background: #0b5ed7; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #bb2d3b; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5c636a; }

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* フォーム */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* カード */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* メッセージ */
.message {
  min-height: 24px;
  font-size: 0.85rem;
  padding: 4px 0;
}

.message.success { color: #198754; }
.message.error { color: #dc3545; }

/* 現在レートボックス */
.rate-box {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px 24px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.rate-item {
  flex-shrink: 0;
}

.rate-item .label {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 4px;
  white-space: nowrap;
}

.rate-item .value {
  font-size: 1.4rem;
  font-weight: bold;
}

.diff-positive { color: #dc3545; }
.diff-negative { color: #0d6efd; }

/* テーブル */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

thead th {
  background: #212529;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.85rem;
  white-space: nowrap;
}

tbody tr:nth-child(even) { background: #f8f9fa; }

tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ログイン画面 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.login-card {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  width: 360px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
  font-size: 1.4rem;
  margin-bottom: 24px;
  text-align: center;
}

.login-card .btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
}

/* グラフ */
canvas {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
}

.no-data {
  display: none;
  color: #6c757d;
  text-align: center;
  padding: 32px;
  font-size: 1rem;
}
