:root {
  color-scheme: light;
  --ink: #0b1830;
  --muted: #5e6978;
  --line: #d5dce5;
  --line-strong: #b4c0cf;
  --surface: #f1f3f6;
  --paper: #ffffff;
  --navy: #071321;
  --navy-raised: #0e2137;
  --blue: #003a9f;
  --blue-bright: #1688c9;
  --blue-soft: #eef3fb;
  --cyan: #20b9d5;
  --red: #cf3554;
  --yellow: #c98808;
  --green: #178064;
  --violet: #526b94;
  --shadow-sm: 0 2px 8px rgba(9, 30, 57, .06);
  --shadow-md: 0 10px 26px rgba(9, 30, 57, .09);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; background: var(--surface); color: var(--ink); font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; }
button, input, select { outline-color: var(--blue); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
strong, b, .bandwidth-hours, .hours-total { font-variant-numeric: tabular-nums; }

.auth-gate, .account-gate, .password-gate { position: fixed; inset: 0; z-index: 10020; min-height: 100vh; background: #071321; color: white; }
.auth-gate[hidden], .account-gate[hidden], .password-gate[hidden] { display: none; }
.auth-gate { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(420px, 560px); align-items: center; gap: 8vw; padding: clamp(28px, 6vw, 90px); }
.auth-brand { align-self: center; display: flex; flex-direction: column; align-items: flex-start; }
.auth-brand img { width: min(420px, 72vw); max-height: 220px; object-fit: cover; border: 1px solid #244766; box-shadow: 0 24px 70px rgba(0, 0, 0, .34); }
.auth-brand strong { margin-top: 24px; font-size: 30px; }
.auth-brand span { margin-top: 8px; color: #8ea5c2; font-size: 12px; }
.auth-panel { width: 100%; padding: 30px; border: 1px solid #29425d; border-top: 3px solid var(--cyan); border-radius: 6px; background: #0d1c2e; box-shadow: 0 24px 70px rgba(0, 0, 0, .32); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: -10px 0 26px; border-bottom: 1px solid #29425d; }
.auth-tabs button { padding: 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #879db7; cursor: pointer; font-weight: 700; }
.auth-tabs button.active { border-color: var(--cyan); color: white; }
.auth-form { display: grid; gap: 16px; }
.auth-form header { margin-bottom: 4px; }
.auth-form h1 { margin-top: 5px; font-size: 24px; }
.auth-form header > p:last-child { margin-top: 8px; color: #9db0c5; font-size: 11px; line-height: 1.6; }
.auth-form label, .project-access-toolbar label { display: grid; gap: 6px; color: #9db0c5; font-size: 10px; }
.auth-form input, .auth-form select, .project-access-toolbar select { min-height: 42px; padding: 0 12px; border: 1px solid #36506d; border-radius: 3px; background: #071525; color: white; }
.auth-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.verification-row { display: grid; grid-template-columns: 1fr 120px; align-items: end; gap: 10px; }
.verification-row button, .auth-primary, .account-gate button, .project-access-toolbar button { min-height: 42px; border: 1px solid #2d71b8; border-radius: 3px; background: #063d9c; color: white; cursor: pointer; font-weight: 750; }
.auth-secondary { min-height: 38px; border: 1px solid #36506d; background: transparent; color: #9db0c5; cursor: pointer; }
.verification-hint { min-height: 16px; color: #60d0df; font-size: 10px; }
.form-error { min-height: 16px; color: #ff7a91; font-size: 10px; }
.account-gate, .password-gate { display: grid; place-content: center; justify-items: center; padding: 32px; text-align: center; }
.account-gate h1 { margin-top: 12px; font-size: 28px; }
.account-gate > p:not(.eyebrow) { max-width: 520px; margin-top: 12px; color: #a6b9ce; line-height: 1.7; }
.account-gate button { min-width: 120px; margin-top: 24px; }
.account-pet { width: 190px; height: 160px; display: grid; place-items: center; }
.password-gate .auth-panel { width: min(440px, calc(100vw - 40px)); text-align: left; }
.user-identity { min-width: 0; max-width: 130px; display: flex; flex-direction: column; line-height: 1.2; }
.user-identity strong, .user-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity strong { color: #f2f7fc; font-size: 11px; }
.user-identity small { margin-top: 3px; color: #8fa8c2; font-size: 9px; }
.admin-user-list, .project-access-list { border: 1px solid var(--line); background: white; }
.admin-user-row { padding: 14px; display: grid; grid-template-columns: minmax(220px, 1.25fr) minmax(260px, 1.4fr) repeat(2, minmax(150px, .8fr)) 84px; align-items: end; gap: 12px; border-bottom: 1px solid var(--line); }
.admin-user-row:last-child { border-bottom: 0; }
.admin-user-row .identity strong, .admin-user-row .identity span { display: block; }
.admin-user-row .identity span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.admin-user-row label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.admin-user-row select, .admin-user-row input { min-height: 36px; padding: 0 8px; border: 1px solid var(--line-strong); background: white; color: var(--ink); }
.admin-user-row button { min-height: 36px; border: 1px solid var(--blue); background: white; color: var(--blue); cursor: pointer; font-weight: 750; }
.project-access-toolbar { padding: 16px; display: grid; grid-template-columns: 1.4fr 1fr .8fr 100px; align-items: end; gap: 12px; border: 1px solid var(--line); background: white; }
.project-access-toolbar select { border-color: var(--line-strong); background: white; color: var(--ink); }
.project-access-list { margin-top: 12px; }
.project-access-row { padding: 12px 14px; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, .7fr) auto; align-items: end; gap: 16px; border-bottom: 1px solid var(--line); font-size: 11px; }
.project-access-row:last-child { border-bottom: 0; }
.project-access-row span { color: var(--muted); }
.project-member-identity { align-self: center; }
.project-member-identity strong, .project-member-identity span { display: block; }
.project-member-identity span { margin-top: 4px; font-size: 10px; }
.project-access-row label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.project-access-row select { min-height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); background: white; color: var(--ink); }
.project-member-actions { display: flex; gap: 8px; }
.project-member-actions button { min-width: 64px; min-height: 36px; border: 1px solid var(--line-strong); background: white; color: var(--blue); cursor: pointer; font-weight: 750; }
.project-member-actions .project-member-delete { border-color: #e2a6ae; color: #b72d43; }
.project-member-actions button:hover { background: #f3f7fb; }
.project-member-actions button:disabled { cursor: wait; opacity: .55; }

.agent-intro { position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; overflow: hidden; background: rgba(5, 13, 26, .96); color: white; animation: intro-backdrop-in .35s ease-out both; }
.agent-intro[hidden] { display: none; }
.agent-intro.is-leaving { pointer-events: none; animation: intro-backdrop-out .48s ease-in both; }
.intro-skip { position: fixed; top: 22px; right: 24px; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(132, 165, 203, .48); border-radius: 50%; background: rgba(7, 19, 33, .72); color: #dbe9f7; cursor: pointer; font-size: 24px; line-height: 1; }
.intro-skip:hover { border-color: #64c8df; background: #102746; }
.intro-stage { position: relative; width: 280px; height: 230px; display: grid; place-items: center; }
.intro-ring { position: absolute; border: 1px solid rgba(86, 186, 218, .4); border-radius: 50%; box-shadow: 0 0 30px rgba(20, 128, 190, .14); animation: intro-ring-pulse 2s ease-in-out infinite; }
.ring-outer { width: 224px; height: 224px; }
.ring-inner { width: 168px; height: 168px; border-color: rgba(49, 121, 198, .5); animation-delay: -.7s; }
.digital-pet { position: relative; z-index: 1; width: 176px; height: 144px; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .42)) drop-shadow(0 0 16px rgba(28, 151, 211, .28)); animation: pet-arrive .78s cubic-bezier(.2, .9, .25, 1.25) both, pet-float 2.2s .8s ease-in-out infinite; }
.pet-pixels { position: absolute; top: 2px; left: 50%; width: 82px; height: 26px; display: flex; align-items: flex-end; justify-content: space-between; transform: translateX(-50%); }
.pet-pixels i { width: 13px; height: 13px; display: block; background: #40c5dc; box-shadow: 0 0 10px rgba(64, 197, 220, .52); animation: pet-pixel-drift 2.4s ease-in-out infinite; }
.pet-pixels i:first-child { width: 10px; height: 10px; background: #eef9fa; animation-delay: -.8s; }
.pet-pixels i:last-child { width: 9px; height: 9px; background: #8b5bd7; animation-delay: -1.6s; }
.pet-body { position: absolute; top: 34px; left: 27px; width: 122px; height: 79px; clip-path: polygon(7% 0, 93% 0, 100% 10%, 100% 88%, 91% 100%, 9% 100%, 0 88%, 0 10%); background: linear-gradient(145deg, #176fc2 0%, #073fa8 45%, #13267f 100%); border: 1px solid rgba(112, 219, 237, .72); box-shadow: inset 0 0 0 5px rgba(9, 30, 90, .18), inset 0 12px 18px rgba(96, 196, 233, .12); }
.pet-body::before { position: absolute; top: 0; left: 10px; right: 10px; height: 9px; background: rgba(132, 216, 239, .18); content: ""; }
.pet-body::after { position: absolute; right: 8px; bottom: 8px; width: 7px; height: 7px; background: #75dbea; box-shadow: 0 0 7px rgba(117, 219, 234, .65); content: ""; }
.pet-ear { position: absolute; z-index: 0; top: 56px; width: 32px; height: 28px; background: #0b55b1; border: 1px solid #4ca6d1; }
.pet-ear-left { left: 5px; clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 78%); }
.pet-ear-right { right: 5px; clip-path: polygon(0 0, 100% 22%, 100% 78%, 0 100%); }
.pet-eyes { position: absolute; top: 29px; left: 27px; right: 27px; display: flex; justify-content: space-between; }
.pet-eyes i { width: 13px; height: 19px; display: block; background: #b8edf2; box-shadow: inset 3px 0 0 rgba(255, 255, 255, .45), 0 0 9px rgba(95, 217, 234, .72); animation: pet-look 3.6s 1.2s ease-in-out infinite, pet-blink 4.4s 1.6s infinite; }
.pet-signal { position: absolute; bottom: 18px; left: 50%; display: flex; align-items: flex-end; gap: 4px; transform: translateX(-50%); }
.pet-signal i { width: 5px; height: 5px; display: block; background: #71d7e8; box-shadow: 0 0 5px rgba(67, 201, 226, .55); }
.pet-signal i:nth-child(2) { transform: translateY(3px); }
.pet-badge { position: absolute; left: 10px; bottom: 8px; color: rgba(207, 241, 246, .8); font-size: 8px; font-weight: 800; letter-spacing: 0; }
.pet-foot { position: absolute; bottom: 10px; width: 13px; height: 25px; background: #092c83; border: 1px solid #3e8fc4; box-shadow: 19px 0 0 #092c83, 19px 0 0 1px #3e8fc4; }
.pet-foot-left { left: 47px; }
.pet-foot-right { right: 47px; }
.intro-wordmark { margin-top: 4px; color: #dce9f5; font-size: 15px; font-weight: 700; letter-spacing: 0; animation: intro-wordmark-in .55s .45s ease-out both; }

@keyframes intro-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-backdrop-out { to { opacity: 0; transform: scale(1.015); } }
@keyframes pet-arrive { 0% { opacity: 0; transform: translateY(80px) scale(.58); } 68% { opacity: 1; transform: translateY(-9px) scale(1.04); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pet-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pet-blink { 0%, 42%, 48%, 100% { transform: scaleY(1); } 45% { transform: scaleY(.08); } }
@keyframes pet-look { 0%, 34%, 100% { translate: 0 0; } 43%, 58% { translate: 5px 1px; } 68%, 82% { translate: -3px -1px; } }
@keyframes pet-head-curious { 0%, 32%, 100% { transform: rotate(0); } 42%, 58% { transform: rotate(6deg); } 68%, 82% { transform: rotate(-3deg); } }
@keyframes pet-beacon { 0%, 100% { opacity: .55; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes pet-pixel-drift { 0%, 100% { opacity: .55; transform: translateY(5px) rotate(0); } 50% { opacity: 1; transform: translateY(-5px) rotate(8deg); } }
@keyframes intro-ring-pulse { 0%, 100% { opacity: .38; transform: scale(.96); } 50% { opacity: .82; transform: scale(1.04); } }
@keyframes intro-wordmark-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .agent-intro, .agent-intro.is-leaving, .digital-pet, .intro-ring, .pet-eyes i, .pet-pixels i, .intro-wordmark { animation-duration: .01ms; animation-iteration-count: 1; }
}

.app-header { min-height: 76px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 2px solid #177bb9; background: var(--navy); color: white; box-shadow: 0 8px 24px rgba(4, 16, 31, .2); }
.brand, .brand > div, .header-actions, .header-runtime, .account-control { display: flex; align-items: center; }
.brand { gap: 15px; }
.brand-mark { width: 88px; height: 44px; display: block; overflow: hidden; border: 1px solid #264d7e; background: #0d1a2b; box-shadow: 0 0 22px rgba(31, 111, 230, .28); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand > div { align-items: flex-start; flex-direction: column; line-height: 1.2; }
.brand > div strong { font-size: 16px; font-weight: 720; }
.brand > div span { margin-top: 3px; color: #8ea5c2; font-size: 10px; }
.header-actions { gap: 14px; }
.header-runtime { gap: 10px; color: #a9bdd4; font-size: 11px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #47d6a2; box-shadow: 0 0 0 3px rgba(71, 214, 162, .16), 0 0 10px rgba(71, 214, 162, .6); }
.header-runtime button { min-height: 36px; margin-left: 4px; padding: 0 15px; border: 1px solid #375fae; border-radius: 4px; background: #142f8f; color: white; cursor: pointer; font-size: 11px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 3, 160, .2); }
.header-runtime button:hover { border-color: #35a7d3; background: #003da6; }
.header-runtime button:disabled { opacity: .6; cursor: wait; }
.account-control { min-height: 44px; gap: 9px; padding: 5px 6px 5px 9px; border: 1px solid #29425d; border-radius: 4px; background: #0c1c2e; }
.user-avatar { width: 28px; height: 28px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #3c78aa; border-radius: 50%; background: #102f53; color: #8ed8e5; font-size: 11px; font-weight: 800; }
.logout-command { min-height: 32px; padding: 0 11px; border: 1px solid #744352; border-radius: 3px; background: transparent; color: #f0b3be; cursor: pointer; font-size: 10px; font-weight: 700; }
.logout-command:hover { border-color: #c96779; background: #351b28; color: white; }

.view-tabs { min-height: 52px; padding: 0 34px; display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line-strong); background: var(--paper); box-shadow: var(--shadow-sm); }
.view-tab { min-width: max-content; height: 52px; padding: 0 20px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #536378; cursor: pointer; font-size: 13px; }
.view-tab:hover { color: var(--blue); }
.view-tab.active { border-bottom-color: var(--blue); background: #f4f6fa; color: #00347f; font-weight: 760; }

main { max-width: 1520px; margin: 0 auto; padding: 24px 34px 64px; }
.context-bar { margin-bottom: 26px; display: grid; grid-template-columns: 1.1fr .9fr .7fr .72fr 1.2fr; border: 1px solid #1c3654; border-top: 3px solid var(--blue); background: #0d1c2e; color: white; box-shadow: var(--shadow-md); }
.context-bar div { min-width: 0; padding: 12px 16px; border-right: 1px solid #263d59; }
.context-bar div:last-child { border-right: 0; }
.context-bar span, .context-bar strong { display: block; }
.context-bar span { margin-bottom: 4px; color: #8199b5; font-size: 9px; text-transform: uppercase; }
.context-bar strong { overflow: hidden; color: #f4f8fd; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.context-bar .week-picker { padding-top: 9px; padding-bottom: 9px; }
.week-picker label { margin-bottom: 3px; display: block; color: #8199b5; font-size: 9px; text-transform: uppercase; }
.week-picker select { width: 100%; height: 27px; padding: 0 24px 0 8px; border: 1px solid #3b5878; border-radius: 3px; background: #14283f; color: #f4f8fd; cursor: pointer; font-size: 10px; }
.week-picker select:hover, .week-picker select:focus { border-color: #55a9cf; }
.week-picker select:disabled { cursor: wait; opacity: .65; }

.view { display: none; }
.view.active { display: block; }
.page-heading { min-height: 84px; margin-bottom: 18px; padding: 4px 0 5px 17px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-left: 4px solid var(--blue); }
.eyebrow { margin-bottom: 6px; color: var(--blue); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: 0; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: 0; }
.page-heading p:last-child { margin-top: 7px; color: var(--muted); font-size: 13px; }
.headline-status, .method-note { max-width: 420px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 3px; background: rgba(255, 255, 255, .82); color: #42546b; font-size: 11px; box-shadow: var(--shadow-sm); }

.summary-strip { margin-bottom: 20px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-top: 3px solid var(--blue); background: var(--paper); box-shadow: var(--shadow-sm); }
.summary-cell { min-height: 78px; padding: 15px 17px; border-right: 1px solid var(--line); }
.summary-cell:last-child { border-right: 0; }
.summary-cell span, .summary-cell strong { display: block; }
.summary-cell span { color: var(--muted); font-size: 10px; }
.summary-cell strong { margin-top: 7px; color: #10284a; font-size: 23px; }
.summary-cell.red strong { color: var(--red); }
.summary-cell.yellow strong { color: #ad7500; }

.judgment-list { display: grid; gap: 12px; }
.judgment { border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-sm); }
.judgment.yellow { border-left-color: var(--yellow); }
.judgment > header { padding: 15px 18px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.severity-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #fde7ec; }
.judgment.yellow .severity-dot { background: var(--yellow); box-shadow: 0 0 0 4px #fbf0ce; }
.judgment header p { color: var(--muted); font-size: 10px; font-weight: 800; }
.judgment header h2 { margin-top: 2px; font-size: 17px; }
.judgment dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.judgment dl div { padding: 14px 16px; border-right: 1px solid var(--line); }
.judgment dl div:last-child { border-right: 0; }
.judgment dt { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.judgment dd { margin: 0; font-size: 12px; line-height: 1.55; }
.judgment .action { background: #edf4fc; }
.data-warning { padding: 13px 16px; display: flex; justify-content: space-between; gap: 20px; border: 1px solid #e8c875; background: #fff9e8; color: #5d4a17; font-size: 12px; }
.empty-state { padding: 28px; border: 1px solid var(--line); background: var(--paper); text-align: center; }
.empty-state p { margin-top: 6px; color: var(--muted); }
.leadership-grid { margin-bottom: 14px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.leadership-grid .work-panel { margin: 0; }
.leadership-grid h2, .weekly-analysis h2 { font-size: 15px; }
.bandwidth-list { display: grid; }
.bandwidth-row { min-height: 48px; display: grid; grid-template-columns: 12px minmax(180px, 1fr) 60px 92px; align-items: center; gap: 10px; border-bottom: 1px solid #edf0f5; }
.bandwidth-row:last-child { border-bottom: 0; }
.bandwidth-row > div { min-width: 0; }
.bandwidth-row strong, .bandwidth-row small { display: block; }
.bandwidth-row strong { font-size: 12px; }
.bandwidth-row small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.signal { width: 9px; height: 9px; border-radius: 50%; }
.signal.red { background: var(--red); box-shadow: 0 0 0 4px #fde7ec; }
.signal.yellow { background: var(--yellow); box-shadow: 0 0 0 4px #fff2cd; }
.signal.green { background: var(--green); box-shadow: 0 0 0 4px #e1f2eb; }
.bandwidth-hours { text-align: right; font-size: 14px; font-weight: 800; }
.bandwidth-label { text-align: right; font-size: 9px; font-weight: 800; }
.bandwidth-label.red { color: var(--red); }
.bandwidth-label.yellow { color: #986700; }
.bandwidth-label.green { color: var(--green); }
.team-distribution-bar { height: 12px; display: flex; overflow: hidden; border: 1px solid #d6e0eb; background: #e7edf4; }
.team-distribution-bar i { display: block; height: 100%; }
.distribution-list { margin-top: 12px; display: grid; gap: 8px; }
.distribution-list div { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 10px; }
.distribution-list span { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.distribution-list span i { width: 8px; height: 8px; border-radius: 50%; }
.distribution-list strong { font-size: 11px; }
.weekly-analysis { margin-bottom: 20px; }
.weekly-analysis > header { margin-bottom: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.analysis-status { padding: 5px 8px; border: 1px solid #bfcae0; background: #f2f6ff; color: var(--blue); font-size: 9px; font-weight: 800; }
.analysis-status.api-key-required { border-color: #e4c76e; background: #fff8df; color: #7b5a00; }
.analysis-message { padding: 12px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.analysis-facts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.analysis-facts div { min-height: 58px; padding: 11px 12px; display: grid; grid-template-columns: 24px 1fr; gap: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.analysis-facts div:nth-child(2n) { border-right: 0; }
.analysis-facts div:nth-last-child(-n+2) { border-bottom: 0; }
.analysis-facts span { color: var(--blue); font-size: 9px; font-weight: 900; }
.analysis-facts p { font-size: 11px; line-height: 1.45; }
.analysis-output { margin-top: 10px; color: var(--muted); font-size: 9px; }
.issues-heading { margin-top: 24px; }

.team-list { display: grid; gap: 11px; }
.team-row { padding: 18px 20px; border: 1px solid var(--line); border-left-width: 5px; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-sm); }
.team-row.bandwidth-red { border-left-color: var(--red); box-shadow: inset 5px 0 18px rgba(216, 58, 89, .045); }
.team-row.bandwidth-yellow { border-left-color: var(--yellow); box-shadow: inset 5px 0 18px rgba(217, 154, 19, .055); }
.team-row.bandwidth-green { border-left-color: var(--green); }
.team-row > header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.team-row h2 { font-size: 17px; }
.role-label { margin-bottom: 3px; color: var(--blue) !important; font-size: 9px !important; font-weight: 800; text-transform: uppercase; }
.team-row header p { max-width: 900px; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.hours-total { font-size: 24px; }
.workload-status { min-width: 138px; display: flex; align-items: flex-end; flex-direction: column; }
.workload-status span { margin-top: 4px; display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; }
.workload-status span i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.workload-status small { margin-top: 3px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.bandwidth-red .hours-total, .bandwidth-red .workload-status span { color: var(--red); }
.bandwidth-yellow .hours-total, .bandwidth-yellow .workload-status span { color: #986700; }
.bandwidth-green .hours-total, .bandwidth-green .workload-status span { color: var(--green); }
.workload-thresholds { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; }
.workload-thresholds span, .trend-thresholds span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.workload-thresholds span::before, .trend-thresholds span::before { width: 8px; height: 8px; display: block; border-radius: 50%; background: currentColor; content: ""; }
.workload-thresholds .red, .trend-thresholds .red, .trend-thresholds .low { color: var(--red); }
.workload-thresholds .yellow, .trend-thresholds .yellow { color: #986700; }
.workload-thresholds .green, .trend-thresholds .normal { color: var(--green); }
.category-bar { height: 8px; margin-top: 15px; display: flex; overflow: hidden; border: 1px solid #dbe3ec; background: #e9edf0; }
.category-bar span { display: block; height: 100%; }
.category-support { background: var(--blue); }
.category-jiaoda { background: var(--violet); }
.category-customer { background: var(--cyan); }
.category-pr_marketing { background: #3e83a8; }
.category-tech_support { background: var(--blue); }
.category-business_management { background: #61758e; }
.category-hk_project { background: var(--cyan); }
.category-a_share { background: #2b9b75; }
.category-consulting_other { background: #7184a2; }
.category-tech_project { background: #2463a5; }
.category-internal { background: #6d7f96; }
.category-bd { background: var(--yellow); }
.category-rd { background: var(--violet); }
.category-training { background: #d76e4b; }
.category-other { background: #8a949d; }
.category-legend { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.category-legend span { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 10px; }
.category-legend i { width: 7px; height: 7px; border-radius: 50%; }
.category-legend strong { color: var(--ink); }
.team-metrics { margin-top: 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.team-metrics div { padding-top: 11px; }
.team-metrics span, .team-metrics strong { display: block; }
.team-metrics span { color: var(--muted); font-size: 10px; }
.team-metrics strong { margin-top: 3px; font-size: 15px; }
.warning-text { color: #ad7500; }
.danger-text { color: var(--red); }
.employee-advice { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.advice-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.advice-heading span, .advice-heading small { display: block; }
.advice-heading span { color: var(--blue); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.advice-heading small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.advice-facts { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.advice-facts span { padding: 6px 8px; border: 1px solid #d2dfef; background: #f3f7fc; color: #425875; font-size: 9px; }
.advice-actions { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: #fbfcfe; }
.advice-actions div { min-height: 62px; padding: 10px 11px; display: grid; grid-template-columns: 22px 1fr; gap: 7px; border-right: 1px solid var(--line); }
.advice-actions div:last-child { border-right: 0; }
.advice-actions b { color: var(--blue); font-size: 9px; }
.advice-actions p { font-size: 10px; line-height: 1.5; }

.employee-heading { align-items: center; }
.select-label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.select-label select { height: 36px; min-width: 150px; padding: 0 30px 0 10px; border: 1px solid #aeb7bf; border-radius: 4px; background: var(--paper); color: var(--ink); }
.employee-summary { margin-bottom: 14px; display: grid; grid-template-columns: 1fr 190px; border: 1px solid #294b73; border-top: 3px solid var(--blue-bright); background: var(--navy-raised); color: white; box-shadow: var(--shadow-md); }
.employee-statement { padding: 22px; }
.employee-statement > span { color: #5cc7df; font-size: 10px; font-weight: 800; }
.employee-statement h2 { margin-top: 8px; font-size: 20px; line-height: 1.55; }
.employee-statement p { margin-top: 10px; color: #aeb9c2; font-size: 12px; }
.employee-total { padding: 22px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid #3b4650; }
.employee-total span { color: #aeb9c2; font-size: 11px; }
.employee-total strong { margin-top: 7px; color: #69cce1; font-size: 34px; }
.employee-grid { margin-bottom: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-panel { padding: 18px 20px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-sm); }
.work-panel > header { margin-bottom: 13px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.work-panel h3 { font-size: 14px; }
.work-panel header span { color: var(--muted); font-size: 10px; }
.daily-chart { height: 154px; padding: 12px 5px 0; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; border-bottom: 1px solid var(--line); }
.daily-chart > div { height: 140px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.daily-chart i { width: min(30px, 55%); min-height: 1px; background: var(--blue); }
.daily-chart i.over { background: var(--red); }
.daily-value { color: var(--ink); font-weight: 700; }
.employee-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.employee-projects div { padding: 10px 12px; display: flex; justify-content: space-between; gap: 10px; border-left: 3px solid #7aa8e8; background: #f1f5fa; font-size: 11px; }
.task-list { margin-top: 13px; border-top: 1px solid var(--line); }
.task-list div { padding: 9px 2px; display: grid; grid-template-columns: 1fr 90px 60px; gap: 12px; border-bottom: 1px solid #edf0f2; font-size: 11px; }
.task-list em { color: var(--muted); font-style: normal; }
.task-list strong { text-align: right; }

.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.project-summary { margin-bottom: 22px; }
.portfolio-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.portfolio-item { min-height: 122px; padding: 15px; display: flex; align-items: flex-start; flex-direction: column; border: 1px solid var(--line); border-top: 3px solid #b7c7da; border-radius: 4px; background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.portfolio-item:hover, .portfolio-item.active { border-color: var(--blue); border-top-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.portfolio-item > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.portfolio-item > span i { width: 8px; height: 8px; border-radius: 50%; }
.portfolio-item strong { margin-top: 12px; color: #102b51; font-size: 23px; }
.portfolio-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.portfolio-item em { margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 9px; font-style: normal; }
.portfolio-item em.has-risk { color: var(--red); font-weight: 700; }
.portfolio-ai-brief { position: relative; margin: 26px 2px 30px; padding: 22px 24px 22px 26px; border: 1px solid #cbd7e5; border-left: 4px solid #0d8fb8; border-radius: 6px; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 30px rgba(20, 51, 86, .1), 0 2px 7px rgba(20, 51, 86, .06); transform: translateY(-2px); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.portfolio-ai-brief:hover { border-color: #aebed1; border-left-color: #0d8fb8; box-shadow: 0 16px 36px rgba(20, 51, 86, .13), 0 3px 9px rgba(20, 51, 86, .07); transform: translateY(-3px); }
.portfolio-ai-brief::before { position: absolute; top: 18px; left: -4px; width: 4px; height: 42px; background: #003a90; content: ""; }
.portfolio-ai-heading { display: block; }
.portfolio-ai-heading > div { min-width: 0; }
.portfolio-ai-heading .eyebrow { color: var(--blue); }
.ai-title-row { margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.portfolio-ai-heading h2 { font-size: 20px; }
.portfolio-ai-heading span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.portfolio-ai-heading button { height: 30px; padding: 0 12px; border: 1px solid #6789b1; border-radius: 3px; background: #f4f8fc; color: #153e70; cursor: pointer; font-size: 9px; font-weight: 800; }
.portfolio-ai-heading button:hover { border-color: var(--blue); background: #e8f1fa; }
.portfolio-ai-heading button:disabled { cursor: wait; opacity: .58; }
.portfolio-ai-progress { margin-top: 18px; display: flex; align-items: center; gap: 10px; color: #42617f; font-size: 10px; }
.portfolio-ai-progress[hidden] { display: none; }
.portfolio-ai-progress i { width: 42px; height: 2px; overflow: hidden; background: #d8e2ed; }
.portfolio-ai-progress i::after { width: 18px; height: 100%; display: block; background: #1aa9ca; content: ""; animation: ai-progress 1.15s ease-in-out infinite; }
@keyframes ai-progress { 0% { transform: translateX(-20px); } 100% { transform: translateX(46px); } }
.portfolio-ai-summary { max-width: 980px; margin-top: 18px; color: #102b51; font-size: 15px; font-weight: 680; line-height: 1.65; }
.portfolio-ai-items { margin-top: 17px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 34px; }
.portfolio-ai-items p { min-height: 44px; padding: 10px 0; display: grid; grid-template-columns: 38px 1fr; gap: 10px; border-top: 1px solid #dde4ec; color: #354b65; font-size: 10px; line-height: 1.65; }
.portfolio-ai-items strong { color: var(--blue); font-size: 8px; letter-spacing: 0; }
.portfolio-ai-items p.streaming:last-child span::after { width: 2px; height: 1em; margin-left: 3px; display: inline-block; background: #18a8c8; vertical-align: -2px; content: ""; animation: ai-caret .7s steps(1) infinite; }
@keyframes ai-caret { 50% { opacity: 0; } }
.ai-analysis-sections { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.ai-analysis-sections section { padding: 12px; border-right: 1px solid var(--line); }
.ai-analysis-sections section:last-child { border-right: 0; }
.ai-analysis-sections h3 { margin-bottom: 7px; color: var(--blue); font-size: 10px; }
.ai-analysis-sections p { position: relative; padding-left: 11px; color: var(--ink); font-size: 9px; line-height: 1.55; }
.ai-analysis-sections p + p { margin-top: 5px; }
.ai-analysis-sections p::before { position: absolute; left: 0; color: var(--cyan); content: "•"; }
.project-toolbar { margin-bottom: 12px; padding: 14px; display: grid; grid-template-columns: 1.4fr repeat(5, minmax(120px, .8fr)); gap: 10px; border: 1px solid var(--line-strong); border-top: 3px solid #6486ae; background: #e5ecf4; box-shadow: var(--shadow-sm); }
.project-toolbar label { min-width: 0; }
.project-toolbar label > span { margin-bottom: 6px; display: block; color: #52667f; font-size: 9px; font-weight: 700; }
.project-toolbar input, .project-toolbar select { width: 100%; height: 37px; padding: 0 10px; border: 1px solid #aebed2; border-radius: 3px; background: white; color: var(--ink); font-size: 11px; box-shadow: inset 0 1px 2px rgba(15, 36, 63, .04); }
.project-toolbar input:hover, .project-toolbar select:hover { border-color: #7e9abc; }
.project-results-heading { margin: 15px 0 9px; display: flex; justify-content: space-between; align-items: center; }
.project-results-heading strong { font-size: 12px; }
.project-results-heading button { padding: 5px 8px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 10px; }
.project-empty { grid-column: 1 / -1; }
.project-row { padding: 19px 20px; border: 1px solid var(--line); border-top: 3px solid #345e8e; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-sm); }
.project-row:only-child, .project-row:has(.project-full-details[open]) { grid-column: 1 / -1; }
.project-row > header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.project-row header p { color: var(--muted); font-size: 10px; font-weight: 800; }
.project-row header h2 { margin-top: 3px; font-size: 16px; }
.project-week { padding: 6px 9px; border: 1px solid #c3d8f4; background: var(--blue-soft); color: #145bbd; font-size: 10px; font-weight: 760; white-space: nowrap; }
.project-risk-tags { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.project-risk-tags span { padding: 3px 5px; background: #fff2cd; color: #8a6100; font-size: 8px; }
.project-risk-tags span.red { background: #fde7ec; color: var(--red); }
.inline-warning { margin-top: 10px; padding: 7px 9px; background: #fff7df; color: #6c5310; font-size: 10px; }
.project-metrics { margin-top: 15px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #d8e1ec; background: #f8fafc; }
.project-metrics div { padding: 12px 9px; border-right: 1px solid var(--line); }
.project-metrics div:last-child { border-right: 0; }
.project-metrics span, .project-metrics strong, .project-metrics small { display: block; }
.project-metrics span { color: var(--muted); font-size: 9px; }
.project-metrics strong { margin-top: 5px; color: #102b51; font-size: 16px; }
.project-metrics small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.budget-value.red { color: var(--red); }
.budget-value.yellow { color: #9a6900; }
.budget-variance { margin-top: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.budget-variance > header { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.budget-variance h3 { font-size: 11px; }
.budget-variance header span, .budget-variance header small { color: var(--muted); font-size: 8px; }
.budget-variance header span { display: block; margin-top: 3px; }
.budget-overall, .budget-task { min-height: 40px; margin-top: 9px; padding: 9px 10px; display: grid; grid-template-columns: 10px minmax(110px, 1fr) 78px 78px 118px; gap: 8px; align-items: center; border: 1px solid var(--line); background: #f5f8fb; font-size: 9px; }
.budget-overall b, .budget-task b { text-align: right; }
.budget-overall.red, .budget-task.red { border-color: #edb8c3; background: #fff5f7; }
.budget-overall.yellow, .budget-task.yellow { border-color: #e7ce87; background: #fffaf0; }
.budget-signal { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.red .budget-signal { background: var(--red); box-shadow: 0 0 0 3px #fde7ec; }
.yellow .budget-signal { background: var(--yellow); box-shadow: 0 0 0 3px #fff2cd; }
.budget-task-list { margin-top: 11px; }
.budget-task-list h4 { color: var(--muted); font-size: 9px; }
.budget-task { grid-template-columns: 10px minmax(140px, 1fr) 70px 70px 52px; margin-top: 5px; }
.budget-task > div strong, .budget-task > div small { display: block; }
.budget-task > div small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.budget-clear, .budget-unplanned { margin-top: 9px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.budget-unplanned { padding: 7px 9px; background: #fff8df; color: #6f5511; }
.term-help { width: 16px; height: 16px; margin-left: 3px; padding: 0; border: 1px solid #9babbe; border-radius: 50%; background: white; color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 800; line-height: 14px; }
.term-help:hover { border-color: var(--blue); background: var(--blue-soft); }
.term-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid #9babc1; border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px rgba(11, 17, 27, .25); }
.term-dialog::backdrop { background: rgba(11, 17, 27, .52); }
.term-dialog-heading { padding: 17px 18px; display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); }
.term-dialog-heading p { color: var(--blue); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.term-dialog-heading h2 { margin-top: 4px; font-size: 18px; }
.term-dialog-heading button { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 23px; line-height: 28px; }
.term-dialog-definition { padding: 18px 18px 12px; color: #344054; font-size: 13px; line-height: 1.7; }
.term-dialog-formula { margin: 0 18px 18px; padding: 11px 12px; border-left: 3px solid var(--blue); background: #f3f6fb; color: #42526a; font-size: 11px; line-height: 1.5; }
.project-breakdown { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.project-breakdown > header { grid-column: 1 / -1; padding: 10px 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; border-left: 3px solid var(--blue); background: #f1f5fa; }
.project-breakdown > header h3 { margin-bottom: 2px; font-size: 12px; }
.project-breakdown > header > div > span { color: var(--muted); font-size: 8px; }
.project-breakdown h3 { margin-bottom: 9px; font-size: 11px; }
.person-color-key { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; }
.person-color-key span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.person-color-key i, .member-meter > span i { width: 7px; height: 7px; display: block; border-radius: 50%; }
.meter-row { padding: 4px 0; display: grid; grid-template-columns: minmax(75px, .8fr) 1.4fr 45px; gap: 8px; align-items: center; font-size: 9px; }
.meter-row i, .coverage-row > i { height: 6px; overflow: hidden; background: #e2e9f1; }
.meter-row b { height: 100%; display: block; background: var(--blue); }
.meter-row strong { text-align: right; }
.member-meter > span { display: flex; align-items: center; gap: 5px; }
.member-meter > em { height: 6px; overflow: hidden; background: #e2e9f1; font-style: normal; }
.member-meter > em b { height: 100%; display: block; }
.activity-meter > i { display: flex; }
.activity-meter > i b { flex: none; }
.project-full-details { margin-top: 16px; border: 1px solid #cbd7e4; background: #fbfcfe; }
.project-full-details > summary { min-height: 48px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; background: #f1f5fa; }
.project-full-details > summary::-webkit-details-marker { display: none; }
.project-full-details > summary::before { width: 18px; color: var(--blue); content: "+"; font-size: 18px; font-weight: 500; }
.project-full-details[open] > summary::before { content: "−"; }
.project-full-details > summary > span { min-width: 0; flex: 1; }
.project-full-details > summary strong, .project-full-details > summary small { display: block; }
.project-full-details > summary strong { font-size: 11px; }
.project-full-details > summary small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.project-full-details > summary > b { color: var(--blue); font-size: 9px; white-space: nowrap; }
.project-execution-strip { display: grid; grid-template-columns: .75fr 1.5fr 1.2fr .65fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.project-execution-strip > div { min-width: 0; padding: 11px 12px; border-right: 1px solid var(--line); }
.project-execution-strip > div:last-child { border-right: 0; }
.project-execution-strip span, .project-execution-strip strong { display: block; }
.project-execution-strip span { color: var(--muted); font-size: 8px; }
.project-execution-strip strong { margin-top: 4px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-cumulative-grid { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: white; }
.project-cumulative-grid section > header { margin-bottom: 7px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.project-cumulative-grid h3 { font-size: 11px; }
.project-cumulative-grid header span { color: var(--muted); font-size: 8px; }
.project-task-ledger { padding: 0 14px 14px; background: white; }
.project-task-ledger > header { padding: 11px 0 8px; display: flex; align-items: end; justify-content: space-between; border-top: 1px solid var(--line); }
.project-task-ledger > header h3 { font-size: 11px; }
.project-task-ledger > header span { color: var(--muted); font-size: 8px; }
.project-task-ledger > header b { color: var(--muted); font-size: 9px; }
.project-task-ledger-head, .project-task-ledger-row { display: grid; grid-template-columns: minmax(220px, 1fr) 62px 62px 72px 105px; gap: 8px; align-items: center; }
.project-task-ledger-head { padding: 6px 9px; background: #edf2f7; color: var(--muted); font-size: 8px; }
.project-task-ledger-row { min-height: 42px; padding: 7px 9px; border-bottom: 1px solid #e4e9ef; font-size: 9px; }
.project-task-ledger-row:last-child { border-bottom: 0; }
.project-task-ledger-row > div strong, .project-task-ledger-row > div small { display: block; }
.project-task-ledger-row > div small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.project-task-ledger-row > b { text-align: right; }
.project-task-ledger-row.red > b { color: var(--red); }
.project-task-ledger-row.yellow > b { color: var(--yellow); }
.project-task-ledger-row.normal > b { color: var(--green); }
.project-task-ledger-row.unavailable > b { color: var(--muted); }
.breakdown-empty { color: var(--muted); font-size: 9px; }

.readiness-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; }
.readiness-layout > div { padding: 18px; border: 1px solid var(--line); border-top: 3px solid #829ab5; background: var(--paper); box-shadow: var(--shadow-sm); }
.readiness-layout h2 { margin-bottom: 13px; font-size: 14px; }
.gap-list { display: grid; }
.gap-row { padding: 11px 0; display: grid; grid-template-columns: 78px 1fr; gap: 11px; border-bottom: 1px solid #edf0f2; }
.gap-row:last-child { border-bottom: 0; }
.gap-status { align-self: start; padding: 4px 6px; text-align: center; background: #edf0f2; color: var(--muted); font-size: 9px; font-weight: 800; }
.gap-status.ready { background: #e3f3ec; color: var(--green); }
.gap-status.partial { background: #fff3d2; color: #8a6100; }
.gap-status.blocked { background: #fde7ec; color: var(--red); }
.gap-row strong { font-size: 12px; }
.gap-row p { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.coverage-list { display: grid; gap: 15px; }
.coverage-row > div { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.coverage-row > i { margin-top: 6px; display: block; height: 7px; }
.coverage-row b { height: 100%; display: block; }
.coverage-row b.low { background: var(--red); }
.coverage-row b.medium { background: var(--yellow); }
.coverage-row b.high { background: var(--green); }
.history-note { padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.5; }
.source-details { margin-top: 16px; border: 1px solid var(--line); border-left: 3px solid #738ca8; background: var(--paper); box-shadow: var(--shadow-sm); }
.source-details summary { padding: 14px 16px; cursor: pointer; color: #294462; font-size: 12px; font-weight: 750; }
.readiness-inline { padding: 0 16px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.readiness-inline span { padding: 7px 9px; border: 1px solid var(--line); background: #f7f9fc; color: var(--muted); font-size: 10px; }
.readiness-inline strong { color: var(--ink); }
.source-list { padding: 0 16px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.source-row { padding: 11px 12px; border: 1px solid var(--line); background: #f7f9fc; }
.source-row strong, .source-row span { display: block; font-size: 11px; }
.source-row span, .source-row p { color: var(--muted); }
.source-row p { margin-top: 4px; font-size: 9px; }
.section-block { margin-top: 22px; }
.section-block:first-of-type { margin-top: 0; }
.section-heading { margin-bottom: 12px; padding-bottom: 9px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid #c6d3e2; }
.section-heading h2 { font-size: 18px; color: #102846; }

.trend-panel { padding: 18px 20px 12px; border: 1px solid var(--line); border-top: 3px solid #2d70c8; background: var(--paper); box-shadow: var(--shadow-sm); }
.trend-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.trend-legend, .trend-thresholds { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.trend-legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.trend-legend i { width: 18px; height: 3px; display: block; }
.trend-scroll { margin-top: 8px; overflow-x: auto; }
.trend-chart { width: 100%; min-width: 620px; max-height: 310px; display: block; }
.trend-chart text { fill: var(--muted); font-family: inherit; font-size: 10px; }
.trend-grid { stroke: #dce5ef; stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-grid.capacity { stroke: var(--green); stroke-dasharray: 6 5; }
.workload-zones rect.low { fill: rgba(216, 58, 89, .035); }
.workload-zones rect.normal { fill: rgba(36, 133, 101, .09); }
.workload-zones rect.yellow { fill: rgba(217, 154, 19, .13); }
.workload-zones rect.red { fill: rgba(216, 58, 89, .13); }
.threshold-line { stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.threshold-base { stroke: var(--green); }
.threshold-yellow { stroke: var(--yellow); }
.threshold-red { stroke: var(--red); }
.trend-heatmap { min-width: 720px; overflow-x: auto; }
.trend-heatmap > div { display: grid; grid-template-columns: 130px repeat(auto-fit, minmax(72px, 1fr)); border-bottom: 1px solid var(--line); }
.trend-heatmap span, .trend-heatmap strong { padding: 9px; font-size: 10px; text-align: center; }
.trend-heatmap strong { text-align: left; }
.heatmap-head { color: var(--muted); font-weight: 700; }
.heat-normal { background: #e7f4ef; }
.heat-low, .heat-red { background: #fde7ec; color: var(--red); }
.heat-yellow { background: #fff2cd; color: #8a6100; }

.project-trend { margin-top: 14px; padding: 13px 0 11px; border-bottom: 1px solid var(--line); }
.project-trend > header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.project-trend h3 { font-size: 11px; }
.project-trend header span, .project-trend header small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.project-trend header span { display: block; margin-top: 3px; }
.project-trend header small { max-width: 210px; text-align: right; }
.project-trend b.up { color: var(--red); }
.project-trend b.down { color: var(--green); }
.project-trend b.flat { color: var(--muted); }
.project-history-bars { height: 92px; margin-top: 9px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(42px, 1fr); gap: 6px; align-items: end; overflow-x: auto; }
.project-history-bars > div { height: 88px; display: grid; grid-template-rows: 16px 58px 14px; justify-items: center; align-items: end; }
.project-history-bars span, .project-history-bars small { color: var(--muted); font-size: 8px; }
.project-history-bars i { width: min(28px, 68%); height: 58px; display: flex; align-items: end; border: 1px solid #e0e7f0; background: #eaf0f6; }
.project-history-bars b { width: 100%; display: block; background: var(--blue); }

/* Crisp decision-workspace details */
.section-block, .weekly-analysis, .issues-heading { position: relative; }
.analysis-facts div, .task-list div, .bandwidth-row { border-color: #e2e8f0; }
.analysis-facts span, .advice-actions b { color: var(--blue); }
.analysis-status { border-color: #b8c7df; background: #eef3fb; color: var(--blue); }
.inline-warning, .budget-unplanned { border-left: 3px solid var(--yellow); }
.project-results-heading { min-height: 30px; }
.project-results-heading button { border: 1px solid transparent; }
.project-results-heading button:hover { border-color: #bed0e6; background: #e7eef7; }
.term-help { border-color: #8fa4c1; color: var(--blue); }
.select-label select { border-color: #9fb2c9; }

@media (max-width: 1050px) {
  .judgment dl { grid-template-columns: 1fr 1fr; }
  .judgment dl div:nth-child(2) { border-right: 0; }
  .judgment dl div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .project-list { grid-template-columns: 1fr; }
  .portfolio-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-gate { grid-template-columns: 1fr; gap: 28px; overflow-y: auto; }
  .auth-brand { align-items: center; }
  .auth-brand img { width: min(360px, 80vw); max-height: 150px; }
  .auth-brand strong { margin-top: 14px; font-size: 22px; }
  .admin-user-row { grid-template-columns: 1fr 1fr; }
  .admin-user-row .identity { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .auth-gate { padding: 24px 14px; }
  .auth-panel { padding: 22px 18px; }
  .auth-fields, .verification-row, .project-access-toolbar, .project-access-row { grid-template-columns: 1fr; }
  .admin-user-row { grid-template-columns: 1fr; }
  .admin-user-row .identity { grid-column: auto; }
  .header-actions { gap: 7px; }
  .account-control { gap: 6px; padding-left: 6px; }
  .user-identity { max-width: 82px; }
  .logout-command { padding: 0 8px; }
  .app-header { min-height: 68px; padding: 0 14px; }
  .brand { gap: 10px; }
  .brand-mark { width: 76px; height: 38px; }
  .brand > div strong { max-width: 200px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .brand > div span, #runtimeLabel { display: none; }
  .view-tabs { padding: 0 10px; }
  .view-tab { height: 48px; padding: 0 16px; }
  main { padding: 16px 12px 44px; }
  .context-bar { grid-template-columns: 1fr 1fr; }
  .context-bar div:nth-child(2) { border-right: 0; }
  .context-bar div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .page-heading { min-height: auto; padding: 5px 0 5px 13px; align-items: flex-start; flex-direction: column; }
  h1 { font-size: 22px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-cell { border-bottom: 1px solid var(--line); }
  .summary-cell:nth-child(2n) { border-right: 0; }
  .summary-cell:nth-last-child(-n+2) { border-bottom: 0; }
  .judgment dl { grid-template-columns: 1fr; }
  .judgment dl div { border-right: 0; border-bottom: 1px solid var(--line); }
  .data-warning { flex-direction: column; gap: 5px; }
  .team-metrics { grid-template-columns: repeat(2, 1fr); }
  .advice-actions { grid-template-columns: 1fr; }
  .advice-actions div { border-right: 0; border-bottom: 1px solid var(--line); }
  .advice-actions div:last-child { border-bottom: 0; }
  .employee-summary, .employee-grid, .readiness-layout { grid-template-columns: 1fr; }
  .leadership-grid, .analysis-facts { grid-template-columns: 1fr; }
  .analysis-facts div { border-right: 0; }
  .analysis-facts div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .analysis-facts div:last-child { border-bottom: 0; }
  .bandwidth-row { grid-template-columns: 12px minmax(130px, 1fr) 48px 72px; gap: 7px; }
  .employee-total { border-top: 1px solid #3b4650; border-left: 0; }
  .employee-projects { grid-template-columns: 1fr; }
  .task-list div { grid-template-columns: 1fr 75px 45px; }
  .project-metrics { grid-template-columns: 1fr 1fr; }
  .project-metrics div:nth-child(2) { border-right: 0; }
  .project-metrics div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .project-breakdown { grid-template-columns: 1fr; }
  .project-breakdown > header { align-items: flex-start; flex-direction: column; }
  .project-execution-strip, .project-cumulative-grid { grid-template-columns: 1fr; }
  .project-execution-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .project-execution-strip > div:last-child { border-bottom: 0; }
  .project-task-ledger { overflow-x: auto; }
  .project-task-ledger-head, .project-task-ledger-row { min-width: 650px; }
  .person-color-key { justify-content: flex-start; }
  .budget-overall { grid-template-columns: 10px 1fr 1fr; }
  .budget-overall b { grid-column: 2 / -1; text-align: left; }
  .budget-task { grid-template-columns: 10px minmax(120px, 1fr) 54px 54px; }
  .budget-task b { grid-column: 2 / -1; text-align: left; }
  .source-list { grid-template-columns: 1fr; }
  .portfolio-overview { grid-template-columns: 1fr 1fr; }
  .portfolio-item { min-height: 112px; }
  .portfolio-ai-items, .ai-analysis-sections { grid-template-columns: 1fr; }
  .ai-analysis-sections section { border-right: 0; border-bottom: 1px solid var(--line); }
  .ai-analysis-sections section:last-child { border-bottom: 0; }
  .project-toolbar { grid-template-columns: 1fr 1fr; }
  .project-search { grid-column: 1 / -1; }
  .project-trend > header { flex-direction: column; gap: 4px; }
  .project-trend header small { max-width: none; text-align: left; }
  .workload-thresholds { justify-content: flex-start; }
  .analyst-section-heading { align-items: flex-start; flex-direction: column; }
}
