/* ブログ更新ツール 共通スタイル（軽量・素朴な見た目） */

:root {
  --fg: #222;
  --muted: #6b7280;
  --bg: #fafafa;
  --card-bg: #fff;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --error: #b91c1c;
  --error-bg: #fef2f2;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
               "Yu Gothic UI", Meiryo, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }

.topnav { display: flex; align-items: center; gap: 1rem; }
.topnav .inline { display: inline; margin: 0; }

.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.card.narrow {
  max-width: 420px;
  margin: 3rem auto 0;
}

.stack { display: flex; flex-direction: column; gap: 1rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.link-card {
  display: block;
  color: var(--fg);
  transition: border-color 0.15s;
}
.link-card:hover { border-color: var(--primary); text-decoration: none; }
.link-card[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

.link-card h2 { margin: 0 0 0.3rem; font-size: 1rem; }

label { display: flex; flex-direction: column; gap: 0.3rem; }
label > span { font-size: 0.9rem; color: var(--muted); }

input[type=email], input[type=password], input[type=text], textarea {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

button.primary {
  background: var(--primary);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
}
button.primary:hover { background: var(--primary-hover); }

button.link {
  color: var(--primary);
  text-decoration: underline;
}

.error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin: 0 0 1rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

/* テーブル */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.table th, .table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.table th {
  background: #f9fafb;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}
.table tr:last-child td { border-bottom: none; }

.actions { display: flex; gap: 0.8rem; align-items: center; }
.actions .inline { display: inline; margin: 0; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge.ok { background: #d1fae5; color: #065f46; }
.badge.off { background: #fee2e2; color: #991b1b; }

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.row {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.row.center { justify-content: center; }
.row .grow { flex: 1; }
label.inline {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

ul.error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 0.6rem 1.4rem;
  margin: 0 0 1rem;
}

button.link.danger { color: var(--error); }

em {
  font-style: normal;
  color: var(--error);
  font-size: 0.85rem;
}

.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
}

.fieldset {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.8rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.fieldset legend {
  padding: 0 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  resize: vertical;
}

/* チェックボックスリスト（複数店舗選択UI） */
.checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.4rem 1rem;
  margin-top: 0.5rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  max-height: 360px;
  overflow-y: auto;
}
.checkbox-list .row {
  grid-column: 1 / -1;
  margin-bottom: 0.3rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px dashed var(--border);
}
.checkbox-list label.inline {
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.checkbox-list label.inline:hover { background: #fff; }

/* プログレス表示 */
.progress {
  background: var(--border);
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
}
.progress-bar {
  background: var(--primary);
  height: 100%;
  transition: width 0.5s ease;
}
.progress-bar.ok { background: #10b981; }
.progress-bar.warn { background: #f59e0b; }

