/* =========================================================
   入札ウォッチ  会員サイト  —  デザインシステム
   やわらかいブルー×オレンジ / Zen Kaku Gothic New
   ========================================================= */
:root{
  --ink:#27313f; --ink2:#3f4d5e; --sub:#6c7886; --faint:#9aa4b1;
  --line:#e4eaf2; --line-soft:#eef3f9;
  --paper:#ffffff; --bg:#eef3fa;

  --blue:#1a6fd0; --blue-deep:#0f4f9e; --blue-bg:#eaf3fc; --blue-soft:#f4f9fe; --blue-line:#cfe2f6;
  --orange:#f5871f; --orange-deep:#d96f08; --orange-bg:#fff3e3; --orange-line:#f7d3a6;
  --red:#e05a37; --red-deep:#bd4321; --red-bg:#fdeee8; --red-line:#f4ccba;
  --green:#1f9d6b; --green-deep:#157a51; --green-bg:#e6f6ef; --green-line:#bfe6d4;

  --r:14px; --r-lg:20px; --r-sm:10px;
  --shadow:0 4px 16px rgba(26,79,158,.07);
  --shadow-lg:0 12px 34px rgba(26,79,158,.13);
  --sidebar-w:248px;
  --font:"Zen Kaku Gothic New","Hiragino Kaku Gothic ProN","Meiryo",sans-serif;
}

*{box-sizing:border-box; margin:0; padding:0;}
html{ -webkit-text-size-adjust:100%; }
body{
  font-family:var(--font); color:var(--ink); background:var(--bg);
  line-height:1.6; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  font-feature-settings:"palt" 1;
}
.tnum{ font-feature-settings:"palt" 0; font-variant-numeric:tabular-nums; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; }
svg{ display:block; }
a{ color:inherit; text-decoration:none; }

/* ============ アプリ・シェル ============ */
.app{ display:flex; min-height:100vh; }

.sidebar{
  width:var(--sidebar-w); flex:none; background:var(--paper);
  border-right:1px solid var(--line); display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh; z-index:40;
}
.brand{
  display:flex; align-items:center; gap:10px; padding:18px 20px 16px;
  border-bottom:1px solid var(--line-soft);
}
.brand .mark{
  width:34px; height:34px; border-radius:10px; background:var(--blue); color:#fff;
  font-weight:900; font-size:18px; display:flex; align-items:center; justify-content:center;
}
.brand .name{ font-weight:900; font-size:16px; letter-spacing:.01em; }
.brand .name .plus{ color:var(--orange); }
.brand .sub{ font-size:10px; color:var(--faint); margin-top:1px; letter-spacing:.04em; }

.nav{ padding:12px 12px; overflow-y:auto; flex:1; }
.nav .grp{ font-size:10.5px; font-weight:700; color:var(--faint); letter-spacing:.12em; padding:14px 12px 6px; }
.nav a{
  display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:11px;
  font-size:13.5px; font-weight:500; color:var(--ink2); margin-bottom:2px; position:relative;
  transition:background .12s, color .12s;
}
.nav a .ico{ width:19px; height:19px; flex:none; color:var(--faint); }
.nav a:hover{ background:var(--blue-soft); color:var(--blue-deep); }
.nav a:hover .ico{ color:var(--blue); }
.nav a.active{ background:var(--blue-bg); color:var(--blue-deep); font-weight:700; }
.nav a.active .ico{ color:var(--blue); }
.nav a.active::before{
  content:""; position:absolute; left:-12px; top:50%; transform:translateY(-50%);
  width:4px; height:22px; border-radius:0 4px 4px 0; background:var(--blue);
}
.nav a .badge-n{
  margin-left:auto; background:var(--orange); color:#fff; font-size:10.5px; font-weight:700;
  border-radius:999px; min-width:18px; height:18px; padding:0 5px; display:flex; align-items:center; justify-content:center;
}

.side-foot{ padding:14px; border-top:1px solid var(--line-soft); }
.plan{
  background:linear-gradient(135deg,var(--blue-bg),var(--blue-soft));
  border:1px solid var(--blue-line); border-radius:14px; padding:13px 14px;
}
.plan .t{ font-size:12px; font-weight:700; color:var(--blue-deep); }
.plan .p{ font-size:11px; color:var(--sub); margin-top:3px; }

/* ============ メイン領域 ============ */
.main{ flex:1; min-width:0; display:flex; flex-direction:column; }

.topbar{
  position:sticky; top:0; z-index:30; background:rgba(255,255,255,.86); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line); padding:12px 28px;
  display:flex; align-items:center; gap:16px;
}
.topbar .crumb{ font-size:12px; color:var(--sub); }
.topbar .crumb b{ color:var(--ink); font-weight:700; }
.search{
  margin-left:auto; display:flex; align-items:center; gap:8px; background:var(--bg);
  border:1px solid var(--line); border-radius:999px; padding:8px 14px; width:280px; max-width:32vw;
}
.search input{ border:none; background:none; outline:none; font-family:inherit; font-size:13px; width:100%; color:var(--ink); }
.search .ico{ width:16px; height:16px; color:var(--faint); flex:none; }
.icon-btn{
  width:38px; height:38px; border-radius:11px; background:var(--bg); display:flex; align-items:center; justify-content:center;
  color:var(--ink2); position:relative; border:1px solid var(--line);
}
.icon-btn:hover{ background:var(--blue-bg); color:var(--blue); }
.icon-btn .dot{ position:absolute; top:8px; right:9px; width:7px; height:7px; border-radius:50%; background:var(--orange); border:1.5px solid #fff; }
.avatar{
  display:flex; align-items:center; gap:9px; padding:5px 6px 5px 5px; border-radius:999px; border:1px solid var(--line); background:#fff;
}
.avatar .pic{ width:30px; height:30px; border-radius:50%; background:var(--orange-bg); color:var(--orange-deep); font-weight:900; font-size:13px; display:flex; align-items:center; justify-content:center; }
.avatar .who{ font-size:12px; line-height:1.25; padding-right:4px; }
.avatar .who b{ font-weight:700; display:block; }
.avatar .who span{ color:var(--faint); font-size:10.5px; }

.page{ padding:26px 28px 56px; max-width:1280px; width:100%; margin:0 auto; }

/* ============ ページ見出し ============ */
.phead{ display:flex; align-items:flex-end; gap:14px; margin-bottom:20px; flex-wrap:wrap; }
.phead .ttl{ font-size:24px; font-weight:900; letter-spacing:.01em; }
.phead .ey{ font-size:11px; font-weight:700; letter-spacing:.18em; color:var(--blue); text-transform:uppercase; }
.phead .desc{ font-size:13px; color:var(--sub); }
.phead .right{ margin-left:auto; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* ============ カード ============ */
.card{ background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow); }
.card.pad{ padding:20px 22px; }
.card-h{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.card-h .ct{ font-size:15px; font-weight:800; }
.card-h .cs{ font-size:11.5px; color:var(--sub); }
.card-h .more{ margin-left:auto; font-size:12px; color:var(--blue); font-weight:700; display:flex; align-items:center; gap:3px; }
.card-h .ci{ width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center; background:var(--blue-bg); color:var(--blue); flex:none; }
.card-h .ci svg{ width:17px; height:17px; }

.grid{ display:grid; gap:18px; }
.cols-2{ grid-template-columns:repeat(2,1fr); }
.cols-3{ grid-template-columns:repeat(3,1fr); }
.cols-4{ grid-template-columns:repeat(4,1fr); }
.span-2{ grid-column:span 2; }
.span-3{ grid-column:span 3; }

/* ============ 統計タイル ============ */
.tile{ background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow); padding:18px 20px; position:relative; overflow:hidden; }
.tile .lab{ font-size:12px; font-weight:700; color:var(--sub); display:flex; align-items:center; gap:8px; }
.tile .lab .ti{ width:28px; height:28px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex:none; }
.tile .lab .ti svg{ width:16px; height:16px; }
.tile .big{ font-size:40px; font-weight:900; line-height:1.05; margin-top:10px; letter-spacing:-.01em; }
.tile .big .u{ font-size:16px; font-weight:700; margin-left:2px; }
.tile .meta{ font-size:11.5px; color:var(--sub); margin-top:7px; }
.tile.blue .ti{ background:var(--blue-bg); color:var(--blue); } .tile.blue .big{ color:var(--blue-deep); }
.tile.orange .ti{ background:var(--orange-bg); color:var(--orange-deep); } .tile.orange .big{ color:var(--orange-deep); }
.tile.red .ti{ background:var(--red-bg); color:var(--red-deep); } .tile.red .big{ color:var(--red-deep); }
.tile.green .ti{ background:var(--green-bg); color:var(--green-deep); } .tile.green .big{ color:var(--green-deep); }
.tile .trend{ position:absolute; right:16px; bottom:14px; opacity:.9; }

/* ============ バッジ・チップ ============ */
.badge{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; border-radius:999px; padding:3px 10px; white-space:nowrap; }
.badge.blue{ background:var(--blue-bg); color:var(--blue-deep); }
.badge.orange{ background:var(--orange-bg); color:var(--orange-deep); }
.badge.red{ background:var(--red-bg); color:var(--red-deep); }
.badge.green{ background:var(--green-bg); color:var(--green-deep); }
.badge.gray{ background:var(--bg); color:var(--sub); }
.badge.solid-o{ background:var(--orange); color:#fff; }
.badge.solid-b{ background:var(--blue); color:#fff; }
.badge .pulse{ width:6px; height:6px; border-radius:50%; background:currentColor; }

.chip{
  font-size:12px; font-weight:600; border-radius:999px; padding:7px 14px; border:1px solid var(--line);
  background:#fff; color:var(--ink2); white-space:nowrap;
}
.chip:hover{ border-color:var(--blue-line); color:var(--blue-deep); }
.chip.on{ background:var(--blue); color:#fff; border-color:var(--blue); }
.chip .cnt{ display:inline-block; min-width:15px; padding:0 5px; margin-left:6px; border-radius:999px;
  background:rgba(15,79,158,.10); color:var(--blue-deep); font-size:10.5px; font-weight:700; text-align:center; line-height:16px; }
.chip.on .cnt{ background:rgba(255,255,255,.22); color:#fff; }

/* フィルタ行（年度・発注者の切替バー） */
.fbar{ display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.fbar + .fbar{ margin-top:7px; }
.fbar-lab{ font-size:11px; font-weight:700; color:var(--faint); min-width:42px; letter-spacing:.04em; }
/* 2列目の切替は色を変えて1列目と区別する（濃いグレー） */
.fbar.alt .chip.on{ background:#37414f; border-color:#37414f; color:#fff; }
.fbar.alt .chip.on .cnt{ background:rgba(255,255,255,.22); color:#fff; }

/* 縞模様で行を読みやすく */
.tbl.zebra tbody tr:nth-child(even){ background:#fafcff; }
.tbl.zebra tbody tr:hover{ background:var(--blue-soft); }

/* ============ ボタン ============ */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:7px; font-size:13px; font-weight:700; border-radius:11px; padding:10px 18px; transition:transform .08s, box-shadow .12s, background .12s; }
.btn svg{ width:16px; height:16px; }
.btn:active{ transform:translateY(1px); }
.btn.primary{ background:var(--orange); color:#fff; box-shadow:0 4px 12px rgba(245,135,31,.32); }
.btn.primary:hover{ background:var(--orange-deep); }
.btn.blue{ background:var(--blue); color:#fff; box-shadow:0 4px 12px rgba(26,111,208,.28); }
.btn.blue:hover{ background:var(--blue-deep); }
.btn.ghost{ background:#fff; color:var(--blue-deep); border:1px solid var(--blue-line); box-shadow:none; }
.btn.ghost:hover{ background:var(--blue-bg); }
.btn.sm{ padding:7px 13px; font-size:12px; border-radius:9px; }
.btn.block{ width:100%; }

/* ============ テーブル ============ */
.tbl-wrap{ border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:#fff; }
.tbl{ width:100%; border-collapse:collapse; font-size:13px; }
.tbl thead th{ text-align:left; padding:12px 16px; font-size:11.5px; font-weight:700; color:var(--blue-deep); background:var(--blue-bg); letter-spacing:.02em; white-space:nowrap; }
.tbl tbody td{ padding:13px 16px; border-top:1px solid var(--line-soft); vertical-align:middle; }
.tbl tbody tr:hover{ background:var(--blue-soft); }
.tbl tbody tr.clickable{ cursor:pointer; }
.tbl .num{ text-align:right; font-feature-settings:"palt" 0; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tbl .neg{ color:var(--red); }
.tbl .pos{ color:var(--green-deep); }
.tbl tr.me td{ background:var(--orange-bg); font-weight:700; }
.tbl tr.me:hover td{ background:#ffead0; }
.tbl tr.me td:first-child{ box-shadow:inset 4px 0 0 var(--orange); }
.rankn{ font-weight:900; color:var(--faint); }
.tbl tr.me .rankn{ color:var(--orange-deep); }

/* ============ 進捗・メーター ============ */
.bar-track{ height:8px; border-radius:999px; background:var(--line); overflow:hidden; }
.bar-fill{ height:100%; border-radius:999px; background:var(--blue); }
.deadline{ font-weight:800; }
.deadline.urgent{ color:var(--red-deep); }
.deadline.soon{ color:var(--orange-deep); }

/* ============ リスト項目 ============ */
.row-item{ display:flex; align-items:center; gap:14px; padding:14px 4px; border-top:1px solid var(--line-soft); }
.row-item:first-child{ border-top:none; }
.row-item .ri-ic{ width:38px; height:38px; border-radius:11px; display:flex; align-items:center; justify-content:center; flex:none; background:var(--blue-bg); color:var(--blue); }
.row-item .ri-ic svg{ width:19px; height:19px; }
.row-item .ri-main{ min-width:0; flex:1; }
.row-item .ri-t{ font-size:13.5px; font-weight:700; }
.row-item .ri-s{ font-size:11.5px; color:var(--sub); margin-top:2px; }
.row-item .ri-r{ margin-left:auto; text-align:right; flex:none; }

/* ============ アラート帯 ============ */
.alert{ border-radius:var(--r); padding:16px 18px; display:flex; gap:13px; align-items:flex-start; }
.alert .ai{ width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex:none; color:#fff; }
.alert .ai svg{ width:17px; height:17px; }
.alert .at{ font-size:14px; font-weight:800; }
.alert .ab{ font-size:12.5px; margin-top:5px; line-height:1.65; }
.alert.warn{ background:var(--red-bg); border:1px solid var(--red-line); }
.alert.warn .ai{ background:var(--red); } .alert.warn .at{ color:var(--red-deep); } .alert.warn .ab{ color:#7a3623; }
.alert.fix{ background:var(--blue-bg); border:1px solid var(--blue-line); }
.alert.fix .ai{ background:var(--blue); } .alert.fix .at{ color:var(--blue-deep); } .alert.fix .ab{ color:#16466f; }
.alert.fix .ab b{ background:rgba(26,111,208,.13); padding:1px 5px; border-radius:5px; }

/* ============ シミュレーター ============ */
.sim-stage{ display:grid; grid-template-columns:1.3fr 1fr; gap:22px; }
.gauge-wrap{ display:flex; flex-direction:column; align-items:center; }
.slider{ -webkit-appearance:none; appearance:none; width:100%; height:8px; border-radius:999px; background:linear-gradient(90deg,var(--red) 0%, var(--orange) 38%, var(--green) 62%, var(--blue) 100%); outline:none; }
.slider::-webkit-slider-thumb{ -webkit-appearance:none; width:26px; height:26px; border-radius:50%; background:#fff; border:4px solid var(--blue); box-shadow:0 2px 8px rgba(0,0,0,.2); cursor:pointer; }
.slider::-moz-range-thumb{ width:26px; height:26px; border-radius:50%; background:#fff; border:4px solid var(--blue); box-shadow:0 2px 8px rgba(0,0,0,.2); cursor:pointer; }

/* ============ ログイン ============ */
.login{ min-height:100vh; display:flex; }
.login .side{ flex:1; background:linear-gradient(150deg,#1a6fd0,#0f4f9e 70%); color:#fff; padding:56px 60px; display:flex; flex-direction:column; justify-content:space-between; position:relative; overflow:hidden; }
.login .side::after{ content:""; position:absolute; right:-120px; bottom:-120px; width:420px; height:420px; border-radius:50%; background:rgba(255,255,255,.07); }
.login .form-wrap{ width:480px; max-width:46%; display:flex; flex-direction:column; justify-content:center; padding:40px 56px; background:#fff; }
.field{ margin-bottom:16px; }
.field label{ font-size:12.5px; font-weight:700; color:var(--ink2); display:block; margin-bottom:6px; }
.field input{ width:100%; font-family:inherit; font-size:14px; padding:13px 15px; border:1px solid var(--line); border-radius:11px; background:var(--bg); outline:none; }
.field input:focus{ border-color:var(--blue); background:#fff; }
.field textarea{ width:100%; font-family:inherit; font-size:14px; line-height:1.7; padding:13px 15px; border:1px solid var(--line); border-radius:11px; background:var(--bg); outline:none; resize:vertical; min-height:130px; }
.field textarea:focus{ border-color:var(--blue); background:#fff; }
.seg{ display:flex; gap:8px; flex-wrap:wrap; }
.seg .chip{ cursor:pointer; }
.status{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; border-radius:999px; padding:3px 10px; }
.status.recv{ background:var(--bg); color:var(--sub); }
.status.prog{ background:var(--orange-bg); color:var(--orange-deep); }
.status.done{ background:var(--green-bg); color:var(--green-deep); }

/* ============ ユーティリティ ============ */
.mut{ color:var(--sub); } .small{ font-size:11.5px; } .b{ font-weight:700; } .center{ text-align:center; }
.flex{ display:flex; } .ac{ align-items:center; } .jc{ justify-content:center; } .jb{ justify-content:space-between; } .gap{ gap:12px; } .gap-s{ gap:7px; } .wrap{ flex-wrap:wrap; }
.mt{ margin-top:16px; } .mt-s{ margin-top:8px; } .mt-l{ margin-top:26px; } .mb{ margin-bottom:16px; }
.divider{ height:1px; background:var(--line-soft); margin:16px 0; }
.demo-flag{ font-size:10px; font-weight:700; color:var(--faint); border:1px dashed var(--line); border-radius:6px; padding:2px 7px; }
.legend{ display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:var(--sub); }
.legend i{ width:11px; height:11px; border-radius:3px; display:inline-block; margin-right:5px; vertical-align:-1px; }

/* mobile menu button (hidden on desktop) */
.menu-btn{ display:none; }
.scrim{ display:none; }

/* ============ レスポンシブ ============ */
@media (max-width:1080px){
  .cols-4{ grid-template-columns:repeat(2,1fr); }
  .cols-3{ grid-template-columns:1fr; }
  .cols-2{ grid-template-columns:1fr; }
  .span-2,.span-3{ grid-column:auto; }
  .sim-stage{ grid-template-columns:1fr; }
  .phead{ flex-direction:column; align-items:flex-start; gap:12px; }
  .phead .right{ margin-left:0; }
}
@media (max-width:860px){
  :root{ --sidebar-w:240px; }
  .sidebar{ position:fixed; left:0; top:0; transform:translateX(-100%); transition:transform .25s ease; box-shadow:var(--shadow-lg); }
  .app.menu-open .sidebar{ transform:translateX(0); }
  .app.menu-open .scrim{ display:block; position:fixed; inset:0; background:rgba(20,40,70,.4); z-index:39; }
  .menu-btn{ display:flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:11px; background:var(--bg); border:1px solid var(--line); color:var(--ink2); }
  .topbar{ padding:11px 16px; }
  .search{ display:none; }
  .page{ padding:18px 16px 64px; }
  .cols-2, .cols-3{ grid-template-columns:1fr; }
  .span-2,.span-3{ grid-column:auto; }
  .phead .ttl{ font-size:20px; }
  .tile .big{ font-size:34px; }
}
@media (max-width:520px){
  .cols-4{ grid-template-columns:1fr 1fr; }
  .avatar .who{ display:none; }
}
