/* hoshitori.jp Phase 1A — 白基調・SSR・PC優先 */
* { box-sizing: border-box; }
body { margin: 0; color: #1a1a1a; background: #fff;
  font-family: "Hiragino Kaku Gothic ProN","Yu Gothic","Meiryo",sans-serif; line-height: 1.6; }
a { color: #2b6cb0; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; align-items: center; gap: 24px; padding: 10px 22px;
  border-bottom: 2px solid #2b6cb0; position: sticky; top: 0; background: #fff; z-index: 5; }
.brand { font-weight: 700; font-size: 18px; color: #204d78; }
.brand .tag { font-size: 11px; color: #fff; background: #b0562b; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.topbar nav a { margin-right: 14px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 22px 70px; }
.foot { max-width: 1180px; margin: 0 auto; padding: 16px 22px; color: #777; font-size: 12px; border-top: 1px solid #eee; }
h1 { font-size: 22px; border-bottom: 3px solid #2b6cb0; padding-bottom: 8px; }
h1 .sub, .sub { font-size: 13px; color: #667; font-weight: 400; }
h2 { font-size: 16px; color: #2b6cb0; border-left: 5px solid #2b6cb0; padding-left: 9px; margin-top: 26px; }
.crumb { font-size: 13px; margin: 0 0 6px; }
table { border-collapse: collapse; width: 100%; margin: 10px 0 18px; font-size: 13px; }
th, td { border: 1px solid #dfe3e8; padding: 6px 9px; text-align: left; vertical-align: top; }
th { background: #f3f6fa; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr:nth-child(even) td { background: #fafbfc; }
table.kv th { width: 130px; }
tr.row-win td { background: #fff7e6 !important; font-weight: 600; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.scroll-x table { min-width: 520px; }
.dash-search { display: flex; gap: 6px; margin: 8px 0 16px; max-width: 560px; }
.dash-search input { flex: 1; min-width: 0; padding: 8px 10px; }
@media (max-width: 640px) { .dash-search { flex-wrap: wrap; } }
.mono { font-family: ui-monospace, "Consolas", monospace; word-break: break-all; }
.small { font-size: 11.5px; color: #667; }
.tax { font-size: 10px; color: #999; margin-left: 3px; }
.empty { text-align: center; color: #999; padding: 24px; }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; color: #fff; margin-right: 3px; }
.badge-bid { background: #d69e2e; }
.badge-contract { background: #2f855a; }
.badge-final { background: #718096; }
.badge-prom { background: #2b6cb0; }
.badge-plain { background: #4a5568; }
.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px;
  background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; }
.search input[type=text] { flex: 1 1 320px; }
.search input, .search select, .search button { padding: 6px 8px; border: 1px solid #cbd5e0; border-radius: 5px; font-size: 13px; }
.search button { background: #2b6cb0; color: #fff; border-color: #2b6cb0; cursor: pointer; }
.search .clear { font-size: 12px; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 16px 0; }
.kpi { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.kpi .box { border: 1px solid #d6e3f0; border-radius: 8px; padding: 10px 16px; background: #f9fbfe; min-width: 150px; }
.kpi .lbl { font-size: 12px; color: #667; }
.kpi .val { font-size: 20px; font-weight: 700; color: #204d78; }
.kbox { border: 1px solid #cddaea; border-radius: 8px; padding: 4px 14px 8px; background: #fbfdff; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.note { background: #f5f8fc; border: 1px solid #d6e3f0; border-radius: 6px; padding: 8px 12px; font-size: 12.5px; color: #445; }
/* --- 管理UI(Phase 1B) --- */
.tag.admin { background: #6b21a8; }
.flash { border-radius: 6px; padding: 9px 13px; margin: 10px 0; font-size: 13px; }
.flash.ok { background: #e6f6ec; border: 1px solid #7cc79a; color: #216e42; }
.flash.ng { background: #fdecec; border: 1px solid #e29a9a; color: #9b2c2c; }
.card { border: 1px solid #d6e3f0; border-radius: 8px; padding: 14px 16px; margin: 14px 0; background: #fbfdff; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.form-row label.lbl { width: 120px; font-size: 13px; color: #445; font-weight: 600; }
.form-row input[type=text], .form-row input[type=email], .form-row textarea {
  flex: 1 1 320px; padding: 6px 9px; border: 1px solid #cbd5e0; border-radius: 5px; font-size: 13px; }
.form-row textarea { min-height: 48px; font-family: inherit; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; flex: 1 1 320px; }
.checks label { font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid #dbe3ec; border-radius: 5px; padding: 3px 8px; cursor: pointer; }
.btn { display: inline-block; background: #2b6cb0; color: #fff; border: 1px solid #2b6cb0;
  border-radius: 5px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.btn.sec { background: #fff; color: #2b6cb0; }
.btn.warn { background: #fff; color: #9b2c2c; border-color: #e29a9a; }
.btn.small { padding: 3px 9px; font-size: 12px; }
.inline { display: inline; }
.muted { color: #999; }
.lead { color: #445; font-size: 14px; margin: 6px 0 16px; }

/* --- 顧客ダッシュボード(Phase 1C第2弾) ---
   アクセントは hoshitori(星取)のアイデンティティ＝夜空の紺 + 控えめな星の金。 */
:root { --star-navy: #2b3a67; --star-gold: #d8a53a; --star-navy-soft: #eef1f8; }
.tag.portal { background: var(--star-navy); }
.brand .star { color: var(--star-gold); margin-right: 2px; }

.dash-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; padding: 14px 16px; margin: 4px 0 4px;
  background: linear-gradient(180deg, var(--star-navy-soft), #fff);
  border: 1px solid #e1e6f2; border-radius: 10px; }
.dash-hello { font-size: 18px; font-weight: 700; color: var(--star-navy); }
.dash-sub { font-size: 13px; color: #556; margin-top: 2px; }
.dash-badge { font-size: 12px; font-weight: 700; color: #7a5b00; background: #fdf2d0;
  border: 1px solid #ecd694; border-radius: 8px; padding: 6px 10px; }
.dash-badge span { display: block; font-weight: 400; color: #8a7330; font-size: 11px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin: 18px 0 8px; }
.dash-card { display: flex; flex-direction: column; gap: 8px; position: relative;
  background: #fff; border: 1px solid #e1e6f2; border-radius: 12px; padding: 18px 18px 16px;
  text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
a.dash-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(43,58,103,.13);
  border-color: var(--star-navy); text-decoration: none; }
.dash-ic { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 22px; color: #fff; line-height: 1;
  background: var(--star-navy); box-shadow: inset 0 0 0 2px rgba(216,165,58,.35); }
.dash-card-title { font-size: 15.5px; font-weight: 700; color: var(--star-navy); }
.dash-card-desc { font-size: 13px; color: #556; line-height: 1.55; }
.dash-card-sum { font-size: 12.5px; color: #33415c; background: var(--star-navy-soft);
  border-radius: 6px; padding: 4px 9px; display: inline-block; margin-top: 2px; }
.dash-card-btn { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--star-gold); }
a.dash-card:hover .dash-card-btn { color: var(--star-navy); }

.dash-card.soon { background: #fbfbfd; border-style: dashed; border-color: #dfe3ee; opacity: .78; }
.dash-card.soon .dash-ic { background: #aab2c8; box-shadow: none; }
.dash-card.soon .dash-card-title { color: #6b7490; }
.soon-tag { font-size: 10.5px; font-weight: 700; color: #7a5b00; background: #fdf2d0;
  border: 1px solid #ecd694; border-radius: 9px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }

/* --- 案件ストック(☆) / 期日リマインド(Phase 1D Wave1) --- */
.star-form { display: inline; margin: 0; }
.star-inline { display: inline-block; vertical-align: middle; }
.star-btn { background: none; border: none; cursor: pointer; font-size: 19px; line-height: 1;
  color: #c3c7d2; padding: 0 2px; transition: color .1s ease, transform .1s ease; }
.star-btn:hover { color: var(--star-gold); transform: scale(1.15); }
.star-btn.on { color: var(--star-gold); }
.star-cell { text-align: center; width: 30px; }
.due-date { color: #b45309; font-variant-numeric: tabular-nums; }
.stock-card { padding: 12px 14px; }
.stock-card.due-soon { border-color: var(--star-gold); background: #fffdf6; }
.stock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.due-line { margin: 6px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fffaf0; border-left: 3px solid var(--star-gold); border-radius: 4px; padding: 6px 10px; }
.due-label { font-size: 12px; color: #8a6d1f; font-weight: 700; }
.due-badge { font-size: 12px; font-weight: 700; color: #fff; background: var(--star-gold);
  border-radius: 10px; padding: 2px 9px; }
.due-badge.today { background: #c53030; }
.note-form { display: flex; gap: 8px; margin-top: 8px; }
.note-form input[type=text] { flex: 1 1 auto; padding: 5px 8px; border: 1px solid #cbd5e0;
  border-radius: 5px; font-size: 13px; }

/* --- 発注機関フィルタ(Phase 1D Wave2) --- */
.agency-details { flex: 1 1 100%; margin: 4px 0; }
.agency-filter-wrap { margin-top: 6px; }
.agency-regions { display: flex; flex-wrap: wrap; gap: 5px 6px; align-items: center;
  padding: 7px 9px; background: #f3f6fa; border: 1px solid #e1e6f2; border-radius: 6px 6px 0 0;
  border-bottom: none; }
.agency-regions .btn { padding: 3px 8px; }
.agency-details > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--star-navy);
  padding: 6px 8px; background: #eef1f8; border-radius: 6px; }
.agency-filter { max-height: 320px; overflow-y: auto; border: 1px solid #e1e6f2; border-radius: 6px;
  padding: 6px 10px; margin-top: 6px; background: #fff; }
.agency-muni > summary { cursor: pointer; font-weight: 700; padding: 5px 0; color: #33415c; }
.agency-bureau { margin: 3px 0 8px 14px; }
.agency-bureau-head { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; }
.agency-bureau-name { font-size: 12.5px; font-weight: 700; color: #556; }
.agency-filter .checks { margin-left: 8px; }
.agency-filter .checks label { font-size: 12px; }

/* --- 顧客共通グローバルナビ(Phase 1D) --- */
.cnav { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 6px 14px; margin-left: 18px; }
.cnav-links, .cnav-right { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.cnav-links a { padding: 6px 10px; font-size: 14px; color: #33415c; border-bottom: 3px solid transparent;
  white-space: nowrap; }
.cnav-links a:hover { color: var(--star-navy); text-decoration: none; border-bottom-color: #d9e0ee; }
.cnav-links a.active { color: var(--star-navy); font-weight: 700; border-bottom-color: var(--star-gold); }
.cnav-badge { display: inline-block; min-width: 18px; text-align: center; font-size: 11px;
  font-weight: 700; color: #fff; background: var(--star-gold); border-radius: 10px; padding: 0 6px;
  margin-left: 2px; vertical-align: middle; }
.cnav-right { gap: 6px 8px; }
.cnav-right a { font-size: 12.5px; color: #556; padding: 4px 6px; border-bottom: 3px solid transparent; }
.cnav-right a.active { color: var(--star-navy); border-bottom-color: var(--star-gold); }
