/* ==========================================================================
   管理画面の共通スタイル（丸ゴシック × パステル）
   2026-09-01 だいずさん指定＝「ダッシュボード系・管理系のアプリは全部このイメージで」

   ここには「形」だけを書く。色は themes.css の1行（data-theme）で切り替える。
   新しい管理アプリを作るときは、この2枚を読み込んで <body data-theme="○○"> と書くだけでよい。

     <link rel="stylesheet" href="admin.css">
     <link rel="stylesheet" href="themes.css">
     <body data-theme="manabi">

   決めごと（参考画像＝丸ゴシックのブランドサイトから起こした）
   - 角丸24px／線は1px／**影は使わない**（影を足すと途端に古くなる）
   - 白いカードのあいだに、うすいパステルのカードを混ぜる
   - 主のボタンは黒い丸ピル＋色つきの丸に矢印。次のボタンは白＋黒枠
   - 見出しは丸ゴシック900の日本語。大事な数字だけ下線マーカーで抜く
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800&family=Zen+Maru+Gothic:wght@700;900&display=swap");

:root {
  --ar-radius: 24px;
  --ar-radius-s: 14px;
  --ar-font: "M PLUS Rounded 1c", system-ui, sans-serif;
  --ar-font-disp: "Zen Maru Gothic", "M PLUS Rounded 1c", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--th-bg);
  color: var(--th-ink);
  font-family: var(--ar-font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }

/* ---------- 小さな部品 ---------- */
.eyebrow {
  font-size: .68rem; letter-spacing: .16em; font-weight: 700; color: var(--th-soft);
  text-transform: uppercase; margin: 0 0 12px;
}
.card {
  background: var(--th-card); border: 1px solid var(--th-line);
  border-radius: var(--ar-radius); padding: 22px 24px;
}
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--th-ink); color: #fff; border-radius: 999px;
  padding: 9px 10px 9px 20px; font-weight: 700; font-size: .86rem;
}
.pill .arw {
  width: 26px; height: 26px; border-radius: 50%; background: var(--th-pop); color: var(--th-ink);
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}
.pill.ghost { background: #fff; color: var(--th-ink); border: 2px solid var(--th-ink); }
.chip {
  display: inline-block; border-radius: 999px; padding: 3px 12px;
  font-size: .72rem; font-weight: 700; background: var(--th-main-s);
}
.chip.a1 { background: var(--th-a1-s); }
.chip.a2 { background: var(--th-a2-s); }
.chip.a3 { background: var(--th-a3-s); }
.chip.line { background: #fff; border: 1px solid var(--th-line); color: var(--th-soft); }

/* ---------- ヘッダー ---------- */
.ar-head { display: flex; align-items: center; gap: 20px; padding: 22px 0 26px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo b { font-family: var(--ar-font-disp); font-weight: 900; font-size: 1.02rem; letter-spacing: .02em; }
.logo small { display: block; font-size: .6rem; letter-spacing: .22em; color: var(--th-soft); font-weight: 700; }
.ar-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.ar-nav button { padding: 9px 16px; border-radius: 999px; font-size: .84rem; font-weight: 700; color: var(--th-soft); }
.ar-nav button:hover { background: #fff; }
.ar-nav button.on { background: var(--th-ink); color: #fff; }
.burger { width: 40px; height: 40px; border-radius: 50%; background: var(--th-ink); color: #fff; display: grid; place-items: center; margin-left: 8px; }

/* ---------- ヒーロー（その画面のいちばん言いたいこと） ---------- */
.hero { display: grid; grid-template-columns: 1.18fr .82fr; gap: 20px; margin-bottom: 20px; }
.hero-main {
  background: var(--th-card); border: 1px solid var(--th-line);
  border-radius: var(--ar-radius); padding: 40px 40px 34px; position: relative; overflow: hidden;
}
.hero h1 {
  font-family: var(--ar-font-disp); font-weight: 900; font-size: clamp(1.8rem, 2.7vw, 2.45rem);
  line-height: 1.34; margin: 6px 0 16px; position: relative; z-index: 2; word-break: keep-all;
}
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--th-main) 62%); }
.hero p { margin: 0 0 22px; color: var(--th-body); font-size: .9rem; max-width: 30em; position: relative; z-index: 2; }
.hero .blobs { position: absolute; right: -56px; top: 6px; width: 300px; opacity: .95; pointer-events: none; z-index: 1; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 2; }

.hero-side {
  border-radius: var(--ar-radius); background: var(--th-a1-s); border: 1px solid var(--th-line);
  padding: 26px 28px; display: flex; flex-direction: column;
}
.side-num { font-family: var(--ar-font-disp); font-weight: 900; font-size: 3.4rem; line-height: 1.05; }
.side-num small { font-size: 1rem; margin-left: 4px; }
.flagcard { margin-top: auto; background: #fff; border-radius: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.flagcard b { font-family: var(--ar-font-disp); font-weight: 900; font-size: 1.02rem; line-height: 1.45; }
.flagcard .arw { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--th-pop); display: grid; place-items: center; font-weight: 800; flex: none; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { border-radius: var(--ar-radius); padding: 20px 22px 18px; border: 1px solid var(--th-line); background: #fff; }
.kpi.c1 { background: var(--th-main-s); }
.kpi.c2 { background: var(--th-a1-s); }
.kpi.c3 { background: var(--th-a2-s); }
.kpi.c4 { background: var(--th-a3-s); }
.kpi .lbl { font-size: .76rem; font-weight: 700; color: var(--th-body); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-family: var(--ar-font-disp); font-weight: 900; font-size: 2.1rem; line-height: 1.25; margin-top: 4px; }
.kpi .val small { font-size: .86rem; margin-left: 3px; }
.kpi .sub { font-size: .72rem; color: var(--th-soft); margin-top: 2px; }

/* ---------- セクション ---------- */
section { margin-bottom: 28px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--ar-font-disp); font-weight: 900; font-size: 1.24rem; margin: 0; }
.sec-head .more { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--th-soft); display: flex; align-items: center; gap: 8px; }
.sec-head .more .arw { width: 24px; height: 24px; border-radius: 50%; background: var(--th-pop); display: grid; place-items: center; color: var(--th-ink); }

/* ---------- 気にかけたいこと（一覧カード） ---------- */
.alerts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.alert h3 { font-size: .88rem; font-weight: 800; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.alert h3 .n { margin-left: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-size: .76rem; background: var(--th-ink); color: #fff; }
.alert .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--th-main); }
.alert.a1 .dot { background: var(--th-a1); }
.alert.a2 .dot { background: var(--th-a2); }
.alert.a3 .dot { background: var(--th-a3); }
.alert.danger .dot { background: var(--th-danger); }
.alert ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.alert li button { width: 100%; text-align: left; padding: 9px 12px; border-radius: 12px; font-size: .82rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert li button:hover { background: var(--th-hover); }
.alert li b { font-weight: 800; }
.alert .muted { color: var(--th-soft); font-size: .76rem; }
.alert .empty { color: var(--th-soft); font-size: .8rem; margin: 0; padding: 8px 2px; }
.alert .link { font-size: .76rem; font-weight: 700; color: var(--th-soft); padding: 6px 2px 0; }

/* ---------- 内訳バー ---------- */
.stores { display: flex; flex-direction: column; gap: 14px; }
.store { display: grid; grid-template-columns: 96px 54px 1fr auto; align-items: center; gap: 14px; }
.store .bar { height: 14px; border-radius: 999px; background: var(--th-track); overflow: hidden; }
.store .bar i { display: block; height: 100%; border-radius: 999px; }
.store .n { font-family: var(--ar-font-disp); font-weight: 900; font-size: 1.05rem; }
.store .amt { font-weight: 800; font-size: .86rem; }
.store .amt span { color: var(--th-soft); font-weight: 500; font-size: .76rem; margin-left: 6px; }

/* ---------- 棒グラフ ---------- */
.spark { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding: 8px 4px 0; }
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.spark-col .n { font-size: .72rem; font-weight: 800; color: var(--th-soft); }
.spark-col i { display: block; width: 100%; max-width: 30px; border-radius: 999px; background: var(--th-ink); }
.spark-col.now i { background: var(--th-pop); }
.spark-col .x { font-size: .7rem; color: var(--th-soft); font-weight: 700; }
.note { font-size: .75rem; color: var(--th-soft); margin: 14px 0 0; }

/* ---------- 表 ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: .85rem; }
.tbl th { text-align: left; font-size: .68rem; letter-spacing: .1em; color: var(--th-soft); font-weight: 700; padding: 0 16px 4px; }
.tbl td { background: #fff; padding: 13px 16px; border-top: 1px solid var(--th-line); border-bottom: 1px solid var(--th-line); }
.tbl tr td:first-child { border-left: 1px solid var(--th-line); border-radius: 16px 0 0 16px; font-weight: 800; }
.tbl tr td:last-child { border-right: 1px solid var(--th-line); border-radius: 0 16px 16px 0; text-align: right; font-weight: 800; }
.tbl tr:hover td { background: var(--th-hover); }
.face { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; margin-right: 10px; vertical-align: -9px; }

footer { color: var(--th-soft); font-size: .74rem; text-align: center; padding-top: 20px; }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .alerts { grid-template-columns: 1fr; }
  .ar-nav { display: none; }
  .store { grid-template-columns: 88px 46px 1fr; }
  .store .amt { grid-column: 1 / -1; }
}
