.primary-action,.secondary-action{border:1px solid var(--ink);border-radius:6px;padding:8px 12px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}.primary-action{background:var(--ink);color:#fff}.secondary-action{background:transparent;color:var(--ink);border-color:var(--line)}.primary-action:disabled,.secondary-action:disabled{opacity:.38;cursor:not-allowed}
.read-only-pill{display:inline-flex;align-items:center;border:1px solid #9fc2b5;background:#e9f3ed;color:var(--green);border-radius:999px;padding:6px 10px;font-size:11px;font-weight:700;white-space:nowrap}

.portfolio-schedules{margin-top:22px}.portfolio-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:12px}.portfolio-heading h3{font:700 22px "Playfair Display","Noto Sans SC";margin:5px 0}.portfolio-heading p{margin:0;color:var(--muted);font-size:12px}.portfolio-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.portfolio-panel{background:#173d35;border-radius:10px;padding:18px;color:#fff;overflow:hidden;position:relative}.portfolio-panel:after{content:"";position:absolute;width:140px;height:140px;border:24px solid var(--lime);border-radius:50%;right:-72px;top:-80px;opacity:.25}.portfolio-panel.update-panel{background:#283852}.portfolio-panel header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff24;padding-bottom:13px;position:relative;z-index:1}.portfolio-panel header small{font:500 9px "DM Mono";letter-spacing:1px;color:#a9c9bd}.portfolio-panel h4{margin:4px 0 0;font-size:15px}.portfolio-panel header>b{font:700 28px "Playfair Display";color:var(--lime);padding-right:12px}.portfolio-list{display:grid;gap:2px;margin-top:8px;position:relative;z-index:1}.portfolio-item{display:grid;grid-template-columns:48px 7px 1fr auto;align-items:center;gap:10px;width:100%;border:0;border-bottom:1px solid #ffffff18;background:transparent;color:#fff;text-align:left;padding:10px 2px;cursor:pointer}.portfolio-item:hover{background:#ffffff0b}.portfolio-item time{font:500 10px "DM Mono";color:#d7e8e1}.portfolio-item>i{width:7px;height:28px;border-radius:5px}.portfolio-item strong,.portfolio-item small{display:block}.portfolio-item strong{font-size:12px}.portfolio-item small{margin-top:2px;color:#b9cec6;font-size:10px}.portfolio-item em{font-style:normal;font-size:10px;color:#fff;border:1px solid #ffffff30;border-radius:999px;padding:3px 7px}.portfolio-empty{padding:26px 4px;color:#b9cec6;font-size:12px}

.project-source-strip{display:grid;grid-template-columns:42px minmax(200px,1fr) minmax(210px,.7fr) auto auto;gap:12px;align-items:center;background:#fffef9;border:1px solid var(--line);border-left:4px solid var(--lime);border-radius:9px;padding:13px 14px;margin-bottom:14px}.source-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;background:#e6f0d0;color:var(--green);font-weight:800}.source-copy span,.source-copy strong,.source-copy small{display:block}.source-copy span{font:500 9px "DM Mono";letter-spacing:.7px;color:var(--green)}.source-copy strong{font-size:13px;margin:2px 0}.source-copy small{font-size:10px;color:var(--muted)}.source-policy{padding-left:13px;border-left:1px solid var(--line)}.source-policy b,.source-policy span{display:block}.source-policy b{font-size:10px}.source-policy span{font-size:10px;color:var(--muted);margin-top:2px;line-height:1.5}

.ai-health{background:#edf1e9;border:1px solid #d9ddd1;border-radius:10px;padding:17px;margin-bottom:14px}.ai-health-title,.gantt-head,.chat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.ai-health-title h3,.gantt-head h3,.chat-head h3{margin:4px 0;font:700 18px "Playfair Display","Noto Sans SC"}.ai-advisory{font-size:10px;color:var(--muted);border:1px solid #ccd3c8;border-radius:999px;padding:5px 8px}.health-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:13px}.health-grid article{min-width:0;background:#fffef9;border:1px solid #dde0d8;border-top:3px solid #b9c6bd;border-radius:7px;padding:11px}.health-grid article.active{border-top-color:var(--green)}.health-grid article.warning{border-top-color:var(--orange)}.health-grid article.danger{border-top-color:var(--red)}.health-grid small,.health-grid b,.health-grid span{display:block}.health-grid small{font-size:9px;color:var(--muted)}.health-grid b{font-size:19px;margin:4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.health-grid span{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-health-actions{display:flex;align-items:center;gap:8px}.analysis-detail-modal{width:min(1080px,94vw);max-height:90vh;overflow:auto}.analysis-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.analysis-detail-head h2{margin:4px 0}.analysis-detail-head p{margin:0;color:var(--muted);font-size:11px}.analysis-kpis{grid-template-columns:1.3fr repeat(3,1fr);margin:18px 0 12px}.analysis-judgement{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.analysis-judgement article{padding:13px 14px;background:#f2f5ed;border:1px solid #dce2d7;border-left:4px solid #6b9484;border-radius:7px}.analysis-judgement article.risk{background:#fff4ec;border-left-color:#d66f3c}.analysis-judgement small,.analysis-judgement b,.analysis-judgement p{display:block}.analysis-judgement small{color:var(--muted);font-size:9px}.analysis-judgement b{margin:4px 0;font-size:13px}.analysis-judgement p{margin:0;color:var(--muted);font-size:10px}.analysis-table{max-height:390px;border:1px solid #dfe3dc;border-radius:7px}.analysis-table .schedule-import-table td:first-child,.analysis-table .schedule-import-table th:first-child{width:auto;text-align:left}.analysis-table .schedule-import-table th:nth-child(3){width:190px}.analysis-table .schedule-import-table th:nth-child(4){width:120px}

.project-gantt{background:var(--panel);border:1px solid var(--line);border-radius:10px;margin-bottom:14px;overflow:hidden}.gantt-head{padding:17px 18px 12px}.gantt-head p,.chat-head p{margin:3px 0 0;color:var(--muted);font-size:11px}.gantt-actions{text-align:right}.gantt-actions>span{display:block;margin-top:5px;font-size:10px;color:var(--muted)}.gantt-scale{display:flex;border:1px solid var(--line);border-radius:6px;overflow:hidden}.gantt-scale button{border:0;border-right:1px solid var(--line);background:#f5f4ed;padding:6px 9px;font-size:10px;cursor:pointer}.gantt-scale button:last-child{border-right:0}.gantt-scale button.active{background:var(--ink);color:#fff}.gantt-calendar{margin:0 16px;border:1px solid #e2e2da;border-radius:7px;overflow:hidden}.gantt-axis{display:flex;justify-content:space-between;padding:7px 12px 7px 220px;background:#f4f4ed;font:500 9px "DM Mono";color:var(--muted)}.gantt-body{position:relative}.gantt-today,.gantt-marker{position:absolute;top:0;bottom:0;width:1px;z-index:2;pointer-events:none}.gantt-today{background:var(--red)}.gantt-marker{border-left:1px dashed #789183}.gantt-today span,.gantt-marker span{position:absolute;top:-22px;left:3px;font-size:8px;color:var(--red);white-space:nowrap}.gantt-marker span{top:3px;color:#577166;line-height:1.25}.gantt-row{position:relative;z-index:3;display:grid;grid-template-columns:205px 1fr 56px;align-items:center;width:100%;min-height:43px;border:0;border-top:1px solid #ecece5;background:transparent;text-align:left;cursor:pointer}.gantt-row:hover{background:#fafbf4}.gantt-task-name{padding:7px 10px;overflow:hidden}.gantt-task-name strong,.gantt-task-name small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gantt-task-name strong{font-size:11px}.gantt-task-name small{font-size:9px;color:var(--muted);margin-top:2px}.gantt-track{position:relative;height:18px;background:repeating-linear-gradient(90deg,#eef0e9 0,#eef0e9 1px,transparent 1px,transparent 20%)}.gantt-bar{position:absolute;top:2px;height:14px;border-radius:3px;background:#87998f;min-width:7px}.gantt-bar.feishu{background:#59a89a}.gantt-bar.manual{background:var(--orange)}.gantt-bar.template{background:#9aa69f}.gantt-bar.important{box-shadow:0 0 0 2px #17231e22}.gantt-bar em{position:absolute;left:5px;top:1px;max-width:120px;overflow:hidden;color:#fff;font-size:8px;font-style:normal;white-space:nowrap}.gantt-row time{font:500 9px "DM Mono";text-align:center;color:var(--muted)}.gantt-empty{padding:35px;text-align:center;color:var(--muted);font-size:11px}.project-gantt footer{display:flex;align-items:center;gap:13px;padding:10px 18px;color:var(--muted);font-size:9px}.project-gantt footer span{display:flex;align-items:center;gap:4px}.project-gantt footer i{width:9px;height:9px;border-radius:2px}.legend-feishu{background:#59a89a}.legend-manual{background:var(--orange)}.legend-template{background:#9aa69f}.project-gantt footer em{margin-left:auto;font-style:normal}

.chat-tracking{background:#17231e;color:#fff;border-radius:10px;padding:18px;margin-bottom:16px}.chat-head .tag{color:var(--lime)}.chat-head h3{color:#fff}.chat-head p{color:#9fb4aa}.chat-actions{display:flex;gap:7px}.chat-actions .secondary-action{color:#fff;border-color:#ffffff3a}.chat-actions .primary-action{background:var(--lime);color:var(--ink);border-color:var(--lime)}.chat-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:#ffffff1f;margin:14px 0}.chat-metrics>span{background:#17231e;padding:10px}.chat-metrics small,.chat-metrics b{display:block}.chat-metrics small{font-size:8px;color:#91aaa0}.chat-metrics b{font-size:12px;margin-top:3px}.chat-result{display:flex;gap:12px;align-items:flex-start;background:#21312b;border:1px solid #ffffff16;border-radius:8px;padding:13px}.signal-orb{width:12px;height:12px;border-radius:50%;background:#68746e;flex:0 0 auto;margin-top:3px}.signal-orb.active{background:var(--lime);box-shadow:0 0 0 5px #c9e74b1f}.chat-result small,.chat-result strong,.chat-result p{display:block}.chat-result small{font-size:9px;color:#91aaa0}.chat-result strong{font-size:12px;margin:4px 0}.chat-result p{margin:0;color:#aebdb6;font-size:10px;line-height:1.55}.tracked-tasks{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:8px}.tracked-tasks button{display:grid;grid-template-columns:24px 1fr;gap:0 8px;border:1px solid #ffffff18;background:#20312b;color:#fff;border-radius:6px;text-align:left;padding:8px;cursor:pointer}.tracked-tasks button>span{grid-row:1/3;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#344a42;color:var(--lime)}.tracked-tasks b{font-size:10px}.tracked-tasks small{font-size:8px;color:#92a79e}.chat-empty{padding:15px 0 2px;color:#92a79e;font-size:11px}

.integration-rule{display:grid;gap:4px;margin-top:14px;padding:13px 14px;background:#f1f4e8;border-left:3px solid var(--lime);border-radius:5px}.integration-rule b{font-size:11px}.integration-rule span{font-size:12px}.integration-rule small{font-size:10px;color:var(--muted);line-height:1.5}.read-result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.read-result-grid span{background:#f3f4ed;border:1px solid var(--line);border-radius:7px;padding:12px}.read-result-grid small,.read-result-grid b{display:block}.read-result-grid small{font-size:9px;color:var(--muted)}.read-result-grid b{font:700 23px "Playfair Display";margin-top:3px}.switch-field{display:flex;gap:10px;align-items:flex-start;margin-top:14px;padding:11px;border:1px solid var(--line);border-radius:7px}.switch-field input{margin-top:3px}.switch-field b,.switch-field small{display:block}.switch-field b{font-size:12px}.switch-field small{font-size:10px;color:var(--muted);margin-top:2px}.modal{max-height:calc(100vh - 40px);overflow-y:auto}

.activity-source-strip{display:grid;grid-template-columns:1fr minmax(250px,.7fr) auto auto;gap:12px;align-items:center;margin:14px 0;padding:15px 17px;background:#edf2e9;border:1px solid #d3dbcd;border-left:4px solid var(--lime);border-radius:9px}.activity-source-strip h3{margin:4px 0;font-size:15px}.activity-source-strip p{margin:0;color:var(--muted);font-size:11px}.activity-source-policy{padding-left:14px;border-left:1px solid #ccd3c6}.activity-source-policy b,.activity-source-policy span{display:block}.activity-source-policy b{font-size:11px}.activity-source-policy span{margin-top:3px;color:var(--muted);font-size:10px;line-height:1.5}.activity-name-line{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.activity-source-badge{display:inline-block;border-radius:999px;padding:2px 6px;font-size:8px;font-weight:700}.activity-source-badge.feishu{background:#d9ece8;color:#217263}.activity-source-badge.manual{background:#ffe2cf;color:#a5501d}

.weekly-source-summary{display:grid!important;grid-template-columns:1.25fr .55fr!important;gap:8px!important}.weekly-source-summary article{border:1px solid var(--line)!important;background:var(--panel)!important;border-radius:10px!important;padding:13px 15px!important}.weekly-source-summary article:before{display:none!important}.weekly-source-main{grid-column:1/3;display:flex;align-items:center;gap:9px}.weekly-source-main>div{margin-right:auto}.weekly-source-main h3{margin:3px 0;font-size:14px}.weekly-source-main p{margin:0!important;color:var(--muted);font-size:10px!important}.weekly-source-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.weekly-source-counts span{padding:5px;border-right:1px solid var(--line)}.weekly-source-counts span:last-child{border:0}.weekly-source-counts small,.weekly-source-counts b{display:block}.weekly-source-counts small{font-size:8px;color:var(--muted)}.weekly-source-counts b{font:700 20px "Playfair Display";margin-top:2px}.weekly-missing-list b{font-size:10px}.weekly-missing-list p{margin:3px 0!important;font-size:11px!important}.weekly-missing-list small{display:block;line-height:1.45;font-size:8px!important;color:var(--muted)}.weekly-source-editor{display:grid;gap:7px;max-height:370px;overflow:auto}.weekly-source-editor label{display:grid;grid-template-columns:80px 1fr 65px;align-items:center;gap:8px;font-size:11px}.weekly-source-editor input{min-width:0;border:1px solid var(--line);border-radius:5px;padding:8px}.weekly-source-editor em{font-size:9px;color:var(--muted);font-style:normal}

.modal-backdrop{z-index:1200;isolation:isolate}.modal{position:relative;z-index:1}
.gantt-today,.gantt-marker{width:1px;pointer-events:none}.gantt-today{width:11px;transform:translateX(-5px);background:linear-gradient(90deg,transparent 0,rgba(246,129,63,.09) 38%,rgba(246,129,63,.09) 62%,transparent 100%)}.gantt-today:after{content:"";position:absolute;inset:0 auto 0 5px;border-left:1px dashed rgba(188,91,39,.58)}.gantt-today span{top:-26px;left:50%;transform:translateX(-50%);padding:2px 6px;border:1px solid #efc4a9;border-radius:999px;background:#fff6ed;color:#a34f20;font:600 8px "Noto Sans SC";line-height:1.2;box-shadow:0 1px 4px rgba(70,42,25,.08)}.gantt-marker span{color:#577166}.gantt-row{background:rgba(255,254,249,.94)}
.source-icon.excel{width:38px;background:#dceee8;color:#176554;font:700 9px "DM Mono"}.source-type-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:2px 0 15px}.source-type-card{display:grid;grid-template-columns:36px 1fr;grid-template-rows:auto auto;gap:1px 9px;text-align:left;border:1px solid var(--line);border-radius:8px;background:#f8f7f0;padding:11px;cursor:pointer;color:var(--ink)}.source-type-card:hover{border-color:#8fb3a7}.source-type-card.active{border-color:#3b8775;background:#edf5ef;box-shadow:inset 0 0 0 1px #3b8775}.source-type-card>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border-radius:7px;background:#dde9e1;color:#246d5b;font:700 9px "DM Mono"}.source-type-card.active>span{background:#173d35;color:var(--lime)}.source-type-card b{font-size:11px}.source-type-card small{font-size:9px;color:var(--muted)}.source-config-panel[hidden]{display:none}.source-file-drop{display:flex;align-items:center;gap:11px;border:1px dashed #8fa99e;border-radius:7px;background:#f5f8f2;padding:13px;cursor:pointer}.source-file-drop:hover{background:#eff5eb;border-color:#4f8b79}.source-file-drop input{width:auto!important;margin:0!important;font-size:11px!important}.source-file-drop span,.source-file-drop b,.source-file-drop small{display:block}.source-file-drop b{font-size:11px}.source-file-drop small{margin-top:2px;color:var(--muted);font-size:9px}.source-file-meta{min-height:35px;margin:7px 0 13px;padding:8px 10px;border-radius:5px;background:#f2f3ed}.source-file-meta b,.source-file-meta small{display:block}.source-file-meta b{font-size:10px}.source-file-meta small,.source-file-meta span{font-size:9px;color:var(--muted)}.locked-modal-note{margin-top:10px;padding:8px 10px;border-radius:5px;background:#fff4e7;color:#91552d;font-size:9px;line-height:1.5}
.schedule-import-preview{margin:-3px 0 14px;background:#fffef9;border:1px solid #cfd8ce;border-radius:10px;overflow:hidden;box-shadow:0 8px 24px rgba(32,57,47,.06)}.schedule-import-preview>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:17px 18px 12px;background:linear-gradient(135deg,#eef4e8 0,#fffef9 70%)}.schedule-import-preview h3{margin:4px 0;font:700 18px "Playfair Display","Noto Sans SC"}.schedule-import-preview header p{margin:0;color:var(--muted);font-size:10px}.schedule-import-actions{display:flex;gap:7px;white-space:nowrap}.schedule-import-metrics{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #e0e4dc;border-bottom:1px solid #e0e4dc;background:#f7f7f1}.schedule-import-metrics span{padding:10px 17px;border-right:1px solid #e0e4dc}.schedule-import-metrics span:last-child{border-right:0}.schedule-import-metrics small,.schedule-import-metrics b{display:block}.schedule-import-metrics small{font-size:8px;color:var(--muted)}.schedule-import-metrics b{font:700 18px "Playfair Display";margin-top:2px}.schedule-import-table-wrap{max-height:360px;overflow:auto}.schedule-import-table{width:100%;border-collapse:collapse}.schedule-import-table th{position:sticky;top:0;z-index:2;padding:8px 10px;background:#f0f2eb;border-bottom:1px solid #d8ddd5;color:#627067;font-size:8px;text-align:left;letter-spacing:.3px}.schedule-import-table td{padding:9px 10px;border-bottom:1px solid #eceee8;vertical-align:top;font-size:10px}.schedule-import-table tr:hover td{background:#fafbf5}.schedule-import-table tr.imported td{background:#f1f6ef;color:#607066}.schedule-import-table td:first-child,.schedule-import-table th:first-child{width:42px;text-align:center}.schedule-import-table b,.schedule-import-table small,.schedule-import-table span,.schedule-import-table time{display:block}.schedule-import-table b{font-size:10px}.schedule-import-table small{margin-top:3px;color:var(--muted);font-size:8px;line-height:1.35}.schedule-import-table time{white-space:nowrap;font:500 9px "DM Mono"}.schedule-match{display:inline-block!important;width:max-content;border-radius:999px;padding:3px 7px;background:#e4efe8;color:#286c5a;font-size:8px;font-weight:700}.schedule-match.protected{background:#fff0e5;color:#9b552a}.schedule-match.review{background:#fff4cc;color:#7a6210}.schedule-match.done{background:#dfeadb;color:#43623d}.schedule-import-preview>footer,.schedule-import-limit{margin:0;padding:9px 18px;background:#f7f7f1;color:var(--muted);font-size:9px}.schedule-import-limit{border-top:1px solid #eceee8}
@media(max-width:1200px){.project-source-strip{grid-template-columns:42px 1fr auto auto}.source-policy{display:none}.health-grid{grid-template-columns:repeat(2,1fr)}.activity-source-strip{grid-template-columns:1fr auto auto}.activity-source-policy{display:none}}
@media(max-width:900px){.portfolio-grid{grid-template-columns:1fr}.project-source-strip{grid-template-columns:42px 1fr}.project-source-strip button{grid-column:auto}.gantt-axis{padding-left:160px}.gantt-row{grid-template-columns:145px 1fr 50px}.chat-metrics{grid-template-columns:repeat(2,1fr)}.tracked-tasks{grid-template-columns:1fr}.activity-source-strip{grid-template-columns:1fr 1fr}.activity-source-strip>div:first-child{grid-column:1/3}.weekly-source-summary{grid-template-columns:1fr!important}.weekly-source-main{grid-column:auto}.weekly-source-main{flex-wrap:wrap}.schedule-import-preview>header{display:block}.schedule-import-actions{margin-top:10px}.schedule-import-metrics{grid-template-columns:repeat(2,1fr)}.schedule-import-table{min-width:720px}}
@media(max-width:650px){.portfolio-heading,.ai-health-title,.gantt-head,.chat-head,.analysis-detail-head{display:block}.read-only-pill,.ai-advisory{display:none}.ai-health-actions{margin-top:10px}.health-grid,.analysis-judgement{grid-template-columns:1fr 1fr}.gantt-actions{margin-top:10px;text-align:left}.gantt-axis{padding-left:115px}.gantt-row{grid-template-columns:105px 1fr}.gantt-row time{display:none}.project-gantt footer em{display:none}.chat-actions{margin-top:12px}.activity-source-strip{display:flex;align-items:stretch;flex-direction:column}.activity-source-strip>div:first-child{grid-column:auto}.weekly-source-main{display:grid}.read-result-grid{grid-template-columns:1fr}.analysis-table .schedule-import-table{min-width:700px}}
