:root{
  --bg:#f4f6fb;
  --card:#fff;
  --text:#10131a;
  --muted:#6b7280;
  --border:#e7e9f3;
  --brand:#0a0ac2;
  --shadow:0 14px 40px rgba(0,0,0,.08);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:"Lexend",system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:var(--bg);
  color:var(--text);
}

/* Topbar */
.topbar{
  height:62px;
  background:#fff;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
  position:sticky;
  top:0;
  z-index:50;
}

.topbarTitle{display:flex; flex-direction:column; gap:2px}
.titleMain{font-weight:900; font-size:16px}
.titleSub{font-weight:800; font-size:12px; color:var(--muted)}

.iconBtn{
  width:44px;height:44px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
}
.iconBtn i{font-size:18px}
.iconBtn.danger{color:#dc2626}
.iconBtn:hover{border-color:rgba(10,10,194,.35)}

/* Layout */
.shell{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:calc(100dvh - 62px);
}
@media(max-width:980px){
  .shell{grid-template-columns:1fr}
}

/* Overlay */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:none;
  z-index:60;
}
.overlay.show{display:block}

/* Main */
.main{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.card{
  background:#fff;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  border-radius:18px;
  padding:14px;
}

.cardHead{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.cardTitle{
  font-weight:950;
  font-size:16px;
  display:flex;
  align-items:center;
  gap:8px;
}
.cardSub{
  margin-top:4px;
  font-size:12px;
  font-weight:800;
  color:var(--muted);
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(34,197,94,.10);
  border:1px solid rgba(34,197,94,.20);
  color:#16a34a;
  font-weight:900;
  font-size:12px;
}

.lbl{
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
}

.mt14{margin-top:14px}

.field{
  width:100%;
  height:52px;
  border:1.5px solid #dbdbe6;
  border-radius:16px;
  padding:12px 14px;
  font-weight:900;
  outline:none;
  background:#fff;
}
.field:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 4px rgba(10,10,194,.12);
}

.fileField{
  width:100%;
  margin-top:8px;
  border:1.5px dashed #dbdbe6;
  background:#fafbff;
  padding:14px;
  border-radius:16px;
  font-weight:900;
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media(max-width:800px){
  .grid2{grid-template-columns:1fr}
}

.labelRow{
  display:flex;
  gap:10px;
  align-items:center;
}

.btnPrimary{
  background:var(--brand);
  color:#fff;
  font-weight:950;
  padding:14px 16px;
  border-radius:18px;
  box-shadow:0 12px 24px rgba(10,10,194,.20);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
  border:none;
  min-width:180px;
}
.btnPrimary:active{transform:scale(.98);}

.btnGhost{
  background:#fff;
  color:var(--text);
  font-weight:950;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--border);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
}
.btnGhost:hover{border-color:rgba(10,10,194,.35);}

.btnRow{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}

.progressWrap{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background:#fff;
}

.progressTop{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.progressTxt{font-size:12px;font-weight:900;color:var(--muted)}

.bar{
  height:10px;
  background:#eef0fb;
  border-radius:999px;
  overflow:hidden;
}
.barFill{
  height:100%;
  width:0%;
  background:var(--brand);
  border-radius:999px;
  transition:width .15s linear;
}

.noteMini{
  margin-top:10px;
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  display:flex;
  gap:8px;
  align-items:center;
}

.list{margin-top:12px; display:flex; flex-direction:column; gap:10px;}
.rowItem{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}

.rowLeft{display:flex; flex-direction:column; gap:6px; min-width:0;}
.rowTitle{font-weight:950; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.rowMeta{font-size:12px; font-weight:850; color:var(--muted)}

.rowRight{display:flex; gap:8px; flex-wrap:wrap}
.smallBtn{
  border:1px solid var(--border);
  background:#fff;
  border-radius:14px;
  padding:10px 12px;
  font-weight:950;
  cursor:pointer;
  display:inline-flex;
  gap:8px;
  align-items:center;
}
.smallBtn:hover{border-color:rgba(10,10,194,.35);}

.emptyTxt{
  padding:14px;
  color:var(--muted);
  font-weight:900;
}

/* Toast */
.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:#111827;
  color:#fff;
  padding:12px 14px;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(0,0,0,.25);
  font-weight:900;
  font-size:12px;
  opacity:0;
  pointer-events:none;
  transition:.2s;
  z-index:999;
}
.toast.show{opacity:1; bottom:24px}
