/* DaoNa Portal · shared theme (from BP v3.1) */
:root {
  --navy: #0E2A47;
  --navy-2: #1A3E64;
  --navy-3: #0A1F36;
  --gold: #B88A3A;
  --gold-2: #D2A45A;
  --gold-soft: #F4E9C9;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --ink-mute: #7A7A7A;
  --line: #E6E1D5;
  --bg: #FAF7F2;
  --paper: #FFFFFF;
  --ok: #2E7D4F;
  --ok-soft: #E8F5EC;
  --warn: #C8962C;
  --warn-soft: #FFF8E6;
  --danger: #8C2D2D;
  --danger-soft: #FCEAEA;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --r: 8px;
  --sh: 0 2px 12px rgba(14, 42, 71, 0.08);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--navy); text-decoration: none; }
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy-3), var(--navy));
  color: #fff;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.sidebar-brand { padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand h1 { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.sidebar-brand p { font-size: 11px; opacity: .65; margin-top: 4px; }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r);
  color: rgba(255,255,255,.75); font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: none; background: transparent; width: 100%; text-align: left;
  font-family: inherit; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: rgba(184,138,58,.25); color: var(--gold-2); font-weight: 600; }
.nav-icon { width: 18px; text-align: center; opacity: .85; font-size: 14px; }
.sidebar-foot {
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(0,0,0,.15);
}
.sidebar-foot-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 6px;
  color: rgba(255,255,255,.78); font-size: 12.5px; font-weight: 500;
  text-decoration: none; transition: background .15s, color .15s;
}
.sidebar-foot-link:hover { background: rgba(255,255,255,.08); color: var(--gold-2); }
.sidebar-foot-link-sub { color: rgba(255,255,255,.55); font-size: 11.5px; }
.sidebar-foot-link-sub:hover { color: var(--gold-2); }
.sf-icon {
  width: 18px; text-align: center; opacity: .85; font-size: 13px;
  color: var(--gold-2);
}
.sidebar-resizer {
  position: absolute; top: 0; right: -2px; bottom: 0; width: 6px;
  cursor: col-resize; z-index: 110; touch-action: none;
  background: transparent; transition: background .15s;
}
.sidebar-resizer::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 2px; width: 2px;
  background: transparent; transition: background .15s;
}
.sidebar-resizer:hover::after,
body.sidebar-resizing .sidebar-resizer::after { background: rgba(184,138,58,.55); }
body.sidebar-resizing { cursor: col-resize !important; user-select: none !important; }
body.sidebar-resizing * { cursor: col-resize !important; }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; transition: margin-left .05s linear; }
body.sidebar-resizing .main { transition: none; }
.topbar {
  min-height: var(--topbar-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 20px; position: sticky; top: 0; z-index: 50;
}
.topbar-left {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
}
.topbar-heading { min-width: 0; }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.topbar-meta { font-size: 12px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.topbar-zone { display: flex; align-items: center; gap: 6px; }
.topbar-sep {
  width: 1px; height: 24px; background: var(--line); flex-shrink: 0;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.content { padding: 24px; max-width: 1280px; }
.page { display: none; }
.page.active { display: block; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--sh);
}
.kpi-card .lbl { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }
.kpi-card .val { font-size: 26px; font-weight: 800; color: var(--navy); margin: 4px 0 2px; }
.kpi-card .sub { font-size: 12px; color: var(--ink-soft); }
.kpi-card.accent { border-top: 3px solid var(--gold); }
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh); margin-bottom: 20px; overflow: hidden;
}
.panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-head h2 { font-size: 15px; font-weight: 700; color: var(--navy); }
.panel-body { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--bg); font-weight: 600; color: var(--ink-soft); font-size: 12px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(14,42,71,.02); }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--bg); color: var(--ink-mute); }
.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; min-width: 80px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--navy), var(--gold)); border-radius: 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--line); background: var(--paper);
  font-family: inherit; color: var(--ink);
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--bg); border-color: var(--line); color: var(--navy); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding: 16px 18px 8px; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 48px; background: var(--navy); border-radius: 4px 4px 0 0; min-height: 4px; }
.chart-bar.target { background: var(--gold-soft); border: 1px dashed var(--gold); }
.chart-lbl { font-size: 10px; color: var(--ink-mute); }
.milestone-list { list-style: none; padding: 12px 18px; }
.milestone-list li {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.milestone-list li:last-child { border-bottom: none; }
.ms-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.ms-dot.done { background: var(--ok); }
.ms-dot.progress { background: var(--gold); }
.ms-dot.pending { background: var(--line); }
.pipeline-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 16px 18px; }
.pipeline-col { background: var(--bg); border-radius: var(--r); padding: 12px; min-height: 120px; }
.pipeline-col h4 { font-size: 12px; color: var(--ink-mute); margin-bottom: 10px; text-transform: uppercase; }
.pipe-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px; margin-bottom: 8px; font-size: 12px;
}
.pipe-card .amt { font-weight: 700; color: var(--navy); margin-top: 4px; }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; box-shadow: var(--sh); animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.editable { cursor: text; }
.editable:focus { outline: 2px solid var(--gold); outline-offset: -1px; background: #fff; }
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar-brand h1, .sidebar-brand p, .nav-item span:not(.nav-icon), .sidebar-foot { display: none; }
  .main { margin-left: 64px; }
  .grid-2, .pipeline-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
