:root {
  --bg:#0f172a;
  --card:#1e293b;
  --primary:#6366f1;
  --text:#e2e8f0;
  --muted:#94a3b8;
}

*{box-sizing:border-box;margin:0;padding:0}

body{
  font-family:'Poppins',sans-serif;
  background:var(--bg);
  color:var(--text);
}

.topbar{
  display:flex;
  justify-content:space-between;
  padding:16px;
  background:#020617;
  position:sticky;
  top:0;
}

button{
  background:var(--primary);
  border:none;
  color:white;
  padding:8px 14px;
  border-radius:10px;
  cursor:pointer;
}

.container{
  max-width:480px;
  margin:auto;
  padding:16px;
}

.hero{
  background:var(--card);
  padding:16px;
  border-radius:16px;
  margin-bottom:16px;
}

.hero input{
  width:100%;
  padding:10px;
  border:none;
  border-radius:12px;
  margin-top:10px;
}

.stats{
  display:flex;
  justify-content:space-between;
  margin-bottom:16px;
}

.stats div{
  flex:1;
  text-align:center;
  padding:10px;
  cursor:pointer;
  border-radius:12px;
}

.stats .active{
  background:rgba(99,102,241,.2);
}

.task-list{
  display:grid;
  gap:12px;
}

.card{
  background:var(--card);
  padding:14px;
  border-radius:16px;
}

.card h3{
  margin-bottom:6px;
}

.card small{
  color:var(--muted);
}

.badge{
  font-size:12px;
  padding:4px 8px;
  border-radius:8px;
}

.pending{background:#facc15;color:#000}
.done{background:#22c55e;color:#000}

/* ===== MODAL ===== */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:none;
  align-items:center;
  justify-content:center;
}

.modal-content{
  background:var(--card);
  padding:20px;
  border-radius:16px;
  width:90%;
  max-width:400px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.modal-content input,
.modal-content textarea,
.modal-content select{
  padding:10px;
  border:none;
  border-radius:10px;
}

.modal-actions{
  display:flex;
  justify-content:space-between;
  margin-top:10px;
}

.btn-cancel{
  background:#334155;
}

/* ===== CARD HEADER ===== */
.card{
  position:relative;
  background:var(--card);
  padding:16px;
  border-radius:16px;
}

.card-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
}

.card-header h3{
  margin:0;
  font-size:16px;
}

/* ===== STATUS ICON ===== */
.status-done{
  color:#22c55e;
  font-size:18px;
}

.status-pending{
  color:#facc15;
  font-size:18px;
}

.action-buttons{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:10px;
}

.action-buttons button{
  background:none;
  border:none;
  color:var(--muted);
  cursor:pointer;
  font-size:15px;
}

.action-buttons button:hover{
  color:var(--primary);
}

/* ===== TOGGLE BODY ===== */
.card-body{
  max-height:0;
  overflow:hidden;
  opacity:0;
  transition:all .3s ease;
}

.card.active .card-body{
  max-height:500px;
  opacity:1;
  margin-top:10px;
}

/* header bisa diklik */
.card-header{
  cursor:pointer;
}

/* ===== MODAL FONT CONSISTENT ===== */
.modal-content,
.modal-content input,
.modal-content textarea,
.modal-content select,
.modal-content button {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast{
  position:fixed;
  bottom:20px;
  left:50%;
  transform:translateX(-50%) translateY(20px);
  background:#22c55e; /* Hijau */
  color:#ffffff;      /* Putih */
  padding:12px 20px;
  border-radius:12px;
  font-size:14px;
  font-weight:500;
  opacity:0;
  pointer-events:none;
  transition:all .3s ease;
  box-shadow:0 10px 25px rgba(0,0,0,.3);
}


.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

/* ===== TOPBAR TITLE ===== */
.topbar h1{
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

/* ===== BUTTON ADD ===== */
#addBtn{
  font-family: 'Poppins', sans-serif;
  font-weight: 600;   /* Samakan dengan title */
  font-size: 14px;
}

/* ===== TOPBAR ACTIONS ===== */
.topbar-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

#themeToggle{
  background:#334155;
  border:none;
  color:#fff;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
}

/* ===== LIGHT MODE ===== */
body.light{
  --bg:#f1f5f9;
  --card:#ffffff;
  --primary:#6366f1;
  --text:#0f172a;
  --muted:#64748b;
}

.topbar h1{
  color:#e2e8f0;
}

