:root{
  --bg:#0b0d10;
  --card:#12151b;
  --muted:#9aa3af;
  --text:#e5e7eb;
  --line:#222836;
  --accent:#e26666;
  --accent2:#6A2424;
  --good:#7cf0b2;
  --warn:#ffd38a;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1000px 600px at 20% 0%, rgba(226,102,102,.15), transparent 60%) , var(--bg);
  color:var(--text);
}

.updatesBar{
  position:sticky;
  top:0;
  z-index:50;
  border-bottom:1px solid rgba(226,102,102,.25);
  background: linear-gradient(90deg, rgba(226,102,102,.18), rgba(106,36,36,.18));
  backdrop-filter: blur(10px);
}
.updatesBar.hidden{display:none}
.updatesBtn{
  width:100%;
  padding:10px 14px;
  border:0;
  background:transparent;
  color:var(--text);
  cursor:pointer;
  font-weight:700;
  display:flex;
  justify-content:center;
  gap:10px;
}
#updatesCount{
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  padding:2px 8px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  padding:18px 20px;
  border-bottom:1px solid var(--line);
  background:rgba(11,13,16,.85);
  backdrop-filter: blur(10px);
}

.kicker{color:var(--muted); font-size:12px; letter-spacing:.08em; text-transform:uppercase}
h1{margin:6px 0 2px 0; font-size:22px}
.sub{color:var(--muted); font-size:13px}

.right{display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; justify-content:flex-end}
.small{font-size:12px; color:var(--muted)}
.who input{width:140px}

select, input, textarea{
  background:#0f1218;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
}
textarea{min-height:90px; resize:vertical; width:100%}

.wrap{max-width:1200px; margin:18px auto; padding:0 18px 40px}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 20%), var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  margin-bottom:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.cardHead{display:flex; justify-content:space-between; align-items:flex-start; gap:12px}
.card h2{margin:0 0 6px 0; font-size:18px}
.muted{color:var(--muted)}
.btn{
  border:1px solid var(--line);
  background:#0f1218;
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}
.btn.primary{
  background: linear-gradient(180deg, rgba(226,102,102,.25), rgba(106,36,36,.35));
  border-color: rgba(226,102,102,.25);
}
.btn:hover{filter:brightness(1.06)}
.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
}
.pill.saving{color:var(--warn); border-color: rgba(255,211,138,.35)}
.pill.error{color:#ff9aa2; border-color: rgba(255,154,162,.35)}

.bell{position:relative}
.badge{
  position:absolute;
  top:-6px;
  right:-6px;
  background: rgba(226,102,102,.9);
  border:1px solid rgba(255,255,255,.25);
  color:white;
  border-radius:999px;
  padding:2px 6px;
  font-size:11px;
}
.badge.hidden{display:none}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
@media (max-width: 860px){
  .grid{grid-template-columns:1fr}
}

.metric{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(0,0,0,.14);
}
.metricTitle{font-weight:700; margin-bottom:8px}
.row{display:grid; grid-template-columns: 90px 1fr; gap:10px; align-items:center; margin-bottom:8px}
.row label{color:var(--muted); font-size:12px}

/* Summary tiles */
.tiles{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap:12px;
}
@media (max-width: 1100px){ .tiles{grid-template-columns: repeat(2, minmax(0,1fr));} }
@media (max-width: 560px){ .tiles{grid-template-columns:1fr;} }

.tile{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(0,0,0,.14);
}
.tileTop{display:flex; justify-content:space-between; align-items:center; gap:10px}
.tileTitle{font-weight:800}
.tileTrend{
  font-size:12px;
  color:var(--muted);
  border:1px dashed rgba(255,255,255,.15);
  padding:4px 8px;
  border-radius:999px;
}
.tileNums{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:var(--muted);
  font-size:12px;
}
.progress{
  margin-top:10px;
  height:10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  overflow:hidden;
  background: rgba(255,255,255,.04);
}
.progress > div{
  height:100%;
  background: linear-gradient(90deg, rgba(124,240,178,.6), rgba(226,102,102,.65));
  width:0%;
}
.pct{margin-top:8px; font-size:12px; color:var(--muted)}

/* Notes tools */
.notesTools{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:12px;
}
.notesTools input{min-width:220px}
.pinOnly, .pinToggle{display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px}

.boardControls{
  display:grid;
  grid-template-columns: 1fr 420px;
  gap:10px;
  margin-top:12px;
}
.boardRight{
  display:flex;
  gap:10px;
  align-items:stretch;
  flex-wrap:wrap;
}
#newTags{flex:1; min-width:160px}

.lanes{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
@media (max-width: 860px){
  .lanes{grid-template-columns:1fr}
  .boardControls{grid-template-columns:1fr}
}

.lane{
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:rgba(0,0,0,.14);
}
.laneHeader{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  font-weight:800;
}
.laneBody{padding:10px 12px; display:flex; flex-direction:column; gap:10px; min-height:120px}

.note{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:#0f1218;
}
.noteMeta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
  color:var(--muted);
  font-size:12px;
}
.noteMetaLeft{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.chip{
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--muted);
}
.noteActions{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.noteActions button{font-size:12px; padding:6px 8px; border-radius:10px}
.note textarea{min-height:70px}
.noteSmallInput{padding:8px 10px; font-size:12px}

/* Activity */
.activityList{display:flex; flex-direction:column; gap:10px; margin-top:10px}
.event{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:rgba(0,0,0,.14);
}
.eventTop{display:flex; justify-content:space-between; gap:10px; color:var(--muted); font-size:12px}
.eventMsg{margin-top:6px; font-weight:700}
