@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
}

* { box-sizing: border-box; }
body {
  font-family: 'Sarabun', 'Segoe UI', Tahoma, sans-serif;
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
}
.btn {
  padding: 10px 18px; border: none; border-radius: 9px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500;
  background: var(--teal-600); color: #fff; transition: background .15s;
}
.btn:hover { background: var(--teal-700); }
.btn-ghost { background: #fff; color: var(--slate-700); border: 1px solid #cbd5e1; }
.btn-ghost:hover { background: var(--slate-100); }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1;
  border-radius: 9px; font-family: inherit; font-size: 14px; background: #fff;
}
.input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-100); border-color: var(--teal-600); }
label { display:block; font-size: 13px; color: var(--slate-700); margin-bottom: 6px; font-weight: 500; }
.field { margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { background: var(--slate-50); font-weight: 600; color: var(--slate-700); font-size: 13px; }
.badge { display:inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge-teal { background: var(--teal-100); color: var(--teal-700); }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-slate { background: var(--slate-100); color: var(--slate-500); }
.grid { display: grid; gap: 16px; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: 16px; max-width: 560px; width: 100%;
  padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.stat-card {
  background: #fff; border:1px solid #e2e8f0; border-radius: 14px; padding: 18px 20px;
}
.stat-num { font-size: 30px; font-weight: 700; color: var(--teal-700); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--slate-500); margin-top: 4px; }
.muted { color: var(--slate-500); font-size: 13px; }
a { color: var(--teal-700); }
@media (max-width: 640px) {
  th, td { padding: 8px; font-size: 13px; }
  .stat-num { font-size: 24px; }
}
