/* =============================================================
   Forêt Noire — 대시보드 공통 베이스 (TASK-050)
   페이지: dashboard / tasks / reports / viewer 4종 공유.
   각 페이지는 본 파일을 <link rel="stylesheet" href="dashboard-base.css">
   로 참조. 페이지 고유 CSS 는 인라인 <style> 유지.
   ============================================================= */

:root {
  --bg: #0e0f0d;
  --surface: #161914;
  --surface2: #1e2119;
  --border: #2a2e26;
  --text: #c8cfc0;
  --text-dim: #6b7363;
  --green: #4a7c59;
  --green-glow: #5a9e6f;
  --blue: #2a4a7c;
  --blue-glow: #4a7cbf;
  --gold: #b8962e;
  --done: #3a6b4a;
  --wip: #5a6b2a;
  --pending-col: #3a3a3a;
  --red: #c87070;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* TABS — 페이지 간 네비 (dashboard / tasks / reports 공유. viewer 는 .nav 별도) */
.tabs {
  display: flex; gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  color: var(--text-dim); text-decoration: none;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 5px 5px 0 0; transition: all 0.15s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); background: var(--surface2); }
.tab.active {
  color: var(--green-glow); background: var(--surface);
  border-color: var(--border); border-bottom: 1px solid var(--surface);
}

/* TASK-062 ▶ task-run-btn / TASK-090 ↗ task-daemon-btn 스타일은 TASK-110 으로 폐기 (Phase 1 Supervisor 의 ⏩/⚙ 가 대체). */

/* ── TASK ROUTE BUTTON — TASK-109 ⏩ pending→inbox + auto-spawn (supervisor :7800) ── */
.task-route-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px;
  font-size: 12px; font-weight: 700;
  color: var(--gold); text-decoration: none;
  background: var(--surface2);
  border: 1px solid var(--border); border-radius: 3px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  cursor: pointer;
}
.task-route-btn:hover {
  background: var(--gold); color: #1e1a08;
  border-color: var(--gold);
}
.task-route-btn:active { transform: translateY(1px); }
.task-route-btn.sent {
  background: var(--done); color: #c8efc0; border-color: var(--done);
}
.task-route-btn.off {
  background: var(--surface2); color: var(--red); border-color: var(--red);
}

/* ── TASK ACTION MENU — TASK-111 ⚙ 풀 상태 전이 드롭다운 ──────────── */
.task-action-wrap {
  position: relative; display: inline-block;
}
.task-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px;
  font-size: 12px; font-weight: 700;
  color: var(--text-dim); text-decoration: none;
  background: var(--surface2);
  border: 1px solid var(--border); border-radius: 3px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  cursor: pointer;
}
.task-action-btn:hover {
  background: var(--text); color: var(--bg);
  border-color: var(--text);
}
.task-action-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  margin-top: 2px;
  min-width: 180px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 100;
  flex-direction: column;
  padding: 4px 0;
}
.task-action-menu.open { display: flex; }
.task-action-item {
  display: block; padding: 6px 12px;
  font-size: 11px; color: var(--text); text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s;
  cursor: pointer;
}
.task-action-item:hover { background: var(--surface2); }
.task-action-item.ok      { color: var(--done); }
.task-action-item.ok:hover{ background: rgba(120,180,120,0.15); }
.task-action-item.warn    { color: var(--gold); }
.task-action-item.warn:hover{ background: rgba(184,150,46,0.15); }
.task-action-item.danger  { color: var(--red); }
.task-action-item.danger:hover{ background: rgba(200,112,112,0.15); }

/* 토스트 — Tier 1 fallback 또는 Tier 2 등록 안내용 */
.tn-toast-host {
  position: fixed; right: 18px; bottom: 18px; z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
}
.tn-toast {
  background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--green-glow);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 12px; color: var(--text);
  max-width: 380px; line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
  pointer-events: auto;
  animation: tn-toast-in 0.18s ease-out;
}
.tn-toast.warn { border-left-color: var(--gold); }
.tn-toast.error { border-left-color: var(--red); }
.tn-toast .tn-toast-title { font-weight: 600; color: var(--text); margin-bottom: 3px; }
.tn-toast .tn-toast-meta { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.tn-toast .tn-toast-cmd {
  font-family: 'Consolas', monospace; font-size: 11px;
  color: var(--blue-glow); background: var(--surface2);
  padding: 4px 6px; border-radius: 3px;
  margin-top: 6px; word-break: break-all;
}
@keyframes tn-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
