@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;700&family=Noto+Serif+JP:wght@400;600&display=swap');

:root {
  --bg: #faf3ea;
  --card-bg: #fffdfb;
  --accent: #dba55f;
  --accent-soft: #f3d9b5;
  --text: #4a3728;
  --text-muted: #8a7a68;
  --link: #1d3b5c;
  --error: #c0392b;
  --error-bg: #fbeaea;
  --border: #ece0d0;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Shippori Mincho", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  background: var(--bg);
  color: var(--text);
  max-width: 640px;
  margin: 32px auto;
  padding: 0 20px 60px;
  line-height: 1.7;
}

h1 {
  font-weight: 700;
  font-size: 1.9em;
  margin: 24px 0 20px;
}

h2 {
  font-weight: 600;
  font-size: 1.2em;
  margin: 24px 0 8px;
}

a {
  color: var(--link);
}

/* トップバー：ログイン情報とリンク */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.9em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.topbar .links a {
  color: var(--link);
  text-decoration: underline;
  margin-left: 12px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-decoration: none;
}
.back-link:hover {
  text-decoration: underline;
}

/* カード（店舗一覧・マシン一覧・アカウント一覧など） */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card {
  display: block;
  background: var(--card-bg);
  border-left: 6px solid var(--accent);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(74, 55, 40, 0.08);
  text-decoration: none;
  color: var(--text);
}

.card.notset {
  border-left-color: var(--error);
  background: var(--error-bg);
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-row .btn {
  margin-top: 0;
  flex-shrink: 0;
}

td .btn {
  margin-top: 0;
  padding: 6px 14px;
  font-size: 0.9em;
  white-space: nowrap;
}

.card .icon {
  margin-right: 6px;
}

.card .status {
  font-size: 0.82em;
  color: var(--text-muted);
}

.card .status.notset {
  color: var(--error);
}

.card .prev {
  font-size: 0.85em;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.card .inputs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.card .inputs label {
  flex: 1;
  font-size: 0.82em;
  color: var(--text-muted);
}

.card .row-error {
  color: var(--error);
  font-size: 0.85em;
  margin-top: 6px;
}

/* フォーム全般 */
label {
  display: block;
  margin-top: 10px;
  font-size: 0.92em;
}

input[type=text],
input[type=password],
input[type=number],
input[type=month],
select {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 1em;
}

.checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 6px;
}

.checkboxes label {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin-top: 0;
  font-size: 0.92em;
}

button, .btn {
  display: inline-block;
  font-family: inherit;
  padding: 10px 22px;
  margin-top: 16px;
  border: none;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 1em;
  text-decoration: none;
  cursor: pointer;
}

button:hover, .btn:hover {
  background: #c98f43;
}

button.delete {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
}
button.delete:hover {
  background: #f6d8d5;
}

/* 通知・状態表示 */
.note {
  color: var(--text-muted);
  font-size: 0.9em;
}

.error {
  color: var(--error);
  margin-top: 16px;
}

.warn {
  color: var(--error);
  font-weight: bold;
}

.result {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--card-bg);
  border-left: 6px solid var(--accent);
  border-radius: 12px;
}

/* テーブル（レポートなど） */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

th:first-child, td:first-child {
  text-align: left;
}

tr.total td {
  font-weight: bold;
  border-top: 2px solid var(--accent);
}

tr.mismatch td {
  color: var(--error);
  font-weight: bold;
}

/* 締めのメッセージ */
.footer-message {
  text-align: center;
  font-size: 1.3em;
  color: var(--text);
  margin-top: 48px;
}
