/* ========== Base ========== */
:root{
  --bg: #0b0f17;
  --panel: #111827;
  --panel-2: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.35);

  --active: #22c55e;
  --paused: #f59e0b;
  --done: #60a5fa;

  --radius: 18px;
  --gap: 18px;
  --max: 1100px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 700px at 20% -10%, rgba(96,165,250,.18), transparent 55%),
              radial-gradient(900px 600px at 110% 20%, rgba(34,197,94,.14), transparent 55%),
              var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible{
  outline: 2px solid rgba(96,165,250,.65);
  outline-offset: 2px;
  border-radius: 10px;
}

.wrap{
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

/* ========== Header ========== */
.site-header{
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(11,15,23,.65);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.header-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

h1{
  margin: 0 0 4px 0;
  font-size: clamp(1.2rem, 2vw + 1rem, 2rem);
  letter-spacing: .2px;
}

.subtitle{
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.quick-links{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ========== Buttons ========== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: .92rem;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
}

.btn.primary{
  background: rgba(96,165,250,.18);
  border-color: rgba(96,165,250,.35);
}

/* ========== KPI ========== */
.kpi{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  padding: 22px 0 10px 0;
}

.kpi-card{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border-radius: var(--radius);
  padding: 14px 14px;
  box-shadow: var(--shadow);
}

.kpi-label{
  color: var(--muted);
  font-size: .9rem;
}

.kpi-value{
  margin-top: 8px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: .2px;
}

.kpi-value.small{
  font-size: 1.15rem;
  font-weight: 750;
}

/* ========== Sections ========== */
.hint{
  margin: 14px 0 22px;
  padding: 14px 14px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255,255,255,.02);
}

.section{
  padding: 22px 0;
}

.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.section h2{
  margin: 0;
  font-size: 1.35rem;
}

.section-head p{
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
  font-size: .95rem;
}

/* ========== Grid & Cards ========== */
.grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.card{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17,24,39,.9), rgba(15,23,42,.85));
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.title{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.badge{
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .2px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-active{
  color: rgba(34,197,94,1);
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.25);
}
.badge-paused{
  color: rgba(245,158,11,1);
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.25);
}
.badge-done{
  color: rgba(96,165,250,1);
  background: rgba(96,165,250,.12);
  border-color: rgba(96,165,250,.25);
}

.meta{
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}

.meta div{
  display: grid;
  gap: 3px;
}

dt{
  color: var(--muted);
  font-size: .78rem;
}
dd{
  margin: 0;
  font-weight: 700;
  font-size: .92rem;
}

.notes{
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: .95rem;
}

.actions{
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ========== Footer ========== */
.footer{
  padding: 26px 0 40px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 30px;
}
.footer-link{
  color: var(--text);
  opacity: .85;
}
.footer-link:hover{ opacity: 1; }

/* ========== Responsive ========== */
@media (max-width: 980px){
  .kpi{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px){
  .header-row{ flex-direction: column; align-items: flex-start; }
  .grid{ grid-template-columns: 1fr; }
  .meta{ grid-template-columns: 1fr; }
}
