:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --ink:#1f2937;
  --muted:#6b7280;

  --p1:#e7f0ff;
  --p2:#fff1e6;
  --p3:#e9fbf1;
  --p4:#f3e8ff;
  --p5:#ffe4f1;
  --p6:#e8fff7;

  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 18px;
}

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

#app{min-height:100vh; padding:18px 18px 88px}

.header{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:14px;
}
.header h1{font-size:18px; margin:0}
.header .sub{color:var(--muted); font-size:13px}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}

.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
}

.module{
  display:flex; flex-direction:column; gap:10px;
  border-radius:var(--radius);
  padding:14px;
  box-shadow:var(--shadow);
  text-decoration:none;
  color:var(--ink);
}
.module .icon{
  width:42px; height:42px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.85);
}
.module .title{font-weight:700}
.module .desc{color:var(--muted); font-size:12px}

.btn{
  border:0; border-radius:14px; padding:10px 12px;
  background:#111827; color:#fff; cursor:pointer;
}
.btn.secondary{background:#e5e7eb; color:#111827}
.btn.danger{background:#ef4444}
.input, select, textarea{
  width:100%; padding:10px 12px; border-radius:14px;
  border:1px solid #e5e7eb; background:#fff;
  font-family:inherit;
}
textarea{min-height:90px}
.row{display:flex; gap:10px}
.row > * {flex:1}

.table{
  width:100%;
  border-collapse: collapse;
  font-size:13px;
}
.table th, .table td{
  padding:8px;
  border-bottom:1px solid #eef2f7;
  vertical-align:top;
}
.table th{color:var(--muted); font-weight:600; text-align:left}

.pill{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  background:#eef2ff;
  font-size:12px;
}

.bottomnav{
  position:fixed; left:0; right:0; bottom:0;
  background:#fff; box-shadow: 0 -10px 30px rgba(0,0,0,.08);
  display:flex; justify-content:space-around; padding:10px 12px;
}
.bottomnav a{
  text-decoration:none; color:var(--muted);
  display:flex; flex-direction:column; align-items:center; gap:6px;
  font-size:11px;
}
.bottomnav a .fa-solid{font-size:18px}
.bottomnav a.active{color:#111827}

.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:92px;
  background:#111827;
  color:#fff;
  padding:10px 12px;
  border-radius:14px;
  box-shadow:var(--shadow);
  font-size:13px;
  display:none;
  max-width:90vw;
}
.modal-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.35);
  display:flex; align-items:flex-end; justify-content:center;
  padding:16px;
}
.modal{
  width:min(720px, 100%);
  background:#fff;
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:14px;
}
.modal h2{margin:0 0 10px 0; font-size:16px}
.modal .actions{display:flex; gap:10px; justify-content:flex-end; margin-top:10px}
