@charset "UTF-8";
/* =====================================================================
   KACHIARU ポータル
   =====================================================================
   毎日いちばん最初に開く画面なので、読む前に押せることを優先している。
   タイルは大きく、説明は小さく。判断が要るのは「どれを開くか」だけ。

   利用権限の画面だけは性質が逆で、一度に見渡せることが価値になる。
   そちらは chart の管理画面と同じ密度（罫で区切る・数字は等幅）に寄せた。
   ===================================================================== */

:root {
  color-scheme: light dark;
  --bg:        #f3f4f7;
  --surface:   #ffffff;
  --surface-2: #f8f9fb;
  --bar:       #0f1319;
  --bar-ink:   #e9ecf2;
  --bar-dim:   #8b94a3;
  --text:      #131820;
  --text-2:    #545d6b;
  --muted:     #7f8896;
  --line:      #e2e5eb;
  --accent:    #1f6feb;
  --accent-ink:#ffffff;
  --accent-soft:#eaf1fe;
  --ok:        #14532d;
  --ok-bg:     #edf9f0;
  --ok-line:   #b7e2c4;
  --warn:      #7c2d12;
  --warn-bg:   #fdf3ec;
  --warn-line: #f0c9a8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --surface: #1c2027; --surface-2: #232830;
    --text: #e6e9ee; --text-2: #b3bac5; --muted: #8d95a2; --line: #2c323b;
    --accent-soft: #1e2a3d;
    --ok: #b7e7c6; --ok-bg: #12251a; --ok-line: #1f5133;
    --warn: #f3cba8; --warn-bg: #2a1d12; --warn-line: #5c3a1c;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 14px; line-height: 1.7;
}
a { color: var(--accent); }

/* ------------------------------------------------------------ 上のバー */
.bar { background: var(--bar); color: var(--bar-ink); }
.bar__in {
  max-width: 1100px; margin: 0 auto; padding: .55rem 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.bar__spacer { flex: 1; }
.brand { display: flex; align-items: baseline; gap: .45rem; color: inherit; text-decoration: none; }
.brand__mark {
  display: grid; place-items: center; width: 22px; height: 22px;
  background: var(--accent); color: #fff; border-radius: 5px;
  font-weight: 700; font-size: 13px;
}
.brand__name { font-weight: 700; letter-spacing: .02em; }
.brand__sub { color: var(--bar-dim); font-size: 12px; }
.bar__user { display: flex; align-items: center; gap: .55rem; font-size: 12px; color: var(--bar-dim); }
.bar__user b { color: var(--bar-ink); font-weight: 600; }
.bar__user form { margin: 0; }
.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent); font: inherit; text-decoration: underline;
}

/* ------------------------------------------------------------ タブ */
.tabs { background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs__in { max-width: 1100px; margin: 0 auto; padding: 0 1rem; display: flex; gap: .2rem; }
.tab {
  padding: .5rem .8rem; font-size: 13px; color: var(--text-2);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.tab[aria-current] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

.shell { max-width: 1100px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.title { font-size: 1.05rem; margin: 0 0 .8rem; }

/* ------------------------------------------------------------ タイル

   1行に3つまで。並べすぎると「探す」動作が生まれる。 */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.tile {
  display: flex; flex-direction: column; gap: .15rem;
  padding: 1rem 1.1rem; min-height: 104px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--text);
}
.tile:hover { border-color: var(--accent); }
.tile__name { font-size: 1rem; font-weight: 700; }
.tile__desc { font-size: 12px; color: var(--muted); flex: 1; }
.tile__role {
  align-self: flex-start; margin-top: .3rem;
  padding: .05rem .45rem; font-size: 11px;
  background: var(--accent-soft); color: var(--accent); border-radius: 999px;
}

/* ------------------------------------------------------------ 囲み */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; margin: 0 0 1rem;
}
.panel__hd {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .7rem 1rem; border-bottom: 1px solid var(--line);
}
.panel__ttl { font-size: .95rem; margin: 0; }
.panel__note { font-size: 12px; color: var(--muted); margin-left: auto; }
.panel__bd { padding: .9rem 1rem; }

.note {
  padding: .7rem .9rem; margin: 0 0 1rem; border-radius: 8px; font-size: 13px;
  background: var(--accent-soft); border: 1px solid var(--line);
}
.note--ok   { background: var(--ok-bg);   border-color: var(--ok-line);   color: var(--ok); }
.note--warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }

.hint { font-size: 12px; color: var(--muted); }
.sub  { font-size: 11px; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty { color: var(--muted); text-align: center; padding: 1.5rem 0; margin: 0; }

.output {
  background: var(--bar); color: var(--bar-ink); padding: .8rem 1rem;
  border-radius: 8px; font-size: 12px; overflow-x: auto; margin: 0 0 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ------------------------------------------------------------ 表と操作 */
.scroll-x { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: 13px; }
.data th, .data td {
  padding: .45rem .6rem; text-align: left; border-bottom: 1px solid var(--line);
  white-space: nowrap; vertical-align: middle;
}
.data th { font-size: 11px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.data tr.off { opacity: .45; }
.data select { font: inherit; font-size: 12px; padding: .15rem .3rem; max-width: 12rem; }
.data form { margin: 0; display: inline; }

.btn {
  display: inline-block; padding: .4rem .9rem; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); border-radius: 6px;
  font: inherit; font-size: 13px; cursor: pointer; text-decoration: none;
}
.btn--ghost { background: var(--surface); color: var(--accent); }
.btn--danger { background: var(--surface); color: #b42318; border-color: #f0c2bd; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.actions select { font: inherit; padding: .35rem .5rem; }
.search { display: flex; gap: .5rem; align-items: center; margin: 0; }
.search input { font: inherit; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 6px; flex: 1; max-width: 22rem; }

/* サービスごとの人数 */
.counts { display: flex; flex-wrap: wrap; gap: .5rem; }
.count {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  min-width: 96px; padding: .6rem .8rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
}
.count__n { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.count__name { font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------ ログイン */
body.plain { background: var(--bg); }
.gate {
  max-width: 24rem; margin: 12vh auto; padding: 2rem 1.75rem; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.gate__mark {
  display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto .8rem;
  background: var(--accent); color: #fff; border-radius: 10px; font-weight: 700; font-size: 20px;
}
.gate h1 { font-size: 1.1rem; margin: 0 0 .2rem; }
.gate__lede { color: var(--muted); font-size: 12px; margin: 0 0 1.4rem; }
.gate__notice {
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 6px; padding: .5rem .7rem; font-size: 12px; margin: 0 0 1rem;
}
.gate__btn {
  display: block; padding: .75rem 1rem; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 600; text-decoration: none;
}
.gate__note { font-size: 11px; color: var(--muted); margin: 1.2rem 0 0; text-align: left; line-height: 1.8; }

.foot {
  max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem;
  font-size: 11px; color: var(--muted); border-top: 1px solid var(--line);
}
