/* Ocean Sakura Portal
   見せる相手は Starboard（マイアミ）と社内。落ち着いた紺を基調に、
   「何が自分宛か」だけが一目で分かる強弱にする。装飾は足さない。 */

:root {
  --navy: #16324f;
  --navy-2: #1f4e79;
  --ink: #1a2733;
  --muted: #6b7a89;
  --line: #dde5ec;
  --bg: #f5f8fa;
  --card: #ffffff;
  --red: #c0392b;
  --red-bg: #fdefec;
  --amber: #b57415;
  --amber-bg: #fdf6e7;
  --green: #1e6b3f;
  --green-bg: #eef8f1;
  --blue-bg: #eef4f9;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.65 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1560px; margin: 0 auto; padding: 0 32px; }
/* チャットドックを開いている間は本文を左に寄せる */
body.dock-open .wrap { max-width: none; margin: 0; padding-right: 400px; }

/* ---------- ヘッダー ---------- */
.top { background: var(--navy); color: #fff; }
.topbar {
  display: flex; align-items: center; gap: 28px;
  padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, #d98b8b, #b8536b);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  letter-spacing: .04em;
}
.brand-text b { display: block; font-size: 15px; letter-spacing: .01em; }
.brand-text small { display: block; font-size: 11.5px; color: #a8bdd1; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: #cfdcea; padding: 7px 12px; border-radius: 7px; font-size: 14px;
}
.nav a:hover { background: rgba(255,255,255,.09); text-decoration: none; }
.nav a.on { background: #fff; color: var(--navy); font-weight: 600; }
.topright { display: flex; align-items: center; gap: 16px; }
.langsw { display: flex; gap: 2px; background: rgba(255,255,255,.1); border-radius: 6px; padding: 2px; }
.langsw a { color: #cfdcea; font-size: 12px; padding: 3px 9px; border-radius: 4px; }
.langsw a.on { background: #fff; color: var(--navy); font-weight: 600; }
.langsw a:hover { text-decoration: none; }
.who { line-height: 1.25; }
.who b { display: block; font-size: 13px; }
.who small { display: block; font-size: 11px; color: #a8bdd1; }
.signout { color: #a8bdd1; font-size: 12.5px; }
.confbar {
  background: #0f2439; color: #e6b8b8; font-size: 11.5px;
  letter-spacing: .06em; text-transform: uppercase; text-align: center;
  padding: 5px 12px; border-top: 1px solid rgba(255,255,255,.07);
}

.main { padding: 30px 24px 50px; }

/* ---------- 見出し ---------- */
h1 { font-size: 25px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; color: var(--navy); }
h3 { font-size: 14px; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.page-head { margin-bottom: 22px; }

/* ---------- カード ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; margin-bottom: 18px;
}
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols-detail { display: grid; grid-template-columns: minmax(0,0.85fr) minmax(0,1.15fr); gap: 20px; }
@media (max-width: 860px) { .cols-detail { grid-template-columns: 1fr; } }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .cols2, .cols3 { grid-template-columns: 1fr; } }

/* ---------- ヒーロー（あなた宛） ---------- */
.hero {
  background: linear-gradient(135deg, #16324f, #1f4e79);
  color: #fff; border-radius: 14px; padding: 26px 28px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 34px; flex-wrap: wrap;
}
.hero-n { font-size: 62px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.hero-label { font-size: 13.5px; color: #b7cbdd; margin-bottom: 3px; }
.hero-body { flex: 1 1 320px; }
.hero-body p { margin: 6px 0 0; color: #cfdcea; font-size: 13.5px; }
.hero-aging {
  margin-left: auto; text-align: right; border-left: 1px solid rgba(255,255,255,.18);
  padding-left: 26px;
}
.hero-aging b { display: block; font-size: 30px; line-height: 1.15; }
.hero-aging span { font-size: 12.5px; color: #b7cbdd; }
.hero-cta {
  display: inline-block; margin-top: 12px; background: #fff; color: var(--navy);
  font-weight: 600; font-size: 13.5px; padding: 9px 18px; border-radius: 8px;
}
.hero-cta:hover { text-decoration: none; background: #eef4f9; }
.hero.clear { background: linear-gradient(135deg, #1e6b3f, #2c8b56); }

/* ---------- 小さい数字カード ---------- */
.tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tile {
  flex: 1 1 170px; background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; padding: 15px 17px;
}
.tile b { display: block; font-size: 27px; line-height: 1.15; letter-spacing: -.02em; }
.tile span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tile.warn b { color: var(--red); }
.tile.ok b { color: var(--green); }

/* ---------- テーブル ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 11.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
  padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td {
  padding: 11px 10px; border-bottom: 1px solid #eef2f6; vertical-align: top;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tr.mine td { background: #fbfdff; }
table.data tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--navy-2); }
table.data tr.done td { color: var(--muted); }
.num { text-align: right; white-space: nowrap; }
.qtitle { font-weight: 600; color: var(--ink); display: block; }
.qbody { color: var(--muted); font-size: 12.5px; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qno { font-family: ui-monospace, "SF Mono", monospace; font-size: 11.5px;
  color: var(--muted); }

/* ---------- バッジ ---------- */
.badge {
  display: inline-block; font-size: 11.5px; padding: 2.5px 9px; border-radius: 999px;
  background: var(--blue-bg); color: var(--navy-2); white-space: nowrap; font-weight: 500;
}
.badge.b-you { background: var(--navy); color: #fff; font-weight: 600; }
.badge.b-open { background: var(--amber-bg); color: var(--amber); }
.badge.b-part { background: #f2ecfa; color: #6b3fa0; }
.badge.b-done { background: var(--green-bg); color: var(--green); }
.badge.b-stale { background: var(--red-bg); color: var(--red); }
.badge.b-cat { background: #eef2f6; color: #4a5b6b; }
.badge.b-urgent { background: var(--red-bg); color: var(--red); font-weight: 600; }
.badge.b-high { background: var(--amber-bg); color: var(--amber); }

.due { white-space: nowrap; font-size: 12.5px; }
.due.overdue { color: var(--red); font-weight: 600; }
.due.today { color: var(--red); font-weight: 600; }
.due.soon { color: var(--amber); font-weight: 600; }
.age { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.age.hot { color: var(--red); font-weight: 600; }

/* ---------- 固定日付の帯 ---------- */
.fixed-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.fixed-item {
  flex: 0 0 auto; min-width: 200px; max-width: 280px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: var(--card);
}
.fixed-item .d { font-size: 13px; font-weight: 700; color: var(--navy); }
.fixed-item.overdue { border-color: #f0c8c1; background: var(--red-bg); }
.fixed-item.overdue .d, .fixed-item.today .d { color: var(--red); }
.fixed-item.today { border-color: #f0c8c1; background: var(--red-bg); }
.fixed-item.soon { border-color: #ead9b0; background: var(--amber-bg); }
.fixed-item .w { font-size: 12.5px; color: var(--ink); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 論点別 ---------- */
.topic-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid #eef2f6; font-size: 13.5px;
}
.topic-row:last-child { border-bottom: 0; }
.topic-row .name { flex: 0 0 150px; }
.topic-bar { flex: 1; height: 8px; background: #eef2f6; border-radius: 4px; overflow: hidden; }
.topic-bar i { display: block; height: 100%; background: var(--navy-2); }
.topic-row .n { flex: 0 0 78px; text-align: right; color: var(--muted); font-size: 12.5px; }

/* ---------- 決定事項カード ---------- */
.dec { border: 1px solid var(--line); border-radius: 11px; padding: 16px 18px;
  margin-bottom: 12px; background: var(--card); }
.dec.overdue, .dec.today { border-left: 4px solid var(--red); }
.dec.soon { border-left: 4px solid var(--amber); }
.dec.done { opacity: .62; }
.dec h3 { font-size: 15px; margin-bottom: 8px; }
.dec .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px;
  color: var(--muted); margin-bottom: 10px; }
.dec .blocks {
  background: var(--red-bg); border-radius: 8px; padding: 10px 13px;
  font-size: 13px; border: 1px solid #f4d7d1;
}
.dec .blocks b { display: block; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--red); margin-bottom: 3px; }
.dec .bg { font-size: 12.5px; color: var(--muted); margin-top: 9px; }

/* ---------- 絞り込み ---------- */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 15px; margin-bottom: 16px;
}
.filters select, .filters input[type=search] {
  font: inherit; font-size: 13.5px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; color: var(--ink);
}
.filters input[type=search] { min-width: 200px; }
.chip {
  font-size: 13px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted);
}
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.chip:hover { text-decoration: none; }

/* ---------- ボタン・フォーム ---------- */
.btn {
  display: inline-block; font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer;
}
.btn:hover { text-decoration: none; background: #f7fafc; }
.btn-primary { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn-primary:hover { background: var(--navy); }
.linkbtn { background: none; border: 0; color: var(--navy-2); cursor: pointer;
  font: inherit; font-size: 12.5px; padding: 0; }
label.block { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
label.block input, label.block select, label.block textarea {
  display: block; width: 100%; font: inherit; font-size: 14px; margin-top: 4px;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
}
textarea { resize: vertical; min-height: 110px; }
.frow { display: flex; gap: 12px; flex-wrap: wrap; }
.frow > label { flex: 1 1 170px; }

/* ---------- 回答欄 ---------- */
/* 書く場所は、読む場所より大きくする。ここが小さいと回答されない。 */
.answer-box {
  border: 2px solid var(--navy-2); border-radius: 12px; padding: 22px 24px;
  background: #fbfdff;
}
.answer-box h2 { margin-bottom: 4px; font-size: 17px; }
.answer-box .hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.answer-box textarea {
  width: 100%; display: block; font: inherit; font-size: 15px; line-height: 1.7;
  min-height: 260px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); resize: vertical;
}
.answer-box textarea:focus { outline: 2px solid var(--navy-2); outline-offset: -1px; }
.answer-box .btn { font-size: 14.5px; padding: 11px 22px; }
.reply { border-left: 3px solid var(--line); padding: 4px 0 4px 14px; margin-bottom: 14px; }
.reply .rmeta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.reply .rbody { font-size: 13.5px; white-space: pre-wrap; }
.reply.queued { border-left-color: var(--amber); }
.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 7px 14px 7px 0;
  white-space: nowrap; vertical-align: top; width: 1%; }
.kv td { padding: 7px 0; }
.qtext { font-size: 16px; line-height: 1.6; margin: 0 0 14px; }

.banner { border-radius: 9px; padding: 11px 15px; font-size: 13.5px; margin-bottom: 16px; }
.banner.ok { background: var(--green-bg); border: 1px solid #bfe0c9; color: var(--green); }
.banner.warn { background: var(--amber-bg); border: 1px solid #ead9b0; color: var(--amber); }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 14px; }

/* ---------- 工程 ---------- */
.gantt { position: relative; overflow-x: auto; }
.g-months { position: relative; height: 22px; border-bottom: 1px solid var(--line);
  margin-bottom: 8px; min-width: 640px; }
.g-months span { position: absolute; font-size: 11px; color: var(--muted);
  transform: translateX(-1px); border-left: 1px solid var(--line);
  padding-left: 5px; height: 22px; }
.g-row { display: flex; align-items: center; gap: 14px; padding: 5px 0; min-width: 640px; }
.g-name { flex: 0 0 260px; font-size: 13px; }
.g-name small { display: block; color: var(--muted); font-size: 11.5px; }
.g-track { position: relative; flex: 1; height: 26px; background: #eef2f6;
  border-radius: 6px; }
.g-bar { position: absolute; top: 4px; height: 18px; border-radius: 5px;
  background: var(--navy-2); }
.g-bar.done { background: #4b9e6d; }
.g-bar.stack { background: var(--red); }
.g-bar.pending { background: #d9a441; }
.g-today { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--red); }
.g-today i { position: absolute; top: -16px; left: -16px; font-size: 10px;
  color: var(--red); font-style: normal; white-space: nowrap; }

/* ---------- ログイン ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center;
  padding: 40px 20px; background: linear-gradient(160deg, #16324f 0%, #24506f 100%); }
.auth-card { width: 100%; max-width: 460px; background: #fff; border-radius: 16px;
  padding: 42px 44px; box-shadow: 0 22px 60px rgba(10,30,50,.3); }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .m { width: 50px; height: 50px; border-radius: 13px; margin: 0 auto 12px;
  background: linear-gradient(140deg, #d98b8b, #b8536b); display: grid;
  place-items: center; color: #fff; font-weight: 700; letter-spacing: .04em; }
.auth-brand b { display: block; font-size: 19px; color: var(--navy); }
.auth-brand small { color: var(--muted); font-size: 13px; }
.auth-lead { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
.auth-google { display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 9px; padding: 12px; font-weight: 600;
  font-size: 14px; color: var(--ink); }
.auth-google:hover { background: #f7fafc; text-decoration: none; }
.g-mark { width: 21px; height: 21px; border-radius: 50%; background: #fff;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-weight: 700; color: #4285f4; font-size: 13px; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted);
  font-size: 12px; margin: 20px 0; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.auth-form input { width: 100%; font: inherit; font-size: 15px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 9px; margin-bottom: 14px; }
.auth-submit { width: 100%; background: var(--navy-2); color: #fff; border: 0;
  border-radius: 9px; padding: 12px; font: inherit; font-size: 14.5px;
  font-weight: 600; cursor: pointer; }
.auth-submit:hover { background: var(--navy); }
.auth-notice { border-radius: 9px; padding: 13px 15px; font-size: 13px; margin-bottom: 18px; }
.auth-notice.ok { background: var(--green-bg); border: 1px solid #bfe0c9; color: var(--green); }
.auth-notice.err { background: var(--red-bg); border: 1px solid #f0c8c1; color: var(--red); }
.auth-notice b { display: block; margin-bottom: 3px; }
.auth-notice p { margin: 0; }
.auth-help { text-align: center; color: var(--muted); font-size: 12px;
  margin: 22px 0 0; line-height: 1.6; }
.auth-foot { text-align: center; color: #9bb4c9; font-size: 11.5px; margin-top: 22px; }

/* ---------- フッター ---------- */
.foot { border-top: 1px solid var(--line); background: #fff; padding: 24px 0 34px; }
.foot .disc { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin: 0 0 10px; }
.foot .sig { font-size: 11.5px; color: #9aa9b7; margin: 0; }

@media (max-width: 720px) {
  .nav { order: 3; width: 100%; margin-left: 0; }
  .hero { gap: 18px; }
  .hero-aging { margin-left: 0; border-left: 0; padding-left: 0; text-align: left; }
  .g-name { flex: 0 0 170px; }
}

/* ---------- チャットドック（右側常駐） ---------- */
/* 案件のやり取りがメールに散る問題への対処。相手ごとに場所を分け、
   書いた内容は参加者へメール転送する（メールしか見ない人にも届く）。 */
.dock-toggle {
  position: fixed; right: 0; top: 42%; z-index: 60;
  background: var(--navy); color: #fff; border: 0; cursor: pointer;
  border-radius: 10px 0 0 10px; padding: 14px 11px; font: inherit; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: -3px 0 14px rgba(10,30,50,.18);
}
.dock-toggle:hover { background: var(--navy-2); }
.dock-toggle-icon { font-size: 17px; line-height: 1; }
.dock-toggle-label { writing-mode: vertical-rl; letter-spacing: .12em; font-size: 11.5px; }
.dock-badge {
  position: absolute; top: -7px; left: -7px; background: var(--red); color: #fff;
  border-radius: 999px; min-width: 20px; height: 20px; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; padding: 0 5px;
}
body.dock-open .dock-toggle { display: none; }

.dock {
  position: fixed; right: 0; top: 0; bottom: 0; width: 400px; z-index: 61;
  background: #fff; border-left: 1px solid var(--line);
  box-shadow: -6px 0 26px rgba(10,30,50,.13);
  display: flex; flex-direction: column;
}
.dock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--navy); color: #fff; flex: none;
}
.dock-head b { font-size: 14.5px; }
.dock-x { background: none; border: 0; color: #cfdcea; font-size: 24px; line-height: 1;
  cursor: pointer; padding: 0 4px; }
.dock-x:hover { color: #fff; }
.dock-tabs { display: flex; gap: 4px; padding: 10px 12px 0; flex: none; flex-wrap: wrap; }
.dock-tab {
  flex: 1 1 auto; background: #eef2f6; border: 0; border-radius: 8px 8px 0 0;
  padding: 8px 9px; font: inherit; font-size: 11.5px; color: var(--muted);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dock-tab.on { background: var(--blue-bg); color: var(--navy); font-weight: 700; }
.dock-meta { padding: 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.dock-desc { margin: 0 0 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.dock-relay { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.dock-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; background: #f8fafc; }
.dock-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 6px; }
.dock-msg {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 13px; margin-bottom: 10px;
}
.dock-msg.mine { background: var(--blue-bg); border-color: #cfe0ee; }
.dm-head { display: flex; align-items: baseline; gap: 7px; margin-bottom: 4px; flex-wrap: wrap; }
.dm-head b { font-size: 12.5px; }
.dm-org { font-size: 11px; color: var(--muted); background: #eef2f6; border-radius: 4px; padding: 0 5px; }
.dm-at { font-size: 11px; color: var(--muted); margin-left: auto; }
.dm-body { font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.dm-foot { font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.dock-form { flex: none; border-top: 1px solid var(--line); padding: 12px 16px 16px; }
.dock-form textarea {
  width: 100%; font: inherit; font-size: 14px; line-height: 1.6; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px; resize: vertical; min-height: 76px;
}
.dock-form textarea:focus { outline: 2px solid var(--navy-2); outline-offset: -1px; }
.dock-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; gap: 10px; }
.dock-emailchk { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
  .dock { width: 100%; }
  body.dock-open .wrap { padding-right: 32px; }
}

/* ---------- 危険度パネル ---------- */
/* 状況を並べるだけでは危機感が伝わらない。何がまずいかを言い切る場所。 */
.risk-panel {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--red);
  border-radius: 12px; padding: 20px 24px; margin-bottom: 18px;
}
.risk-panel.calm { border-left-color: #4b9e6d; }
.risk-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.risk-head h2 { margin: 0; font-size: 17px; }
.risk-count { font-size: 12.5px; color: var(--muted); }
.risk-ship {
  margin-left: auto; font-size: 12.5px; color: var(--muted);
  background: #eef2f6; border-radius: 8px; padding: 5px 12px;
}
.risk-ship b { font-size: 17px; color: var(--red); }
.risk-item { display: flex; gap: 14px; padding: 13px 0; border-top: 1px solid #eef2f6; }
.risk-item:first-of-type { border-top: 0; padding-top: 0; }
.risk-tag {
  flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .07em;
  padding: 4px 9px; border-radius: 5px; height: fit-content; white-space: nowrap;
}
.risk-tag.critical { background: var(--red); color: #fff; }
.risk-tag.warning  { background: var(--amber-bg); color: var(--amber); border: 1px solid #ead9b0; }
.risk-tag.info     { background: #eef2f6; color: var(--muted); }
.risk-body { flex: 1; min-width: 0; }
.risk-body h3 { margin: 0 0 3px; font-size: 14.5px; }
.risk-body p { margin: 0; font-size: 13.5px; color: #43535f; line-height: 1.7; }
.risk-body a { font-size: 12.5px; }
.risk-ok { color: var(--green); font-size: 14px; margin: 0; }

/* ---------- 顧客が書く欄 ---------- */
/* 「書ける」ことが伝わらないと誰も書かない。読む表より目立たせる。 */
.add-panel { border: 2px solid var(--navy-2); background: #fbfdff; }
.add-panel h2 { font-size: 17px; }
.add-panel textarea { min-height: 120px; }
.section-split {
  font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  margin: 30px 0 12px; padding-top: 18px; border-top: 1px solid var(--line);
}
.inline-status select { font: inherit; font-size: 12px; padding: 3px 7px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* ---------- 工程（依存関係） ---------- */
.g-body { position: relative; min-width: 900px; }
.g-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.g-link { fill: none; stroke: #a9bccd; stroke-width: 1.4; }
.g-link.broken { stroke: var(--red); stroke-width: 2; stroke-dasharray: 4 3; }
.g-row { display: flex; align-items: center; gap: 14px; height: 40px; position: relative; z-index: 2; }
.g-name { flex: 0 0 300px; font-size: 13px; line-height: 1.3; }
.g-name small { display: block; color: var(--muted); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-track { position: relative; flex: 1; height: 26px; background: #eef2f6; border-radius: 6px; }
.g-bar { position: absolute; top: 4px; height: 18px; border-radius: 5px;
  background: #d9a441; overflow: hidden; }
.g-bar i { display: block; height: 100%; background: rgba(255,255,255,.45); }
.g-bar.done { background: #4b9e6d; }
.g-bar.blocked { background: var(--red); }
.g-bar.in_progress { background: var(--navy-2); }
.g-bar.late { box-shadow: 0 0 0 2px rgba(192,57,43,.35); }
.g-bar.ms { border-radius: 3px; min-width: 9px; background: var(--navy); }
.g-side { flex: 0 0 150px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.g-blocks { font-size: 10.5px; color: var(--red); font-weight: 600; }

/* ---------- 依頼メニュー ---------- */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.offer { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; display: flex; flex-direction: column; }
.offer-top { display: flex; gap: 6px; margin-bottom: 9px; flex-wrap: wrap; }
.offer h3 { font-size: 15.5px; margin: 0 0 8px; line-height: 1.45; }
.offer-sum { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0 0 14px; flex: 1; }
.offer-facts { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.offer-facts div { display: flex; flex-direction: column; }
.offer-facts span { font-size: 10.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; }
.offer-facts b { font-size: 14.5px; }
.offer-note { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }
.offer-state { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.offer-input { width: 100%; font: inherit; font-size: 13px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 9px; }
.offer-btn { width: 100%; }
.offer-edit { margin-top: 12px; font-size: 12px; }
.offer-edit summary { color: var(--muted); cursor: pointer; }

/* ---------- 追加工数の承認 ---------- */
.cr { display: flex; gap: 20px; padding: 16px 0; border-top: 1px solid #eef2f6; }
.cr:first-of-type { border-top: 0; padding-top: 0; }
.cr.pending { background: linear-gradient(90deg, var(--amber-bg), transparent 40%);
  border-radius: 9px; padding-left: 14px; }
.cr-main { flex: 1; min-width: 0; }
.cr-main h3 { font-size: 15px; margin: 0 0 5px; }
.cr-reason { font-size: 13px; color: var(--muted); margin: 0 0 8px; line-height: 1.7; }
.cr-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; }
.cr-hours { background: var(--navy); color: #fff; border-radius: 6px; padding: 3px 10px; font-weight: 700; }
.cr-amt { font-weight: 700; }
.cr-side { flex: 0 0 250px; }
.cr-note { width: 100%; font: inherit; font-size: 12.5px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 7px; margin-bottom: 8px; }
.cr-btns { display: flex; gap: 8px; }

/* ---------- 書類・商品 ---------- */
.vis-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.vis-label { font-size: 13px; color: var(--muted); }
.vis-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
table.data.compact td { padding: 7px 9px; font-size: 12.5px; }
.pager { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 16px; }
.disc-note { font-size: 12px; color: var(--muted); background: #eef2f6; border-radius: 9px;
  padding: 12px 16px; margin-top: 18px; line-height: 1.7; }
.mt { margin-top: 16px; }

/* ---------- アシスタント・チケット・履歴・ブランド ---------- */
.dock-mode { display: flex; gap: 4px; padding: 10px 12px 0; flex: none; }
.dock-mode-b { flex: 1; background: #eef2f6; border: 0; border-radius: 8px; padding: 8px;
  font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.dock-mode-b.on { background: var(--navy); color: #fff; font-weight: 700; }
.bot-lead { font-size: 12px; color: var(--muted); margin: 0 0 9px; line-height: 1.6; }
.bot-warn { font-size: 11px; color: var(--amber); line-height: 1.5; flex: 1; }
.bot-prop { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.bot-prop-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 4px; }
.bot-prop-t { font-size: 13px; background: #fffdf3; border: 1px solid #ead9b0;
  border-radius: 7px; padding: 9px 11px; margin-bottom: 9px; white-space: pre-wrap; }
.bot-done { font-size: 12px; color: var(--green); font-weight: 600; }
.bot-apply { width: 100%; font-size: 13px; padding: 8px; }

.reply.internal { border-left-color: var(--amber); background: var(--amber-bg);
  border-radius: 0 8px 8px 0; padding-right: 12px; }
.hist-sum { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.hist { list-style: none; padding: 10px 0 0; margin: 0; font-size: 12.5px; }
.hist li { padding: 5px 0; border-bottom: 1px solid #eef2f6; line-height: 1.6; }
.chg { font-size: 12px; margin: 2px 0; }
.chg-from { color: var(--muted); text-decoration: line-through; }
.chg-to { color: var(--navy); font-weight: 600; }

.brand { padding: 16px 22px; }
.brand-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-head h2 { margin: 0; font-size: 16px; flex: 0 0 auto; }
.brand-loc { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 12px;
  color: var(--muted); }
.brand-bar { width: 110px; height: 8px; background: #eef2f6; border-radius: 4px; overflow: hidden; }
.brand-bar i { display: block; height: 100%; background: #4b9e6d; }
.brand-more { cursor: pointer; color: var(--navy-2); font-size: 12.5px; margin-top: 10px; }

.member { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.member > summary { padding: 12px 16px; cursor: pointer; display: flex; gap: 10px;
  align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.member-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.feat-item { display: flex; align-items: center; gap: 8px; font-size: 13px;
  background: #f7fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; }
.mb { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #eef2f6; }
.tpl-panel { border-left: 4px solid var(--navy-2); background: #fbfdff; }
.mail-body { white-space: pre-wrap; font-size: 14px; line-height: 1.85; word-break: break-word; }

/* ---------- 工数の推定 ---------- */
/* 推定と実績を見た目でも混ぜない。承認するまで保存されないことが伝わる作りにする。 */
.est-panel { border-left: 4px solid var(--amber); background: #fffdf7; }
.inline-est { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inline-est .block { margin-bottom: 0; }

/* ---------- メールと質問の突き合わせ ---------- */
/* 相手にアドレスを選ばせない代わりに、こちらで結びつける画面。
   AIの判定は提案どまりなので、人が直せる形（編集可能なテキストエリア）にする。 */
.match-panel { border-left: 4px solid var(--navy-2); background: #fbfdff; }
.match { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  margin-bottom: 12px; background: #fff; }
.match-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  cursor: pointer; margin-bottom: 6px; }
.match-head b { font-size: 14px; }
.match-why { font-size: 12.5px; color: var(--muted); margin: 0 0 9px; line-height: 1.6; }
.match textarea { width: 100%; font: inherit; font-size: 13.5px; line-height: 1.65;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }

/* 月あたりの枠。超過分は色を変えて、見落とせないようにする。 */
.cap-bar { display:block; height:10px; background:#eef2f6; border-radius:5px; overflow:hidden; }
.cap-bar i { display:block; height:100%; background:var(--navy-2); }
.cap-bar i.over { background:var(--red); }

/* ---------- データ転送 ---------- */
/* 「置く」動作を一番大きく見せる。ここが小さいと誰も使わない。 */
.drop-panel { border: 2px solid var(--navy-2); background: #fbfdff; }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 2px dashed #b9cbdb; border-radius: 14px; padding: 40px 24px;
  background: #fff; cursor: pointer; margin-bottom: 20px; text-align: center;
}
.drop:hover { border-color: var(--navy-2); background: #f7fbfe; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--navy-2);
  color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.drop-main { font-size: 16px; font-weight: 600; color: var(--navy); }
.drop-sub { font-size: 12.5px; color: var(--muted); max-width: 620px; word-break: break-all; }
.btn-lg { font-size: 15px; padding: 12px 28px; }
.vis-block { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  margin: 4px 0 18px; background: #fff; }
.vis-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.vis-head b { font-size: 13.5px; }
.vis-item { display: flex; align-items: center; gap: 7px; font-size: 13.5px;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 13px; background: #fff; }
.vis-item.fixed { background: #eef4f9; border-color: #cfe0ee; color: var(--navy); }
.vis-item i { font-size: 11px; color: var(--muted); font-style: normal; }
.transfer { padding: 18px 22px; }
.tr-head { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap;
  margin-bottom: 10px; }
.tr-head h3 { margin: 0 0 5px; font-size: 15.5px; }
.tr-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.tr-vis { text-align: right; font-size: 12px; }
.tr-msg { font-size: 13.5px; color: #43535f; background: #f7fafc; border-radius: 8px;
  padding: 10px 14px; margin: 0 0 12px; line-height: 1.7; }

/* ---------- 通知・承認依頼の登録簿 ---------- */
/* 種別が一目で分からないと、承認依頼が情報共有に埋もれる。色で分ける。 */
.badge.nk-approval { background: var(--red); color: #fff; font-weight: 700; }
.badge.nk-reminder { background: var(--amber-bg); color: var(--amber); border: 1px solid #ead9b0; }
.badge.nk-request  { background: #f2ecfa; color: #6b3fa0; }
.badge.nk-notice   { background: var(--blue-bg); color: var(--navy-2); }
.badge.nk-info     { background: #eef2f6; color: var(--muted); }
.acks { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.ack { font-size: 11px; border-radius: 5px; padding: 2px 7px; background: #eef2f6; color: var(--muted); }
.ack-approved { background: var(--green-bg); color: var(--green); }
.ack-rejected { background: var(--red-bg); color: var(--red); }
/* 使い分けを画面に置く。置かないと入れ物が増えるほど迷う。 */
.kind-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px; margin-bottom: 20px; }
.kg { border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px; background: #fff; }
.kg b { display: block; font-size: 13px; margin-bottom: 3px; }
.kg span { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
