:root {
  --primary: #1645d2;
  --accent: #f17827;
  --bg: #f4f4f4;
  --text: #000;
  --muted: #64748b;
  --card: #fff;
  --border: #e2e8f0;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  overflow-x: hidden;
}
a { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1280px, 100% - clamp(1rem, 4vw, 2.5rem));
  margin-inline: auto;
}

/* ============ TOMBOL & BADGE ============ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: clamp(0.6rem, 1.5vw, 0.85rem) clamp(1.2rem, 3vw, 1.75rem);
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(0.85rem, 1.8vw, 0.98rem);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s, filter 0.2s;
  white-space: nowrap;
}
.button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--primary); }
.button-small { padding: 8px 16px; color: #fff; background: var(--accent); font-size: 0.85rem; }
.button-outline { margin-top: 20px; color: var(--primary); border: 2px solid var(--primary); background: transparent; box-shadow: none; }
.button-contrast { color: #111; background: #e8b931; }
.button-wide { width: 100%; border: 0; font: inherit; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4.5vw, 3.5rem); margin: 0 0 18px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); margin: 0 0 20px; }
h3 { margin: 10px 0 6px; font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ============ ADMIN LAYOUT & HEADER ============ */
.admin-page { background: #f8fafc; min-height: 100vh; }
.admin-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: 8px;
}
.admin-brand {
  color: var(--text);
  font-weight: 900;
  font-size: clamp(1rem, 2vw, 1.15rem);
  text-decoration: none;
}
.admin-brand small {
  display: block;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.admin-header nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}
.admin-header nav a { font-weight: 800; text-decoration: none; }

.dashboard, .form-page { padding: clamp(24px, 4vw, 48px) 0; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-heading h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0; }
.back-link { display: inline-block; margin-bottom: 16px; text-decoration: none; font-weight: 700; font-size: 0.9rem; }

/* ============ CARD & TABLES ============ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}
.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.filter-bar a {
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s;
}
.filter-bar a.is-selected { color: #fff; background: var(--primary); font-weight: 800; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
}
table {
  width: 100%;
  min-width: 768px;
  border-collapse: collapse;
}
th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 0.92rem;
}
th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f8fafc;
}
.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.status-active { color: #166534; background: #dcfce7; }
.status-inactive { color: #475569; background: #e2e8f0; }
.row-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.row-actions a, .link-button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.link-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.danger-link { color: #b91c1c; }
