@font-face {
  font-family: Padauk;
  src: url("../assets/Padauk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Padauk;
  src: url("../assets/Padauk-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #0a1f3a;
  --navy-2: #12304f;
  --teal: #0e7490;
  --teal-2: #155e75;
  --gold: #c9a227;
  --gold-2: #e8c960;
  --cream: #f6f1e8;
  --paper: #f4f7fb;
  --ink: #142033;
  --muted: #5b6b80;
  --line: #d7e0ea;
  --ok: #0f766e;
  --warn: #b45309;
  --bad: #b91c1c;
  --wait: #6d28d9;
  --side: 268px;
  --shadow: 0 10px 30px rgba(10, 31, 58, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Padauk, "Noto Sans Myanmar", Pyidaungsu, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

button, input, select, textarea {
  font-family: inherit;
}

a { color: var(--teal-2); text-decoration: none; }

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--side);
  background: linear-gradient(180deg, var(--navy) 0%, #071526 100%);
  color: #e8eef6;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 10px;
}
.brand img {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--gold);
  background: var(--navy-2);
}
.brand h1 { font-size: 16px; margin: 0; line-height: 1.3; color: #fff; }
.brand small { color: var(--gold-2); font-size: 12px; letter-spacing: .04em; }

.nav-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; border: 0; color: #c9d6e6;
  padding: 11px 12px; border-radius: 10px; cursor: pointer; font-size: 16px;
}
.nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-btn.active { background: rgba(14,116,144,.35); color: #fff; outline: 1px solid rgba(201,162,39,.35); }
.nav-ico { width: 22px; text-align: center; opacity: .9; }
.side-foot { margin-top: auto; padding: 12px 8px 4px; color: #8aa0b8; font-size: 13px; }

.main { flex: 1; min-width: 0; }
.topbar {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar h2 { margin: 0; font-size: 22px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; min-width: 280px;
}
.search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 16px; }
.userchip { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy); color: var(--gold-2);
  display: grid; place-items: center; font-weight: 700;
}

.page { padding: 24px; max-width: 1280px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 28px; color: var(--navy); line-height: 1.2; }
.stat span { color: var(--muted); font-size: 15px; }
.stat em { font-style: normal; font-size: 13px; color: var(--teal); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filters select, .filters input, .field input, .field select, .field textarea {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 10px; font-size: 15px; color: var(--ink);
}
.btn {
  border: 0; border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 15px;
  background: var(--navy); color: #fff;
}
.btn.gold { background: var(--gold); color: var(--navy); font-weight: 700; }
.btn.ghost { background: #eef3f8; color: var(--navy); }
.btn.teal { background: var(--teal); }
.btn.danger { background: #9f1239; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 14px; color: var(--muted); font-weight: 700; background: #f8fafc; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f0f7fb; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--teal-2); }

.badge {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.badge.active { background: #ccfbf1; color: var(--ok); }
.badge.pending { background: #ede9fe; color: var(--wait); }
.badge.expired { background: #ffedd5; color: var(--warn); }
.badge.suspended { background: #fee2e2; color: var(--bad); }
.badge.yes { background: #ecfeff; color: var(--teal-2); }
.badge.no { background: #f1f5f9; color: #64748b; }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.course, .mini {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px;
}
.course h3, .mini h3 { margin: 0 0 6px; font-size: 18px; }

/* landing */
.landing { min-height: 100vh; background: var(--navy); color: #e8eef6; }
.hero {
  max-width: 1100px; margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center;
}
.hero img.seal { width: min(420px, 100%); border-radius: 50%; border: 6px solid var(--gold); }
.hero h1 { font-size: 44px; line-height: 1.25; margin: 8px 0 12px; color: #fff; }
.hero p.lead { font-size: 20px; color: #c5d2e2; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.features { background: var(--cream); color: var(--ink); padding: 36px 24px 60px; }
.features-in { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feat { background: #fff; border-radius: 16px; padding: 18px; border: 1px solid #eadfca; }
.feat b { display: block; font-size: 18px; margin-bottom: 6px; color: var(--navy); }

/* drawer */
.overlay {
  position: fixed; inset: 0; background: rgba(7, 15, 28, .45); z-index: 40;
  display: none;
}
.overlay.show { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(520px, 96vw);
  background: #fff; z-index: 50; transform: translateX(110%);
  transition: transform .25s ease; overflow: auto;
  box-shadow: -20px 0 50px rgba(0,0,0,.18);
}
.drawer.show { transform: none; }
.drawer-h { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.idcard {
  margin: 18px; background: linear-gradient(135deg, var(--navy), #155e75);
  color: #fff; border-radius: 18px; padding: 18px; position: relative; overflow: hidden;
}
.idcard:after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  border: 18px solid rgba(201,162,39,.25); border-radius: 50%;
}
.id-top { display: flex; justify-content: space-between; align-items: start; }
.idcard img { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.id-name { font-size: 24px; margin: 16px 0 4px; }
.id-meta { color: #cfe3ee; font-size: 15px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 10px; padding: 8px 20px 20px; }
.kv b { color: var(--muted); font-weight: 400; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--navy); color: #fff;
  padding: 12px 16px; border-radius: 12px; display: none; z-index: 80;
  border-left: 4px solid var(--gold);
}
.toast.show { display: block; }

.empty { padding: 40px; text-align: center; color: var(--muted); }

@media (max-width: 980px) {
  .stats, .features-in, .grid-3, .grid-2, .hero, .form-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .search { min-width: 0; width: 160px; }
}
