/* CRM boot shell: stable workspace geometry, one quiet indeterminate indicator. */
html,body,#app { height:100%; margin:0; padding:0; }
.crm-startup { --startup-bg:#f8f9fb; --startup-panel:#fff; --startup-line:#e9edf1; --startup-border:#edf0f3; --startup-text:#1f2329; --startup-muted:#6b7280; --startup-accent:var(--application-accent,#3b82f6); position:relative; width:100%; height:100%; min-height:260px; overflow:hidden; background:linear-gradient(90deg,color-mix(in srgb,var(--startup-panel) 28%,transparent),var(--startup-panel)); color:var(--startup-text); font:14px/1.5 'Source Han Sans-Normal','Segoe UI','Microsoft YaHei',sans-serif; }
.crm-startup[data-mode="dark"] { --startup-bg:#181b20; --startup-panel:#22262c; --startup-line:#30363e; --startup-border:#30363e; --startup-text:#f3f4f6; --startup-muted:#aab2bf; --startup-accent:var(--color-primary); }
.startup-skeleton { display:grid; grid-template-columns:220px minmax(0,1fr); height:100%; gap:8px; }
.startup-sidebar { display:flex; flex-direction:column; gap:12px; padding:24px 16px; background:color-mix(in srgb,var(--startup-panel) 82%,transparent); backdrop-filter:blur(24px); border:1px solid var(--startup-border); border-radius:20px; box-shadow:6px 0 24px #172b4d05; }
.startup-nav-brand,.startup-nav-row { display:flex; align-items:center; gap:12px; padding:8px; }
.startup-nav-brand { margin-bottom:12px; }
.startup-line { display:block; height:9px; width:65%; border-radius:4px; background:var(--startup-line); }
.startup-glyph { display:block; width:15px; height:15px; border:1px solid var(--startup-line); border-radius:4px; }
.startup-nav-row.selected { background:color-mix(in srgb,var(--startup-accent) 7%,transparent); border-radius:6px; }
.startup-nav-row.selected .startup-line { background:color-mix(in srgb,var(--startup-accent) 18%,var(--startup-line)); }
.startup-nav-row:nth-child(3n) .startup-line { width:44%; }
.startup-sidebar-footer { margin-top:auto; border:1px solid var(--startup-border); padding:14px; border-radius:8px; }
.startup-workspace { display:flex; flex-direction:column; padding:20px 24px; min-width:0; min-height:0; container-type:inline-size; }
.startup-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 16px; flex-shrink:0; }
.startup-heading { display:block; width:180px; height:34px; border-radius:6px; background:var(--startup-line); }
.startup-action { width:240px; max-width:40%; height:36px; border-radius:8px; background:color-mix(in srgb,var(--startup-accent) 10%,transparent); }
.startup-subtitle { display:block; width:220px; max-width:100%; height:19px; margin-top:6px; border-radius:4px; background:var(--startup-line); }
.startup-nav-group { margin-top:20px; display:grid; gap:12px; }
.startup-statistics { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,360px); gap:16px; margin-bottom:12px; flex-shrink:0; }
.startup-stages,.startup-comparison { min-width:0; height:124px; box-sizing:border-box; padding:14px 16px; border:1px solid var(--startup-border); border-radius:14px; background:var(--startup-panel); }
.startup-stages { display:flex; gap:12px; }.startup-metric { flex:1; min-width:0; }
.startup-metric>.startup-line,.startup-comparison-metrics .startup-line { height:12px; margin:3px 0; }
.startup-amount { display:block; width:75%; max-width:110px; height:18px; margin-top:7px; border-radius:4px; background:var(--startup-line); }
.startup-segments { display:grid; grid-template-columns:repeat(20,minmax(0,1fr)); gap:3px; height:14px; margin-top:14px; }.startup-segments i { border-radius:2px; background:var(--startup-line); }.startup-segments.comparison { grid-template-columns:repeat(40,minmax(0,1fr)); }.startup-comparison-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.startup-filter { display:flex; align-items:center; gap:8px; align-self:flex-end; width:382px; max-width:100%; height:38px; box-sizing:border-box; padding:8px; margin-bottom:12px; border:1px solid var(--startup-border); border-radius:8px; background:var(--startup-panel); flex-shrink:0; }
.startup-search { flex:1; height:12px; margin-right:14px; border-radius:4px; background:var(--startup-line); }.startup-tool { width:16px; height:16px; border-radius:4px; background:var(--startup-line); }
.startup-lanes { display:flex; flex:1; min-height:0; gap:12px; overflow:hidden; }
.startup-lane { width:clamp(260px,22vw,304px); box-sizing:border-box; flex-shrink:0; border:1px solid var(--startup-border); border-radius:12px; padding:0 10px 30px; background:var(--startup-bg); overflow:hidden; }
.startup-lane-title { display:flex; align-items:center; justify-content:space-between; height:48px; padding:0 2px; }.startup-lane-title .startup-line { width:30%; }
.startup-dot { display:block; width:18px; height:18px; background:var(--startup-line); border-radius:5px; }
.startup-card { padding:12px; margin:10px 0 0; border:1px solid var(--startup-border); background:var(--startup-panel); border-radius:10px; }.startup-card>.startup-line { height:18px; width:58%; margin-bottom:6px; }
.startup-card-fields>div { display:flex; align-items:center; gap:8px; height:27px; }.startup-card-fields .startup-line:first-child { width:72px; }.startup-card-fields .startup-line:last-child { width:45%; height:12px; }
.startup-heatmap { display:grid; grid-template-columns:repeat(7,5px); gap:3px; margin:8px 0 20px; }.startup-heatmap i { width:5px; height:5px; background:var(--startup-line); border-radius:1px; }
.startup-card-footer { display:flex; gap:8px; align-items:center; padding-top:12px; border-top:1px solid var(--startup-border); }.startup-card-footer .startup-dot { border-radius:50%; width:22px; height:22px; }.startup-card-footer .startup-line { width:50%; }
@container(max-width:860px) { .startup-statistics { grid-template-columns:minmax(0,1fr); gap:12px; }.startup-comparison { width:min(100%,360px); justify-self:end; } }
@container(max-width:540px) { .startup-stages { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); height:auto; gap:18px 12px; }.startup-comparison { width:100%; } }
.startup-status { position:absolute; left:calc(50% + 110px); top:44%; transform:translate(-50%,-50%); box-sizing:border-box; width:min(320px,calc(100% - 40px)); padding:28px; text-align:center; background:var(--startup-panel); border:1px solid var(--startup-border); border-radius:16px; box-shadow:0 8px 32px #172b4d08; }
.startup-app-icon { display:grid; place-items:center; width:44px; height:44px; margin:0 auto 16px; border-radius:12px; color:var(--startup-accent); background:color-mix(in srgb,var(--startup-accent) 8%,var(--startup-panel)); }
.startup-app-icon svg { width:24px; height:24px; fill:currentColor; }
.startup-status h1 { margin:0 0 6px; font-size:16px; font-weight:600; letter-spacing:.01em; }
.startup-status p { margin:0; color:var(--startup-muted); font-size:13px; line-height:1.6; }
.startup-progress { margin:22px auto 0; height:3px; width:112px; overflow:hidden; border-radius:3px; background:var(--startup-line); }
.startup-progress span { display:block; width:42%; height:100%; border-radius:inherit; background:var(--startup-accent); animation:crm-startup-progress 1.6s ease-in-out infinite; }
@keyframes crm-startup-progress { from {transform:translateX(-110%)} to {transform:translateX(350%)} }
.startup-status button { margin-top:18px; padding:8px 18px; min-height:36px; border:1px solid var(--startup-border); border-radius:8px; background:var(--startup-panel); color:var(--startup-accent); font:inherit; cursor:pointer; }
.startup-status button:hover { background:color-mix(in srgb,var(--startup-accent) 8%,var(--startup-panel)); }.startup-status button:focus-visible { outline:2px solid var(--startup-accent); outline-offset:3px; }
.crm-startup[data-failed="true"] .startup-progress { display:none; }
@media(max-width:760px) { .startup-skeleton { grid-template-columns:minmax(0,1fr); }.startup-sidebar { display:none; }.startup-workspace {padding:24px 20px}.startup-status {left:50%} }
@media(max-height:440px) { .startup-status {top:50%;padding:20px}.startup-app-icon {display:none}.startup-lane {min-height:200px} }
@media(prefers-reduced-motion:reduce) { .startup-progress span {animation:none;transform:translateX(68%)} }

/* Keep the boot placeholder aligned with the card's identity-first layout. */
.startup-record{display:none}
.crm-startup[data-record="true"] .startup-skeleton{display:none}
.crm-startup[data-record="true"] .startup-record{height:100%;display:grid;grid-template-columns:clamp(260px,23%,355px) minmax(0,1fr)}
.startup-record aside,.startup-record main section{background:var(--startup-panel);border:1px solid var(--startup-border);border-radius:14px;padding:16px}
.startup-record main{display:flex;flex-direction:column;gap:12px;padding:20px}.startup-record main>div{display:grid;grid-template-columns:1.1fr 1fr;gap:12px}.startup-record main>section:last-child{flex:1}
.startup-record :is(b,i,p){display:block;height:10px;width:36%;border-radius:4px;margin:10px 0;background:var(--startup-line)}.startup-record b{height:22px;width:74%}.startup-record p{width:80%}.startup-record aside section{margin-top:24px;padding-top:12px;border-top:1px solid var(--startup-border)}
@media(max-width:1000px){.startup-record main{padding:12px}.startup-record main>div{grid-template-columns:1fr}}
@media(max-width:680px){.crm-startup[data-record="true"] .startup-record{grid-template-columns:1fr;grid-template-rows:34vh 1fr}.startup-record aside{overflow:hidden}}
.startup-card { display:flex; flex-direction:column; }
.startup-card>.startup-line { height:22px; width:70%; margin-bottom:8px; }
.startup-card-footer { order:1; border:0; padding:0; min-height:22px; }
.startup-card-footer .startup-dot { width:20px; height:20px; }
.startup-card-footer .startup-line { width:32px; }
.startup-card-footer::after { content:''; width:68px; height:10px; margin-left:auto; border-radius:4px; background:var(--startup-line); }
.startup-heatmap { order:2; margin:10px 0 0; padding:9px 8px; }
.startup-card-fields { order:3; margin-top:16px; }
.startup-card-fields>div { height:30px; gap:10px; }
.startup-card-fields .startup-line:first-child { width:84px; }
