/* 龙和船厂·企划中心系统 — 桌面端样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f2f4f7; --panel: #fff; --line: #dfe3e9; --txt: #1a1d21; --sub: #5c6470;
  --blue: #1a5fd7; --red: #b3261e; --redbg: #fdecea; --amber: #b26a00; --amberbg: #fff4e0;
  --green: #2f7d32; --greenbg: #e6f4e6;
}
body { font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--txt); font-size: 14px; }
#app { display: flex; min-height: 100vh; }

/* 侧边栏 */
aside { width: 190px; background: #16202b; color: #cfd6de; padding: 14px 0; flex-shrink: 0; display: flex; flex-direction: column; }
aside .brand { padding: 4px 18px 14px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #2a3644; line-height: 1.5; }
aside .brand small { display: block; font-size: 11px; font-weight: 400; color: #8b97a5; }
nav { margin-top: 10px; flex: 1; }
nav a { display: block; padding: 10px 18px; color: #cfd6de; text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
nav a:hover { background: #1f2b38; }
nav a.on { background: #22303f; color: #fff; border-left-color: var(--blue); font-weight: 600; }
nav .badge { float: right; background: var(--red); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
aside .me { padding: 12px 18px; font-size: 12px; color: #8b97a5; border-top: 1px solid #2a3644; }
aside .me b { color: #fff; display: block; font-size: 13px; }
aside .me a { color: #6ea8ff; cursor: pointer; }

main { flex: 1; padding: 18px 22px; max-width: 1280px; }
h2 { font-size: 19px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
h2 .acts { margin-left: auto; display: flex; gap: 8px; }

/* 通用 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
button, .btn { font-size: 13px; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--txt); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
button.danger { color: var(--red); border-color: #e6b9b4; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; width: 100%; font-family: inherit; }
label.f { display: block; font-size: 12px; color: var(--sub); margin: 10px 0 4px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f7f9fb; color: var(--sub); font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f7fafd; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.sub { color: var(--sub); font-size: 12px; }
.bar { height: 8px; background: #e9edf2; border-radius: 99px; overflow: hidden; min-width: 70px; }
.bar > i { display: block; height: 100%; background: var(--green); }
.bar.warn > i { background: var(--amber); } .bar.bad > i { background: var(--red); }

.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: #eef2f6; white-space: nowrap; }
.tag.hi { background: var(--redbg); color: var(--red); font-weight: 700; }
.tag.mid { background: var(--amberbg); color: var(--amber); font-weight: 700; }
.tag.ok { background: var(--greenbg); color: var(--green); }
.tag.blue { background: #e8f0fe; color: var(--blue); }
.tag.crit { background: #f3e8fd; color: #6b21a8; font-weight: 700; }

.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.kpi .n { font-size: 26px; font-weight: 800; }
.kpi .l { font-size: 12px; color: var(--sub); margin-top: 2px; }
.kpi.red .n { color: var(--red); } .kpi.green .n { color: var(--green); }

.shiprow { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.shiprow:last-child { border: 0; }
.shiprow .nm { width: 170px; font-weight: 700; }
.shiprow .nm small { display: block; font-weight: 400; color: var(--sub); }
.shiprow .bar { flex: 1; height: 14px; }

/* 甘特 */
.gantt { position: relative; }
.gantt .glabel { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--red); z-index: 2; }
.grow { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; }
.grow .gname { width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.grow .gtrack { position: relative; flex: 1; height: 18px; background: #eef1f5; border-radius: 4px; }
.grow .gbar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; background: #9bb8e8; min-width: 3px; }
.grow .gbar.done { background: var(--green); } .grow .gbar.run { background: var(--blue); }
.grow .gbar.over { background: var(--red); } .grow .gbar.wait { background: #b9c2cd; }
.grow .gbar .gp { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .45); border-radius: 3px 0 0 3px; }
.grow .gbar.crit { box-shadow: 0 0 0 2px #6b21a8; }

/* 表单弹层 */
.mask { position: fixed; inset: 0; background: rgba(10, 15, 22, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.dialog { background: #fff; border-radius: 12px; width: 640px; max-width: 96vw; padding: 18px 20px; }
.dialog h3 { font-size: 16px; margin-bottom: 10px; }
.dialog .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.frow { display: flex; gap: 12px; } .frow > div { flex: 1; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #16202b; }
.login { background: #fff; border-radius: 14px; padding: 28px; width: 340px; }
.login h1 { font-size: 19px; margin-bottom: 4px; } .login .sub { margin-bottom: 18px; }
.login button { width: 100%; padding: 10px; margin-top: 16px; font-size: 14px; }
.login .err { color: var(--red); font-size: 13px; margin-top: 10px; }

.empty { padding: 40px; text-align: center; color: var(--sub); }
.demo-note { background: #fff4e0; border: 1px solid #f0c674; color: #7a4f00; border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; font-size: 13px; line-height: 1.65; }
.demo-note b { color: #5a3a00; }
.dev-badge { display: inline-block; font-size: 11px; color: #7a4f00; background: #fff4e0; border: 1px solid #f0c674; border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: #16202b; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 99; opacity: 0; transition: opacity .2s; }
.toast.show { opacity: .95; }
body.meeting aside { display: none; }
body.meeting main { max-width: 100%; font-size: 16px; }
body.meeting .kpi .n { font-size: 40px; }
