/* 线路调度 · 设计系统
   Material: white grouped panels with hairline edges and soft layered shadows on
   Argon's grey canvas; dialogs are sheets over a blurred, lightly dimmed page.
   Every control is our own (pill buttons, switches, steppers, pill selects,
   segmented control), because Argon restyles bare button/select/input/table/
   checkbox/h4 globally. Lists use CSS grid, never <table>. */

.ce-app, .ce-sheet, .ce-modal-host, .ce-menu {
  --c-label: #1d1d1f; --c-label-2: #6e6e73; --c-label-3: #8e8e93; --c-label-4: #c7c7cc;
  --c-surface: #ffffff; --c-surface-2: #f5f5f7; --c-surface-3: #e9e9ee; --c-hover: rgba(0,0,0,.035);
  --c-line: rgba(60,60,67,.12); --c-line-2: rgba(60,60,67,.22);
  --c-accent: #007aff; --c-accent-tint: rgba(0,122,255,.1); --c-accent-text: #0066d6;
  --c-green: #34c759; --c-green-text: #248a3d; --c-green-tint: rgba(52,199,89,.14);
  --c-red: #ff3b30; --c-red-text: #d70015; --c-red-tint: rgba(255,59,48,.1);
  --c-orange: #ff9500; --c-orange-text: #b25000; --c-orange-tint: rgba(255,149,0,.14);
  --c-up: #af52de; --c-down: #007aff; --c-gray: #aeaeb2;
  --sh-panel: 0 0 0 .5px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.035);
  --sh-raise: 0 0 0 .5px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.06);
  --sh-sheet: 0 0 0 .5px rgba(0,0,0,.08), 0 30px 80px rgba(0,0,0,.28);
  --sh-knob: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16);
  --f-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --f-mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-darkmode="false"]) .ce-app, :root:not([data-darkmode="false"]) .ce-sheet, :root:not([data-darkmode="false"]) .ce-modal-host, :root:not([data-darkmode="false"]) .ce-menu {
    --c-label: #f5f5f7; --c-label-2: #aeaeb2; --c-label-3: #8e8e93; --c-label-4: #48484a;
    --c-surface: #1c1c1e; --c-surface-2: #2c2c2e; --c-surface-3: #3a3a3c; --c-hover: rgba(255,255,255,.05);
    --c-line: rgba(84,84,88,.6); --c-line-2: rgba(84,84,88,.9);
    --c-accent: #0a84ff; --c-accent-tint: rgba(10,132,255,.2); --c-accent-text: #409cff;
    --c-green: #30d158; --c-green-text: #30d158; --c-green-tint: rgba(48,209,88,.18);
    --c-red: #ff453a; --c-red-text: #ff6961; --c-red-tint: rgba(255,69,58,.18);
    --c-orange: #ff9f0a; --c-orange-text: #ffb340; --c-orange-tint: rgba(255,159,10,.18);
    --c-up: #bf5af2; --c-down: #0a84ff;
    --sh-panel: 0 0 0 .5px rgba(255,255,255,.08), 0 6px 20px rgba(0,0,0,.3);
    --sh-raise: 0 0 0 .5px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.35);
    --sh-sheet: 0 0 0 .5px rgba(255,255,255,.1), 0 30px 80px rgba(0,0,0,.6);
  }
}
[data-darkmode="true"] .ce-app, [data-darkmode="true"] .ce-sheet, [data-darkmode="true"] .ce-modal-host, [data-darkmode="true"] .ce-menu {
  --c-label: #f5f5f7; --c-label-2: #aeaeb2; --c-label-3: #8e8e93; --c-label-4: #48484a;
  --c-surface: #1c1c1e; --c-surface-2: #2c2c2e; --c-surface-3: #3a3a3c; --c-hover: rgba(255,255,255,.05);
  --c-line: rgba(84,84,88,.6); --c-line-2: rgba(84,84,88,.9);
  --c-accent: #0a84ff; --c-accent-tint: rgba(10,132,255,.2); --c-accent-text: #409cff;
  --c-green: #30d158; --c-green-text: #30d158; --c-green-tint: rgba(48,209,88,.18);
  --c-red: #ff453a; --c-red-text: #ff6961; --c-red-tint: rgba(255,69,58,.18);
  --c-orange: #ff9f0a; --c-orange-text: #ffb340; --c-orange-tint: rgba(255,159,10,.18);
  --c-up: #bf5af2; --c-down: #0a84ff;
  --sh-panel: 0 0 0 .5px rgba(255,255,255,.08), 0 6px 20px rgba(0,0,0,.3);
  --sh-raise: 0 0 0 .5px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.35);
  --sh-sheet: 0 0 0 .5px rgba(255,255,255,.1), 0 30px 80px rgba(0,0,0,.6);
}

/* ---------- reset inside our scope (beats Argon's bare element rules) ---------- */
.ce-app, .ce-sheet { font-family: var(--f-sans); font-size: 14px; line-height: 1.45; color: var(--c-label); -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
.ce-app *, .ce-sheet * { box-sizing: border-box; }
.ce-app button, .ce-app input, .ce-app select, .ce-app textarea,
.ce-sheet button, .ce-sheet input, .ce-sheet select, .ce-sheet textarea {
  margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none;
  font: inherit; line-height: normal; color: inherit; text-transform: none; min-width: 0; width: auto; height: auto; transition: none; }
.ce-app a, .ce-sheet a { color: var(--c-accent-text); text-decoration: none !important; }
.ce-app small, .ce-sheet small { font-size: 12px; line-height: 1.4; }
.ce-app p, .ce-sheet p { margin: 0; }
.ce-mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ce-num { font-variant-numeric: tabular-nums; }
.ce-2 { color: var(--c-label-2); }
.ce-3 { color: var(--c-label-3); }
.ce-grow { flex: 1 1 auto; }
.ce-app :focus-visible, .ce-sheet :focus-visible { outline: 3px solid var(--c-accent-tint) !important; outline-offset: 1px; }

/* ---------- typography ---------- */
.ce-title { font-size: 28px; font-weight: 700; letter-spacing: -.022em; line-height: 1.15; }
.ce-h2 { font-size: 17px; font-weight: 650; letter-spacing: -.012em; }
.ce-h3 { font-size: 15px; font-weight: 600; }
.ce-caption { font-size: 12px; color: var(--c-label-2); }
.ce-section-head { display: flex; align-items: baseline; gap: 10px; padding: 0 18px; margin: 22px 0 8px; }
.ce-section-head .ce-h3 { font-size: 13px; font-weight: 600; color: var(--c-label-2); }
.ce-section-head .ce-caption { color: var(--c-label-3); }
.ce-footnote { padding: 8px 18px 0; font-size: 12px; line-height: 1.6; color: var(--c-label-3); }

/* ---------- icons ---------- */
.ce-icon { display: inline-block; width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.ce-icon svg, svg.ce-icon { width: 100%; height: 100%; display: block; }

/* ---------- surfaces ---------- */
.ce-app { max-width: 1680px; margin: 0 auto; padding: 6px 0 32px; }
.ce-panel { background: var(--c-surface); border-radius: 16px; box-shadow: var(--sh-panel); overflow: hidden; }
.ce-panel + .ce-panel { margin-top: 12px; }
.ce-pad { padding: 18px 20px; }

/* page header */
.ce-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; margin: 6px 0 14px; background: var(--c-surface); border-radius: 20px; box-shadow: var(--sh-panel); position: relative; z-index: 1; }
.ce-hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ce-hero-sub { font-size: 13px; color: var(--c-label-2); }
.ce-hero-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* status chips */
.ce-chip-s { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-label-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
a.ce-chip-s { color: var(--c-accent-text); background: var(--c-accent-tint); }
a.ce-chip-s:hover { filter: brightness(.97); }
.ce-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-gray); flex: none; display: inline-block; }
.ce-dot.ce-ok { background: var(--c-green); } .ce-dot.ce-fail { background: var(--c-red); } .ce-dot.ce-wait { background: var(--c-orange); } .ce-dot.ce-info { background: var(--c-accent); }
.ce-dot.ce-live { background: var(--c-green); animation: ce-pulse 2s infinite; }
@keyframes ce-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,89,.5); } 70% { box-shadow: 0 0 0 6px rgba(52,199,89,0); } 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); } }

/* tags (status inside rows) */
.ce-tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--c-surface-2); color: var(--c-label-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ce-tag.ce-ok { background: var(--c-green-tint); color: var(--c-green-text); }
.ce-tag.ce-fail { background: var(--c-red-tint); color: var(--c-red-text); }
.ce-tag.ce-wait { background: var(--c-orange-tint); color: var(--c-orange-text); }
.ce-tag.ce-info { background: var(--c-accent-tint); color: var(--c-accent-text); }

/* ---------- buttons ---------- */
.ce-app .ce-btn, .ce-sheet .ce-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 15px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-label); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; user-select: none; transition: background .15s, opacity .15s, transform .08s; }
.ce-app .ce-btn:hover, .ce-sheet .ce-btn:hover { background: var(--c-surface-3); }
.ce-app .ce-btn:active, .ce-sheet .ce-btn:active { transform: scale(.97); }
.ce-app .ce-btn.ce-fill, .ce-sheet .ce-btn.ce-fill { background: var(--c-accent); color: #fff; }
.ce-app .ce-btn.ce-fill:hover, .ce-sheet .ce-btn.ce-fill:hover { background: var(--c-accent); filter: brightness(1.08); }
.ce-app .ce-btn.ce-tint, .ce-sheet .ce-btn.ce-tint { background: var(--c-accent-tint); color: var(--c-accent-text); }
.ce-app .ce-btn.ce-danger, .ce-sheet .ce-btn.ce-danger { background: var(--c-red-tint); color: var(--c-red-text); }
.ce-app .ce-btn.ce-text, .ce-sheet .ce-btn.ce-text { height: 28px; padding: 0 8px; background: transparent; color: var(--c-accent-text); font-weight: 500; }
.ce-app .ce-btn.ce-text:hover, .ce-sheet .ce-btn.ce-text:hover { background: var(--c-accent-tint); }
.ce-app .ce-btn.ce-text.ce-danger, .ce-sheet .ce-btn.ce-text.ce-danger { background: transparent; color: var(--c-red-text); }
.ce-app .ce-btn.ce-text.ce-danger:hover, .ce-sheet .ce-btn.ce-text.ce-danger:hover { background: var(--c-red-tint); }
.ce-app .ce-btn.ce-small, .ce-sheet .ce-btn.ce-small { height: 28px; padding: 0 12px; font-size: 12.5px; }
.ce-app .ce-btn.ce-big, .ce-sheet .ce-btn.ce-big { height: 38px; padding: 0 20px; font-size: 14px; }
.ce-app .ce-btn:disabled, .ce-sheet .ce-btn:disabled { background: var(--c-surface-2) !important; color: var(--c-label-4) !important; filter: none !important; cursor: default; transform: none; }
.ce-app .ce-btn.ce-icon-btn, .ce-sheet .ce-btn.ce-icon-btn { width: 32px; padding: 0; }

/* ---------- inputs ---------- */
.ce-app .ce-input, .ce-sheet .ce-input { width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--c-surface-2); color: var(--c-label); font-size: 14px; box-shadow: inset 0 0 0 .5px var(--c-line); transition: box-shadow .15s, background .15s; }
.ce-app .ce-input::placeholder, .ce-sheet .ce-input::placeholder { color: var(--c-label-3); }
.ce-app .ce-input:focus, .ce-sheet .ce-input:focus { background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-accent), 0 0 0 3px var(--c-accent-tint); }
.ce-sheet .ce-file { font-size: 13px; color: var(--c-label-2); }
.ce-sheet .ce-file::file-selector-button { margin-right: 10px; height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--c-accent-tint); color: var(--c-accent-text); font: 600 12.5px var(--f-sans); cursor: pointer; }

/* inline editable text: looks like text, becomes a field on hover/focus */
.ce-app .ce-inline, .ce-sheet .ce-inline { width: 100%; height: 30px; margin-left: -8px; padding: 0 8px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--c-label); background: transparent; cursor: text; transition: background .15s, box-shadow .15s; }
.ce-app .ce-inline:hover, .ce-sheet .ce-inline:hover { background: var(--c-hover); box-shadow: inset 0 0 0 .5px var(--c-line-2); }
.ce-app .ce-inline:focus, .ce-sheet .ce-inline:focus { background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-accent), 0 0 0 3px var(--c-accent-tint); }
.ce-edit-hint { display: inline-flex; color: var(--c-label-4); }

/* pill select */
.ce-app .ce-select, .ce-sheet .ce-select { height: 32px; padding: 0 30px 0 13px; border-radius: 999px; background-color: var(--c-surface-2); color: var(--c-label); font-size: 13px; font-weight: 500; cursor: pointer; -webkit-appearance: none; appearance: none; max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; box-shadow: inset 0 0 0 .5px var(--c-line); }
.ce-app .ce-select:hover, .ce-sheet .ce-select:hover { background-color: var(--c-surface-3); }
.ce-app .ce-dd, .ce-sheet .ce-dd { display: inline-flex; align-items: center; text-align: left; vertical-align: middle; transition: background-color .15s, box-shadow .15s; }
.ce-app .ce-dd[aria-expanded="true"], .ce-sheet .ce-dd[aria-expanded="true"] { background-color: var(--c-surface-3); box-shadow: inset 0 0 0 .5px var(--c-line), 0 0 0 3px var(--c-accent-tint); }
.ce-dd-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* option list (attached to <body>) */
.ce-menu { position: fixed; z-index: 2000000; box-sizing: border-box; max-width: min(440px, calc(100vw - 16px)); overflow-y: auto; overscroll-behavior: contain; padding: 5px;
  border-radius: 14px; background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.1), 0 10px 32px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.06);
  font-family: var(--f-sans); font-size: 13px; line-height: 1.3; color: var(--c-label); -webkit-font-smoothing: antialiased;
  transform-origin: top center; animation: ce-menu-in .16s cubic-bezier(.2,.8,.2,1); }
.ce-menu.ce-up { transform-origin: bottom center; }
.ce-menu.ce-menu-out { animation: ce-menu-out .12s ease forwards; pointer-events: none; }
.ce-menu-item { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; gap: 7px; min-height: 32px; padding: 0 14px 0 8px; border-radius: 9px; cursor: pointer; user-select: none; }
.ce-menu-item > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-menu-item .ce-icon { display: inline-flex; width: 14px; height: 14px; visibility: hidden; color: var(--c-accent); }
.ce-menu-item .ce-icon svg { width: 100%; height: 100%; stroke-width: 2.4; }
.ce-menu-item.ce-on { font-weight: 600; }
.ce-menu-item.ce-on .ce-icon { visibility: visible; }
.ce-menu-item.ce-act { background: var(--c-accent); color: #fff; }
.ce-menu-item.ce-act .ce-icon { color: #fff; }
.ce-menu.ce-mono .ce-menu-item { font-family: var(--f-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
@keyframes ce-menu-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@keyframes ce-menu-out { to { opacity: 0; transform: scale(.98); } }
@media (prefers-color-scheme: dark) { :root:not([data-darkmode="false"]) .ce-menu { background: rgba(44,44,46,.9); box-shadow: 0 0 0 .5px rgba(255,255,255,.12), 0 12px 36px rgba(0,0,0,.5); } }
[data-darkmode="true"] .ce-menu { background: rgba(44,44,46,.9); box-shadow: 0 0 0 .5px rgba(255,255,255,.12), 0 12px 36px rgba(0,0,0,.5); }
@media (prefers-reduced-motion: reduce) { .ce-menu, .ce-menu.ce-menu-out { animation: none; } }

/* stepper  − [ n ] + */
.ce-stepper { display: inline-flex; align-items: center; height: 34px; padding: 2px; border-radius: 999px; background: var(--c-surface-2); box-shadow: inset 0 0 0 .5px var(--c-line); flex: none; }
.ce-app .ce-stepper button, .ce-sheet .ce-stepper button { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--c-label); font-size: 18px; font-weight: 500; line-height: 1; cursor: pointer; }
.ce-app .ce-stepper button:hover, .ce-sheet .ce-stepper button:hover { background: var(--c-surface); box-shadow: var(--sh-knob); }
.ce-app .ce-stepper button:disabled, .ce-sheet .ce-stepper button:disabled { color: var(--c-label-4); background: transparent; box-shadow: none; cursor: default; }
.ce-app .ce-stepper input, .ce-sheet .ce-stepper input { width: 46px; height: 30px; text-align: center; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--c-label); border-radius: 8px; }
.ce-app .ce-stepper input:focus, .ce-sheet .ce-stepper input:focus { background: var(--c-surface); box-shadow: 0 0 0 2px var(--c-accent-tint); }
.ce-stepper.ce-zero input { color: var(--c-label-3); }

/* switch */
.ce-app .ce-switch, .ce-sheet .ce-switch { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--c-surface-3); cursor: pointer; flex: none; transition: background .2s; }
.ce-app .ce-switch::after, .ce-sheet .ce-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--sh-knob); transition: transform .2s cubic-bezier(.3,.7,.4,1.3); }
.ce-app .ce-switch[aria-checked="true"], .ce-sheet .ce-switch[aria-checked="true"] { background: var(--c-green); }
.ce-app .ce-switch[aria-checked="true"]::after, .ce-sheet .ce-switch[aria-checked="true"]::after { transform: translateX(18px); }

/* round checkbox (Argon forces appearance:none !important; we draw our own) */
.ce-app input.ce-check, .ce-sheet input.ce-check { width: 20px !important; height: 20px !important; margin: 0 !important; padding: 0 !important; border-radius: 50% !important; border: 1.5px solid var(--c-label-4) !important; background: transparent none !important; cursor: pointer; flex: none; position: static !important; top: auto !important; }
.ce-app input.ce-check:checked, .ce-sheet input.ce-check:checked { border-color: var(--c-accent) !important; background: var(--c-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat !important; }

/* segmented control */
.ce-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--c-surface-3); max-width: 100%; overflow-x: auto; }
.ce-app .ce-seg button { height: 30px; padding: 0 16px; border-radius: 8px; color: var(--c-label); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s; }
.ce-app .ce-seg button:hover { background: rgba(255,255,255,.35); }
.ce-app .ce-seg button.ce-on { background: var(--c-surface); font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.05); }
.ce-seg .ce-count { margin-left: 6px; color: var(--c-label-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.ce-seg-lg { padding: 3px; border-radius: 12px; }
.ce-app .ce-seg-lg button { height: 34px; padding: 0 18px; border-radius: 9px; font-size: 14px; }

/* filter chips (dashboard) */
.ce-app .ce-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--c-surface); color: var(--c-label); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--c-line-2); transition: background .15s, box-shadow .15s; }
.ce-app .ce-chip:hover { background: var(--c-surface-2); }
.ce-app .ce-chip b { font-weight: 650; color: var(--c-label-3); font-variant-numeric: tabular-nums; }
.ce-app .ce-chip.ce-on { background: var(--c-label); color: var(--c-surface); box-shadow: none; }
.ce-app .ce-chip.ce-on b { color: inherit; opacity: .7; }
.ce-app .ce-chip:disabled { opacity: .45; cursor: default; }

/* ---------- toolbar ---------- */
.ce-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.ce-toolbar .ce-spec { margin-left: auto; }
.ce-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; font-size: 13px; margin-bottom: 12px; background: var(--c-accent-tint); color: var(--c-accent-text); }
.ce-banner.ce-fail { background: var(--c-red-tint); color: var(--c-red-text); }
.ce-banner.ce-wait { background: var(--c-orange-tint); color: var(--c-orange-text); }

/* ---------- summary strip (settings page) ---------- */
.ce-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.ce-stat { padding: 16px 20px; min-width: 0; position: relative; }
.ce-stat + .ce-stat::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: .5px; background: var(--c-line-2); }
.ce-stat-k { display: block; font-size: 12px; color: var(--c-label-2); }
.ce-stat-v { display: block; margin-top: 4px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-stat-n { display: block; margin-top: 2px; font-size: 12px; color: var(--c-label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-stat.ce-ok .ce-stat-v { color: var(--c-green-text); } .ce-stat.ce-wait .ce-stat-v { color: var(--c-orange-text); } .ce-stat.ce-fail .ce-stat-v { color: var(--c-red-text); }

/* ---------- grouped list rows ---------- */
.ce-list { display: flex; flex-direction: column; }
.ce-row { display: grid; align-items: center; gap: 14px; padding: 12px 18px; min-height: 56px; position: relative; }
.ce-row + .ce-row::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: .5px; background: var(--c-line); }
.ce-row.ce-inset + .ce-row::before, .ce-row + .ce-row.ce-inset::before { left: 64px; }
.ce-row:hover { background: var(--c-hover); }
.ce-row.ce-static:hover { background: transparent; }
.ce-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ce-cell > strong, .ce-cell > .ce-strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-cell > span, .ce-cell > small { font-size: 12px; color: var(--c-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-cell .ce-err { color: var(--c-red-text); white-space: normal; }
.ce-tags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; min-width: 0; }
.ce-acts { display: flex; gap: 2px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ce-avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 14px; font-weight: 650; color: #fff; background: linear-gradient(160deg, #8e8e93, #636366); }
.ce-avatar.ce-a1 { background: linear-gradient(160deg, #5ac8fa, #007aff); } .ce-avatar.ce-a2 { background: linear-gradient(160deg, #ffcc00, #ff9500); }
.ce-avatar.ce-a3 { background: linear-gradient(160deg, #64d2ff, #5856d6); } .ce-avatar.ce-a4 { background: linear-gradient(160deg, #30d158, #248a3d); }
.ce-avatar.ce-a5 { background: linear-gradient(160deg, #ff8a80, #ff3b30); } .ce-avatar.ce-a6 { background: linear-gradient(160deg, #da8fff, #af52de); }
.ce-state { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--c-surface-2); color: var(--c-label-3); }
.ce-state.ce-ok { background: var(--c-green-tint); color: var(--c-green-text); } .ce-state.ce-fail { background: var(--c-red-tint); color: var(--c-red-text); }
.ce-state.ce-wait { background: var(--c-orange-tint); color: var(--c-orange-text); } .ce-state.ce-info { background: var(--c-accent-tint); color: var(--c-accent-text); }
.ce-rate { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ce-rate .ce-down { color: var(--c-down); font-weight: 600; } .ce-rate .ce-up { color: var(--c-up); font-weight: 600; }
.ce-rate small { color: var(--c-label-3); font-size: 11.5px; }
.ce-progress { height: 6px; border-radius: 999px; background: var(--c-surface-3); overflow: hidden; }
.ce-progress i { display: block; height: 100%; border-radius: 999px; background: var(--c-accent); }
.ce-empty { padding: 44px 20px; text-align: center; color: var(--c-label-2); font-size: 13px; }
.ce-empty .ce-h3 { color: var(--c-label); margin-bottom: 4px; }

/* row layouts */
.ce-row-node { grid-template-columns: 34px minmax(170px, 1.4fr) minmax(150px, 1.2fr) 118px minmax(110px, .9fr) auto; }
.ce-row-device { grid-template-columns: 20px 34px minmax(160px, 1.4fr) 78px minmax(150px, 1fr) minmax(110px, .8fr) auto; }
.ce-row-job { grid-template-columns: 34px minmax(160px, 1.2fr) minmax(140px, 1fr) 120px auto; }
.ce-row-account { grid-template-columns: 34px minmax(160px, 1fr) auto auto; }
.ce-row-setting { grid-template-columns: minmax(0, 1fr) auto; min-height: 52px; }
.ce-row-setting .ce-input { width: 280px; text-align: right; background: transparent; box-shadow: none; padding-right: 0; color: var(--c-label-2); }
.ce-row-setting .ce-input:focus { text-align: left; padding: 0 12px; color: var(--c-label); }
.ce-row-add { grid-template-columns: 34px 1fr; color: var(--c-accent-text); cursor: pointer; font-weight: 600; }

/* ---------- sheets (LuCI .modal tagged by sheet()) ---------- */
#modal_overlay:has(> .ce-modal-host) { background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2); }
.modal.ce-modal-host { display: block; width: calc(100% - 32px); max-width: 540px; margin: 7vh auto 40px; padding: 0; border-radius: 22px !important; background: var(--c-surface); color: var(--c-label); box-shadow: var(--sh-sheet); overflow: hidden; animation: ce-sheet-in .22s cubic-bezier(.2,.8,.2,1); }
.modal.ce-modal-host.ce-wide { max-width: 720px; }
.modal.ce-modal-host > h4 { display: none; }
.modal.ce-modal-host > * { margin: 0; }
@keyframes ce-sheet-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.ce-sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 6px; }
.ce-sheet-head .ce-grow { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ce-sheet-title { font-size: 20px; font-weight: 700; letter-spacing: -.018em; line-height: 1.25; }
.ce-sheet-sub { font-size: 13px; color: var(--c-label-2); line-height: 1.5; }
.ce-app .ce-close, .ce-sheet .ce-close { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--c-surface-2); color: var(--c-label-2); cursor: pointer; flex: none; }
.ce-sheet .ce-close:hover { background: var(--c-surface-3); color: var(--c-label); }
.ce-sheet-body { padding: 14px 24px 8px; max-height: 62vh; overflow-y: auto; }
.ce-sheet-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px 20px; }
.ce-sheet-foot .ce-grow { font-size: 13px; color: var(--c-label-2); }
.ce-sheet-foot .ce-total { font-size: 22px; font-weight: 700; color: var(--c-label); font-variant-numeric: tabular-nums; margin: 0 3px; }
.ce-sheet .ce-group { background: var(--c-surface-2); border-radius: 14px; overflow: hidden; }
.ce-sheet .ce-group .ce-row:hover { background: transparent; }
.ce-sheet .ce-group .ce-row + .ce-row::before { background: var(--c-line-2); opacity: .7; }
.ce-sheet .ce-group .ce-input { background: var(--c-surface); }
.ce-sheet .ce-group-label { font-size: 12px; font-weight: 600; color: var(--c-label-2); margin: 16px 4px 6px; }
.ce-sheet .ce-group-label:first-child { margin-top: 0; }
.ce-sheet .ce-note { font-size: 12px; line-height: 1.6; color: var(--c-label-3); margin: 10px 4px 0; }
.ce-config { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--c-surface-2); margin-bottom: 14px; }
.ce-config .ce-grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ce-config strong { font-size: 14px; font-weight: 650; }
.ce-config span { font-size: 12px; color: var(--c-label-2); }
.ce-config .ce-price { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ce-config .ce-price small { font-size: 12px; font-weight: 500; color: var(--c-label-3); }
.ce-row-launch { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 10px 14px 10px 22px; }
/* Launch progress reuses the current server/account card and sheet materials. */
.ce-build-counts, .ce-build-filters, .ce-build-pagination, .ce-build-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ce-build-filters { margin: 10px 0; }
.ce-build-grid { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; max-height: 28vh; overflow-y: auto; padding: 2px; }
.ce-build-grid .ce-build-card { cursor: pointer; min-width: 0; box-shadow: inset 0 0 0 1px var(--c-line); }
.ce-build-card .ce-nc-top { padding: 12px 12px 8px; }
.ce-build-card .ce-nc-id > strong { font-size: 13px; }
.ce-build-card.ce-build-selected { box-shadow: inset 0 0 0 1.5px var(--c-accent); }
.ce-build-card:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.ce-build-card-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ce-build-ip { font-size: 14px; font-weight: 600; }
.ce-build-stage { font-size: 12px; color: var(--c-label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-build-clock { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ce-build-segments { display: flex; gap: 3px; margin: 4px 0; }
.ce-build-segments > i { height: 4px; flex: 1; border-radius: 99px; background: var(--c-surface-3); transition: background .2s; }
.ce-build-segments > .ce-build-segment-success { background: var(--c-green); }
.ce-build-segments > .ce-build-segment-running { background: var(--c-accent); }
.ce-build-segments > .ce-build-segment-error { background: var(--c-red); }
.ce-build-detail { margin-top: 14px; padding-top: 14px; box-shadow: inset 0 .5px 0 var(--c-line); }
.ce-build-detail:empty { display: none; }
.ce-build-detail-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.ce-build-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.ce-build-step { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 0; color: var(--c-label-3); font-size: 12px; }
.ce-build-step-name { flex: 1; }
.ce-build-step-dot { display: flex; align-items: center; justify-content: center; flex: none; width: 21px; height: 21px; border-radius: 50%; background: var(--c-surface-3); font-size: 11px; }
.ce-build-step-success .ce-build-step-dot { background: var(--c-green-tint); color: var(--c-green-text); }
.ce-build-step-running { color: var(--c-accent-text); }
.ce-build-step-running .ce-build-step-dot { box-shadow: inset 0 0 0 1.5px var(--c-accent); background: var(--c-accent-tint); }
.ce-build-step-error .ce-build-step-dot { color: var(--c-red-text); background: var(--c-red-tint); }
.ce-build-good { color: var(--c-green-text); } .ce-build-bad { color: var(--c-red-text); }
.ce-build-actions, .ce-build-pagination { margin-top: 10px; justify-content: flex-end; }
.ce-build-check { display: block; width: 28px; height: 28px; padding: 4px; border-radius: 50%; color: var(--c-green-text); background: var(--c-green-tint); animation: ce-build-pop .25s ease-out both; }
.ce-build-check path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 28; stroke-dashoffset: 28; animation: ce-build-tick .35s .1s ease-out forwards; }
@keyframes ce-build-tick { to { stroke-dashoffset: 0; } }
@keyframes ce-build-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.ce-build-card.ce-build-success { animation: ce-build-fade .22s var(--ce-build-exit-delay, 2780ms) ease-in forwards; }
@keyframes ce-build-fade { to { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ce-build-check path { stroke-dashoffset: 0; } }
@media (max-width: 540px) { .ce-build-steps { gap: 4px 10px; } .ce-build-step { gap: 5px; font-size: 11px; } .ce-build-grid { max-height: 20vh; } }
@media (max-width: 379px) { .ce-build-steps { grid-template-columns: minmax(0, 1fr); } .ce-build-grid { max-height: 16vh; } }
.ce-row-quote { grid-template-columns: minmax(90px, 1fr) minmax(120px, 1.1fr) 168px auto; padding: 10px 10px 10px 16px; }
.ce-row-quote.ce-best .ce-quote-price strong { color: var(--c-green-text); }
.ce-row-form { grid-template-columns: 110px minmax(0, 1fr); padding: 10px 14px; min-height: 52px; }
.ce-row-form > label { font-size: 13px; color: var(--c-label-2); }
.ce-quote-price { display: flex; align-items: baseline; justify-content: flex-end; gap: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ce-quote-price strong { font-size: 16px; font-weight: 700; }
.ce-quote-price small { color: var(--c-label-3); }
.ce-quote-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ce-quote-bar .ce-caption { margin-left: auto; color: var(--c-label-3); }

/* log */
.ce-log { max-height: 320px; overflow: auto; padding: 12px 18px; font-family: var(--f-mono); font-size: 11.5px; line-height: 1.7; color: var(--c-label-2); }
.ce-log div { overflow-wrap: anywhere; }
.ce-app details.ce-panel > summary { list-style: none; cursor: pointer; padding: 14px 18px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ce-app details.ce-panel > summary::-webkit-details-marker { display: none; }
.ce-app details.ce-panel[open] > summary { box-shadow: inset 0 -.5px 0 var(--c-line); }

/* ========== dashboard ========== */
.ce-overview { display: grid; grid-template-columns: 230px minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; }
.ce-ov-cell { padding: 20px 22px; min-width: 0; position: relative; }
.ce-ov-cell + .ce-ov-cell::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: .5px; background: var(--c-line-2); }
.ce-ring { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.ce-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ce-ring circle { fill: none; stroke-width: 14; }
.ce-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ce-ring-center strong { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ce-ring-center span { font-size: 12px; color: var(--c-label-2); }
.ce-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 14px; font-size: 12px; color: var(--c-label-2); }
.ce-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ce-legend b { color: var(--c-label); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; }
.ce-thru { display: flex; gap: 28px; flex-wrap: wrap; }
.ce-thru > div { display: flex; flex-direction: column; gap: 2px; }
.ce-thru span { font-size: 12px; color: var(--c-label-2); }
.ce-thru strong { font-size: 30px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; }
.ce-thru .ce-down strong { color: var(--c-down); } .ce-thru .ce-up strong { color: var(--c-up); }
.ce-area { width: 100%; height: 86px; display: block; margin-top: 12px; }
.ce-area .ce-a-down { fill: rgba(0,122,255,.14); stroke: var(--c-down); stroke-width: 1.6; }
.ce-area .ce-a-up { fill: rgba(175,82,222,.10); stroke: var(--c-up); stroke-width: 1.4; }
.ce-kv { display: flex; flex-direction: column; }
.ce-kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; }
.ce-kv > div + div { box-shadow: inset 0 .5px 0 var(--c-line); }
.ce-kv span { font-size: 13px; color: var(--c-label-2); white-space: nowrap; }
.ce-kv strong { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ce-kv small { display: block; font-size: 11.5px; color: var(--c-label-3); font-weight: 500; text-align: right; }
.ce-filters { display: flex; flex-direction: column; gap: 10px; padding: 14px 22px 18px; box-shadow: inset 0 .5px 0 var(--c-line); }
.ce-filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ce-filter-label { width: 34px; flex: none; font-size: 12px; color: var(--c-label-3); }
.ce-list-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 12px; }
.ce-search { position: relative; flex: 1 1 240px; max-width: 340px; }
.ce-search .ce-icon { position: absolute; left: 12px; top: 50%; margin-top: -8px; color: var(--c-label-3); }
.ce-app .ce-search input { width: 100%; height: 34px; padding: 0 14px 0 34px; border-radius: 10px; background: var(--c-surface); font-size: 13px; box-shadow: var(--sh-panel); }
.ce-app .ce-search input:focus { box-shadow: 0 0 0 1px var(--c-accent), 0 0 0 4px var(--c-accent-tint); }
.ce-list-tools .ce-caption { margin-left: auto; color: var(--c-label-3); }

/* node capsules */
.ce-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(700px, 1fr)); gap: 10px 14px; }
.ce-node { display: grid; grid-template-columns: minmax(150px, 1.3fr) 112px 78px 78px 74px 72px minmax(96px, 1fr); align-items: center; gap: 10px; min-height: 58px; padding: 8px 8px 8px 10px; border-radius: 999px; background: var(--c-surface); box-shadow: var(--sh-panel); transition: box-shadow .2s, transform .2s; min-width: 0; }
.ce-node:hover { box-shadow: var(--sh-raise); }
.ce-node.ce-fail { box-shadow: 0 0 0 1px rgba(255,59,48,.35), 0 6px 20px rgba(255,59,48,.06); }
.ce-node.ce-gone { opacity: .55; }
.ce-node-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ce-node-id > div { display: flex; flex-direction: column; min-width: 0; }
.ce-node-ip { font-family: var(--f-mono); font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-node-meta { font-size: 11.5px; color: var(--c-label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-node .ce-state { width: 40px; height: 40px; }
.ce-node .ce-tag { justify-self: start; }
.ce-metric { display: flex; flex-direction: column; min-width: 0; }
.ce-metric small { font-size: 10.5px; color: var(--c-label-3); line-height: 1.25; }
.ce-metric strong { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-metric.ce-m-down strong { color: var(--c-down); } .ce-metric.ce-m-up strong { color: var(--c-up); }
.ce-metric.ce-idle strong { color: var(--c-label-4); font-weight: 500; }
.ce-spark { width: 72px; height: 26px; display: block; }
.ce-spark polyline { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.ce-spark .ce-s-down { stroke: var(--c-down); } .ce-spark .ce-s-up { stroke: var(--c-up); opacity: .65; }
.ce-node-dev { display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; height: 42px; padding: 0 12px 0 5px; border-radius: 999px; background: var(--c-surface-2); font-size: 12.5px; font-weight: 500; }
.ce-node-dev .ce-avatar { width: 32px; height: 32px; font-size: 12px; }
.ce-node-dev > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-node-dev.ce-free { background: transparent; color: var(--c-label-3); justify-content: flex-end; padding-right: 14px; }
.ce-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--c-label-3); font-size: 12px; margin-top: 22px; padding: 0 6px; }

/* ---------- server cards (线路设置 · 云服务器) ---------- */
.ce-ncards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.ce-ncard { display: flex; flex-direction: column; background: var(--c-surface); border-radius: 18px; box-shadow: var(--sh-panel); overflow: hidden; transition: box-shadow .2s; min-width: 0; }
.ce-ncard:hover { box-shadow: var(--sh-raise); }
.ce-ncard.ce-fail { box-shadow: 0 0 0 1px rgba(255,59,48,.32), 0 6px 20px rgba(255,59,48,.06); }
.ce-ncard.ce-gone { opacity: .6; }
.ce-nc-top { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 14px 14px 10px; }
.ce-nc-id { display: flex; flex-direction: column; min-width: 0; }
.ce-nc-id strong { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-nc-id span { font-size: 12px; color: var(--c-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-nc-id.ce-nc-headline { flex-direction: row; align-items: baseline; gap: 7px; }
.ce-nc-headline .ce-nc-zone { flex: 0 1 auto; min-width: 0; }
.ce-nc-headline .ce-nc-address { flex: none; font-size: 14px; }
.ce-nc-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 14px; padding: 9px 0; border-radius: 12px; background: var(--c-surface-2); }
.ce-nc-m { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0 4px; position: relative; }
.ce-nc-m + .ce-nc-m::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: .5px; background: var(--c-line-2); }
.ce-nc-m small { font-size: 10.5px; color: var(--c-label-3); line-height: 1.3; }
.ce-nc-m strong { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ce-nc-m.ce-m-down strong { color: var(--c-down); } .ce-nc-m.ce-m-up strong { color: var(--c-up); }
.ce-nc-m.ce-idle strong { color: var(--c-label-4); font-weight: 500; }
.ce-nc-err { margin: 8px 14px 0; padding: 6px 10px; border-radius: 10px; background: var(--c-red-tint); color: var(--c-red-text); font-size: 12px; line-height: 1.45; }
.ce-nc-acts { display: flex; align-items: center; gap: 2px; height: 42px; padding: 0 6px 0 14px; margin-top: auto; box-shadow: inset 0 .5px 0 var(--c-line); }
.ce-nc-metrics + .ce-nc-acts, .ce-nc-err + .ce-nc-acts { margin-top: 12px; }
/* Device shares the action row: one line, truncated, full text on hover. */
.ce-nc-dev { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--c-label); }
.ce-nc-dev > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-nc-dev b { font-weight: 600; }
.ce-nc-dev .ce-mono { color: var(--c-label-2); font-size: 12px; margin-left: 6px; }
.ce-nc-dev .ce-dot { flex: none; }
.ce-nc-dev.ce-free { color: var(--c-label-3); }
.ce-nc-dev .ce-nc-device-name { flex: 0 1 auto; }
.ce-nc-dev .ce-nc-time { flex: none; font-size: 11.5px; color: var(--c-label-2); font-variant-numeric: tabular-nums; }
.ce-app .ce-nc-acts .ce-btn.ce-icon-btn { flex: none; width: 32px; height: 32px; padding: 0; border-radius: 10px; color: var(--c-label-2); }
.ce-app .ce-nc-acts .ce-btn.ce-icon-btn:hover { color: var(--c-accent-text); }
.ce-app .ce-nc-acts .ce-btn.ce-danger { color: var(--c-red-text); }
.ce-arm-text { display: none; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ce-arm.ce-armed .ce-arm-idle { display: none; }
.ce-app .ce-toolbar .ce-btn.ce-arm-label.ce-armed { background: var(--c-red); color: #fff; animation: ce-pop-in .2s cubic-bezier(.2,.8,.2,1); }
.ce-app .ce-toolbar .ce-chip-s.ce-picked { background: var(--c-accent-tint); color: var(--c-accent-text); box-shadow: none; font-weight: 600; }
.ce-app .ce-nc-acts .ce-btn.ce-arm.ce-armed { width: auto; padding: 0 10px; gap: 5px; background: var(--c-red); color: #fff; animation: ce-pop-in .2s cubic-bezier(.2,.8,.2,1); }
.ce-arm.ce-armed .ce-arm-text { display: inline; }
/* config dialog */
.ce-row-test { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 10px 14px 10px 18px; }
.ce-test-res .ce-tag { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-cfg-v { font-size: 13px; color: var(--c-label); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-app .ce-nc-acts .ce-btn.ce-text { height: 30px; padding: 0 9px; font-size: 12.5px; }

/* ---------- responsive: container queries on the plugin's own width ----------
   LuCI's sidebar makes the content much narrower than the window, so layouts
   follow the width of .ce-app itself, not the viewport. */
.ce-app { container: ceapp / inline-size; }
.ce-nodes { grid-template-columns: repeat(auto-fill, minmax(min(700px, 100%), 1fr)); }
.ce-row-device { grid-template-columns: 20px 34px minmax(150px, 1.3fr) minmax(150px, auto) minmax(150px, 1fr) auto; grid-template-areas: "check av main tags sel acts"; }
.ce-row-device .d-check { grid-area: check; } .ce-row-device .d-av { grid-area: av; } .ce-row-device .d-main { grid-area: main; }
.ce-row-device .d-tags { grid-area: tags; } .ce-row-device .d-sel { grid-area: sel; min-width: 0; } .ce-row-device .d-acts { grid-area: acts; }
.ce-row-device .d-sel .ce-select { width: 100%; }
.ce-row-job { grid-template-columns: 34px minmax(160px, 1.3fr) minmax(140px, 1fr) 150px auto; grid-template-areas: "icon main prog time acts"; }
.ce-row-job .j-icon { grid-area: icon; } .ce-row-job .j-main { grid-area: main; } .ce-row-job .j-prog { grid-area: prog; } .ce-row-job .j-time { grid-area: time; } .ce-row-job .j-acts { grid-area: acts; }

/* The four-tile summary strip only folds to 2×2 when the tiles get cramped. */
@container ceapp (max-width: 860px) {
  .ce-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-strip .ce-stat:nth-child(3)::before { display: none; }
  .ce-strip .ce-stat:nth-child(n+3) { box-shadow: inset 0 .5px 0 var(--c-line); }
}
@container ceapp (max-width: 1100px) {
  .ce-overview { grid-template-columns: 210px minmax(0, 1fr); }
  .ce-overview .ce-ov-cell:nth-child(3) { grid-column: 1 / -1; }
  .ce-overview .ce-ov-cell:nth-child(3)::before { left: 22px; right: 22px; top: 0; bottom: auto; width: auto; height: .5px; }
  .ce-kv { flex-direction: row; flex-wrap: wrap; gap: 0 28px; }
  .ce-kv > div + div { box-shadow: none; }
  .ce-row-device { grid-template-columns: 20px 34px minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "check av main sel" ". . tags acts"; row-gap: 8px; }
  .ce-row-job { grid-template-columns: 34px minmax(0, 1.3fr) minmax(0, 1fr); grid-template-areas: "icon main prog" ". time acts"; row-gap: 6px; }
}
@container ceapp (max-width: 700px) {
  .ce-hero { padding: 18px; border-radius: 18px; } .ce-title { font-size: 24px; }
  .ce-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-strip .ce-stat::before { display: none !important; }
  .ce-strip > :nth-child(3), .ce-strip > .ce-month { grid-column: 1 / -1; }
  .ce-strip .ce-stat:nth-child(n+3) { box-shadow: inset 0 .5px 0 var(--c-line); }
  .ce-stat-v { font-size: 20px; }
  .ce-overview { grid-template-columns: 1fr; }
  .ce-ov-cell + .ce-ov-cell::before { left: 22px; right: 22px; top: 0; bottom: auto; width: auto; height: .5px; }
  .ce-thru strong { font-size: 24px; }
  .ce-row-device { grid-template-columns: 34px minmax(0, 1fr); grid-template-areas: "av main" ". tags" ". sel" ". acts"; }
  .ce-row-device .d-check { display: none; }
  .ce-row-job { grid-template-columns: 34px minmax(0, 1fr); grid-template-areas: "icon main" ". prog" ". time" ". acts"; }
  .ce-row-account { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .ce-row-account .ce-acts { grid-column: 2 / -1; justify-content: flex-start; }
  .ce-acts { justify-content: flex-start; }
  .ce-row-setting .ce-input { width: 150px; }
  .ce-node { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id tag" "down up" "total dev"; border-radius: 22px; padding: 12px 14px; gap: 8px 12px; }
  .ce-node > :nth-child(1) { grid-area: id; } .ce-node > :nth-child(2) { grid-area: tag; justify-self: end; }
  .ce-node > :nth-child(3) { grid-area: down; } .ce-node > :nth-child(4) { grid-area: up; text-align: right; }
  .ce-node > :nth-child(5) { grid-area: total; } .ce-node > :nth-child(6) { display: none; } .ce-node > :nth-child(7) { grid-area: dev; height: 34px; }
  .ce-search { max-width: none; }
  .ce-toolbar .ce-spec { margin-left: 0; }
}
@media (max-width: 600px) {
  .modal.ce-modal-host { width: 100%; margin: 12vh 0 0; border-radius: 22px 22px 0 0 !important; }
  .ce-sheet-head { padding: 18px 18px 4px; } .ce-sheet-body { padding: 12px 18px 6px; } .ce-sheet-foot { padding: 12px 18px 18px; flex-wrap: wrap; }
  .ce-row-quote { grid-template-columns: minmax(0, 1fr) auto; }
  .ce-row-quote > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .ce-row-quote > :nth-child(4) { grid-column: 2; grid-row: 2; }
  .ce-row-form { grid-template-columns: 1fr; gap: 6px; }
}

/* controls sitting directly on Argon's grey canvas get the white panel material */
.ce-app .ce-toolbar .ce-btn:not(.ce-fill):not(.ce-tint):not(.ce-text):not(.ce-danger), .ce-app .ce-toolbar .ce-chip-s, .ce-app .ce-hero .ce-chip-s { background: var(--c-surface); box-shadow: var(--sh-panel); }
.ce-app .ce-toolbar .ce-btn:not(.ce-fill):not(.ce-tint):not(.ce-text):not(.ce-danger):hover { background: var(--c-surface-2); }
.ce-app .ce-hero .ce-chip-s { background: var(--c-surface-2); box-shadow: none; }
.ce-app .ce-hero a.ce-chip-s { background: var(--c-accent-tint); }
.ce-sheet .ce-group .ce-row-launch + .ce-row-launch::before { left: 22px; }

/* ---------- dashboard: one row of key tiles ---------- */
.ce-tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 10px; padding: 14px; }
.ce-tiles > .ce-month { grid-column: span 2; }
@container ceapp (max-width: 1180px) { .ce-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container ceapp (max-width: 620px) { .ce-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ce-tiles > .ce-month { grid-column: 1 / -1; } }
.ce-tile { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; border-radius: 14px; background: var(--c-surface-2); }
.ce-tile-text { display: flex; flex-direction: column; min-width: 0; }
.ce-tile-k { font-size: 12px; color: var(--c-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-tile-v { margin-top: 2px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.ce-tile-n { margin-top: 2px; font-size: 11.5px; color: var(--c-label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-tile-down .ce-tile-v { color: var(--c-down); } .ce-tile-up .ce-tile-v { color: var(--c-up); }
.ce-tile-task .ce-tile-v { color: var(--c-accent-text); } .ce-tile-err .ce-tile-v { color: var(--c-red-text); }
.ce-tile { overflow: hidden; }
.ce-mini-ring { width: 42px; height: 42px; flex: none; transform: rotate(-90deg); }
.ce-mini-ring circle { fill: none; stroke-width: 7; }
.ce-filters { box-shadow: inset 0 .5px 0 var(--c-line); }

/* Monthly bill only: keep the existing strip/tile, split its number by account. */
.ce-month.ce-tile { display: block; }
.ce-month > .ce-tile-k { display: block; }
.ce-month-columns { display: grid; gap: 6px; width: 100%; }
.ce-month-account { min-width: 0; }
.ce-month-value { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ce-month-value.ce-month-free { color: var(--c-green-text); }
.ce-month-value.ce-month-excess { color: var(--c-orange-text); }
.ce-month-value.ce-month-unknown { color: var(--c-label-3); }
.ce-month-columns:not(.ce-month-count-1) .ce-month-account { text-align: center; }
.ce-month-count-2 .ce-month-value { font-size: 20px; }
.ce-month-count-3 .ce-month-value { font-size: 17px; }
.ce-month-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-month-more { cursor: pointer; }
.ce-month-more:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.ce-month-value[data-stale="true"] { text-decoration: underline dotted var(--c-label-3); text-underline-offset: 4px; }
.ce-month-list { margin-top: 14px; max-height: 55vh; overflow-y: auto; }
.ce-month-row { display: flex; gap: 12px; align-items: center; }
.ce-month-list-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- dashboard: small capsules in a dense grid ---------- */
.ce-app .ce-nodes { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.ce-app .ce-node { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-height: 0; padding: 11px 14px 11px 16px; border-radius: 20px; grid-template-columns: none; grid-template-areas: none; }
.ce-cap-top { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ce-cap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-gray); }
.ce-cap-dot.ce-ok { background: var(--c-green); box-shadow: 0 0 0 3px var(--c-green-tint); }
.ce-cap-dot.ce-fail { background: var(--c-red); box-shadow: 0 0 0 3px var(--c-red-tint); }
.ce-cap-dot.ce-wait { background: var(--c-orange); box-shadow: 0 0 0 3px var(--c-orange-tint); }
.ce-cap-id { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ce-cap-id .ce-node-ip { font-size: 14px; flex: none; }
.ce-cap-id .ce-node-meta { font-size: 11.5px; }
.ce-app .ce-node .ce-tag { height: 22px; font-size: 11.5px; padding: 0 8px; }
.ce-cap-bot { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 7px 12px; border-radius: 12px; background: var(--c-surface-2); }
.ce-cap-m { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-cap-m.ce-m-down { color: var(--c-down); } .ce-cap-m.ce-m-up { color: var(--c-up); }
.ce-cap-m.ce-idle { color: var(--c-label-4); font-weight: 500; }
.ce-cap-dev { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--c-label); }
.ce-cap-dev > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-cap-dev.ce-free { color: var(--c-label-3); font-weight: 400; }

/* ---------- motion ----------
   Plays on user actions only (tab switch, filter, sort, search, open/close);
   the periodic data refresh re-renders without replaying anything. */
@keyframes ce-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ce-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ce-pop-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ce-sheet-out { to { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes ce-bump-k { 40% { transform: scale(1.22); } 100% { transform: none; } }
@keyframes ce-press { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: none; } }
.ce-app { animation: ce-fade .35s ease both; }
.ce-enter > * { animation: ce-rise .34s cubic-bezier(.2,.8,.2,1) both; }
.ce-enter > :nth-child(2) { animation-delay: .04s; } .ce-enter > :nth-child(3) { animation-delay: .08s; } .ce-enter > :nth-child(4) { animation-delay: .12s; } .ce-enter > :nth-child(n+5) { animation-delay: .16s; }
.ce-enter .ce-ncards > *, .ce-enter .ce-list > *, .ce-stagger > * { animation: ce-pop-in .32s cubic-bezier(.2,.8,.2,1) both; }
.ce-enter .ce-ncards > :nth-child(2), .ce-enter .ce-list > :nth-child(2), .ce-stagger > :nth-child(2) { animation-delay: .025s; }
.ce-enter .ce-ncards > :nth-child(3), .ce-enter .ce-list > :nth-child(3), .ce-stagger > :nth-child(3) { animation-delay: .05s; }
.ce-enter .ce-ncards > :nth-child(4), .ce-enter .ce-list > :nth-child(4), .ce-stagger > :nth-child(4) { animation-delay: .075s; }
.ce-enter .ce-ncards > :nth-child(5), .ce-enter .ce-list > :nth-child(5), .ce-stagger > :nth-child(5) { animation-delay: .1s; }
.ce-enter .ce-ncards > :nth-child(6), .ce-enter .ce-list > :nth-child(6), .ce-stagger > :nth-child(6) { animation-delay: .125s; }
.ce-enter .ce-ncards > :nth-child(7), .ce-enter .ce-list > :nth-child(7), .ce-stagger > :nth-child(7) { animation-delay: .15s; }
.ce-enter .ce-ncards > :nth-child(8), .ce-enter .ce-list > :nth-child(8), .ce-stagger > :nth-child(8) { animation-delay: .175s; }
.ce-enter .ce-ncards > :nth-child(n+9), .ce-enter .ce-list > :nth-child(n+9), .ce-stagger > :nth-child(n+9) { animation-delay: .2s; }
/* sliding highlight in segmented controls */
.ce-seg { position: relative; }
.ce-seg-thumb { position: absolute; top: 2px; bottom: 2px; left: 0; width: 0; border-radius: 8px; background: var(--c-surface); box-shadow: 0 3px 8px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.05); transition: left .34s cubic-bezier(.3,.7,.2,1), width .34s cubic-bezier(.3,.7,.2,1); pointer-events: none; }
.ce-seg-lg .ce-seg-thumb { top: 3px; bottom: 3px; border-radius: 9px; }
.ce-app .ce-seg button { position: relative; z-index: 1; }
.ce-app .ce-seg.ce-has-thumb button.ce-on { background: transparent; box-shadow: none; }
/* press feedback */
.ce-app .ce-btn, .ce-sheet .ce-btn, .ce-app .ce-chip, .ce-app .ce-seg button, .ce-sheet .ce-stepper button, .ce-app .ce-stepper button { transition: background .18s, color .18s, box-shadow .18s, opacity .18s, transform .12s cubic-bezier(.3,.7,.4,1); }
.ce-app .ce-chip:active, .ce-app .ce-seg button:active, .ce-sheet .ce-stepper button:active, .ce-app .ce-stepper button:active { transform: scale(.94); }
.ce-app .ce-chip.ce-pop-once { animation: ce-press .32s ease; }
.ce-app .ce-ncard, .ce-app .ce-node, .ce-app .ce-tile, .ce-app .ce-row { transition: box-shadow .2s, background .2s, transform .2s; }
.ce-app .ce-ncard:hover, .ce-app .ce-node:hover { transform: translateY(-1px); }
.ce-bump { animation: ce-bump-k .26s ease; }
/* sheets: open (ce-sheet-in, above) and close */
#modal_overlay { transition: opacity .18s ease; }
#modal_overlay.ce-closing { opacity: 0 !important; }
.modal.ce-modal-host.ce-closing { animation: ce-sheet-out .17s ease forwards; }
.ce-sheet.ce-fresh .ce-row-quote, .ce-sheet.ce-fresh .ce-row-launch { animation: ce-pop-in .3s cubic-bezier(.2,.8,.2,1) both; }
.ce-sheet.ce-fresh .ce-group .ce-list > :nth-child(2) { animation-delay: .03s; } .ce-sheet.ce-fresh .ce-group .ce-list > :nth-child(3) { animation-delay: .06s; }
.ce-sheet.ce-fresh .ce-group .ce-list > :nth-child(4) { animation-delay: .09s; } .ce-sheet.ce-fresh .ce-group .ce-list > :nth-child(n+5) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  .ce-app, .ce-app *, .ce-sheet, .ce-sheet *, .modal.ce-modal-host, #modal_overlay { animation: none !important; transition: none !important; }
}

/* ---------- devices: dense cards with selection ---------- */
.ce-dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 12px; }
.ce-dcard { display: flex; flex-direction: column; min-width: 0; background: var(--c-surface); border-radius: 18px; box-shadow: var(--sh-panel); transition: box-shadow .2s, transform .2s; }
.ce-dcard:hover { box-shadow: var(--sh-raise); }
.ce-dcard.ce-sel { box-shadow: 0 0 0 2px var(--c-accent), var(--sh-panel); }
.ce-dcard.ce-gone { opacity: .6; }
.ce-dc-top { display: grid; grid-template-columns: 20px 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.ce-dc-top .ce-avatar { width: 32px; height: 32px; font-size: 12.5px; }
.ce-dc-id { display: flex; flex-direction: column; min-width: 0; }
.ce-dc-id strong { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 600; }
.ce-dc-id strong > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-dc-id strong .ce-dot { flex: none; }
.ce-dc-id > .ce-mono { font-size: 12px; color: var(--c-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-dc-exit { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; margin: 0 14px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--c-surface-2); min-height: 44px; }
.ce-dc-exit small { font-size: 11.5px; color: var(--c-label-3); }
.ce-dc-exit .ce-select { width: 100%; height: 32px; }
.ce-dc-exit .ce-2 { font-size: 13px; }
.ce-dc-acts { display: flex; align-items: center; gap: 0; padding: 4px 6px; margin-top: 8px; box-shadow: inset 0 .5px 0 var(--c-line); }
.ce-app .ce-dc-acts .ce-btn.ce-text { height: 30px; padding: 0 9px; font-size: 12.5px; }
.ce-app .ce-dc-acts .ce-btn.ce-mute { color: var(--c-label-2); }
.ce-enter .ce-dcards > * { animation: ce-pop-in .32s cubic-bezier(.2,.8,.2,1) both; }
