/* 全体背景 - NTT東西イメージ（淡いブルー→オレンジ） */
body {
  font-family: "Segoe UI", "ヒラギノ角ゴ ProN", "Meiryo", sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #e3f2fd 0%, #fff3e0 100%);
}

/* ヘッダー */
header {
  background: #1565c0; /* 東の青 */
  color: #fff;
  text-align: center;
  padding: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* メイン */
main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

/* カード */
.form-card {
  background: #fff;
  width: 100%;
  max-width: 800px;
  padding: 1.5rem 1.8rem;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.form-card h2 {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 1.2rem;
  color: #333;
  border-bottom: 2px solid #f1f1f1;
  padding-bottom: .7rem;
}

/* 入力群 */
.form-group { margin-bottom: 1rem; }

label { color: #444; font-weight: 600; display: block; margin-bottom: .35rem; }

input[type="text"],
input[type="password"],
select {
  width: 100%;
  max-width: 32rem;
  padding: .6rem .8rem;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}

input:focus, select:focus {
  outline: none;
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.18);
}

fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: .8rem 1rem;
  margin-bottom: 1rem;
}

legend { padding: 0 .4rem; color: #333; font-weight: 700; }

/* ボタン */
button {
  width: 100%;
  padding: .85rem;
  background: linear-gradient(90deg, #1565c0, #ff9800); /* 東→西 */
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .05s ease, opacity .15s ease;
}
button:hover { opacity: .95; }
button:active { transform: scale(.997); }

/* details / pre */
details { margin: .6rem 0; }
details > summary {
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: #333;
}
pre {
  background: #0b1020;
  color: #e8f0fe;
  border-radius: 8px;
  padding: 1rem;
  overflow: auto;
  font-size: .9rem;
}

/* アラート（エラー用） */
.alert {
  border: 1px solid #f5c2c7;
  background: #fff1f2;
  color: #7f1d1d;
  padding: .9rem 1rem;
  border-radius: 10px;
  margin: .8rem 0 1.2rem;
}
.alert h3 { margin: 0 0 .4rem; font-size: 1.05rem; }

/* フッタ */
footer {
  text-align: center;
  padding: .9rem;
  font-size: .9rem;
  color: #666;
  background: #fafafa;
  border-top: 1px solid #e5e7eb;
}
/* 通知（営業時間案内/閉局中メッセージ） */
.notice {
  border-radius: 10px;
  padding: .75rem 1rem;
  margin: 0 0 1rem;
  font-size: .95rem;
}
.notice-warning { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; }
.notice-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }

/* ボタンが無効のときの見た目（22:00～翌8:00 JSTで適用） */
button[disabled] {
  opacity: .6;
  cursor: not-allowed;
  filter: grayscale(20%);
}

/* バナー（メンテナンス告知） */
.banner {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 0 0 1rem;
  font-size: .95rem;
}
.banner-maintenance {
  background: #fff1f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}
.badge {
  background: #ef4444;
  color: #fff;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: .5rem;
  font-size: .8rem;
  line-height: 1.6;
}

/* 既存の notice/disabled ボタンはそのまま活用 */
#countdown { font-variant-numeric: tabular-nums; }

/* --- admin list --- */
.card {
  max-width: 900px;
  margin: 40px auto;
  padding: 24px 28px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.card-title {
  margin: 0 0 18px;
  font-size: 22px;
  text-align: center;
}
.card-title span {
  font-size: 14px;
  color: #666;
}

.hash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hash-table thead th {
  background: #f3f6f9;
  padding: 10px;
  border-bottom: 2px solid #d0d7de;
  text-align: left;
}

.hash-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: top;
}

.hash-table tbody tr:hover {
  background: #fafcff;
}

.hash-table td.hash {
  font-family: monospace;
  word-break: break-all;
  font-size: 13px;
}

.hash-table td.dt {
  white-space: nowrap;
  color: #444;
}

.hash-table td.recept {
  font-weight: 600;
}

.empty {
  text-align: center;
  color: #888;
  padding: 20px;
}

.back {
  margin-top: 18px;
  text-align: center;
}
.back a {
  color: #2a6adf;
  text-decoration: none;
}
.back a:hover {
  text-decoration: underline;
}

/* ===== 管理ナビ ===== */
.admin-nav {
  display: flex;
  gap: 24px;
  padding: 10px 32px;
  background: #f6f9fc;
  border-bottom: 1px solid #e0e6ed;
}

.admin-nav a {
  color: #1f3c88;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 2px;
  position: relative;
}

.admin-nav a:hover {
  color: #0d47a1;
}

.admin-nav a.active {
  font-weight: 600;
}

.admin-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  background: #1e88e5;
}

/* --- 期限管理表示 --- */
.hash-table td.state {
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.badge.alive {
  background: #e3f2fd;
  color: #1565c0;
}

.badge.expired {
  background: #eeeeee;
  color: #777;
}

.badge.unknown {
  background: #fff3e0;
  color: #ef6c00;
}

.hash-table tr.expired {
  opacity: 0.55;
}

.client-ip {
  margin-top: 14px;
  text-align: right;
  font-size: 11px;
  color: #8a8f98;
}
