:root {
  --navy: #0d2340; --navy-mid: #1a3a5c; --blue: #005eb8; --accent: #00a3e0;
  --canvas: #eceef4; --card: #ffffff; --off-white: #f5f7fb; --gray-light: #edf0f5;
  --gray: #8896a6; --text: #1a2332; --text-muted: #5a6a7a;
  --green: #1a7f4b; --green-bg: #e4f5eb;
  --amber: #b4770c; --amber-bg: #fdf1dc;
  --red: #c22b28; --red-bg: #fbe6e5;
  --purple: #6a3fd6; --purple-bg: #ece4fb;
  --sidebar-w: 260px;
  --shadow: 0 1px 2px rgba(20,32,58,0.04), 0 8px 24px rgba(20,32,58,0.07);
  --r: 22px; --r-sm: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Inter", "Helvetica Neue", Arial, sans-serif; color: var(--text); background: var(--canvas); }

.app { display: flex; align-items: flex-start; min-height: 100vh; }

/* sidebar */
.sidebar { width: var(--sidebar-w); flex-shrink: 0; min-height: 100vh; background: var(--navy); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; }
.sidebar-logo { padding: 28px 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo .brand-name { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.sidebar-logo .proposal-badge { display: inline-block; margin-top: 8px; background: rgba(0,163,224,0.2); color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.sidebar nav { padding: 16px 0 24px; flex: 1; }
.sidebar nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar nav ul li a { display: flex; align-items: center; gap: 10px; padding: 9px 24px; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 12.5px; font-weight: 500; border-left: 3px solid transparent; line-height: 1.3; }
.sidebar nav ul li a.active { color: #fff; border-left-color: var(--accent); background: rgba(0,163,224,0.1); }
.sidebar nav ul li a .nav-num { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.3); min-width: 18px; }
.sidebar nav ul li a.active .nav-num { color: var(--accent); }
.sidebar nav ul li a .nav-ext { margin-left: auto; font-size: 10px; opacity: 0.5; }
.nav-section-label { padding: 16px 24px 4px; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.25); }
.sidebar-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 11px; color: rgba(255,255,255,0.3); line-height: 1.5; }

.wrap { flex: 1; min-width: 0; max-width: 1200px; margin: 0; padding: 30px 36px 60px; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 14px; }
.eyebrow { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
h1 { font-size: 27px; font-weight: 700; color: var(--navy); margin: 0; }

.segctl { display: flex; gap: 3px; background: var(--card); border-radius: 30px; padding: 4px; box-shadow: var(--shadow); flex-wrap: wrap; }
.segctl a { padding: 8px 15px; border-radius: 24px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; text-decoration: none; cursor: pointer; }
.segctl a.on { background: var(--navy); color: #fff; }

.icon { width: 16px; height: 16px; flex-shrink: 0; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-bottom: 16px; }
.g-3 { grid-column: span 3; }
.g-4 { grid-column: span 4; }
.g-6 { grid-column: span 6; }

.mod { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; }
.mod-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mod-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--navy); }
.countpill { font-size: 12px; font-weight: 700; color: #fff; background: var(--navy); border-radius: 20px; padding: 3px 11px; white-space: nowrap; }
.countpill.red { background: var(--red); } .countpill.amber { background: var(--amber); } .countpill.green { background: var(--green); }

/* hero action cards */
.hero .mod { padding: 18px; }
.actioncard { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: var(--r-sm); margin-bottom: 10px; }
.actioncard:last-child { margin-bottom: 0; }
.actioncard.red { background: var(--red-bg); }
.actioncard.amber { background: var(--amber-bg); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.avatar.red { background: var(--red); } .avatar.amber { background: var(--amber); }
.actioncard .body { flex: 1; }
.actioncard .head { font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.actioncard .sub { font-size: 12px; color: var(--text-muted); }
.gobtn { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

/* two-column split */
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; }

/* tasks */
.taskrow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--gray-light); font-size: 13px; }
.taskrow:first-child { border-top: none; }
.checkdone { width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 11px; }
.checkpending { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 1.5px solid var(--gray-light); flex-shrink: 0; }
.taskrow.pending { color: var(--text-muted); }

/* gantt */
.gantt-meta { font-size: 12px; color: var(--text-muted); }
.jlink { color: var(--blue); font-weight: 600; }
.grow { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.grow:last-child { margin-bottom: 0; }
.glabel { width: 168px; flex-shrink: 0; }
.glabel-title { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.glabel-sub { font-size: 11.5px; color: var(--text-muted); }
.glabel-sub .stat { font-weight: 700; }
.glabel-sub .stat.done { color: var(--green); } .glabel-sub .stat.active { color: var(--accent); } .glabel-sub .stat.pending { color: var(--gray); }
.gtrack { flex: 1; height: 22px; background: var(--canvas); border-radius: 10px; position: relative; }
.gbar { position: absolute; top: 3px; bottom: 3px; border-radius: 8px; }
.gbar.done { background: var(--green); } .gbar.active { background: var(--accent); }
.gbar.pending { background: transparent; border: 1.5px dashed var(--gray-light); }
.today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--red); }
.today-label { position: absolute; top: -18px; font-size: 10px; color: var(--red); font-weight: 700; transform: translateX(-50%); }

.glegend { display: flex; align-items: center; gap: 20px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--gray-light); font-size: 11.5px; color: var(--text-muted); flex-wrap: wrap; }
.glegend span { display: flex; align-items: center; gap: 6px; }
.legdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.legdot.done { background: var(--green); } .legdot.active { background: var(--accent); }
.legdot.pending { background: transparent; border: 1.5px dashed var(--gray-light); }
.legline { width: 2px; height: 12px; background: var(--red); display: inline-block; flex-shrink: 0; }

.desc-text { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 0 0 14px; }
.desc-text:last-child { margin-bottom: 0; }
.desc-subhead { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray); margin: 0 0 8px; }
.desc-list { list-style: none; margin: 0 0 14px; padding: 0; }
.desc-list:last-child { margin-bottom: 0; }
.desc-list li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--text-muted); margin-bottom: 7px; }
.desc-list li:last-child { margin-bottom: 0; }
.desc-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.desc-list li b { color: var(--navy); }
.desc-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); background: var(--canvas); border-radius: var(--r-sm); padding: 9px 13px; }
.desc-status b { color: var(--navy); }
.reslink { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--canvas); font-size: 12.5px; color: var(--blue); font-weight: 600; margin-bottom: 8px; text-decoration: none; }
.doc { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--canvas); font-size: 12px; margin-bottom: 6px; }
.doc:last-child { margin-bottom: 0; }
.doc .ext { margin-left: auto; color: var(--gray); font-family: ui-monospace, monospace; font-size: 10px; }
.doclist { max-height: 384px; overflow-y: auto; padding-right: 4px; margin-right: -4px; }
.doclist::-webkit-scrollbar { width: 6px; }
.doclist::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 4px; }

.made-item { padding: 11px 0; border-top: 1px solid var(--gray-light); font-size: 12.5px; color: var(--text-muted); }
.made-item:first-child { border-top: none; padding-top: 0; }
.made-date { color: var(--gray); font-size: 11px; display: block; margin-bottom: 2px; }
.made-item b { color: var(--navy); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 6px 0; border-bottom: 1px solid var(--gray-light); }
td { padding: 8px 0; font-size: 12.5px; border-bottom: 1px solid var(--gray-light); }
tr:last-child td { border-bottom: none; }
.tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.tag.client { background: var(--purple-bg); color: var(--purple); }
.tag.internal { background: var(--canvas); color: var(--text-muted); }

.freshness { display: flex; justify-content: flex-end; align-items: center; gap: 6px; font-size: 11.5px; color: var(--gray); margin: 0 0 12px; }
.freshness .icon { width: 13px; height: 13px; }
.freshness b { color: var(--text-muted); font-weight: 600; }

.empty-note { font-size: 13px; color: var(--gray); font-style: italic; padding: 4px 0; }
