/* ========== 顧問先ポータル 共通スタイル ========== */
:root{
  --brand:#245599;
  --brand-light:#eef4fb;
}
body{ font-family:"Noto Sans JP", system-ui, sans-serif; }

/* --- サイドナビ --- */
.side-nav{ display:flex; flex-direction:column; }
.nav-item{
  width:100%; display:flex; align-items:center; gap:.6rem;
  padding:.6rem .75rem; border-radius:.5rem; font-size:.875rem;
  color:rgba(255,255,255,.78); transition:all .15s; text-align:left;
}
.nav-item:hover{ background:rgba(255,255,255,.08); color:#fff; }
.nav-item.active{ background:#fff; color:var(--brand); font-weight:700; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.nav-badge{
  margin-left:auto; min-width:20px; height:20px; padding:0 6px; border-radius:99px;
  background:#ef4444; color:#fff; font-size:10px; font-weight:700;
  display:inline-grid; place-items:center;
}

/* --- カード --- */
.card{ background:#fff; border:1px solid #e2e8f0; border-radius:.9rem; }
.card-hover{ transition:box-shadow .15s, transform .15s; }
.card-hover:hover{ box-shadow:0 8px 24px rgba(15,23,42,.09); transform:translateY(-1px); }

/* --- バッジ --- */
.badge{ display:inline-flex; align-items:center; gap:.25rem; padding:.1rem .5rem; border-radius:99px; font-size:11px; font-weight:700; white-space:nowrap; }
.badge-urgent{ background:#fee2e2; color:#b91c1c; }
.badge-high{ background:#ffedd5; color:#c2410c; }
.badge-mid{ background:#fef9c3; color:#a16207; }
.badge-low{ background:#e2e8f0; color:#475569; }
.badge-done{ background:#dcfce7; color:#15803d; }
.badge-doing{ background:#dbeafe; color:#1d4ed8; }
.badge-wait{ background:#ede9fe; color:#6d28d9; }
.badge-hold{ background:#f1f5f9; color:#64748b; }
.badge-todo{ background:#f1f5f9; color:#334155; }

/* --- タスクカード期日色 --- */
.due-over{ border-left:5px solid #ef4444; }
.due-today{ border-left:5px solid #f59e0b; }
.due-soon{ border-left:5px solid #eab308; }
.due-normal{ border-left:5px solid #cbd5e1; }
.due-done{ border-left:5px solid #22c55e; }

/* --- フォーム --- */
.f-label{ display:block; font-size:12px; font-weight:700; color:#475569; margin-bottom:.25rem; }
.f-input, .f-select, .f-textarea{
  width:100%; padding:.5rem .65rem; font-size:.875rem; border:1px solid #cbd5e1;
  border-radius:.5rem; background:#fff; outline:none; transition:border .15s, box-shadow .15s;
}
.f-input:focus, .f-select:focus, .f-textarea:focus{ border-color:var(--brand); box-shadow:0 0 0 3px rgba(36,85,153,.15); }
.f-textarea{ min-height:90px; resize:vertical; }

/* --- ボタン --- */
.btn{ display:inline-flex; align-items:center; gap:.4rem; padding:.5rem .9rem; border-radius:.5rem; font-size:.85rem; font-weight:700; transition:all .15s; }
.btn-primary{ background:var(--brand); color:#fff; }
.btn-primary:hover{ background:#1d447b; }
.btn-ghost{ background:#fff; color:#334155; border:1px solid #cbd5e1; }
.btn-ghost:hover{ background:#f8fafc; }
.btn-danger{ background:#fee2e2; color:#b91c1c; }
.btn-danger:hover{ background:#fecaca; }
.btn-sm{ padding:.3rem .6rem; font-size:.75rem; }

/* --- タブ --- */
.tab{ padding:.5rem .9rem; font-size:.85rem; font-weight:700; color:#64748b; border-bottom:3px solid transparent; }
.tab.active{ color:var(--brand); border-color:var(--brand); }

/* --- カレンダー --- */
.cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:#e2e8f0; border:1px solid #e2e8f0; border-radius:.6rem; overflow:hidden; }
.cal-cell{ background:#fff; min-height:112px; padding:.35rem; font-size:11px; position:relative; }
.cal-cell.other{ background:#f8fafc; color:#cbd5e1; }
.cal-cell.today{ background:#fffbeb; }
.cal-head{ background:#f1f5f9; text-align:center; font-size:12px; font-weight:700; padding:.4rem 0; color:#475569; }
.cal-chip{ display:block; width:100%; text-align:left; padding:1px 4px; border-radius:4px; margin-top:2px; font-size:10px; line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:640px){ .cal-cell{ min-height:74px; } }

/* --- 掲示板ツリー --- */
.thread-reply{ position:relative; padding-left:1.1rem; }
.thread-reply::before{
  content:""; position:absolute; left:.35rem; top:0; bottom:0; width:2px; background:#e2e8f0; border-radius:2px;
}

/* --- ガント --- */
.gantt-row{ display:grid; grid-template-columns:200px 1fr; align-items:center; border-bottom:1px solid #f1f5f9; }
.gantt-bar{ height:16px; border-radius:99px; position:relative; }
@media (max-width:768px){ .gantt-row{ grid-template-columns:120px 1fr; } }

/* --- スクロールバー --- */
::-webkit-scrollbar{ width:9px; height:9px; }
::-webkit-scrollbar-thumb{ background:#cbd5e1; border-radius:99px; }
::-webkit-scrollbar-thumb:hover{ background:#94a3b8; }

/* --- トースト --- */
.toast{ min-width:240px; padding:.7rem 1rem; border-radius:.6rem; color:#fff; font-size:.85rem; box-shadow:0 8px 24px rgba(0,0,0,.18); animation:slideIn .2s ease-out; }
@keyframes slideIn{ from{ transform:translateX(20px); opacity:0 } to{ transform:none; opacity:1 } }

/* --- 印刷 --- */
@media print{
  #side-nav, header, footer, .no-print{ display:none !important; }
  body{ background:#fff; }
}

/* --- ユーティリティ --- */
.line-clamp-2{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.rt p{ margin:.25rem 0; }
