/* SYPOWER 任务列表 — original styles, not copied from official CSS */
.btn-tasks {
  height: 2rem;
  padding: 0 .85rem 0 .7rem;
  border-radius: 999px;
  font-size: .8rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  position: relative;
}
.btn-tasks .icon {
  width: 1rem;
  height: 1rem;
}
.btn-tasks-badge {
  min-width: 1rem;
  height: 1rem;
  padding: 0 .28rem;
  margin-left: .05rem;
  border-radius: 999px;
  background: #1a1406;
  color: #fde68a;
  font-size: .62rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}
.page-app[data-menu="linggan"] .btn-tasks { display: none; }

.sy-task-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}
.sy-task-root.is-open { pointer-events: auto; }
.sy-task-bg { position: absolute; inset: 0; background: transparent; }
.sy-task-pop {
  position: absolute;
  width: 22.5rem;
  max-height: min(36rem, calc(100vh - 5.5rem));
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: .85rem .85rem .9rem;
  border-radius: 1rem;
  background: #17181e;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, .55);
  color: rgba(255, 255, 255, .9);
}
.sy-task-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .7rem;
}
.sy-task-head h3 {
  margin: 0;
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
}
.sy-task-close {
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: .45rem;
  background: transparent;
  color: rgba(255, 255, 255, .55);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.sy-task-close:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sy-task-search {
  position: relative;
  margin-bottom: .65rem;
}
.sy-task-search svg {
  position: absolute;
  left: .6rem;
  top: 50%;
  width: .95rem;
  height: .95rem;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .35);
}
.sy-task-search input {
  width: 100%;
  box-sizing: border-box;
  height: 2.15rem;
  padding: 0 .7rem 0 2rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: .55rem;
  background: #121318;
  color: #fff;
  font-size: .82rem;
}
.sy-task-search input::placeholder { color: rgba(255, 255, 255, .35); }
.sy-task-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
  margin-bottom: .7rem;
}
.sy-task-filter {
  width: 100%;
  height: 2.05rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: .5rem;
  background: #121318;
  color: rgba(255, 255, 255, .78);
  font-size: .75rem;
  padding: 0 .45rem;
  cursor: pointer;
}
.sy-task-model {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: .15rem 0 .55rem;
  min-height: 1.6rem;
}
.sy-task-model-name {
  flex: 1;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sy-task-model-acts { display: inline-flex; gap: .15rem; }
.sy-task-ico {
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  color: rgba(255, 255, 255, .4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.sy-task-ico svg { width: .95rem; height: .95rem; }
.sy-task-ico:hover,
.sy-task-ico.is-on { color: #e8c25a; background: rgba(232, 194, 90, .1); }
.sy-task-body {
  flex: 1;
  min-height: 8rem;
  overflow: auto;
}
.sy-task-empty {
  min-height: 8.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  color: rgba(255, 255, 255, .38);
}
.sy-task-empty svg { width: 2.6rem; height: 2.6rem; }
.sy-task-empty p { margin: 0; font-size: .82rem; }
.sy-task-item {
  display: flex;
  gap: .6rem;
  padding: .6rem .15rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.sy-task-media { flex: 0 0 4.2rem; }
.sy-task-thumb {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: .45rem;
  background: #101116;
  display: block;
}
.sy-task-thumb.is-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .45);
  font-size: .7rem;
}
.sy-task-meta { min-width: 0; flex: 1; }
.sy-task-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .2rem;
}
.sy-task-status { font-size: .7rem; font-weight: 600; color: #fbbf24; }
.sy-task-item.is-done .sy-task-status { color: #34d399; }
.sy-task-item.is-failed .sy-task-status { color: #f87171; }
.sy-task-time { margin-left: auto; font-size: .68rem; color: rgba(255, 255, 255, .38); }
.sy-task-prompt {
  margin: 0;
  font-size: .78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, .78);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sy-task-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.sy-task-chips span {
  font-size: .62rem;
  color: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: .08rem .4rem;
}
.sy-task-error { margin: .3rem 0 0; font-size: .7rem; color: #fca5a5; }

html[data-theme="light"] .sy-task-pop {
  background: #fff;
  color: #1e232d;
  border-color: rgba(15, 23, 42, .1);
}
html[data-theme="light"] .sy-task-search input,
html[data-theme="light"] .sy-task-filter { background: #f3f4f7; color: #1e232d; border-color: rgba(15, 23, 42, .1); }
html[data-theme="light"] .sy-task-model-name,
html[data-theme="light"] .sy-task-prompt { color: #1f2937; }
html[data-theme="light"] .sy-task-close,
html[data-theme="light"] .sy-task-ico { color: #64748b; }
html[data-theme="light"] .sy-task-empty { color: #94a3b8; }

@media (max-width: 700px) {
  .sy-task-pop { max-width: calc(100vw - 1.2rem); }
}
