@charset "utf-8";
/* =====================================================================
   BS-CLOUD 共通スタイル
   外部CDNに依存しない。1ファイルで完結させる。
   ===================================================================== */

:root {
  --bg:            #ffffff;
  --bg-soft:       #f5f7fa;
  --bg-elevated:   #ffffff;
  --border:        #dde3ea;
  --border-strong: #c3cdd8;
  --text:          #172029;
  --text-muted:    #5b6875;
  --brand:         #10557f;
  --brand-strong:  #0b3f60;
  --brand-soft:    #e8f1f7;
  --accent:        #0d8a7a;
  --warn-bg:       #fff7e6;
  --warn-border:   #e8c37a;
  --warn-text:     #6b4a06;
  --radius:        10px;
  --radius-sm:     6px;
  --shadow:        0 1px 2px rgba(16,32,48,.06), 0 6px 20px rgba(16,32,48,.06);
  --maxw:          1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0f151b;
    --bg-soft:       #141c24;
    --bg-elevated:   #18212a;
    --border:        #2a3742;
    --border-strong: #3a4a58;
    --text:          #e6ecf2;
    --text-muted:    #a2b0bd;
    --brand:         #5fb3e0;
    --brand-strong:  #8fcdf0;
    --brand-soft:    #16303f;
    --accent:        #3fc0ac;
    --warn-bg:       #2e2413;
    --warn-border:   #6b5320;
    --warn-text:     #e8c98a;
    --shadow:        0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo,
               "Yu Gothic UI", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 28px;
  min-height: 62px;
}
.brand {
  font-weight: 700; font-size: 19px; letter-spacing: .06em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand span { color: var(--brand); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: inline-block; padding: 7px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 14.5px; text-decoration: none;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; line-height: 1.4;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--bg-soft); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}
.btn-sm { padding: 7px 14px; font-size: 13.5px; }

/* ---------- ヒーロー ---------- */
.hero {
  background: linear-gradient(180deg, var(--brand-soft), var(--bg));
  border-bottom: 1px solid var(--border);
  padding: 76px 0 64px;
}
.hero h1 {
  margin: 0 0 20px; font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.45; letter-spacing: .01em;
}
.hero p.lead {
  margin: 0 0 32px; max-width: 46em;
  font-size: 17px; color: var(--text-muted);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- ページ見出し（下層） ---------- */
.page-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 44px 0 36px;
}
.page-head .eyebrow {
  margin: 0 0 8px; font-size: 13px; font-weight: 600;
  letter-spacing: .12em; color: var(--brand); text-transform: uppercase;
}
.page-head h1 { margin: 0 0 10px; font-size: clamp(24px, 3.4vw, 33px); line-height: 1.45; }
.page-head p { margin: 0; color: var(--text-muted); max-width: 50em; }

/* ---------- セクション ---------- */
section.block { padding: 60px 0; }
section.block + section.block { border-top: 1px solid var(--border); }
.block h2 {
  margin: 0 0 8px; font-size: 23px; line-height: 1.5;
}
.block .section-note { margin: 0 0 28px; color: var(--text-muted); }

/* ---------- カード ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 4px; font-size: 18px; }
.card .card-sub { margin: 0 0 14px; font-size: 13px; color: var(--text-muted); }
.card p { margin: 0 0 16px; font-size: 14.5px; color: var(--text-muted); }
.card ul { margin: 0 0 18px; padding-left: 1.2em; font-size: 14.5px; color: var(--text-muted); }
.card ul li { margin-bottom: 4px; }
.card .card-foot { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.7;
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--border);
}
.badge-dev { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }

/* ---------- 手順 ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li {
  counter-increment: step; list-style: none;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; background: var(--bg-elevated);
}
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-bottom: 10px;
  border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 700;
}
.steps li h3 { margin: 0 0 6px; font-size: 16px; }
.steps li p { margin: 0; font-size: 14.5px; color: var(--text-muted); }
.steps { padding: 0; margin: 0; }

/* ---------- 表 ---------- */
.table-scroll { overflow-x: auto; }
table.spec {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  border: 1px solid var(--border);
}
table.spec th, table.spec td {
  border: 1px solid var(--border); padding: 10px 14px; text-align: left; vertical-align: top;
}
table.spec th { background: var(--bg-soft); font-weight: 600; white-space: nowrap; }
table.spec tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-soft) 55%, transparent); }

/* ---------- 注記 ---------- */
.notice {
  border: 1px solid var(--warn-border); background: var(--warn-bg); color: var(--warn-text);
  border-radius: var(--radius-sm); padding: 14px 18px; font-size: 14.5px;
}
.notice strong { font-weight: 700; }

/* ---------- フォーム ---------- */
.form-grid { display: grid; gap: 18px; max-width: 640px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 15px;
  color: var(--text); background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.field textarea { min-height: 120px; resize: vertical; }
.req { color: #c0392b; font-size: 12px; margin-left: 4px; }
@media (prefers-color-scheme: dark) { .req { color: #ff8b7a; } }

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: 36px 0; margin-top: 0;
  font-size: 14px; color: var(--text-muted);
}
.site-footer .foot-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.site-footer .foot-links a { color: var(--text-muted); }
.site-footer .copyright { margin: 0; font-size: 13px; }

/* ---------- 管理画面 ---------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 62px); }
@media (max-width: 800px) { .admin-shell { grid-template-columns: 1fr; } }
.admin-side {
  border-right: 1px solid var(--border); background: var(--bg-soft); padding: 22px 16px;
}
.admin-side h2 { font-size: 12px; letter-spacing: .1em; color: var(--text-muted); margin: 0 0 10px; text-transform: uppercase; }
.admin-side nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 14.5px;
}
.admin-side nav a:hover { background: var(--bg-elevated); text-decoration: none; }
.admin-side nav a[aria-current="page"] { background: var(--brand); color: #fff; font-weight: 600; }
.admin-main { padding: 30px 32px 60px; }
.admin-main h1 { margin: 0 0 6px; font-size: 24px; }
.admin-main > p.sub { margin: 0 0 26px; color: var(--text-muted); }

.status-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 999px;
  margin-right: 7px; vertical-align: 1px; background: var(--text-muted);
}
.status-dot.up { background: #16a34a; }
.status-dot.down { background: #dc2626; }
.status-dot.unknown { background: #9aa5b1; }

.stat-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 30px; }
.stat {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elevated); padding: 18px 20px;
}
.stat .stat-label { font-size: 13px; color: var(--text-muted); margin: 0 0 6px; }
.stat .stat-value { font-size: 26px; font-weight: 700; margin: 0; line-height: 1.3; }

.skeleton-note {
  margin-top: 40px; font-size: 13.5px; color: var(--text-muted);
  border-top: 1px dashed var(--border); padding-top: 16px;
}

/* ---------- ユーティリティ ---------- */
.stack-sm > * + * { margin-top: 12px; }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-32 { margin-top: 32px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* 表のセルは既定で左寄せ。中央寄せ指定を後から効かせる */
table.spec td.center, table.spec th.center { text-align: center; }

/* ---------- ヘッダー左のロゴ ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; display: block; flex: none; }
@media (max-width: 480px) { .brand-mark { width: 28px; height: 28px; } }
.brand .brand-text { color: var(--text); white-space: nowrap; }
.brand .brand-text > span { color: var(--brand); }
