:root {
  --ink: #111419;
  --ink-2: #353b43;
  --muted: #727b86;
  --line: #e2e6e9;
  --line-strong: #d4d9dd;
  --paper: #ffffff;
  --canvas: #f5f7f8;
  --canvas-2: #eef2f3;
  --brand: #009b6c;
  --brand-dark: #087a59;
  --brand-soft: #eaf7f2;
  --danger: #e2363f;
  --danger-soft: #fff0f1;
  --warning: #ed8a19;
  --warning-soft: #fff6e9;
  --blue: #307fcf;
  --blue-soft: #edf5ff;
  --violet: #7265db;
  --violet-soft: #f1efff;
  --shadow: 0 6px 22px rgba(22, 31, 39, .07);
  --shadow-strong: 0 18px 50px rgba(10, 25, 33, .14);
  --radius: 14px;
  --topbar: 70px;
  --sidebar: 208px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); overflow-x: hidden; }
body { min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 58fr) minmax(460px, 42fr); background: var(--paper); }
.login-visual { position: relative; min-height: 720px; overflow: hidden; background: #252923; }
.login-visual > img { width: 100%; height: 100%; object-fit: cover; object-position: 54% center; position: absolute; inset: 0; }
.login-visual-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 13, 11, .02) 42%, rgba(7, 16, 13, .84) 100%); }
.login-visual-copy { position: absolute; left: clamp(38px, 5vw, 84px); right: 48px; bottom: 88px; color: #fff; }
.visual-kicker, .eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.visual-kicker { color: rgba(255,255,255,.72); margin-bottom: 16px; }
.login-visual-copy h1 { margin: 0 0 16px; font-size: clamp(34px, 3vw, 54px); line-height: 1.22; letter-spacing: -.04em; font-weight: 650; }
.login-visual-copy p { margin: 0; color: rgba(255,255,255,.74); font-size: 15px; }
.asset-boundary { position: absolute; left: clamp(38px, 5vw, 84px); bottom: 35px; color: rgba(255,255,255,.52); font-size: 11px; }
.login-panel { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px clamp(36px, 5vw, 82px) 24px; }
.login-card { width: min(420px, 100%); }
.brand-lockup { display: inline-flex; align-items: baseline; gap: 7px; color: var(--brand); line-height: 1; white-space: nowrap; }
.brand-logo { display: block; width: 86px; height: auto; flex: 0 0 auto; }
.brand-cn { font-size: 13px; font-weight: 700; }
.brand-lockup-login { margin-bottom: 62px; }
.brand-lockup-login .brand-logo { width: 146px; }
.brand-lockup-login .brand-cn { font-size: 18px; }
.login-heading .eyebrow { color: var(--brand); margin-bottom: 11px; }
.login-heading h2 { font-size: 34px; margin: 0 0 10px; letter-spacing: -.035em; }
.login-heading p { color: var(--muted); margin: 0 0 34px; font-size: 14px; }
.field-label { display: block; margin: 18px 0 8px; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.input-wrap { position: relative; height: 50px; }
.input-wrap > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #8c949d; font-size: 18px; }
.input-wrap input { width: 100%; height: 50px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 48px 0 44px; outline: none; background: #fff; transition: border .16s, box-shadow .16s; }
.input-wrap input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 155, 108, .1); }
.input-wrap input::placeholder { color: #abb1b7; }
.password-toggle { position: absolute; right: 8px; top: 7px; width: 36px; height: 36px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.password-toggle:hover { background: var(--canvas); color: var(--ink); }
.login-error { display: none; min-height: 38px; margin-top: 14px; padding: 9px 12px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 12px; line-height: 1.55; }
.login-error.show { display: block; }
.button { border: 0; border-radius: 10px; min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 650; transition: transform .15s, box-shadow .15s, background .15s, opacity .15s; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button.primary { color: #fff; background: var(--brand); box-shadow: 0 7px 18px rgba(0, 155, 108, .18); }
.button.primary:hover:not(:disabled) { background: var(--brand-dark); box-shadow: 0 9px 22px rgba(0, 122, 89, .24); }
.button.secondary { color: var(--ink-2); background: #fff; border: 1px solid var(--line-strong); }
.button.danger-outline { color: var(--danger); background: #fff; border: 1px solid #f1b6ba; }
.button.compact { min-height: 34px; border-radius: 8px; padding: 0 13px; font-size: 12px; }
.login-submit { width: 100%; height: 51px; margin-top: 23px; justify-content: space-between; padding: 0 20px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: #a1a7ad; font-size: 11px; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.sso-button { width: 100%; background: #fff; color: var(--ink-2); border: 1px solid var(--line-strong); justify-content: flex-start; }
.sso-button em { margin-left: auto; color: var(--warning); font-size: 11px; font-style: normal; background: var(--warning-soft); padding: 3px 7px; border-radius: 20px; }
.demo-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; padding: 13px 14px; background: var(--canvas); border: 1px solid #edf0f1; border-radius: 10px; color: var(--muted); }
.demo-note i { color: var(--blue); margin-top: 2px; }
.demo-note p { margin: 0; font-size: 11px; line-height: 1.65; }
.demo-note b { color: var(--ink-2); }
.login-footer { margin-top: auto; padding-top: 40px; color: #9aa1a8; font-size: 11px; }
.login-footer span { margin-left: 8px; color: var(--warning); }

.app-shell { min-height: 100vh; background: var(--canvas); }
.app-topbar { position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: var(--topbar); display: flex; align-items: center; gap: 24px; padding: 0 18px 0 27px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.topbar-brand { display: flex; align-items: center; gap: 15px; text-decoration: none; color: var(--ink); min-width: 390px; }
.topbar-brand::after { content: ""; width: 1px; height: 25px; background: var(--line); order: 1; }
.topbar-brand strong { font-size: 17px; letter-spacing: -.02em; order: 2; }
.global-filters { display: flex; align-items: center; gap: 16px; flex: 1; justify-content: center; }
.global-filters label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.global-filters select { min-width: 112px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-2); padding: 0 30px 0 11px; outline: none; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.data-state { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 20px; background: #fafbfb; color: var(--muted); font-size: 11px; white-space: nowrap; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-size: 18px; }
.icon-button:hover { background: var(--canvas-2); }
.notification-button { position: relative; }
.notification-button b { position: absolute; right: 0; top: 0; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; color: #fff; background: var(--danger); border: 2px solid #fff; border-radius: 10px; font-size: 9px; }
.notification-control { position: relative; }
.notification-panel { position: absolute; z-index: 55; top: 49px; right: -5px; width: min(390px, calc(100vw - 30px)); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-strong); }
.notification-panel-head { min-height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 13px 16px 11px; border-bottom: 1px solid #edf0f2; }
.notification-panel-head .eyebrow { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.notification-panel-head h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.03em; }
.notification-close { width: 29px; height: 29px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; }
.notification-close:hover { color: var(--ink); background: var(--canvas); }
.notification-list { max-height: 330px; overflow-y: auto; padding: 0 14px; }
.notification-item { min-height: 76px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid #edf0f2; }
.notification-item:last-child { border-bottom: 0; }
.notification-kind { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
.notification-item.danger .notification-kind { color: var(--danger); background: var(--danger-soft); }
.notification-item.warning .notification-kind { color: #a96608; background: var(--warning-soft); }
.notification-item.info .notification-kind { color: var(--blue); background: var(--blue-soft); }
.notification-copy { min-width: 0; }
.notification-copy b { display: block; overflow: hidden; color: var(--ink-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.notification-copy p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.notification-action { display: inline-flex; align-items: center; gap: 4px; padding: 5px 0 5px 8px; border: 0; color: var(--brand-dark); background: transparent; font-size: 10px; white-space: nowrap; }
.notification-action:hover { color: var(--brand); }
.notification-action i { font-size: 9px; }
.notification-empty { padding: 34px 16px; color: var(--muted); text-align: center; }
.notification-empty i { display: block; margin-bottom: 8px; color: var(--brand); font-size: 25px; }
.notification-empty b { display: block; color: var(--ink-2); font-size: 12px; }
.notification-empty p { margin: 6px 0 0; font-size: 10px; }
.notification-panel-foot { padding: 10px 16px; border-top: 1px solid #edf0f2; background: #fafbfb; text-align: right; }
.notification-panel-foot a { color: var(--muted); font-size: 10px; text-decoration: none; }
.notification-panel-foot a:hover { color: var(--brand-dark); }
.user-control { position: relative; }
.user-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 5px; border-radius: 10px; text-align: left; }
.user-button:hover { background: var(--canvas); }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: 50%; font-size: 12px; }
.user-button span:nth-child(2) { display: grid; gap: 1px; min-width: 65px; }
.user-button b { font-size: 12px; }
.user-button small { color: var(--muted); font-size: 9px; }
.user-button > i { color: var(--muted); font-size: 11px; }
.user-menu { position: absolute; right: 0; top: 48px; width: 150px; padding: 6px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); border-radius: 10px; }
.user-menu button { width: 100%; border: 0; background: transparent; color: var(--ink-2); border-radius: 7px; padding: 9px 10px; text-align: left; }
.user-menu button:hover { background: var(--canvas); }
.mobile-menu { display: none; }

.app-sidebar { position: fixed; z-index: 30; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); display: flex; flex-direction: column; background: #fbfcfc; border-right: 1px solid var(--line); padding: 25px 14px 18px; }
.app-sidebar nav { display: grid; gap: 8px; }
.nav-link { min-height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 15px; color: #4c555f; text-decoration: none; font-size: 14px; border-radius: 10px; border: 1px solid transparent; transition: background .15s, color .15s; }
.nav-link i { width: 22px; font-size: 19px; text-align: center; }
.nav-link:hover { background: #f0f3f4; color: var(--ink); }
.nav-link.active { position: relative; color: var(--ink); font-weight: 650; background: #fff1f2; border-color: #ffe5e7; }
.nav-link.active::before { content: ""; position: absolute; left: -1px; width: 3px; height: 24px; border-radius: 0 4px 4px 0; background: var(--danger); }
.sidebar-brand { margin-top: auto; padding: 14px 10px 10px; display: flex; align-items: center; gap: 6px; color: var(--brand); }
.sidebar-brand img { width: 72px; height: auto; }
.sidebar-brand span { font-size: 10px; font-weight: 700; white-space: nowrap; }
.sidebar-foot { padding: 14px 10px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; color: var(--ink-2); }
.sidebar-foot > span:last-child { display: grid; gap: 3px; }
.sidebar-foot b { font-size: 11px; }
.sidebar-foot small { color: var(--muted); font-size: 9px; }
.status-dot { width: 8px; height: 8px; background: var(--brand); border-radius: 50%; box-shadow: 0 0 0 4px var(--brand-soft); }

.app-main { min-height: 100vh; margin-left: var(--sidebar); padding: calc(var(--topbar) + 28px) 32px 22px; outline: none; }
.page-loading { min-height: 60vh; display: none; place-items: center; align-content: center; gap: 13px; color: var(--muted); }
.page-loading.show { display: grid; }
.spinner { width: 30px; height: 30px; border: 3px solid #dfe6e4; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 0 0 23px; }
.page-heading h1 { margin: 0 0 7px; font-size: 34px; line-height: 1.1; letter-spacing: -.045em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.page-heading-actions { display: flex; gap: 10px; }

.overview-stage { position: relative; min-height: 230px; margin-bottom: 16px; padding-top: 1px; }
.overview-stage::before { content: ""; position: absolute; z-index: 0; top: -96px; right: -32px; width: min(1020px, 74%); height: 370px; background: url("assets/generated/refrigerator-assembly-concept.png") center right / cover no-repeat; opacity: .5; pointer-events: none; }
.overview-product { position: absolute; z-index: 1; top: -47px; right: 8%; width: 190px; height: 230px; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(20,30,38,.09)); opacity: .72; pointer-events: none; }
.concept-label { position: absolute; z-index: 2; right: 4px; top: -10px; padding: 4px 8px; border: 1px solid rgba(100,115,125,.18); border-radius: 20px; color: #8b959d; background: rgba(255,255,255,.66); font-size: 9px; }
.overview-stage .page-heading { position: relative; z-index: 3; max-width: 680px; padding-top: 7px; }
.overview-stage .page-heading h1 { font-size: 38px; }
.overview-grid { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .9fr); gap: 16px; margin-top: 28px; }
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; }
.metric-card, .panel { background: rgba(255,255,255,.96); border: 1px solid rgba(221,226,229,.92); box-shadow: var(--shadow); border-radius: var(--radius); }
.metric-card { min-height: 150px; padding: 21px 20px 16px; }
.metric-label { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13px; }
.metric-label i { width: 27px; height: 27px; display: grid; place-items: center; color: var(--ink-2); background: var(--canvas); border-radius: 7px; font-size: 16px; }
.metric-value { margin-top: 15px; text-align: center; font-size: 34px; line-height: 1; font-weight: 730; letter-spacing: -.04em; }
.metric-value small { margin-left: 3px; font-size: 13px; font-weight: 600; }
.metric-note { margin-top: 16px; text-align: center; color: var(--muted); font-size: 11px; }
.metric-note .danger { color: var(--danger); }
.startup-card { min-height: 150px; padding: 20px 22px; display: grid; grid-template-columns: 62px 1fr; column-gap: 16px; align-items: center; }
.startup-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 50%; font-size: 30px; }
.startup-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.03em; }
.startup-card h2 strong { color: var(--brand); }
.startup-card p { margin: 0; color: var(--muted); font-size: 12px; }
.startup-alert { grid-column: 1 / -1; min-height: 38px; margin-top: 10px; padding: 0 13px; border-radius: 9px; display: flex; align-items: center; gap: 10px; color: var(--danger); background: var(--danger-soft); font-size: 12px; font-weight: 650; }
.startup-action { margin-left: auto; min-height: 27px; padding: 0 9px; border: 1px solid #f0aeb3; border-radius: 6px; color: var(--danger); background: rgba(255,255,255,.68); font-size: 9px; font-weight: 650; white-space: nowrap; }
.startup-action:disabled { opacity: .45; cursor: not-allowed; }

.dashboard-mid { display: grid; grid-template-columns: minmax(0, 1.56fr) minmax(350px, .8fr); gap: 16px; margin-bottom: 16px; }
.panel { overflow: hidden; }
.panel-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; border-bottom: 1px solid #edf0f2; }
.panel-header h2 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.panel-header h2 small { color: var(--muted); font-weight: 400; }
.panel-link { color: var(--muted); font-size: 11px; text-decoration: none; }
.team-flow { min-height: 183px; display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); align-items: center; gap: 28px; padding: 22px 24px; }
.team-node { position: relative; min-height: 120px; border: 1px solid var(--line); border-radius: 11px; padding: 17px 13px 12px; text-align: center; background: #fff; }
.team-node:not(:last-child)::after { content: "\F285"; font-family: bootstrap-icons; position: absolute; right: -26px; top: 50%; transform: translateY(-50%); color: #7b858e; }
.team-node.attention { border-color: #ff9ba1; background: #fff9f9; box-shadow: inset 0 -3px 0 var(--danger); }
.team-node.attention::before { content: "瓶颈"; position: absolute; top: -9px; right: -5px; padding: 4px 8px; border-radius: 9px; color: #fff; background: var(--danger); font-size: 9px; }
.team-node b { display: block; margin-bottom: 10px; font-size: 13px; }
.team-node strong { display: block; margin-bottom: 5px; font-size: 25px; letter-spacing: -.04em; }
.team-node.attention strong { color: var(--danger); }
.team-node small { color: var(--muted); font-size: 10px; }
.load-bar { height: 5px; margin-top: 13px; overflow: hidden; background: #e8ebed; border-radius: 10px; }
.load-bar i { display: block; height: 100%; background: #67727d; border-radius: inherit; }
.team-node.attention .load-bar i { background: var(--danger); }
.pending-list { padding: 0 14px; }
.pending-item { min-height: 59px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid #edf0f2; }
.pending-item:last-child { border-bottom: 0; }
.pending-kind { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: var(--danger-soft); }
.pending-item:nth-child(2) .pending-kind { color: var(--blue); background: var(--blue-soft); }
.pending-item:nth-child(3) .pending-kind { color: var(--violet); background: var(--violet-soft); }
.pending-item b { display: block; font-size: 12px; }
.pending-item p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.status-text { font-size: 9px; color: var(--danger); }

.dashboard-bottom { display: grid; grid-template-columns: 1.2fr .82fr .85fr; gap: 16px; }
.chart-wrap { position: relative; height: 194px; padding: 12px 16px 10px; }
#trendCanvas { width: 100%; height: 100%; display: block; }
.evidence-list, .collab-list { padding: 4px 15px 12px; }
.evidence-item, .collab-item { min-height: 54px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; border-bottom: 1px solid #edf0f2; }
.evidence-item:last-child, .collab-item:last-child { border-bottom: 0; }
.evidence-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); }
.evidence-item:nth-child(2) .evidence-icon { color: var(--blue); background: var(--blue-soft); }
.evidence-item:nth-child(3) .evidence-icon { color: var(--warning); background: var(--warning-soft); }
.evidence-item b, .collab-item b { font-size: 11px; }
.evidence-item p, .collab-item p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.status-pill { padding: 4px 7px; border-radius: 5px; background: var(--brand-soft); color: var(--brand-dark); font-size: 9px; white-space: nowrap; }
.status-pill.warning { color: #b86a10; background: var(--warning-soft); }
.status-pill.blue { color: var(--blue); background: var(--blue-soft); }
.trace-bar { min-height: 44px; margin-top: 16px; display: flex; align-items: center; gap: 18px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.78); color: var(--muted); font-size: 10px; }
.trace-bar span { white-space: nowrap; }
.trace-bar .review-required { margin-left: auto; color: var(--danger); background: var(--danger-soft); padding: 5px 10px; border-radius: 6px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.content-grid.equal { grid-template-columns: 1fr 1fr; }
.content-stack { display: grid; gap: 16px; }
.panel-body { padding: 18px; }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; margin-bottom: 16px; }
.summary-cell { padding: 14px 16px; border-right: 1px solid var(--line); background: #fafbfb; }
.summary-cell:last-child { border: 0; }
.summary-cell small { display: block; color: var(--muted); margin-bottom: 5px; font-size: 10px; }
.summary-cell strong { font-size: 22px; }
.data-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 11px 12px; background: #f6f8f8; color: var(--muted); font-size: 10px; font-weight: 650; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid #edf0f2; color: var(--ink-2); font-size: 11px; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong { color: var(--ink); }
.inline-form { display: grid; gap: 13px; }
.inline-form label { display: grid; gap: 6px; color: var(--ink-2); font-size: 11px; font-weight: 600; }
.inline-form input, .inline-form select, .inline-form textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink); padding: 10px 11px; outline: none; }
.inline-form textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.inline-form input:focus, .inline-form select:focus, .inline-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,155,108,.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.permission-note, .empty-state, .error-state { padding: 24px; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fafbfb; color: var(--muted); text-align: center; font-size: 12px; }
.permission-note i, .empty-state i, .error-state i { display: block; margin-bottom: 9px; font-size: 25px; color: #8d969f; }
.error-state { color: var(--danger); background: var(--danger-soft); border-color: #f2b5b9; }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; min-height: 72px; padding: 0 0 18px 38px; }
.timeline-item::before { content: ""; position: absolute; left: 13px; top: 27px; bottom: -2px; width: 1px; background: var(--line-strong); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 2px; top: 2px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 11px; }
.timeline-item b { font-size: 12px; }
.timeline-item p { margin: 4px 0; color: var(--muted); font-size: 10px; }
.timeline-item time { color: #9ba2a8; font-size: 9px; }
.list-card { display: grid; gap: 10px; }
.record-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 15px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.record-card h3 { margin: 0 0 5px; font-size: 13px; }
.record-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.record-actions { display: flex; align-items: center; gap: 8px; }
.source-tag { display: inline-flex; margin-top: 7px; padding: 3px 6px; border-radius: 5px; background: var(--canvas-2); color: var(--muted); font-size: 9px; }
.ai-answer { min-height: 180px; white-space: pre-wrap; line-height: 1.75; color: var(--ink-2); font-size: 12px; }
.evidence-boundary { border-left: 3px solid var(--warning); padding: 11px 13px; background: var(--warning-soft); color: #79501f; font-size: 10px; line-height: 1.65; }
.toast-stack { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast { width: min(360px, calc(100vw - 44px)); padding: 13px 15px; color: #fff; background: #22282d; border-radius: 9px; box-shadow: var(--shadow-strong); font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { background: #9e252d; }
.toast.success { background: #087a59; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1500px) {
  .app-topbar { gap: 13px; padding-left: 20px; }
  .topbar-brand { min-width: 330px; gap: 11px; }
  .topbar-brand strong { font-size: 14px; }
  .global-filters { gap: 8px; }
  .global-filters select { min-width: 92px; }
  .data-state span { display: none; }
}

@media (max-width: 1360px) {
  :root { --sidebar: 184px; }
  .app-topbar { gap: 13px; padding-left: 20px; }
  .topbar-brand { min-width: 330px; gap: 11px; }
  .topbar-brand strong { font-size: 14px; }
  .global-filters { gap: 8px; }
  .global-filters select { min-width: 92px; }
  .data-state span { display: none; }
  .app-main { padding-left: 23px; padding-right: 23px; }
  .nav-link { gap: 10px; padding-left: 11px; padding-right: 11px; font-size: 13px; white-space: nowrap; }
  .nav-link i { width: 20px; }
  .team-flow { gap: 22px; padding-left: 16px; padding-right: 16px; }
  .team-node:not(:last-child)::after { right: -21px; }
  .dashboard-bottom { grid-template-columns: 1.05fr .95fr; }
  .dashboard-bottom .panel:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1300px) {
  .dashboard-mid { grid-template-columns: 1fr; }
  .team-flow { gap: 24px; }
  .team-node:not(:last-child)::after { right: -23px; }
}

@media (max-width: 1080px) {
  .app-topbar { padding-left: 12px; }
  .topbar-brand { min-width: auto; }
  .topbar-brand strong, .topbar-brand::after, .brand-lockup .brand-cn { display: none; }
  .global-filters label { font-size: 0; }
  .global-filters select { font-size: 11px; min-width: 86px; }
  .overview-grid, .dashboard-mid, .content-grid, .content-grid.equal { grid-template-columns: 1fr; }
  .overview-stage { min-height: 380px; }
  .overview-grid { margin-top: 150px; }
  .overview-stage::before { width: 100%; opacity: .42; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-bottom { grid-template-columns: 1fr; }
  .dashboard-bottom .panel:last-child { grid-column: auto; }
}

@media (max-width: 820px) {
  .login-shell { display: block; }
  .login-visual { min-height: 38vh; height: 330px; }
  .login-visual-copy { left: 25px; right: 25px; bottom: 42px; }
  .login-visual-copy h1 { font-size: 28px; }
  .login-visual-copy p, .visual-kicker { display: none; }
  .asset-boundary { left: 25px; bottom: 18px; }
  .login-panel { min-height: 62vh; padding: 34px 25px 22px; justify-content: flex-start; }
  .brand-lockup-login { margin-bottom: 29px; }
  .brand-lockup-login .brand-logo { width: 122px; }
  .login-heading h2 { font-size: 27px; }
  .login-heading p { margin-bottom: 25px; }
  .login-footer { padding-top: 28px; }
  .mobile-menu { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 9px; background: var(--canvas); font-size: 21px; }
  .app-topbar { height: 62px; }
  .topbar-brand .brand-logo { width: 82px; }
  .global-filters { display: none; }
  .data-state { display: none; }
  .topbar-actions { margin-left: auto; }
  .user-button span:nth-child(2), .user-button > i { display: none; }
  .app-sidebar { top: 62px; width: min(280px, 82vw); transform: translateX(-101%); transition: transform .2s ease; box-shadow: var(--shadow-strong); }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; padding: 84px 15px 20px; }
  .overview-stage { min-height: 410px; }
  .overview-stage::before { top: -70px; right: -15px; height: 280px; background-position: 69% center; }
  .overview-product { width: 130px; height: 180px; top: -25px; right: 3%; }
  .overview-stage .page-heading h1 { font-size: 31px; }
  .overview-grid { margin-top: 160px; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 128px; padding: 16px 12px; }
  .metric-value { font-size: 29px; }
  .team-flow { display: flex; overflow-x: auto; align-items: stretch; }
  .team-node { min-width: 138px; }
  .team-node::after { display: none !important; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading-actions { width: 100%; flex-wrap: wrap; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-cell:nth-child(2) { border-right: 0; }
  .summary-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .form-row { grid-template-columns: 1fr; }
  .trace-bar { align-items: flex-start; flex-direction: column; gap: 7px; padding: 12px; }
  .trace-bar .review-required { margin-left: 0; }
}

@media (max-width: 460px) {
  .login-visual { height: 270px; min-height: 0; }
  .login-visual > img { object-position: 55% center; }
  .login-visual-copy h1 { font-size: 23px; }
  .metric-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-label { font-size: 11px; gap: 6px; }
  .metric-label i { width: 23px; height: 23px; font-size: 14px; }
  .metric-value { font-size: 25px; }
  .startup-card { grid-template-columns: 48px 1fr; padding: 16px; }
  .startup-icon { width: 45px; height: 45px; font-size: 23px; }
  .startup-card h2 { font-size: 19px; }
  .concept-label { display: none; }
}

/* Decision workbench extensions: same Ronshen green / warm-grey language as the overview. */
.app-sidebar { overflow: hidden; }
.app-sidebar nav { min-height: 0; overflow-y: auto; padding-right: 3px; }
.nav-group { display: grid; gap: 3px; margin-bottom: 12px; }
.nav-group-title { padding: 0 12px 5px; color: #a0a8ae; font-size: 9px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.nav-link { min-height: 38px; gap: 10px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.nav-link i { width: 19px; font-size: 15px; }
.nav-link.active { background: var(--brand-soft); border-color: #d1efe3; }
.nav-link.active::before { background: var(--brand); height: 20px; }
.sidebar-brand { padding-top: 10px; }

.decision-chain { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr; align-items: center; margin-bottom: 16px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.decision-chain > div { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; align-items: center; }
.decision-chain span { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; color: var(--brand); background: var(--brand-soft); border-radius: 8px; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; }
.decision-chain b { font-size: 13px; }
.decision-chain small { color: var(--muted); font-size: 10px; }
.decision-chain > i { color: #b1bac0; text-align: center; }
.line-summary { margin-bottom: 16px; }
.line-summary .summary-cell strong { white-space: nowrap; }
.text-danger { color: var(--danger) !important; }
.text-brand { color: var(--brand) !important; }
.line-workbench { margin-bottom: 16px; }
.source-tag.inline { margin: 0; }
.line-backbone { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)); gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.line-stage { position: relative; min-height: 124px; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto auto 6px; column-gap: 8px; align-content: center; padding: 14px 12px; text-align: left; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 11px; transition: border .16s, box-shadow .16s, transform .16s; }
.line-stage:hover { transform: translateY(-2px); border-color: #a8dccc; box-shadow: var(--shadow); }
.line-stage.selected { border-color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand), var(--shadow); }
.line-stage.gap { border-color: #f0a9ad; background: #fffafa; }
.stage-index { grid-row: span 4; display: grid; place-items: center; width: 25px; height: 25px; color: var(--brand); background: var(--brand-soft); border-radius: 8px; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; }
.line-stage b { font-size: 12px; }
.line-stage strong { font-size: 21px; letter-spacing: -.04em; }
.line-stage small { color: var(--muted); font-size: 9px; }
.stage-load { grid-column: 2; display: block; height: 5px; overflow: hidden; background: #e6ecea; border-radius: 8px; }
.stage-load em { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.line-stage.attention .stage-load em, .line-stage.gap .stage-load em { background: var(--warning); }
.line-stage.gap strong { color: var(--danger); }
.stage-detail { padding: 20px 18px 22px; }
.stage-detail-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 15px; }
.stage-detail-head h3 { margin: 5px 0 5px; font-size: 20px; letter-spacing: -.03em; }
.stage-detail-head p { margin: 0; color: var(--muted); font-size: 11px; }
.stage-detail-head .eyebrow { color: var(--brand); font-size: 9px; }
.position-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 10px; }
.position-card { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.position-card.attention { border-color: #f1ca97; background: #fffdf8; }
.position-card.gap { border-color: #efb6ba; background: #fff9f9; }
.position-card-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font: 10px "SFMono-Regular", Consolas, monospace; }
.position-card h4 { margin: 13px 0 4px; color: var(--ink); font-size: 13px; }
.position-card > p { margin: 0; color: var(--muted); font-size: 10px; }
.position-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 12px; padding: 9px 0; border-top: 1px solid #edf1f0; border-bottom: 1px solid #edf1f0; }
.position-stats span { display: grid; gap: 4px; }
.position-stats small { color: var(--muted); font-size: 9px; }
.position-stats b { font-size: 14px; }
.position-adjust { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.position-adjust button { width: 25px; height: 25px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--brand); background: #fff; }
.position-adjust button:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.position-adjust button:disabled { opacity: .4; cursor: not-allowed; }
.planning-lower { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 16px; }
.compact-form { gap: 9px; }
.event-list { display: grid; gap: 3px; }
.event-row { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 57px; padding: 7px 0; border-bottom: 1px solid #edf0f2; }
.event-row:last-child { border-bottom: 0; }
.event-icon { width: 29px; height: 29px; display: grid; place-items: center; color: var(--danger); background: var(--danger-soft); border-radius: 8px; }
.event-icon.positive { color: var(--brand); background: var(--brand-soft); }
.event-row b { display: block; font-size: 11px; }
.event-row p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }

.filter-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; padding: 11px 13px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 3px 14px rgba(22,31,39,.035); }
.filter-toolbar label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.filter-toolbar select, .filter-toolbar input { height: 32px; min-width: 112px; padding: 0 10px; color: var(--ink-2); background: #fafcfc; border: 1px solid var(--line-strong); border-radius: 7px; outline: none; }
.filter-toolbar select:focus, .filter-toolbar input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,155,108,.08); }
.search-field { position: relative; }
.search-field i { margin-right: -28px; z-index: 1; color: var(--muted); }
.search-field input { padding-left: 30px; min-width: 240px; }
.toolbar-note { margin-left: auto; color: var(--muted); font-size: 10px; }
.toolbar-note i { margin-right: 5px; color: var(--brand); }

.cycle-panel { overflow: hidden; }
.cycle-legend { display: flex; align-items: center; gap: 16px; padding: 12px 16px; color: var(--muted); font-size: 10px; border-bottom: 1px solid var(--line); }
.cycle-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cycle-legend i { display: inline-block; width: 17px; height: 11px; border-radius: 3px; }
.legend-action { background: #d7c8ef; }
.legend-wait { background: repeating-linear-gradient(-45deg, #edf1ef 0, #edf1ef 5px, #e0e7e4 5px, #e0e7e4 8px); }
.legend-start { width: 3px !important; background: #695086; border-radius: 0 !important; }
.cycle-legend em { margin-left: auto; font-style: normal; color: #a0a8ae; }
.cycle-scroll { overflow-x: auto; }
.cycle-board { min-width: 1320px; padding: 0 0 12px; }
.cycle-row { display: grid; grid-template-columns: 220px minmax(1100px, 1fr); min-height: 134px; border-bottom: 10px solid var(--canvas); }
.cycle-evidence { margin: 13px 12px 0 14px; padding: 13px 13px 11px; border: 1px solid #d9e3df; border-left: 3px solid var(--brand); border-radius: 9px; background: #fff; }
.cycle-evidence h3 { margin: 0 0 7px; font-size: 14px; }
.cycle-evidence p { margin: 0 0 8px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.cycle-evidence b, .cycle-evidence strong, .cycle-evidence small { display: block; font-size: 9px; line-height: 1.55; }
.cycle-evidence b { color: var(--brand-dark); }
.cycle-evidence strong { margin-top: 3px; color: var(--ink-2); font-weight: 600; }
.cycle-evidence small { margin-top: 6px; color: #9ba4a8; }
.cycle-lane { display: flex; align-items: center; gap: 0; min-width: 0; margin: 18px 14px 18px 0; overflow: hidden; background: #f1f3f2; border-bottom: 7px solid #e9eceb; }
.cycle-repeat { position: relative; display: flex; align-items: stretch; flex: 1 1 0; min-width: 0; height: 91px; border-left: 1px solid #dedfe0; }
.cycle-repeat:first-child { border-left: 0; }
.cycle-start { position: absolute; z-index: 2; left: 0; top: 0; bottom: 0; width: 3px; background: #6c5084; }
.cycle-action, .cycle-wait { position: relative; flex: 0 0 var(--segment); min-width: 22px; display: grid; align-content: center; justify-items: center; gap: 3px; padding: 7px 5px; overflow: hidden; text-align: center; border-right: 1px solid rgba(255,255,255,.56); }
.cycle-action { color: #46365b; background: #dbcdf0; }
.cycle-action.tone-2 { background: #cdb7e8; }.cycle-action.tone-3 { background: #e4d8f4; }.cycle-action.tone-4 { background: #c7afe3; }.cycle-action.tone-5 { background: #e0d1f1; }.cycle-action.tone-6 { background: #d2bde9; }
.cycle-action small { align-self: start; color: #fff; background: #6c5084; border-radius: 3px; padding: 2px 4px; font-size: 8px; }
.cycle-action b, .cycle-action span, .cycle-wait b, .cycle-wait span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cycle-action b { font-size: 10px; font-weight: 600; }.cycle-action span, .cycle-wait span { color: #806e95; font-size: 9px; }.cycle-wait { color: #727c7c; background: repeating-linear-gradient(-45deg, #f1f4f3 0, #f1f4f3 7px, #e4eae8 7px, #e4eae8 10px); }.cycle-wait b { font-size: 10px; font-weight: 600; }

.employee-layout { grid-template-columns: minmax(0, 1fr) 330px; }
.skills-cell { white-space: normal !important; max-width: 170px; }.skills-cell span { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 5px; border-radius: 4px; color: var(--brand-dark); background: var(--brand-soft); font-size: 9px; }
.table-actions { display: flex; gap: 5px; }.table-actions button { padding: 5px 7px; color: var(--brand-dark); background: var(--brand-soft); border: 0; border-radius: 5px; font-size: 9px; white-space: nowrap; }.table-actions button:last-child { color: var(--muted); background: var(--canvas-2); }
.process-list { display: grid; gap: 8px; }.process-record { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }.process-record summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }.process-record summary::-webkit-details-marker { display: none; }.process-record summary > span { display: grid; gap: 4px; }.process-record summary b { font-size: 12px; }.process-record summary small { color: var(--muted); font-size: 10px; }.process-record summary > strong { color: var(--brand-dark); font-size: 13px; }.action-list { padding: 0 12px 9px; background: #fafcfc; border-top: 1px solid var(--line); }.action-list > div { display: grid; grid-template-columns: 40px minmax(0,1fr) auto 28px; gap: 9px; align-items: center; padding: 9px 3px; border-bottom: 1px solid #edf0f2; }.action-list > div:last-child { border-bottom: 0; }.action-list > div > span { color: var(--violet); font: 700 10px "SFMono-Regular", Consolas, monospace; }.action-list p { margin: 0; }.action-list p b, .action-list p small { display: block; }.action-list p b { color: var(--ink-2); font-size: 10px; }.action-list p small { margin-top: 3px; color: var(--muted); font-size: 9px; }.action-list > div > strong { font-size: 11px; white-space: nowrap; }.action-list button { width: 25px; height: 25px; color: var(--brand); border: 1px solid var(--line-strong); background: #fff; border-radius: 6px; }
.shift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }.shift-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }.shift-card h3 { margin: 10px 0 4px; font-size: 14px; }.shift-card p { margin: 0; color: var(--muted); font-size: 10px; }.shift-card > strong { color: var(--brand-dark); font-size: 20px; text-align: right; }.shift-card > strong small { display: block; color: var(--muted); font-size: 9px; font-weight: 400; }.shift-breaks { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }.shift-breaks span { display: inline-block; margin-right: 5px; padding: 3px 5px; background: var(--canvas-2); border-radius: 4px; }.shift-card .record-actions { grid-column: 1 / -1; justify-content: flex-end; }.danger-button { color: var(--danger) !important; }
.roster-summary { margin-bottom: 15px; }.constraint-list { display: grid; gap: 5px; }.constraint-row { display: grid; grid-template-columns: 28px minmax(0,1fr) 92px; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid #edf0f2; }.constraint-code { color: var(--brand); font: 700 10px "SFMono-Regular", Consolas, monospace; }.constraint-row b, .constraint-row small { display: block; }.constraint-row b { font-size: 11px; }.constraint-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }.constraint-row select { height: 30px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-2); background: #fff; font-size: 10px; }.rules-save { margin-top: 16px; }
.roi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }.roi-grid > div { min-height: 94px; display: grid; align-content: center; gap: 7px; padding: 13px; background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; }.roi-grid small { color: var(--muted); font-size: 10px; }.roi-grid strong { font-size: 18px; letter-spacing: -.03em; }.roi-grid .roi-primary { color: var(--brand-dark); background: var(--brand-soft); border-color: #c9ecdd; }.model-note { margin: 15px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }.form-boundary { margin-top: 17px; }
.drawer-backdrop { position: fixed; z-index: 80; inset: 0; display: flex; justify-content: flex-end; background: rgba(16, 24, 25, .24); }.edit-drawer { width: min(460px, 92vw); height: 100%; overflow-y: auto; padding: 27px 25px; background: #fff; box-shadow: -14px 0 40px rgba(20,31,34,.16); }.edit-drawer.wide { width: min(570px, 94vw); }.drawer-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 27px; }.drawer-head h2 { margin: 6px 0; font-size: 23px; letter-spacing: -.03em; }.drawer-head p { margin: 0; color: var(--muted); font-size: 11px; }.drawer-head .eyebrow { color: var(--brand); font-size: 9px; }.drawer-head > button { width: 33px; height: 33px; flex: 0 0 auto; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; background: #fff; }

@media (max-width: 1360px) {
  .line-backbone { grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 7px; padding: 13px; }.line-stage { padding: 11px 8px; }.line-stage strong { font-size: 17px; }.nav-link { min-height: 35px; font-size: 11px; }.nav-group { margin-bottom: 8px; }
}
@media (max-width: 1080px) {
  .planning-lower, .employee-layout { grid-template-columns: 1fr; }.line-backbone { overflow-x: auto; grid-template-columns: repeat(5, 148px); }.cycle-legend { flex-wrap: wrap; }.cycle-legend em { width: 100%; margin-left: 0; }.toolbar-note { width: 100%; margin-left: 0; }.roi-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .app-sidebar nav { padding-bottom: 8px; }.decision-chain { grid-template-columns: 1fr; gap: 6px; }.decision-chain > i { transform: rotate(90deg); }.decision-chain > div { min-height: 36px; }.stage-detail-head { flex-direction: column; }.position-grid { grid-template-columns: 1fr 1fr; }.cycle-row { grid-template-columns: 196px minmax(1100px, 1fr); }.filter-toolbar label { width: 100%; }.filter-toolbar select, .filter-toolbar input { flex: 1; }.search-field input { min-width: 0; }.event-row { grid-template-columns: 29px minmax(0,1fr); }.event-row > button, .event-row > .status-pill { grid-column: 2; justify-self: start; }.roi-grid { grid-template-columns: 1fr 1fr; }.constraint-row { grid-template-columns: 25px minmax(0,1fr) 82px; }
}
@media (max-width: 520px) {
  .position-grid { grid-template-columns: 1fr; }.cycle-evidence { margin-left: 8px; margin-right: 8px; }.cycle-row { grid-template-columns: 184px minmax(1100px,1fr); }.cycle-lane { margin-right: 8px; }.roi-grid { grid-template-columns: 1fr; }.decision-chain { padding: 10px; }.line-summary .summary-cell strong { font-size: 17px; }.filter-toolbar { align-items: stretch; }.toolbar-note { line-height: 1.5; }
}

.teammesh-video-panel { margin-bottom: 16px; }
.teammesh-video-panel .panel-header { min-height: 64px; }
.teammesh-panel-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
.teammesh-video-panel .panel-header .status-pill i { margin-right: 4px; }
.teammesh-video-layout { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(280px, .78fr); gap: 20px; padding: 18px; }
.teammesh-video-frame { min-width: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #11191b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.teammesh-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #11191b; }
.teammesh-video-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 5px 8px 5px 2px; }
.teammesh-video-copy .eyebrow { color: var(--brand); font-size: 9px; }
.teammesh-video-copy h3 { max-width: 390px; margin: 10px 0 9px; font-size: 21px; line-height: 1.35; letter-spacing: -.035em; }
.teammesh-video-copy > p { max-width: 430px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.teammesh-video-points { display: grid; gap: 7px; margin: 20px 0; color: var(--ink-2); font-size: 11px; font-weight: 650; }
.teammesh-video-points span { display: flex; align-items: center; gap: 8px; }
.teammesh-video-points i { color: var(--brand); font-size: 16px; }
.teammesh-video-boundary { margin-top: auto; font-size: 10px; }

@media (max-width: 1080px) {
  .teammesh-video-layout { grid-template-columns: 1fr; }
  .teammesh-video-copy { padding: 2px 3px 3px; }
  .teammesh-video-copy h3, .teammesh-video-copy > p { max-width: none; }
  .teammesh-video-points { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 15px 0; }
  .teammesh-video-boundary { margin-top: 0; }
}

@media (max-width: 520px) {
  .teammesh-video-layout { gap: 14px; padding: 12px; }
  .teammesh-video-frame { aspect-ratio: 1 / 1; }
  .teammesh-video-copy h3 { font-size: 19px; }
  .teammesh-video-panel .panel-header { align-items: flex-start; flex-direction: column; gap: 7px; padding: 13px 14px; }
}

/* ===== Weekly roster calendar ===== */
.roster-empty { margin-top: 4px; }
.roster-empty .empty-state { padding: 64px 24px; }

.roster-toolbar { display: grid; gap: 10px; margin-bottom: 15px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 3px 14px rgba(22,31,39,.035); }
.roster-week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.roster-week-nav .icon-button { width: 32px; height: 32px; border: 1px solid var(--line-strong); background: #fff; font-size: 15px; }
.roster-week-range { display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; color: var(--ink-2); font-size: 13px; font-weight: 650; white-space: nowrap; }
.roster-week-range i { color: var(--brand); }
.roster-week-range em { color: var(--warning); font-style: normal; font-size: 11px; font-weight: 600; margin-left: 6px; }
.roster-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.roster-filter-row label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.roster-filter-row select, .roster-filter-row input { height: 32px; min-width: 112px; padding: 0 10px; color: var(--ink-2); background: #fafcfc; border: 1px solid var(--line-strong); border-radius: 7px; outline: none; }
.roster-filter-row select:focus, .roster-filter-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,155,108,.08); }
.roster-search input { min-width: 190px; }
.roster-view-toggle { display: inline-flex; margin-left: auto; padding: 3px; background: var(--canvas-2); border-radius: 9px; }
.roster-view-toggle button { min-height: 26px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; }
.roster-view-toggle button.active { background: #fff; color: var(--brand-dark); box-shadow: 0 2px 8px rgba(22,31,39,.12); }
.roster-perm-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.roster-perm-note i { color: var(--warning); }

.roster-batchbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 9px 13px; background: var(--blue-soft); border: 1px solid #cfdff5; border-radius: 10px; color: var(--ink-2); font-size: 12px; }
.roster-batchbar > i { color: var(--blue); font-size: 17px; }
.roster-batchbar > span { font-weight: 650; margin-right: auto; }

.roster-calendar { overflow: hidden; }
.roster-calendar .panel-header { flex-wrap: wrap; gap: 10px; }
.roster-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 6px 0; color: var(--muted); font-size: 10px; }
.roster-legend-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.roster-legend-item i { font-size: 13px; }
.roster-legend-item.confirmed i { color: var(--brand); }
.roster-legend-item.night i { color: #20365e; }
.roster-legend-item.pending i { color: #b86a10; }
.roster-legend-item.leave i { color: var(--violet); }
.roster-legend-item.training i { color: var(--blue); }
.roster-legend-item.absence i { color: var(--danger); }
.roster-legend-item.transfer i { color: var(--warning); }
.roster-legend-item.rest i { color: #9aa3aa; }

.roster-scroll { overflow: auto; max-height: calc(100vh - 300px); min-height: 300px; border-top: 1px solid #edf0f2; background: #fbfcfc; }
.roster-grid { display: grid; grid-template-columns: 236px repeat(7, minmax(166px, 1fr)); min-width: 1398px; width: 100%; }
.roster-corner { position: sticky; left: 0; top: 0; z-index: 30; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 12px 14px; background: #f2f6f7; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.roster-corner b { font-size: 12px; }
.roster-corner span { color: var(--muted); font-size: 10px; }
.roster-day-head { position: sticky; top: 0; z-index: 20; min-height: 128px; display: flex; flex-direction: column; gap: 5px; padding: 9px 10px 8px; background: #f7f9f9; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); }
.roster-day-head.today { background: var(--brand-soft); }
.roster-day-head.today .roster-day-title b { color: var(--brand-dark); }
.roster-day-head.weekend { background: #f1f4f5; }
.roster-day-head.weekend.today { background: var(--brand-soft); }
.roster-day-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.roster-day-title b { font-size: 13px; }
.roster-day-title span { color: var(--muted); font-size: 10px; }
.roster-day-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-left: auto; }
.roster-tag { padding: 2px 6px; border-radius: 20px; font-style: normal; font-size: 9px; font-weight: 650; }
.roster-tag.muted { background: #e8ecee; color: #7a848c; }
.roster-tag.danger { background: var(--danger-soft); color: var(--danger); }
.roster-tag.warning { background: var(--warning-soft); color: #a96608; }
.roster-tag.brand { background: var(--brand-soft); color: var(--brand-dark); }
.roster-day-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px 5px; background: #fff; border: 1px solid #e7ebed; border-radius: 7px; }
.roster-day-stats span { display: grid; gap: 2px; justify-items: center; color: var(--muted); font-size: 9px; white-space: nowrap; }
.roster-day-stats b { color: var(--ink-2); font-size: 13px; line-height: 1; }
.roster-day-stats span.danger { color: var(--danger); }
.roster-day-stats span.danger b { color: var(--danger); }
.roster-day-stats.alarm { border-color: #f2b5b9; box-shadow: inset 0 0 0 1px rgba(226,54,63,.14); }
.roster-day-extra { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 9px; }
.roster-bottleneck { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-bottleneck i { color: var(--brand); margin-right: 3px; }
.roster-anomaly i { color: var(--muted); margin-right: 3px; }
.roster-anomaly.alarm { color: var(--danger); font-weight: 650; }
.roster-anomaly.alarm i { color: var(--danger); }
.roster-day-warns { display: flex; flex-wrap: wrap; gap: 3px; }
.roster-day-warns span { padding: 2px 6px; border-radius: 5px; background: var(--warning-soft); color: #a96608; font-size: 9px; white-space: nowrap; }
.roster-day-alarm { display: flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; background: var(--danger-soft); color: var(--danger); font-size: 9px; font-weight: 700; }

.roster-emp { position: sticky; left: 0; z-index: 10; display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; background: #fff; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.roster-emp-head { display: flex; align-items: center; gap: 6px; }
.roster-emp-head b { font-size: 12px; }
.roster-emp-head span { color: var(--muted); font-size: 9px; }
.roster-emp-head i { margin-left: auto; color: var(--warning); font-size: 11px; }
.roster-emp-line { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-emp-line i { color: var(--brand); }
.roster-emp-skills { display: flex; flex-wrap: wrap; gap: 3px; }
.roster-skill { padding: 2px 6px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 9px; white-space: nowrap; }
.roster-skill.empty { background: var(--warning-soft); color: #a96608; }
.roster-emp-status { display: flex; align-items: center; gap: 6px; }
.roster-emp-warn { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 5px; background: var(--danger-soft); color: var(--danger); font-size: 9px; font-weight: 650; white-space: nowrap; }
.roster-team .roster-emp-head b { font-size: 13px; color: var(--brand-dark); }

.roster-cell { min-height: 96px; padding: 7px; display: flex; flex-direction: column; gap: 5px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.roster-off { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; color: #b6bdc2; font-size: 10px; background: repeating-linear-gradient(-45deg, #f6f8f8 0, #f6f8f8 6px, #f1f4f4 6px, #f1f4f4 12px); border-radius: 8px; min-height: 78px; }
.roster-off-leave { color: var(--violet); background: var(--violet-soft); font-weight: 650; }

.roster-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 7px 8px 6px; border: 1px solid; border-radius: 9px; background: #fff; cursor: pointer; box-shadow: 0 2px 7px rgba(22,31,39,.05); transition: transform .14s, box-shadow .14s, border-color .14s; text-align: left; }
.roster-card:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(22,31,39,.11); }
.roster-card.selected { outline: 2px solid var(--blue); outline-offset: 1px; }
.roster-card.readonly { cursor: default; }
.roster-check { position: absolute; right: 6px; top: 6px; color: #b7bfc5; font-size: 15px; line-height: 1; }
.roster-check i { pointer-events: none; }
.roster-check:hover { color: var(--blue); }
.roster-card-top { display: flex; align-items: center; gap: 5px; padding-right: 20px; }
.roster-shift { display: inline-flex; align-items: center; gap: 3px; color: var(--brand-dark); font-size: 10px; font-weight: 700; }
.roster-shift.night { color: #20365e; }
.roster-status { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 1px 5px; border-radius: 4px; font-size: 9px; white-space: nowrap; }
.roster-card-employee { color: var(--ink); font-size: 10px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-card-line { display: flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-card-line i { color: var(--brand); }
.roster-card-position { color: var(--ink); font-size: 11px; font-weight: 650; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.roster-card-post { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--muted); font-size: 9px; }
.roster-card-foot span { display: inline-flex; align-items: center; gap: 3px; }
.roster-warn { display: inline-flex; align-items: center; gap: 2px; color: var(--danger); font-weight: 700; }
.roster-card.confirmed { border-color: #bfe6d6; background: #f3fbf7; }
.roster-card.confirmed .roster-status { background: var(--brand-soft); color: var(--brand-dark); }
.roster-card.night { border-color: #b9c8e4; background: #f2f5fb; }
.roster-card.night .roster-status { background: #e3ebf8; color: #20365e; }
.roster-card.pending { border-color: #f0d29a; background: #fffaf1; }
.roster-card.pending .roster-status { background: var(--warning-soft); color: #a96608; }
.roster-card.leave { border-color: #d9d3f4; background: #f7f5ff; }
.roster-card.leave .roster-status { background: var(--violet-soft); color: var(--violet); }
.roster-card.training { border-color: #c4d9f2; background: #f4f8fd; }
.roster-card.training .roster-status { background: var(--blue-soft); color: var(--blue); }
.roster-card.absence { border-color: #f1b6ba; background: #fff7f7; }
.roster-card.absence .roster-status { background: var(--danger-soft); color: var(--danger); }
.roster-card.transfer { border-color: #f0c79a; background: #fff8ef; }
.roster-card.transfer .roster-status { background: var(--warning-soft); color: #b86a10; }

.roster-overview-section { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 16px; margin-top: 16px; }
.roster-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px; }
.roster-overview-metric { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: #fafcfc; border: 1px solid var(--line); border-radius: 10px; }
.roster-overview-metric > i { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 8px; font-size: 16px; }
.roster-overview-metric.warning > i { color: #a96608; background: var(--warning-soft); }
.roster-overview-metric.danger > i { color: var(--danger); background: var(--danger-soft); }
.roster-overview-metric div { min-width: 0; display: grid; gap: 3px; }
.roster-overview-metric small { color: var(--muted); font-size: 10px; }
.roster-overview-metric b { font-size: 18px; line-height: 1; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-overview-metric em { font-style: normal; color: var(--muted); font-size: 9px; margin-left: 4px; }
.roster-overview-metric.danger b { color: var(--danger); }

.roster-status-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.roster-status-quick button { min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--ink-2); font-size: 11px; font-weight: 600; }
.roster-status-quick button.active { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.roster-drawer-info { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid #d9e3df; border-left: 3px solid var(--brand); border-radius: 8px; background: #fbfdfc; color: var(--muted); font-size: 10px; line-height: 1.6; }
.roster-drawer-info i { color: var(--brand); margin-top: 1px; }
.roster-generate-checks { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }

@media (max-width: 1360px) {
  .roster-grid { grid-template-columns: 220px repeat(7, minmax(158px, 1fr)); min-width: 1326px; }
  .roster-overview { grid-template-columns: repeat(2, 1fr); }
  .roster-view-toggle { margin-left: 0; }
}
@media (max-width: 1080px) {
  .roster-overview-section { grid-template-columns: 1fr; }
  .roster-week-nav { flex-wrap: wrap; }
}
@media (max-width: 820px) {
  .roster-grid { grid-template-columns: 190px repeat(7, minmax(150px, 1fr)); min-width: 1240px; }
  .roster-corner { padding: 10px; }
  .roster-emp { padding: 8px 10px; }
  .roster-overview { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .roster-view-toggle { width: 100%; }
  .roster-view-toggle button { flex: 1; justify-content: center; }
  .roster-week-range { width: 100%; }
  .roster-filter-row label { width: 100%; }
  .roster-filter-row select, .roster-filter-row input { flex: 1; min-width: 0; }
  .roster-search input { min-width: 0; }
  .roster-overview { grid-template-columns: 1fr; }
}
