:root{
  --bg:#e9f3ef;
  --card:#fff;
  --ink:#0c2d21;
  --muted:#5b6e65;
  --accent:#176b4b;
  --accent-ink:#fff;
  --red:#d83a3a;
  --green:#1a7f43;
  --radius:14px;
}

*{box-sizing:border-box}
html,body{
  margin:0;padding:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,"Noto Sans",Tahoma;
  background:var(--bg); color:var(--ink);
}
[dir="rtl"] body{text-align:right}

.app-bar{
  background:var(--accent); color:var(--accent-ink);
  padding:18px 16px 10px;
  border-bottom-left-radius:20px; border-bottom-right-radius:20px;
}
.title{margin:0 0 4px; font-size:28px; font-weight:800}
.date-line{opacity:.9; margin-bottom:10px; font-size:14px}
.nav-row{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px}
.nav-btn{background:#111; color:#fff; border:0; border-radius:10px; padding:8px 12px; font-size:14px; cursor:pointer}
.nav-btn:disabled{opacity:.5; cursor:not-allowed}
.note{background:rgba(255,255,255,.15); padding:8px 10px; border-radius:10px; font-size:13px}

.container{padding:14px; max-width:820px; margin-inline:auto}
.top-row{display:flex; justify-content:flex-end; margin-bottom:10px}
.danger{background:var(--red); color:#fff; border:0; border-radius:10px; padding:8px 12px; font-size:14px; cursor:pointer}

.card{
  background:var(--card); border-radius:var(--radius); padding:14px; margin-bottom:12px;
  box-shadow:0 1px 0 rgba(0,0,0,.06)
}
.field-label{display:block; margin-bottom:6px; color:var(--muted); font-size:13px}

/* نفس ارتفاع وستايل القِطّة */
.input{
  width:100%; height:40px; border:1px solid #dfe5e1; border-radius:10px;
  padding:0 10px; font-size:16px; background:#f7fbf9
}
.input-compact{max-width:160px}

.inline-field{display:flex; align-items:center; gap:10px}
.inline-field .field-label{margin:0}

.hint{margin-top:6px; color:var(--muted); font-size:12px}

.section-title{margin:0 0 10px; font-size:18px}
.summary-row{
  display:flex; justify-content:space-between; padding:8px 10px;
  background:#f6faf8; border:1px solid #e0e8e3; border-radius:10px; margin-bottom:8px
}
.summary-row.red{color:var(--red)}
.summary-row.green{color:var(--green)}

.table-controls{display:flex; justify-content:flex-end; margin-bottom:8px}
.toggle-btn{
  background:#fff; border:1px solid #cfe2d8; color:#0e4b35; border-radius:10px;
  padding:6px 10px; cursor:pointer; font-size:13px
}

.table{width:100%}
.thead{position:sticky; top:0; z-index:5; background:#f2f8f5; border:1px solid #e1e8e3; border-radius:12px; padding:8px}
.row{
  display:grid; grid-template-columns: 1fr 120px 120px;
  gap:8px; align-items:center; padding:8px; border-bottom:1px dashed #e8eee9
}
.row:last-child{border-bottom:0}
.cell{font-size:15px}
.cell.name{font-weight:600}
.member-input{
  width:100%; height:40px;
  border:1px solid #dde5df; border-radius:10px; padding:0 8px; background:#f9fbfa; font-size:16px; text-align:center;
}

.check-wrap{display:flex; align-items:center; justify-content:center}
input[type="checkbox"]{
  width:28px; height:28px; accent-color:var(--green); cursor:pointer;
  transform: translateY(1px);
}

@media (max-width:420px){
  .row{grid-template-columns: 1fr 100px 100px}
  .title{font-size:24px}
}
