:root {
  --fox-product-bg: #0b1015;
  --fox-product-surface: #111820;
  --fox-product-surface-raised: #16202a;
  --fox-product-surface-soft: #1a2530;
  --fox-product-line: #263542;
  --fox-product-line-strong: #344858;
  --fox-product-text: #f2f6fa;
  --fox-product-muted: #a5b3c1;
  --fox-product-subtle: #718293;
  --fox-product-action: #39d3ad;
  --fox-product-action-hover: #54e4c1;
  --fox-product-blue: #5c8dff;
  --fox-product-warn: #f1b957;
  --fox-product-danger: #ff6f82;
}

#fox-desktop-shell.is-product-polished,
#fox-desktop-shell.is-product-polished button,
#fox-desktop-shell.is-product-polished input,
#fox-desktop-shell.is-product-polished textarea,
#fox-desktop-shell.is-product-polished select {
  font-family: Bahnschrift, "Microsoft YaHei UI", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

@media (min-width: 900px) {
  #fox-desktop-shell.is-product-polished .fox-side {
    width: 224px;
    padding: 14px 10px 20px;
    border-right: 1px solid var(--fox-product-line);
    background: #0d1319;
    box-shadow: 14px 0 40px rgba(0, 0, 0, .16);
  }

  #fox-desktop-shell.is-product-polished .fox-workbench {
    left: 224px;
    padding: 0 28px 44px;
    background-color: var(--fox-product-bg);
    background-image:
      linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
    background-size: 32px 32px;
  }

  #fox-desktop-shell.is-product-polished.is-sidebar-collapsed .fox-side { width: 76px; }
  #fox-desktop-shell.is-product-polished.is-sidebar-collapsed .fox-workbench { left: 76px; }

  .fox-product-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 56px;
    margin: 0 4px 16px;
    padding: 0 10px;
    border-bottom: 1px solid var(--fox-product-line);
  }

  .fox-product-brand-mark {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: var(--fox-product-action);
    color: #07130f;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(57, 211, 173, .16);
  }

  .fox-product-brand-copy { display: grid; min-width: 0; gap: 1px; }
  .fox-product-brand-copy strong { color: var(--fox-product-text); font-size: 15px; }
  .fox-product-brand-copy small { color: var(--fox-product-subtle); font-size: 9px; letter-spacing: 1.1px; }

  #fox-desktop-shell.is-product-polished .fox-side-collapse {
    top: 25px;
    right: -15px;
    width: 30px;
    height: 30px;
    border-color: var(--fox-product-line-strong);
    border-radius: 50%;
    background: var(--fox-product-surface-raised);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  }

  #fox-desktop-shell.is-product-polished.is-sidebar-collapsed .fox-side-collapse { right: -15px; }
  #fox-desktop-shell.is-product-polished.is-sidebar-collapsed .fox-product-brand { justify-content: center; padding: 0; }
  #fox-desktop-shell.is-product-polished.is-sidebar-collapsed .fox-product-brand-copy { display: none; }

  #fox-desktop-shell.is-product-polished .fox-side-mark { display: none; }
  #fox-desktop-shell.is-product-polished .fox-side-item {
    position: relative;
    gap: 13px;
    width: 100%;
    height: 44px;
    margin: 3px 0;
    padding: 0 14px;
    border-radius: 6px;
    color: #aebbc8;
    font-size: 14px;
    transition: color .16s ease, background .16s ease;
  }

  #fox-desktop-shell.is-product-polished .fox-side-item:hover {
    background: #151f28;
    color: #f2f6fa;
  }

  #fox-desktop-shell.is-product-polished .fox-side-item:first-of-type:not(.is-active) { background: transparent; }
  #fox-desktop-shell.is-product-polished .fox-side-item.is-active {
    background: #17262a;
    color: #eafff9;
    box-shadow: none;
  }

  #fox-desktop-shell.is-product-polished .fox-side-item.is-active::before {
    content: "";
    position: absolute;
    left: -10px;
    width: 3px;
    height: 22px;
    border-radius: 0 3px 3px 0;
    background: var(--fox-product-action);
  }

  #fox-desktop-shell.is-product-polished .fox-side-item svg { width: 17px; height: 17px; stroke-width: 1.8; }
  #fox-desktop-shell.is-product-polished .fox-side-spacer { height: 15px; border-top: 1px solid var(--fox-product-line); margin: 12px 8px 0; }

  .fox-product-header {
    position: sticky;
    z-index: 18;
    top: 0;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(340px, 1fr);
    align-items: center;
    gap: 20px;
    min-height: 76px;
    margin: 0 -28px 24px;
    padding: 0 28px;
    border-bottom: 1px solid var(--fox-product-line);
    background: rgba(11, 16, 21, .94);
    backdrop-filter: blur(14px);
  }

  .fox-product-heading { display: grid; gap: 3px; }
  .fox-product-heading > span,
  .fox-pipeline-heading span {
    color: var(--fox-product-action);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.35px;
  }
  .fox-product-heading h1 { margin: 0; color: var(--fox-product-text); font-size: 20px; line-height: 1.2; }
  .fox-product-modes { display: flex; justify-content: center; }

  #fox-desktop-shell.is-product-polished .fox-modebar {
    position: static;
    width: auto;
    margin: 0;
    padding: 3px;
    border: 1px solid var(--fox-product-line);
    border-radius: 7px;
    background: #0f161d;
    box-shadow: none;
  }

  #fox-desktop-shell.is-product-polished .fox-mode {
    min-width: 74px;
    height: 32px;
    border: 0;
    border-radius: 5px;
    color: #90a0af;
    font-size: 12px;
  }
  #fox-desktop-shell.is-product-polished .fox-mode.is-active { background: #203038; color: #eafff9; box-shadow: none; }
  #fox-desktop-shell.is-product-polished .fox-mode.is-active svg { color: var(--fox-product-action); }

  .fox-product-header-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
  .fox-product-health { display: inline-flex; align-items: center; gap: 7px; color: #a8b7c5; font-size: 11px; white-space: nowrap; }
  .fox-product-health i { width: 7px; height: 7px; border-radius: 50%; background: var(--fox-product-action); box-shadow: 0 0 0 4px rgba(57, 211, 173, .1); }
  .fox-product-health b { font-weight: 500; }
  .fox-product-health.is-error i { background: var(--fox-product-danger); box-shadow: 0 0 0 4px rgba(255, 111, 130, .1); }

  #fox-desktop-shell.is-product-polished .fox-top-actions { position: static; display: flex; gap: 7px; }
  #fox-desktop-shell.is-product-polished .fox-top-actions button,
  #fox-desktop-shell.is-product-polished .fox-top-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--fox-product-line);
    border-radius: 5px;
    background: #111920;
    color: #aab8c5;
    font-size: 11px;
    text-decoration: none;
  }
  #fox-desktop-shell.is-product-polished .fox-top-actions button:hover,
  #fox-desktop-shell.is-product-polished .fox-top-actions a:hover { border-color: #456071; color: #fff; }

  .fox-product-user { display: flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid var(--fox-product-line); }
  .fox-product-user > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #263646; color: #fff; font-size: 12px; font-weight: 700; }
  .fox-product-user div { display: grid; gap: 1px; }
  .fox-product-user strong { max-width: 90px; overflow: hidden; color: #e9eff5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .fox-product-user small { color: var(--fox-product-subtle); font-size: 9px; }

  .fox-pipeline-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 13px;
  }
  .fox-pipeline-heading > div { display: grid; gap: 4px; }
  .fox-pipeline-heading strong { color: var(--fox-product-text); font-size: 17px; }
  .fox-pipeline-heading small { color: var(--fox-product-subtle); font-size: 11px; }

  #fox-desktop-shell.is-product-polished .fox-project-strip {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
    min-width: 0;
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid var(--fox-product-line);
    border-radius: 7px;
    background: rgba(17, 24, 32, .88);
    color: #a7b5c3;
    font-size: 11px;
  }
  #fox-desktop-shell.is-product-polished .fox-project-strip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #fox-desktop-shell.is-product-polished #fox-api-status { color: #a9e9d8; }

  #fox-desktop-shell.is-product-polished .fox-step-strip {
    min-width: 0;
    grid-template-columns: repeat(7, minmax(100px, 1fr));
    gap: 6px;
    margin-bottom: 14px;
  }
  #fox-desktop-shell.is-product-polished .fox-step-pill {
    min-height: 43px;
    padding: 7px 9px;
    border: 1px solid var(--fox-product-line);
    border-radius: 6px;
    background: #111820;
    color: #9faebb;
    font-size: 11px;
  }
  #fox-desktop-shell.is-product-polished .fox-step-pill::before { background: #40505e; box-shadow: none; }
  #fox-desktop-shell.is-product-polished .fox-step-pill.is-done { border-color: rgba(57, 211, 173, .32); background: #13231f; color: #d8fff4; }
  #fox-desktop-shell.is-product-polished .fox-step-pill.is-done::before { background: var(--fox-product-action); }
  #fox-desktop-shell.is-product-polished .fox-step-pill.is-running,
  #fox-desktop-shell.is-product-polished .fox-step-pill.is-queued { border-color: rgba(92, 141, 255, .38); background: #151f30; color: #e0e9ff; }

  #fox-desktop-shell.is-product-polished .fox-grid {
    grid-template-columns: minmax(330px, .82fr) minmax(330px, .82fr) minmax(500px, 1.28fr);
    gap: 14px;
    min-width: 0;
  }
  #fox-desktop-shell.is-product-polished .fox-col { gap: 14px; }
  #fox-desktop-shell.is-product-polished .fox-bottom-row { gap: 14px; }

  #fox-desktop-shell.is-product-polished .fox-flow-card {
    overflow: hidden;
    border: 1px solid var(--fox-product-line);
    border-radius: 8px;
    background: rgba(17, 24, 32, .96);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
    animation: fox-product-reveal .32s ease both;
  }
  #fox-desktop-shell.is-product-polished .fox-flow-card:hover { border-color: #355064; box-shadow: 0 16px 34px rgba(0, 0, 0, .2); }
  #fox-desktop-shell.is-product-polished .fox-col:nth-child(2) .fox-flow-card { animation-delay: .05s; }
  #fox-desktop-shell.is-product-polished .fox-col:nth-child(3) .fox-flow-card { animation-delay: .1s; }

  #fox-desktop-shell.is-product-polished .fox-card-head {
    height: 54px;
    padding: 0 16px;
    border-bottom: 1px solid var(--fox-product-line);
    background: #151d25;
  }
  #fox-desktop-shell.is-product-polished .fox-card-title { gap: 9px; font-size: 14px; }
  #fox-desktop-shell.is-product-polished .fox-card-title strong { color: #edf3f8; font-weight: 650; }
  #fox-desktop-shell.is-product-polished .fox-card-icon {
    width: 31px;
    height: 31px;
    border: 1px solid #31584e;
    border-radius: 6px;
    background: #173229;
    color: var(--fox-product-action);
    box-shadow: none;
  }
  #fox-desktop-shell.is-product-polished .fox-card-icon svg { width: 16px; height: 16px; }
  #fox-desktop-shell.is-product-polished .fox-card-link { color: #85a9ff; font-size: 11px; }
  #fox-desktop-shell.is-product-polished .fox-card-body { padding: 16px; }

  #fox-desktop-shell.is-product-polished .fox-card-body label { margin: 13px 0 7px; color: #bdc9d4; font-size: 11px; font-weight: 650; }
  #fox-desktop-shell.is-product-polished .fox-flow-card input,
  #fox-desktop-shell.is-product-polished .fox-flow-card select,
  #fox-desktop-shell.is-product-polished .fox-flow-card textarea {
    border: 1px solid #30404d;
    border-radius: 6px;
    background: #0d141a;
    color: #eef4f8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .015);
    transition: border-color .16s ease, box-shadow .16s ease;
  }
  #fox-desktop-shell.is-product-polished .fox-flow-card input,
  #fox-desktop-shell.is-product-polished .fox-flow-card select { height: 40px; }
  #fox-desktop-shell.is-product-polished .fox-flow-card textarea { min-height: 176px; padding: 12px; line-height: 1.65; }
  #fox-desktop-shell.is-product-polished .fox-flow-card input::placeholder,
  #fox-desktop-shell.is-product-polished .fox-flow-card textarea::placeholder { color: #788997; }
  #fox-desktop-shell.is-product-polished .fox-flow-card input:focus,
  #fox-desktop-shell.is-product-polished .fox-flow-card select:focus,
  #fox-desktop-shell.is-product-polished .fox-flow-card textarea:focus { border-color: var(--fox-product-action); box-shadow: 0 0 0 3px rgba(57, 211, 173, .1); }

  #fox-desktop-shell.is-product-polished .fox-mini-tabs { gap: 24px; margin: 0 0 16px; color: #8fa0af; font-size: 12px; }
  #fox-desktop-shell.is-product-polished .fox-mini-tabs span { padding-bottom: 9px; }
  #fox-desktop-shell.is-product-polished .fox-mini-tabs .is-active { color: #f1f7f5; border-color: var(--fox-product-action); }

  #fox-desktop-shell.is-product-polished .fox-gradient,
  #fox-desktop-shell.is-product-polished .fox-manager-primary {
    min-height: 38px;
    border: 1px solid var(--fox-product-action) !important;
    border-radius: 6px;
    background: var(--fox-product-action) !important;
    color: #071510 !important;
    font-weight: 750;
    box-shadow: none;
  }
  #fox-desktop-shell.is-product-polished .fox-gradient:hover,
  #fox-desktop-shell.is-product-polished .fox-manager-primary:hover { border-color: var(--fox-product-action-hover) !important; background: var(--fox-product-action-hover) !important; }
  #fox-desktop-shell.is-product-polished .fox-secondary,
  #fox-desktop-shell.is-product-polished .fox-icon-btn,
  #fox-desktop-shell.is-product-polished .fox-checks button {
    border: 1px solid #344653;
    border-radius: 6px;
    background: #17212a;
    color: #c7d2dc;
  }
  #fox-desktop-shell.is-product-polished .fox-warn { border-radius: 6px; background: #40331d; color: #ffd58a; box-shadow: none; }

  #fox-desktop-shell.is-product-polished .fox-result,
  #fox-desktop-shell.is-product-polished .fox-empty,
  #fox-desktop-shell.is-product-polished .fox-preview {
    border-color: #30404d;
    border-radius: 6px;
    background: #0d141a;
    color: #a8b6c3;
  }
  #fox-desktop-shell.is-product-polished .fox-empty strong,
  #fox-desktop-shell.is-product-polished .fox-preview strong { color: #dbe4eb; }
  #fox-desktop-shell.is-product-polished .fox-module-note { border-color: #30404d; border-radius: 6px; background: #141e26; color: #c4d0da; }
  #fox-desktop-shell.is-product-polished .fox-module-note span { color: #a8b6c3; }
  #fox-desktop-shell.is-product-polished .fox-module-note.is-ready strong { background: #173229; color: #8df0d5; }
  #fox-desktop-shell.is-product-polished .fox-module-note.is-queued strong { background: #202e48; color: #a9c0ff; }
  #fox-desktop-shell.is-product-polished .fox-module-note.is-pending strong { background: #3d2e1b; color: #ffd18a; }

  #fox-desktop-shell.is-product-polished .fox-switch.is-on { background: var(--fox-product-action); }
  #fox-desktop-shell.is-product-polished .fox-radio.is-on span { border-color: var(--fox-product-action); background: var(--fox-product-action); }

  #fox-desktop-shell.is-product-polished .fox-manager-view { background: var(--fox-product-bg); color: var(--fox-product-text); }
  #fox-desktop-shell.is-product-polished .fox-manager-header { border-color: var(--fox-product-line); }
  #fox-desktop-shell.is-product-polished .fox-manager-header p { color: var(--fox-product-action); }
  #fox-desktop-shell.is-product-polished .fox-manager-header span { color: var(--fox-product-muted); }
  #fox-desktop-shell.is-product-polished .fox-manager-panel,
  #fox-desktop-shell.is-product-polished .fox-task-summary > div { border-color: var(--fox-product-line); background: var(--fox-product-surface); box-shadow: 0 12px 28px rgba(0,0,0,.13); }
  #fox-desktop-shell.is-product-polished .fox-asset-card,
  #fox-desktop-shell.is-product-polished .fox-avatar-card,
  #fox-desktop-shell.is-product-polished .fox-material-card,
  #fox-desktop-shell.is-product-polished .fox-template-card,
  #fox-desktop-shell.is-product-polished .fox-task-row,
  #fox-desktop-shell.is-product-polished .fox-project-task { border-color: var(--fox-product-line); background: #0e151b; }
  #fox-desktop-shell.is-product-polished .fox-voice-avatar { border-radius: 6px; background: #173229; color: var(--fox-product-action); }
  #fox-desktop-shell.is-product-polished .fox-manager-view .is-primary { background: #244d42 !important; color: #cffff1 !important; box-shadow: none; }
  #fox-desktop-shell.is-product-polished .fox-manager-actions button,
  #fox-desktop-shell.is-product-polished .fox-card-actions button,
  #fox-desktop-shell.is-product-polished .fox-template-card button,
  #fox-desktop-shell.is-product-polished .fox-avatar-card button { border-color: #344653; background: #17212a; }
  #fox-desktop-shell.is-product-polished .fox-progress i { background: var(--fox-product-action); }
}

@media (min-width: 900px) and (max-width: 1450px) {
  #fox-desktop-shell.is-product-polished .fox-product-header { grid-template-columns: minmax(170px, 1fr) auto auto; }
  #fox-desktop-shell.is-product-polished .fox-product-header-right { display: flex; }
  #fox-desktop-shell.is-product-polished .fox-product-health,
  #fox-desktop-shell.is-product-polished .fox-product-user { display: none; }
  #fox-desktop-shell.is-product-polished .fox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #fox-desktop-shell.is-product-polished .fox-col-wide { grid-column: 1 / -1; }
  #fox-desktop-shell.is-product-polished .fox-step-strip { overflow-x: auto; grid-template-columns: repeat(7, minmax(130px, 1fr)); }
}

@media (max-width: 899px) {
  #fox-desktop-shell.is-product-polished .fox-product-brand { display: none; }
  #fox-desktop-shell.is-product-polished .fox-workbench {
    padding-bottom: 76px;
    background-color: var(--fox-product-bg);
    background-image: none;
  }
  #fox-desktop-shell.is-product-polished .fox-product-header {
    position: sticky;
    z-index: 18;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 62px;
    padding: 0 14px;
    border-bottom: 1px solid var(--fox-product-line);
    background: rgba(11, 16, 21, .96);
  }
  #fox-desktop-shell.is-product-polished .fox-product-heading > span { display: none; }
  #fox-desktop-shell.is-product-polished .fox-product-heading h1 { font-size: 17px; }
  #fox-desktop-shell.is-product-polished .fox-product-header-right { display: none; }
  #fox-desktop-shell.is-product-polished .fox-modebar { position: static; margin: 0; transform: none; }
  #fox-desktop-shell.is-product-polished .fox-mode { min-width: 38px; padding: 0 8px; }
  #fox-desktop-shell.is-product-polished .fox-mode span { display: none; }
  #fox-desktop-shell.is-product-polished .fox-pipeline-heading { padding: 16px 12px 0; margin-bottom: 10px; }
  #fox-desktop-shell.is-product-polished .fox-pipeline-heading strong { font-size: 15px; }
  #fox-desktop-shell.is-product-polished .fox-project-strip { margin: 0 12px 10px; padding: 9px 10px; border-color: var(--fox-product-line); background: var(--fox-product-surface); }
  #fox-desktop-shell.is-product-polished .fox-project-strip span:last-child { display: none; }
  #fox-desktop-shell.is-product-polished .fox-step-strip { margin: 0 12px 12px; }
  #fox-desktop-shell.is-product-polished .fox-grid { padding: 0 12px 18px !important; gap: 12px; }
  #fox-desktop-shell.is-product-polished .fox-flow-card { border-color: var(--fox-product-line); background: var(--fox-product-surface); box-shadow: none; }
  #fox-desktop-shell.is-product-polished .fox-card-head { height: 50px; padding: 0 13px; background: #151d25; }
  #fox-desktop-shell.is-product-polished .fox-card-body { padding: 14px; }
  #fox-desktop-shell.is-product-polished .fox-flow-card input,
  #fox-desktop-shell.is-product-polished .fox-flow-card select,
  #fox-desktop-shell.is-product-polished .fox-flow-card textarea { border-color: #30404d; background: #0d141a; }
  #fox-desktop-shell.is-product-polished .fox-manager-view { padding-top: 18px; background: var(--fox-product-bg); }
}

@keyframes fox-product-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #fox-desktop-shell.is-product-polished *,
  #fox-desktop-shell.is-product-polished *::before,
  #fox-desktop-shell.is-product-polished *::after { animation: none !important; transition: none !important; }
}
