:root{
  --bg:#070b14;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.10);
  --stroke:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.62);
  --muted2:rgba(255,255,255,.42);
  --accent1:#7c3aed;
  --accent2:#06b6d4;
  --danger:#ef4444;
  --radius:18px;
  --shadow:0 18px 60px rgba(0,0,0,.45);
  --shadow2:0 10px 30px rgba(0,0,0,.28);
  --focus:0 0 0 4px rgba(124,58,237,.25);
}
[data-theme="light"]{
  --bg:#f6f7fb;
  --panel:rgba(255,255,255,.78);
  --panel2:rgba(255,255,255,.95);
  --stroke:rgba(15,23,42,.10);
  --text:rgba(15,23,42,.92);
  --muted:rgba(15,23,42,.60);
  --muted2:rgba(15,23,42,.42);
  --shadow:0 18px 60px rgba(2,6,23,.10);
  --shadow2:0 10px 30px rgba(2,6,23,.08);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(1100px 650px at 10% 10%, rgba(124,58,237,.28), transparent 55%),
    radial-gradient(1100px 650px at 90% 15%, rgba(6,182,212,.20), transparent 60%),
    radial-gradient(900px 650px at 60% 100%, rgba(34,197,94,.10), transparent 58%),
    var(--bg);
}
.bg{
  position:fixed; inset:-25%;
  filter:blur(60px);
  opacity:.45;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 30%, rgba(124,58,237,.20), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(6,182,212,.16), transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(34,197,94,.10), transparent 50%);
}
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 16px;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(0,0,0,.28), rgba(0,0,0,0));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
[data-theme="light"] .topbar{
  background: linear-gradient(to bottom, rgba(246,247,251,.85), rgba(246,247,251,0));
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:40px; height:40px; border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(6,182,212,.85));
  box-shadow: var(--shadow2);
  font-weight:900;
}
.title{font-weight:900; letter-spacing:.2px}
.subtitle{font-size:12px; color:var(--muted)}
.actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.wrap{max-width:920px; margin:18px auto 32px; padding:0 16px}
.card{
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.addRow{
  display:flex; gap:10px; flex-wrap:wrap;
  padding:16px;
  border-bottom: 1px solid var(--stroke);
}
.input{
  flex: 1 1 280px;
  height:46px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.input::placeholder{color: var(--muted2)}
.input:focus{outline:none; box-shadow: var(--focus); border-color: rgba(124,58,237,.35)}
.select{
  height:46px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.select.small{height:40px; border-radius:12px}
.select:focus{outline:none; box-shadow: var(--focus)}
.primary{
  height:46px;
  padding:0 16px;
  border-radius:14px;
  border:none;
  cursor:pointer;
  color:white;
  font-weight:900;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  box-shadow: var(--shadow2);
}
.primary:focus{outline:none; box-shadow: var(--shadow2), var(--focus)}
.primary:active{transform: translateY(1px)}
.tools{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  padding:12px 16px;
  border-bottom: 1px solid var(--stroke);
}
.search{
  flex: 1 1 240px;
  height:40px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.search::placeholder{color: var(--muted2)}
.search:focus{outline:none; box-shadow: var(--focus); border-color: rgba(124,58,237,.35)}
.status{
  margin-left:auto;
  font-size:12px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  user-select:none;
}
.btn{
  height:42px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  box-shadow: var(--shadow2);
  font-weight:800;
}
.btn:hover{background: rgba(255,255,255,.10)}
.btn:focus{outline:none; box-shadow: var(--shadow2), var(--focus)}
.btn.icon{width:42px; padding:0; display:grid; place-items:center}
.btn.danger{border-color: rgba(239,68,68,.35)}
.list{list-style:none; margin:0; padding:8px}
.item{
  position:relative;
  display:flex; align-items:center; gap:10px;
  padding:10px 10px;
  border-radius:14px;
  margin: 8px 6px;
  border:1px solid transparent;
  overflow:hidden;
  touch-action: pan-y;
}
.item:hover{border-color: var(--stroke); background: rgba(255,255,255,.04)}
.check{width:22px; height:22px; accent-color: var(--accent1)}
.name{
  flex:1; min-width:0;
  font-weight:850; letter-spacing:.15px;
  user-select:none; cursor:text;
}
.name.done{color: var(--muted); text-decoration: line-through}
.tag{
  font-size:11px;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  opacity:.95;
  cursor:pointer;
  user-select:none;
}
.small{
  width:38px; height:38px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor:pointer;
}
.small:hover{background: rgba(255,255,255,.10)}
.swipeBg{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:flex-end;
  padding-right:16px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,.18));
  opacity:0;
  pointer-events:none;
}
.swipeBg span{font-weight:900; color: var(--danger)}
.item.swiping .swipeBg{opacity:1}
.empty{display:none; text-align:center; padding:34px 18px 40px}
.emptyIcon{font-size:40px}
.emptyTitle{font-size:16px; font-weight:950; margin-top:6px}
.emptySub{font-size:12px; color: var(--muted); margin-top:8px}
.footerHint{
  padding: 12px 16px 14px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size:12px;
}
