:root {
  --ink: #162531;
  --muted: #6a7b87;
  --line: #dce5e9;
  --surface: #ffffff;
  --canvas: #f3f7f8;
  --navy: #0a3c4a;
  --teal: #087b78;
  --teal-soft: #e0f4f1;
  --red: #c44545;
  --red-soft: #fdeaea;
  --yellow: #ae7412;
  --yellow-soft: #fff2cf;
  --green: #277a50;
  --green-soft: #e3f4e9;
  --gray-soft: #edf1f2;
  --shadow: 0 8px 30px rgba(20, 54, 65, .07);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; color: #e9f3f4; background: linear-gradient(170deg, #073642, #0a4b55 64%, #0c5c61); display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 28px; }
.brand-mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; letter-spacing: 2px; color: #083c46; background: #d4f0e9; }
.brand strong, .brand span { display: block; }.brand strong { font-size: 17px; }.brand span { opacity: .68; font-size: 11px; }
nav { display: grid; gap: 5px; }
.nav-item { border: 0; border-radius: 10px; padding: 11px 12px; color: #cde0e2; background: transparent; text-align: left; display: flex; gap: 11px; align-items: center; }
.nav-item span { width: 18px; text-align: center; font-weight: 700; }.nav-item b { margin-left: auto; min-width: 22px; border-radius: 20px; padding: 1px 7px; font-size: 11px; text-align: center; color: #173f46; background: #bfece2; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.13); }
.sidebar-foot { margin-top: auto; padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.12); color: #c5dadc; }.sidebar-foot small { opacity: .65; }.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #62d29c; box-shadow: 0 0 0 4px rgba(98,210,156,.13); }
main { min-width: 0; padding: 0 30px 45px; }
.topbar { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar h1 { margin: 2px 0 0; font-size: 28px; line-height: 1.2; }.eyebrow { margin: 0; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.top-actions { display: flex; align-items: center; gap: 10px; }
.button { border: 1px solid transparent; border-radius: 9px; padding: 9px 14px; font-weight: 650; transition: .15s ease; }.button:hover { transform: translateY(-1px); }.button.primary { color: white; background: var(--teal); box-shadow: 0 5px 15px rgba(8,123,120,.17); }.button.secondary { color: var(--ink); border-color: var(--line); background: white; }.button.danger { color: var(--red); border-color: #f2caca; background: var(--red-soft); }.button.small { padding: 5px 9px; font-size: 12px; }
.muted { color: var(--muted); }.view { display: none; }.view.active { display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 13px; margin-bottom: 18px; }.metric-card { min-width: 0; padding: 17px; border: 1px solid #e5ecef; border-radius: 13px; background: white; box-shadow: var(--shadow); }.metric-card span { color: var(--muted); font-size: 12px; }.metric-card strong { display: block; margin-top: 6px; font-size: 27px; line-height: 1; }.metric-card em { margin-left: 3px; font-size: 12px; font-style: normal; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }.panel { border: 1px solid #e2eaed; border-radius: 14px; padding: 19px; background: var(--surface); box-shadow: var(--shadow); }.panel.wide { min-width: 0; }.panel-head, .section-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }.panel h2, .section-actions h2 { margin: 0; font-size: 17px; }.panel-head p, .section-actions p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }.text-button { border: 0; color: var(--teal); background: transparent; font-weight: 650; }
.risk-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.risk-item { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }.risk-item:hover { border-color: #9fc9c8; }.risk-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.risk-item small { color: var(--muted); }.risk-dot { width: 10px; height: 10px; border-radius: 50%; }.risk-red { color: var(--red); background: var(--red-soft); }.risk-yellow { color: var(--yellow); background: var(--yellow-soft); }.risk-green { color: var(--green); background: var(--green-soft); }.risk-gray { color: #68777d; background: var(--gray-soft); }.risk-dot.risk-red { background: var(--red); }.risk-dot.risk-yellow { background: #d89a2a; }.risk-dot.risk-green { background: #42a46f; }.risk-dot.risk-gray { background: #98a5aa; }
.risk-bars { display: grid; gap: 13px; padding-top: 4px; }.risk-line { display: grid; grid-template-columns: 42px 1fr 24px; gap: 9px; align-items: center; }.bar { height: 8px; overflow: hidden; border-radius: 10px; background: #edf2f3; }.bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.table-wrap { overflow-x: auto; }table { width: 100%; border-collapse: collapse; }th { padding: 9px 10px; color: var(--muted); background: #f6f9fa; font-size: 11px; text-align: left; white-space: nowrap; }td { padding: 11px 10px; border-top: 1px solid #edf1f2; vertical-align: top; }tbody tr:hover { background: #fafcfc; }.clip { max-width: 370px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 3px 8px; font-size: 11px; font-weight: 700; background: var(--gray-soft); }.badge.overdue { color: var(--red); background: var(--red-soft); }.badge.closed { color: var(--green); background: var(--green-soft); }.badge.pending { color: var(--yellow); background: var(--yellow-soft); }
.timeline { display: grid; gap: 12px; }.timeline-item { position: relative; padding-left: 18px; }.timeline-item::before { content: ""; position: absolute; left: 1px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }.timeline-item strong { display: block; }.timeline-item span { color: var(--muted); font-size: 11px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 15px; }.toolbar input { flex: 1; }.toolbar input, .toolbar select, input, select, textarea { min-height: 40px; border: 1px solid #ccd9de; border-radius: 9px; padding: 8px 11px; color: var(--ink); background: white; outline: none; }.toolbar input:focus, input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,123,120,.1); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }.project-card { padding: 18px; border: 1px solid #e0e9ec; border-radius: 14px; background: white; box-shadow: var(--shadow); transition: .15s; }.project-card:hover { transform: translateY(-2px); border-color: #a8cecc; }.project-card-head { display: flex; justify-content: space-between; gap: 10px; }.project-card h2 { margin: 7px 0 3px; font-size: 17px; }.project-card p { margin: 0; color: var(--muted); }.project-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 15px 0; }.project-stats div { padding: 8px; border-radius: 8px; text-align: center; background: #f5f8f9; }.project-stats strong, .project-stats span { display: block; }.project-stats span { color: var(--muted); font-size: 10px; }.progress { height: 7px; overflow: hidden; border-radius: 10px; background: #edf2f3; }.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #41aca0); }.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.draft-list { display: grid; gap: 11px; }.draft-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 12px; background: white; }.draft-card h3 { margin: 0 0 5px; }.draft-card p { margin: 3px 0; color: var(--muted); }.draft-actions { display: flex; align-items: center; gap: 7px; }.confidence { color: var(--teal); font-weight: 700; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.report-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }.report-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 11px; color: var(--teal); background: var(--teal-soft); font-size: 17px; font-weight: 800; }.report-card h2 { margin: 16px 0 6px; }.report-card p { min-height: 63px; color: var(--muted); }.result-panel { margin-top: 16px; }.result-item { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.ai-banner { margin-bottom: 15px; padding: 24px; border-radius: 15px; color: white; background: linear-gradient(120deg, #0a4350, #087b78); box-shadow: var(--shadow); }.ai-banner div { max-width: 760px; }.ai-banner h2 { margin: 0 0 5px; }.ai-banner p { margin: 0; opacity: .82; }.spark { float: right; font-size: 42px; opacity: .55; }.form-grid { display: flex; align-items: end; gap: 12px; margin-bottom: 15px; }.form-grid label { min-width: 160px; }.form-grid .grow { flex: 1; }.form-grid label span, .dialog-form label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }.form-grid input, .form-grid select { width: 100%; }.job { display: grid; grid-template-columns: 110px 1fr 100px 160px; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); align-items: center; }
dialog { width: min(640px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 15px; box-shadow: 0 22px 70px rgba(8,37,44,.28); }dialog::backdrop { background: rgba(9,35,41,.45); backdrop-filter: blur(2px); }.dialog-form { padding: 23px; display: grid; gap: 13px; }.dialog-head { display: flex; justify-content: space-between; }.dialog-head h2 { margin: 2px 0; }.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--muted); background: #f1f5f6; font-size: 22px; }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.dialog-form input, .dialog-form select, .dialog-form textarea { width: 100%; }.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; }.project-dialog { width: min(960px, calc(100vw - 32px)); }.project-detail { padding: 24px; }.detail-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }.detail-section { padding: 15px; border: 1px solid var(--line); border-radius: 11px; }.detail-section h3 { margin: 0 0 10px; }.key-values { display: grid; grid-template-columns: 120px 1fr; gap: 7px 10px; }.key-values dt { color: var(--muted); }.key-values dd { margin: 0; }
#toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 430px; padding: 12px 16px; border-radius: 10px; color: white; background: #123f48; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }#toast.show { opacity: 1; transform: translateY(0); }#toast.error { background: var(--red); }
.empty { padding: 30px; color: var(--muted); text-align: center; }.link-button { border: 0; padding: 0; color: var(--teal); background: transparent; text-decoration: underline; }
.login-screen { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(170deg, #073642, #0a4b55 64%, #0c5c61); padding: 24px; }.login-card { width: min(360px, 100%); display: grid; gap: 13px; padding: 32px 28px; border-radius: 16px; background: white; box-shadow: 0 22px 70px rgba(8,37,44,.28); text-align: center; }.login-mark { justify-self: center; margin-bottom: 2px; }.login-card h1 { margin: 0; font-size: 20px; }.login-card p.muted { margin: 0 0 8px; font-size: 12px; }.login-card label { text-align: left; }.login-error { margin: 0; color: var(--red); font-size: 12px; }
#logoutButton { margin-top: 6px; padding: 0; font-size: 12px; }
@media (max-width: 1100px) { .metric-grid { grid-template-columns: repeat(3, 1fr); }.project-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }.report-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .shell { display: block; }.sidebar { position: static; width: auto; height: auto; padding: 14px; }.brand { padding-bottom: 12px; }nav { grid-template-columns: repeat(3, 1fr); }.nav-item { justify-content: center; font-size: 12px; }.nav-item span { display: none; }.sidebar-foot { display: none; }main { padding: 0 14px 30px; }.topbar { align-items: flex-start; padding: 18px 0; }.top-actions .muted, #refreshButton { display: none; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.project-grid, .risk-board { grid-template-columns: 1fr; }.toolbar, .form-grid { flex-direction: column; align-items: stretch; }.toolbar select { width: 100%; }.form-row, .detail-grid { grid-template-columns: 1fr; }.draft-card { grid-template-columns: 1fr; }.job { grid-template-columns: 80px 1fr; } }
