@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --ink: #f5f2eb;
  --muted: #99988f;
  --panel: rgba(19, 21, 20, .82);
  --line: rgba(255,255,255,.09);
  --rust: #ff6846;
  --amber: #ffbd59;
  --mint: #76e5b1;
  --red: #ff6b78;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: #0b0d0c;
  font-family: "Noto Sans SC", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.aurora { position: fixed; width: 42rem; height: 42rem; border-radius: 50%; filter: blur(120px); opacity: .12; pointer-events: none; }
.aurora-one { background: var(--rust); left: -18rem; top: -18rem; }
.aurora-two { background: #e9ff8e; right: -22rem; bottom: -26rem; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 64px; position: relative; }
.hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 70px; align-items: end; margin-bottom: 54px; }
.eyebrow { font: 500 12px/1 "DM Mono", monospace; letter-spacing: .18em; color: #cbc8be; margin-bottom: 20px; }
.rust-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 20px var(--rust); margin-right: 10px; }
h1 { font-size: clamp(42px, 6vw, 78px); line-height: 1.08; letter-spacing: -.055em; margin: 0; font-weight: 700; }
h1 em { color: var(--rust); font-style: normal; }
.hero p { max-width: 650px; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }

.system-card { border: 1px solid var(--line); background: rgba(13,15,14,.65); backdrop-filter: blur(16px); padding: 22px; border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.24); }
.pulse { font: 500 10px/1 "DM Mono"; letter-spacing: .13em; color: var(--mint); }
.pulse span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); margin-right: 8px; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
.flow-line { display: flex; align-items: center; gap: 7px; margin: 24px 0 12px; }
.flow-line b { font: 500 10px "DM Mono"; }
.flow-line i { height: 1px; flex: 1; background: linear-gradient(90deg, var(--rust), rgba(255,104,70,.16)); position: relative; }
.flow-line i::after { content: ""; position: absolute; right: -1px; top: -2px; width: 5px; height: 5px; border-top: 1px solid var(--rust); border-right: 1px solid var(--rust); transform: rotate(45deg); }
.system-meta { display: flex; justify-content: space-between; color: #696b66; font-size: 10px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border: 1px solid var(--line); background: var(--panel); border-radius: 24px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.35); backdrop-filter: blur(28px); }
.todo-panel { min-height: 580px; padding: 34px; }
.composer label { display: block; margin-bottom: 12px; color: #b6b4ab; font-size: 12px; font-weight: 600; }
.composer-row { display: flex; gap: 10px; }
.composer input { flex: 1; min-width: 0; border: 1px solid rgba(255,255,255,.11); background: #0f1110; color: var(--ink); border-radius: 13px; padding: 0 18px; height: 56px; font: inherit; outline: none; transition: .2s ease; }
.composer input:focus { border-color: rgba(255,104,70,.65); box-shadow: 0 0 0 4px rgba(255,104,70,.08); }
.composer input::placeholder { color: #5f615d; }
.composer button { height: 56px; padding: 0 18px; border: 0; border-radius: 13px; color: #131210; background: var(--rust); font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 14px; transition: .2s ease; }
.composer button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.composer button:disabled { opacity: .5; cursor: wait; }
.composer kbd { font: 500 12px "DM Mono"; padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,.14); }
.form-error { min-height: 20px; color: var(--red); margin: 8px 0 0; font-size: 12px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 14px; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 24px; }
.filter { color: #777973; background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 0; font: 600 12px inherit; cursor: pointer; }
.filter.active { color: var(--ink); border-color: var(--rust); }
.filter span { margin-left: 5px; font: 500 10px "DM Mono"; color: #5f615d; }
.refresh { border: 0; background: none; color: #757872; font-size: 20px; cursor: pointer; transition: .25s; }
.refresh:hover { color: var(--ink); transform: rotate(90deg); }

.todo-list { list-style: none; padding: 0; margin: 0; }
.todo-item { display: grid; grid-template-columns: 38px 1fr 34px; gap: 12px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.055); padding: 17px 4px; animation: enter .32s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.toggle { width: 27px; height: 27px; border-radius: 9px; border: 1px solid #3a3d39; background: #111311; color: transparent; cursor: pointer; transition: .2s; }
.toggle:hover { border-color: var(--rust); }
.todo-item.done .toggle { color: #101511; background: var(--mint); border-color: var(--mint); }
.todo-copy { min-width: 0; }
.todo-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; }
.todo-item.done .todo-copy strong { color: #656862; text-decoration: line-through; }
.todo-meta { margin-top: 6px; display: flex; align-items: center; gap: 9px; }
.todo-meta time { color: #595c57; font: 400 10px "DM Mono"; }
.async-badge { font: 500 9px "DM Mono"; padding: 3px 6px; border: 1px solid currentColor; border-radius: 5px; text-transform: uppercase; letter-spacing: .04em; }
.async-badge.pending { color: var(--amber); }
.async-badge.processing { color: #65bfff; }
.async-badge.completed { color: var(--mint); }
.async-badge.failed { color: var(--red); }
.delete { opacity: 0; border: 0; background: transparent; color: #777; font-size: 22px; cursor: pointer; transition: .2s; }
.todo-item:hover .delete { opacity: 1; }
.delete:hover { color: var(--red); }

.loading { display: flex; justify-content: center; gap: 7px; padding: 80px; }
.loading span { width: 6px; height: 6px; border-radius: 50%; background: var(--rust); animation: bounce .8s infinite alternate; }
.loading span:nth-child(2) { animation-delay: .15s; }
.loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { to { transform: translateY(-8px); opacity: .35; } }
.empty { text-align: center; padding: 70px 20px; color: #777a74; }
.empty-orbit { width: 70px; height: 70px; margin: 0 auto 18px; border: 1px solid #363936; border-radius: 50%; display: grid; place-items: center; position: relative; }
.empty-orbit::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--rust); top: -4px; animation: orbit 4s linear infinite; transform-origin: 4px 39px; }
@keyframes orbit { to { transform: rotate(360deg); } }
.empty h2 { margin: 0 0 8px; color: #a4a69f; font-size: 16px; }
.empty p { margin: 0; font-size: 13px; }

.insights { border-left: 1px solid var(--line); background: rgba(8,10,9,.42); padding: 30px 26px; }
.insight-head { display: flex; justify-content: space-between; align-items: center; font: 500 10px "DM Mono"; letter-spacing: .12em; color: #8d8f89; }
.insight-head small { color: var(--mint); font: 400 9px "DM Mono"; letter-spacing: 0; }
.metric { padding: 34px 0 26px; border-bottom: 1px solid var(--line); }
.metric strong { display: block; font: 500 58px/1 "DM Mono"; letter-spacing: -.08em; color: var(--ink); }
.metric span { display: block; margin-top: 8px; color: #777a73; font-size: 11px; }
.action-bars { display: grid; gap: 13px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.bar-row { display: grid; grid-template-columns: 60px 1fr 25px; gap: 8px; align-items: center; font: 400 9px "DM Mono"; color: #777a73; }
.bar-track { height: 4px; background: #252825; border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--rust); transition: width .5s ease; }
.last-event { padding: 25px 0; border-bottom: 1px solid var(--line); }
.last-event span { display: block; color: #666964; font-size: 10px; margin-bottom: 9px; }
.last-event strong { display: block; font-size: 12px; font-weight: 600; color: #b9bbb4; }
.last-event time { display: block; margin-top: 7px; color: #555852; font: 400 9px "DM Mono"; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 25px; }
.legend div { display: flex; align-items: center; gap: 7px; color: #6e716c; font-size: 10px; }
.legend i { width: 6px; height: 6px; border-radius: 50%; }
.legend .pending { background: var(--amber); }
.legend .processing { background: #65bfff; }
.legend .completed { background: var(--mint); }
.legend .failed { background: var(--red); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .system-card { max-width: 480px; }
  .workspace { grid-template-columns: 1fr; }
  .insights { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 1180px); padding-top: 42px; }
  .hero { margin-bottom: 34px; }
  .workspace { border-radius: 18px; }
  .todo-panel { padding: 20px 16px; min-height: 520px; }
  .composer-row { display: grid; }
  .composer button { justify-content: center; }
  .filters { gap: 14px; }
  .filter { font-size: 11px; }
}
