/* 運営者の画面（/ops）と、会社の管理者の画面（会社とプラン・利用者）で足りない部品だけ。
   色・文字・角の丸みは public/style.css の変数をそのまま使う。 */

.head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.block.first { margin-top: 8px; }
.eyebrow a { color: inherit; }
.list td small { display: block; }
.list tr.off td { color: var(--faint); }
.list tr.off td a { color: var(--sub); }
form.inline.end { justify-content: flex-end; }
form.inline.wrap { flex-wrap: wrap; align-items: flex-end; gap: 10px; }
form.inline.wrap input[name="reason"] { flex: 1 1 320px; width: auto; }
.lbl { display: grid; gap: 4px; font-size: 0.8rem; color: var(--ink-2); font-weight: 700; }
.ops-foot { margin-top: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }

/* 入力の欄を 1 列に並べる（足す画面） */
.edit .grid.one { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.edit .grid.flat { border: 0; padding: 0; box-shadow: none; background: none; }
.edit label small { color: var(--sub); font-size: 0.78rem; font-weight: 400; }
.edit label.check { display: flex; align-items: center; gap: 10px; }
.edit label.check input { width: 18px; height: 18px; flex: none; }
.edit label.check span { font-size: 0.92rem; }
.edit.narrow + .sub, .edit .sub { margin-top: 12px; max-width: 560px; }

/* アドレスと「写す」ボタン */
.copyrow { display: flex; gap: 8px; max-width: 720px; }
.copyrow + .sub { margin-top: 10px; }
.copyrow input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 0.9rem; background: var(--sunken); }

/* 1 回だけ見せるパスワード */
.once { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; max-width: 720px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.once dt, .once dd { padding: 12px 16px; border-bottom: 1px solid var(--rule-2); }
.once dt { color: var(--sub); font-size: 0.82rem; font-weight: 700; background: var(--sunken); display: flex; align-items: center; }
.once dd { font-size: 1rem; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.once dd.pw { font-size: 1.3rem; font-weight: 600; letter-spacing: 0.06em; }
.once dt:last-of-type, .once dd:last-of-type { border-bottom: 0; }

/* 使っている量の帯 */
.usebars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; max-width: 900px; margin-bottom: 12px; }
.usebar { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.usebar p { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.usebar p span { font-size: 0.82rem; font-weight: 700; color: var(--ink-2); }
.usebar p b { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; }
.usebar p small { font-size: 0.8rem; font-weight: 400; color: var(--sub); }
.usebar .track { height: 8px; border-radius: 99px; background: var(--rule-2); overflow: hidden; }
.usebar .track i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.usebar.full .track i { background: var(--bad); }
.usebar.full p b { color: var(--bad); }

/* 1 社の画面の上に並べる、あらまし */
.cfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 8px; }
.cfacts > div { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 12px 16px 13px; box-shadow: var(--shadow); }
.cfacts dt { font-size: 0.76rem; color: var(--sub); font-weight: 700; }
.cfacts dd { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; line-height: 1.35; }
.cfacts dd.small { font-family: var(--font); font-size: 0.92rem; font-weight: 700; padding-top: 4px; }
.cfacts dd small { display: block; font-family: var(--font); font-size: 0.78rem; font-weight: 400; color: var(--sub); }
.cfacts dd:not(.small) small { display: inline; }

/* 「すること」を 1 行ずつ並べ、押すと開く */
.acts-box { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
details.act { margin: 0; border-bottom: 1px solid var(--rule-2); }
details.act:last-child { border-bottom: 0; }
details.act > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t i" "s i"; gap: 1px 12px; align-items: center; padding: 13px 16px; cursor: pointer; }
details.act > summary::-webkit-details-marker { display: none; }
details.act > summary:hover { background: var(--hover); }
details.act > summary b { grid-area: t; font-size: 0.95rem; }
details.act > summary span { grid-area: s; color: var(--sub); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.act > summary .ic { grid-area: i; color: var(--faint); transition: transform 0.15s; }
details.act[open] > summary .ic { transform: rotate(90deg); }
details.act > div { padding: 4px 16px 18px; }
details.act > div .sub { margin-top: 10px; }
details.act select { max-width: 100%; }

/* 利用者 1 人の画面: することを、説明つきで 1 行ずつ */
.acts-list { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); max-width: 900px; }
.acts-list > li { display: flex; align-items: center; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--rule-2); }
.acts-list > li:last-child { border-bottom: 0; }
.acts-list > li > div { flex: 1; min-width: 0; }
.acts-list > li > div > p { color: var(--sub); font-size: 0.86rem; margin-top: 2px; }
.acts-list > li > form { flex: none; }
/* パスワード: 自動で作り直すボタンは説明のすぐ下。自分で決める欄は、その下の折りたたみ（入力欄の下に大きいボタンを置かない） */
.acts-list > li.pw > div > form { margin-top: 10px; }
.acts-list details { margin: 8px 0 0; font-size: 0.86rem; }
.acts-list details summary { cursor: pointer; color: var(--accent-ink); }
.acts-list details form { margin-top: 8px; flex-wrap: wrap; }
.acts-list + .sub { margin-top: 12px; }

/* 利用規約などへのリンクの行 */
.legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 36px; font-size: 0.82rem; color: var(--sub); }
.namef input { width: min(420px, 100%); }

/* ログインの前に出る、知らせの画面 */
.notice-page { min-height: 100vh; }
.notice { display: grid; justify-items: start; gap: 12px; padding: 14vh 28px 40px; max-width: 640px; }
.notice > .ic { width: 40px; height: 40px; color: var(--faint); }
.notice h1 { font-size: 1.45rem; line-height: 1.5; }
.notice p { color: var(--ink-2); }
.legal-page { padding: 40px 28px 80px; max-width: 86ch; }
.legal-page h1 { font-size: 1.62rem; margin-bottom: 18px; }
.legal-page section { margin-top: 26px; }
.legal-page h2 { font-size: 1rem; margin-bottom: 6px; }
.legal-page section p { color: var(--ink-2); line-height: 1.9; }

@media (max-width: 820px) {
  .head .acts { margin-left: 0; }
  .copyrow { flex-wrap: wrap; }
  .copyrow input { flex-basis: 100%; }
  .once { grid-template-columns: minmax(0, 1fr); }
  .once dt { border-bottom: 0; padding-bottom: 2px; background: none; }
  .once dd { padding-top: 2px; }
  .acts-list > li { flex-direction: column; align-items: stretch; gap: 10px; }
  .acts-list > li > form .btn, .acts-list > li.pw > div > form .btn.primary { width: 100%; height: 42px; }
  .cfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice { padding: 9vh 20px 40px; }
  .legal-page { padding: 24px 18px 60px; }
  /* 一覧の表は、狭い画面では 1 社（1 人）を 1 つの札にする */
  .list.ops-list thead, .list.users thead { display: none; }
  .list.ops-list tr, .list.users tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule-2); }
  .list.ops-list td, .list.users td { border: 0; padding: 0; text-align: left; }
  .list.ops-list td:nth-child(1), .list.users td:nth-child(1) { grid-column: 1; }
  .list.ops-list td:nth-child(2), .list.users td:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; }
  .list.ops-list td:nth-child(n + 3) { grid-column: 1 / -1; font-family: var(--font); font-size: 0.82rem; color: var(--sub); }
  .list.ops-list td:nth-child(3)::before { content: "利用者 "; }
  .list.ops-list td:nth-child(5)::before { content: "最終ログイン "; }
  .list.ops-list td:nth-child(n + 3) small { display: inline; margin-left: 6px; }
  .list.users td:nth-child(3) { grid-column: 1 / -1; }
  .list.users td:nth-child(4) { grid-column: 1; align-self: center; font-size: 0.8rem; }
  .list.users td:nth-child(4)::before { content: "最終ログイン "; font-family: var(--font); }
  .list.users td:nth-child(5) { grid-column: 2; }
}
/* 操作履歴: 「誰が」「どの会社に」は、右が空いているのに 2 行に折れていた。パソコン幅では折らない */
@media (min-width: 821px) { .list.opslog td:nth-child(2), .list.opslog td:nth-child(3) { white-space: nowrap; } }

/* プランと請求（スマホ）: 札は縦 1 列。言葉の途中で折らない */
.cfacts dd, .cfacts dd small { word-break: auto-phrase; }
@media (max-width: 820px) { .cfacts.bill { grid-template-columns: minmax(0, 1fr); } }
