:root{
  --bg: #ffffff;
  --card: #f8f9fa;
  --accent: #10b981;
  --muted: #6b7280;
  --glass: rgba(0,0,0,0.04);
}

*{box-sizing:border-box}
body{
  font-family:Inter, system-ui, Arial;
  margin:0;
  min-height:100vh;
  background:var(--bg);
  color:#111827;
  display:flex;
  flex-direction:column
}

header{
  padding:20px 24px;
  text-align:center;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
}
h1{font-size:22px; margin:0; font-weight:700}
header input{
  padding:8px 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  width:90%;
  max-width:420px;
  font-size:14px;
}

.tabs{flex:1; display:flex; flex-direction:column; padding:20px}
.tab-container{flex:1}

.tab-nav{
  display:flex;
  justify-content:center;
  gap:6px;
  flex-wrap:wrap;
  margin-top:20px
}
.tab-nav button{
  background:var(--glass);
  border:1px solid rgba(0,0,0,0.1);
  color:inherit;
  padding:6px 10px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
  font-size:13px
}
.tab-nav button.active{
  background:var(--accent);
  color:#fff;
  box-shadow:0 3px 8px rgba(0,0,0,0.2);
  border-color:var(--accent)
}

.tab-content{display:none}
.tab-content.active{display:block}

.grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:18px;
  justify-items:center
}
.card{
  background:var(--card);
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,0.08);
  box-shadow:0 6px 12px rgba(0,0,0,0.08);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  cursor:pointer;
  transition:transform .2s
}
.card:hover{transform:scale(1.04)}

.chart-label{font-size:13px; color:var(--muted); text-align:center}

svg.trash{width:120px; height:150px}
.percent{font-weight:600; color:#065f46}

footer{
  padding:18px 24px;
  color:var(--muted);
  font-size:13px;
  text-align:center
}

#detailView{
  flex:1;
  padding:20px;
}
#detailView h2{
  margin-top:0;
  font-size:20px;
}
#detailView button{
  background:var(--accent);
  color:#fff;
  border:none;
  padding:8px 14px;
  border-radius:8px;
  cursor:pointer;
  margin-bottom:20px;
}
#detailView button:hover{
  opacity:0.9;
}

/* Responsive */
@media (max-width:520px){
  .grid{grid-template-columns:repeat(2,1fr)}
  svg.trash{width:90px;height:115px}
}
