/* 守护火花 · warm light, living embers. Activated only by the client runtime. */
body.guard-spark-ui {
  --spark-paper: #fffaf4;
  --spark-ink: #193638;
  --spark-muted: #7c8981;
  --spark-ember: #ed6b43;
  --spark-amber: #edaa58;
  --spark-line: #eadfd3;
  --el-color-primary: #d95c35;
  --el-color-primary-light-3: #e58a6b;
  --el-color-primary-light-5: #edb09a;
  --el-color-primary-light-7: #f6d5c6;
  --el-color-primary-light-8: #fae5d9;
  --el-color-primary-light-9: #fff1e8;
  --el-color-primary-dark-2: #bc4827;
  background: var(--spark-paper);
  color: var(--spark-ink);
  isolation: isolate;
}
body.guard-spark-ui #app { position: relative; z-index: 1; }
body.guard-spark-ui .guard-spark-backdrop {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse at 87% 8%, #ffcba74d 0, transparent 42%),
    radial-gradient(ellipse at 24% 61%, #fff0d56b 0, transparent 43%),
    radial-gradient(ellipse at 97% 96%, #cfdfd92b 0, transparent 36%), #fffaf4;
}
body.guard-spark-ui .guard-spark-ambient { display: block; width: 100%; height: 100%; opacity: .75; pointer-events: none; }
body.guard-spark-ui .layout-container {
  --brand: #d95c35; --brand-hover: #bc4827; --brand-light: #fff1e8;
  --brand-tint: #fff5ec; --brand-tint-border: #f2d9c8; --brand-pressed: #a93f23;
  --brand-shadow: #e9874810; --brand-shadow-strong: #e9874820;
  --page-bg: transparent; --card-border: #eadfd3; --card-shadow: 0 6px 22px #74533a05;
  background: transparent !important;
}
body.guard-spark-ui .layout-container .main-content { background: transparent; }
body.guard-spark-ui .layout-container .topbar {
  background: #fffaf4d9; border-bottom-color: #eadfd3aa; backdrop-filter: blur(16px);
}
body.guard-spark-ui .layout-container .sidebar {
  background: linear-gradient(180deg, #183537, #1c3939 65%, #23413e);
  border-right: 1px solid #37514d;
}
body.guard-spark-ui .layout-container .sidebar .user-info { background: #ffffff06; border-color: #54716a66; }
body.guard-spark-ui .layout-container .sidebar .nav-item.active {
  background: linear-gradient(100deg, #f6a86c22, #f6a86c09); border-color: #d7b08c42; color: #fff4e9;
}
body.guard-spark-ui .layout-container .sidebar .nav-item.active .nav-icon { color: #ffb381; }
body.guard-spark-ui .layout-container .guard-sidebar-brand img { filter: drop-shadow(0 0 12px #f2a86924); }
body.guard-spark-ui .layout-container .content-wrapper :is(.accounts-page,.scheduled-tasks-page,.tasks-page,.packages-page,.orders-page,.agent-cards-page,.logs-page) {
  --brand: #d95c35; --brand-hover: #bc4827; --brand-light: #fff1e8; --brand-tint: #fff4eb;
  --brand-tint-border: #f1ddcf; --brand-shadow: #ed6b4310; --page-bg: transparent;
  --card-border: #eadfd3; --text-strong: #193638; --text-muted: #7c8981;
}
body.guard-spark-ui .layout-container .content-wrapper :is(.page-header,.header-card) {
  position: relative; isolation: isolate; border-color: #eedfd0;
  background: linear-gradient(115deg, #fffefa 8%, #fff9f2 62%, #fff0e0 100%);
  box-shadow: 0 5px 24px #925d3205; border-radius: 20px;
}
body.guard-spark-ui .layout-container .content-wrapper :is(.page-header,.header-card) h1 {
  color: #193638; letter-spacing: -.035em;
}
body.guard-spark-ui .guard-spark-page-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; border-radius: inherit;
  background: radial-gradient(ellipse at 90% 20%, #ffc99340, transparent 43%);
}
body.guard-spark-ui .layout-container .content-wrapper :is(.account-card,.task-card,.package-card,.stat-card,.table-card,.table-container,.content-card,.card-section),
body.guard-spark-ui .layout-container :is(.sg-dash-panel,.sg-dash-metric) {
  border-color: #eadfd3; border-radius: 18px; background-color: #fffefd;
  box-shadow: 0 4px 21px #80562f05;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
body.guard-spark-ui .layout-container .content-wrapper :is(.filter-bar,.filter-card,.search-bar,.search-card) {
  border-color: #eee4d9; background: #fffdf9; border-radius: 15px;
}
body.guard-spark-ui .layout-container .content-wrapper .account-card::after {
  background: radial-gradient(circle, #f3ba7d24 0, #f4d3a50d 42%, transparent 70%);
}
body.guard-spark-ui .layout-container .content-wrapper .action-btn.gradient {
  background: linear-gradient(130deg, #ef8357, #d95c35); color: #fff; border-color: #d96a43;
}
body.guard-spark-ui .layout-container .content-wrapper :is(.empty-state,.empty-container) {
  border-color: #e8d7c5; background: #fffdf9;
}
body.guard-spark-ui .layout-container .content-wrapper .page-header .header-icon,
body.guard-spark-ui .layout-container .content-wrapper :is(.title-icon,.page-icon) {
  background: #fff0e3 !important; color: #cf7047 !important;
}
body.guard-spark-ui .layout-container .el-button--primary:not(.is-link):not(.is-text):not(.is-plain),
body.guard-spark-ui .layout-container .content-wrapper > :not(.sg-dashboard) .el-button--primary:not(.is-link):not(.is-text):not(.is-plain) {
  --el-button-bg-color: #d95c35; --el-button-border-color: #d95c35;
  background: linear-gradient(130deg, #ef8357, #d95c35) !important;
  border-color: #d96a43 !important; color: #fff !important;
  box-shadow: 0 5px 12px #d75d3515 !important;
}
body.guard-spark-ui .layout-container .el-button--primary.is-plain {
  --el-button-text-color: #ba532e; --el-button-bg-color: #fff2e8; --el-button-border-color: #efcdb5;
}
body.guard-spark-ui .layout-container .sg-dash-hero {
  background: linear-gradient(115deg, #fff2e3 0, #fff6ec 48%, #ffe9ce 100%);
  border-color: #f0d9c0; border-radius: 24px; box-shadow: 0 10px 36px #a7753a06;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 32%);
}
body.guard-spark-ui .layout-container .sg-dash-hero h1 span { color: #d5653f; }
body.guard-spark-ui .layout-container .sg-dash-date { color: #9c7c60; }
body.guard-spark-ui .layout-container .sg-dash-hero-art { min-height: 230px; }
body.guard-spark-ui .layout-container .sg-dash-hero-art > :not(.guard-hearth) { display: none !important; }
body.guard-spark-ui .layout-container .sg-dash-metric-top svg { color: #c58257; }
body.guard-spark-ui .layout-container .sg-dash-shortcut-grid button {
  background: linear-gradient(125deg, #fffaf3, #fffdf9); border-color: #f0e3d6; border-radius: 14px;
}
body.guard-spark-ui .layout-container .sg-dash-shortcut-grid button > svg { color: #c47b4e; }
body.guard-spark-ui .layout-container .sg-dash-membership {
  background: radial-gradient(ellipse at 100% 0, #d3ab6840, transparent 70%), linear-gradient(145deg, #193c39, #234a42);
  border: 1px solid #58776340; box-shadow: 0 8px 26px #1d3f3710; border-radius: 19px;
}
body.guard-spark-ui .layout-container .sg-dash-section-heading h2 { color: #213d3c; }
body.guard-spark-ui .layout-container .sg-dash-activity-icon { background: #fff1e4; color: #bd8055; }
body.guard-spark-ui .layout-container .sg-dash-activity-icon.danger { background: #fbefeb; color: #ba654f; }
body.guard-spark-ui .layout-container .sg-dash-activity-icon.warning { background: #faf4e6; color: #b78931; }
body.guard-spark-ui .layout-container .sg-dash-activity-icon.info { background: #edf2f2; color: #728b8c; }
body.guard-spark-ui .layout-container .guard-mobile-nav { background: #fffdf8f5; border-color: #e9dfd2; box-shadow: 0 -7px 26px #8e6b3a06; }
body.guard-spark-ui .layout-container .guard-mobile-nav-item.active { background: #ffeddd; color: #b95e35; }
body.guard-spark-ui .layout-container .guard-mobile-nav-item.active .guard-mobile-icon { color: #cf7143; }
body.guard-spark-ui .layout-container .guard-mobile-more { background: #fffaf3; border-color: #eadfd0; }
body.guard-spark-ui .layout-container .guard-mobile-more-link { border-color: #eee3d6; background: #fffefb; }
body.guard-spark-ui .layout-container .guard-mobile-more-link.active { border-color: #e9c4a5; background: #fff1e4; }
body.guard-spark-ui .layout-container .el-button:focus-visible,
body.guard-spark-ui .layout-container .sg-dash-metric:focus-visible,
body.guard-spark-ui :is(.guard-hearth-flame,.guard-header-spark,.guard-motion-toggle):focus-visible {
  outline: 2px solid #c7633b; outline-offset: 4px;
}

/* A small hearth is the visual anchor; the canvas never intercepts an action. */
body.guard-spark-ui .guard-hearth { width: 100%; max-width: 290px; margin: 0 auto; position: relative; text-align: center; }
body.guard-spark-ui .guard-hearth-stage {
  width: 230px; height: 210px; max-width: 100%; position: relative; margin: 0 auto; isolation: isolate;
  display: flex; align-items: center; justify-content: center;
}
body.guard-spark-ui .guard-hearth-stage::before {
  content: ""; position: absolute; inset: 19px 25px 13px; border-radius: 50%; z-index: -1;
  background: radial-gradient(ellipse, #ffb95c45 0, #ffd7a82b 36%, transparent 72%);
  animation: guard-hearth-aura 4.8s ease-in-out infinite alternate;
}
body.guard-spark-ui .guard-hearth-stage::after {
  content: ""; position: absolute; bottom: 13px; left: 50%; width: 106px; height: 15px;
  background: #c0773b14; border-radius: 50%; transform: translateX(-50%); filter: blur(6px); z-index: -1;
}
body.guard-spark-ui .guard-hearth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
body.guard-spark-ui .guard-hearth-flame {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 126px; height: 150px; padding: 15px; border: 1px solid #fff8edbd; border-radius: 55% 55% 43% 43%;
  background: linear-gradient(145deg, #fffef8ba, #fff2dc52); color: #ef7545; cursor: pointer;
  box-shadow: inset 0 1px 0 #fffef6, 0 8px 30px #bc7f3b10;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform .32s cubic-bezier(.2,.7,.2,1), box-shadow .32s ease, background .32s ease;
  rotate: var(--guard-flame-lean, 0deg);
}
body.guard-spark-ui .guard-hearth-flame > svg {
  display: block; width: 78px; height: 105px; overflow: visible;
  filter: drop-shadow(0 5px 13px #ed7d3c2b);
  transform-origin: 50% 85%; animation: guard-flame-sway 3.8s ease-in-out infinite alternate;
}
body.guard-spark-ui .guard-flame-outer { transform-origin: 50% 88%; animation: guard-flame-breathe 2.8s ease-in-out infinite alternate; }
body.guard-spark-ui .guard-flame-inner { transform-origin: 50% 90%; animation: guard-flame-breathe 2s -.7s ease-in-out infinite alternate; }
body.guard-spark-ui .guard-hearth-orbit,
body.guard-spark-ui .guard-hearth-orbit-two {
  pointer-events: none; position: absolute; inset: 35px 6px 34px; border: 1px solid #da9c583b; border-radius: 50%;
  transform: rotate(-24deg); z-index: -1;
}
body.guard-spark-ui .guard-hearth-orbit::after,
body.guard-spark-ui .guard-hearth-orbit-two::after {
  content: ""; display: block; position: absolute; left: 20px; top: 9px; width: 6px; height: 6px; border-radius: 50%;
  background: #e7a563; box-shadow: 0 0 0 5px #f3bc7b13;
}
body.guard-spark-ui .guard-hearth-orbit-two { inset: 21px 36px 14px; transform: rotate(31deg); border-style: dashed; border-color: #bc9b6e29; }
body.guard-spark-ui .guard-hearth-orbit-two::after { left: auto; right: 4px; top: 35px; width: 4px; height: 4px; background: #e68961; }
body.guard-spark-ui .guard-hearth-caption { margin: 6px 0 0; font-size: 11px; letter-spacing: .08em; line-height: 1.7; color: #a27c5d; }
body.guard-spark-ui .guard-hearth.is-ignited .guard-hearth-flame,
body.guard-spark-ui .guard-hearth-flame.is-ignited { transform: translateY(-3px) scale(1.05); box-shadow: inset 0 1px 0 #fff, 0 0 36px #ef9b4033; }
body.guard-spark-ui .guard-hearth.is-burst .guard-hearth-flame,
body.guard-spark-ui .guard-hearth-flame.is-burst { animation: guard-hearth-ignite .65s cubic-bezier(.2,.8,.2,1); }
body.guard-spark-ui .guard-header-spark {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; min-width: 44px; min-height: 44px; padding: 10px;
  border: 1px solid #edc9a8; border-radius: 15px; color: #d67841;
  background: radial-gradient(circle at 50% 30%, #fff6de, #ffedda); cursor: pointer;
  box-shadow: 0 4px 12px #cc7a3410; touch-action: manipulation;
  transition: transform .22s ease, box-shadow .22s ease;
}
body.guard-spark-ui .guard-header-spark > svg { display: block; width: 25px; height: 29px; filter: drop-shadow(0 2px 3px #ed9a3630); }
body.guard-spark-ui .guard-header-spark::after {
  content: ""; position: absolute; left: calc(50% - 1.5px); top: calc(50% - 1.5px);
  width: 3px; height: 3px; border-radius: 50%; pointer-events: none; opacity: 0;
  box-shadow: 0 -28px #eaa14d, 20px -20px #ed8651, 28px 0 #e9b56a, 20px 20px #efad64,
    0 28px #eaa14d, -20px 20px #ed8651, -28px 0 #e9b56a, -20px -20px #efad64;
}
body.guard-spark-ui .guard-header-spark.is-burst { animation: guard-hearth-ignite .65s cubic-bezier(.2,.8,.2,1); }
body.guard-spark-ui .guard-header-spark.is-burst::after { animation: guard-header-embers .7s ease-out both; }
body.guard-spark-ui .guard-motion-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none;
  min-height: 44px; padding: 9px 12px; border: 1px solid #e9d9c8; border-radius: 99px;
  color: #8a684b; background: #fffcf7b8; font: inherit; font-size: 11px; line-height: 1.4;
  cursor: pointer; white-space: nowrap; touch-action: manipulation;
  transition: background .2s ease, border-color .2s ease;
}
body.guard-spark-ui .guard-motion-toggle::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #dc9860; box-shadow: 0 0 0 3px #f4d3a52b; flex: none; }
body.guard-spark-ui .guard-motion-toggle > svg { width: 14px; height: 14px; flex: none; }
body.guard-spark-ui .guard-motion-toggle:disabled { cursor: default; }
body.guard-spark-ui .guard-hearth-feedback { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.guard-spark-ui .layout-container .content-wrapper .page-header :is(h1,h2) { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
body.guard-spark-ui .guard-motion-toggle[aria-pressed="false"] { color: #8a8a80; border-color: #e3ded5; background: #fffdf8; }
body.guard-spark-ui .guard-motion-toggle[aria-pressed="false"]::before { background: #b4b4a8; box-shadow: none; }
body.guard-spark-ui .friend-spark-badge {
  border: 1px solid #f2cba640;
  animation: guard-spark-badge 3.8s ease-in-out infinite;
}

@media (hover:hover) and (pointer:fine) {
  body.guard-spark-ui .layout-container .content-wrapper :is(.account-card,.task-card,.package-card):hover,
  body.guard-spark-ui .layout-container .sg-dash-metric:hover {
    transform: translateY(-3px); border-color: #e7c7a5; box-shadow: 0 11px 28px #a26d3810;
  }
  body.guard-spark-ui .layout-container .content-wrapper > :not(.sg-dashboard) .el-button--primary:not(.is-link):not(.is-text):hover {
    background: #c95630 !important; border-color: #c95630 !important;
  }
  body.guard-spark-ui .guard-hearth-flame:hover { transform: translateY(-4px) rotate(-3deg); box-shadow: inset 0 1px 0 #fff, 0 10px 36px #d18b3921; }
  body.guard-spark-ui .guard-header-spark:hover { transform: translateY(-2px) rotate(-4deg); box-shadow: 0 6px 18px #c5813420; }
  body.guard-spark-ui .guard-motion-toggle:hover { border-color: #dfc0a2; background: #fff4e7; }
}
@media (max-width: 1050px) and (min-width: 768px) {
  body.guard-spark-ui .layout-container .sg-dash-hero { grid-template-columns: minmax(0, 1fr) 215px; gap: 14px; }
  body.guard-spark-ui .guard-hearth-stage { width: 215px; }
}
@media (max-width: 767px) {
  body.guard-spark-ui .guard-spark-backdrop { background: radial-gradient(ellipse at 100% 0, #ffd7ab40, transparent 49%), #fffaf4; }
  body.guard-spark-ui .guard-spark-ambient { opacity: .5; }
  body.guard-spark-ui .layout-container .topbar { backdrop-filter: none; background: #fffaf4f5; }
  body.guard-spark-ui .layout-container .topbar .guard-motion-toggle { margin-left: auto; font-size: 10px; padding: 9px 10px; gap: 6px; }
  body.guard-spark-ui .layout-container .content-wrapper :is(.page-header,.header-card) { border-radius: 18px; }
  body.guard-spark-ui .layout-container .content-wrapper :is(.account-card,.task-card,.package-card) { border-radius: 18px; box-shadow: 0 4px 19px #80562f05; }
  body.guard-spark-ui .layout-container .content-wrapper :is(.account-card,.task-card,.package-card):hover { transform: none; }
  body.guard-spark-ui .layout-container .sg-dash-hero { display: block; padding: 21px 20px 15px; border-radius: 21px; }
  body.guard-spark-ui .layout-container .sg-dash-hero-art { display: flex; min-height: 0; width: 100%; margin-top: 10px; }
  body.guard-spark-ui .guard-hearth { max-width: 250px; }
  body.guard-spark-ui .guard-hearth-stage { width: 220px; height: 143px; }
  body.guard-spark-ui .guard-hearth-stage::before { inset: 0 29px -2px; }
  body.guard-spark-ui .guard-hearth-stage::after { bottom: 5px; width: 81px; height: 10px; }
  body.guard-spark-ui .guard-hearth-flame { width: 94px; height: 120px; padding: 11px; border-radius: 55% 55% 43% 43%; }
  body.guard-spark-ui .guard-hearth-flame > svg { width: 59px; height: 84px; }
  body.guard-spark-ui .guard-hearth-orbit { inset: 19px 12px 19px; }
  body.guard-spark-ui .guard-hearth-orbit-two { inset: 8px 38px 5px; }
  body.guard-spark-ui .guard-hearth-caption { margin-top: 4px; font-size: 10px; letter-spacing: .04em; }
  body.guard-spark-ui .guard-header-spark { width: 44px; height: 44px; padding: 9px; border-radius: 13px; }
  body.guard-spark-ui .layout-container .sg-dash-metric { border-radius: 16px; }
}
@media (max-width: 359px) {
  body.guard-spark-ui .layout-container .topbar { gap: 7px; }
  body.guard-spark-ui .layout-container .topbar .guard-motion-toggle { font-size: 9px; padding-inline: 8px; }
  body.guard-spark-ui .layout-container .topbar-left { gap: 7px; }
  body.guard-spark-ui .layout-container .topbar .page-title { font-size: 16px; }
  body.guard-spark-ui .layout-container .sg-dash-hero { padding-inline: 17px; }
}
@keyframes guard-flame-sway { from { transform: rotate(-2deg) translateY(1px); } to { transform: rotate(2deg) translateY(-2px); } }
@keyframes guard-flame-breathe { from { transform: scale(.98, .97); opacity: .93; } to { transform: scale(1.02, 1.025); opacity: 1; } }
@keyframes guard-hearth-aura { from { opacity: .68; transform: scale(.97); } to { opacity: 1; transform: scale(1.08); } }
@keyframes guard-hearth-ignite { 0%,100% { transform: scale(1); } 35% { transform: translateY(-5px) scale(1.09) rotate(-3deg); } 65% { transform: translateY(-1px) scale(1.025) rotate(2deg); } }
@keyframes guard-spark-badge { 0%,100% { box-shadow: 0 0 0 0 #edb16b00; } 50% { box-shadow: 0 0 0 3px #edb16b18; } }
@keyframes guard-header-embers { 0% { opacity: 0; transform: scale(.35) rotate(-12deg); } 20% { opacity: .85; } 100% { opacity: 0; transform: scale(1.25) rotate(10deg); } }
body.guard-spark-ui.guard-motion-paused :is(.guard-hearth-stage,.guard-hearth-flame,.guard-flame-outer,.guard-flame-inner,.friend-spark-badge),
body.guard-spark-ui.guard-motion-paused .guard-hearth-stage::before,
body.guard-spark-ui.guard-motion-paused .guard-hearth-flame > svg,
body.guard-spark-ui.guard-motion-paused .guard-header-spark,
body.guard-spark-ui.guard-motion-paused .guard-header-spark::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  body.guard-spark-ui :is(.guard-hearth-stage,.guard-hearth-flame,.guard-flame-outer,.guard-flame-inner,.friend-spark-badge,.guard-header-spark),
  body.guard-spark-ui .guard-hearth-stage::before,
  body.guard-spark-ui .guard-header-spark::after,
  body.guard-spark-ui .guard-hearth-flame > svg { animation: none !important; }
  body.guard-spark-ui :is(.guard-hearth-flame,.guard-header-spark,.guard-motion-toggle),
  body.guard-spark-ui .layout-container :is(.sg-dash-metric,.account-card,.task-card,.package-card) { transition: none; }
  body.guard-spark-ui .layout-container .content-wrapper :is(.account-card,.task-card,.package-card):hover,
  body.guard-spark-ui .layout-container .sg-dash-metric:hover { transform: none; }
}
