:root {
  --bg: #f1f5f4;
  --card: #ffffff;
  --ink: #0c1f1b;
  --ink-2: #2c4340;
  --muted: #5f7570;
  --brand: #0f766e;
  --brand-dark: #0b5a54;
  --line: #dbe5e2;
  --line-soft: #ecf2f0;
  --menunggu: #b45309;
  --diproses: #1d4ed8;
  --disetujui: #15803d;
  --ditolak: #b91c1c;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(12, 31, 27, 0.05);
  --shadow-md: 0 6px 18px -10px rgba(12, 31, 27, 0.28);
  --ring: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 90% 55% at 50% -12%, #e3efeb 0%, rgba(241, 245, 244, 0) 62%);
  background-repeat: no-repeat;
  background-size: 100% 460px;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.7rem 1.4rem;
  background: linear-gradient(135deg, #0f766e 0%, #0b5a54 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 8px 22px -16px rgba(6, 40, 37, 0.95);
}
.topbar a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.nav { display: flex; gap: 0.2rem; flex-wrap: wrap; align-items: center; }
.nav a {
  padding: 0.38rem 0.7rem;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; text-decoration: none; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
h1 { font-size: 1.55rem; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 0.35rem; }
h2 { font-size: 1.02rem; letter-spacing: -0.01em; margin: 0 0 0.85rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.card > h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.7rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.card.empty { text-align: center; color: var(--muted); padding: 2.25rem 1rem; }
.empty-title { color: var(--ink-2); font-weight: 600; margin: 0 0 0.25rem; font-size: 0.98rem; }
.empty p { margin: 0 0 0.9rem; }
.auth-card { max-width: 430px; margin: 3rem auto; padding: 1.9rem 1.75rem 1.5rem; border-radius: 18px; box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: 1.35rem; }
.auth-card .btn-primary { width: 100%; justify-content: center; padding: 0.62rem 1rem; }
.auth-card > p:last-child { margin-bottom: 0; }

label { display: block; margin-bottom: 0.85rem; font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=password], input[type=email], select, textarea {
  width: 100%;
  margin-top: 0.32rem;
  padding: 0.58rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #9aaba7; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}
textarea { min-height: 96px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.92rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease;
}
.btn:hover { background: #f7faf9; border-color: #cfdcd8; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(11, 90, 84, 0.35); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); }
.topbar .btn-ghost { color: #fff; }
main .btn-ghost { border-color: var(--line); color: var(--ink-2); }
main .btn-ghost:hover { background: #f7faf9; border-color: #cfdcd8; }
.btn-danger { background: #fff; border-color: #f0c4c4; color: var(--ditolak); }
.btn-danger:hover { background: #fef5f5; }
.btn-small { padding: 0.3rem 0.62rem; font-size: 0.83rem; border-radius: 8px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.68rem 0.8rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th {
  background: #f6faf9;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f9fcfb; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
td.actions { display: flex; gap: 0.4rem; align-items: center; }
.row-form { display: contents; }
.inline-form { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { flex: 1 1 180px; margin-bottom: 0; }
.filters {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: #f8fbfa;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.filters label { margin-bottom: 0; min-width: 185px; flex: 1 1 185px; }
.filters .btn { flex: 0 0 auto; }
.check { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; margin: 0; color: var(--ink-2); }
.check input { width: auto; margin: 0; accent-color: var(--brand); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.17rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #e6eeec;
  color: var(--ink-2);
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge-role { background: rgba(255,255,255,0.18); color: #fff; font-weight: 600; }
.badge-menunggu { background: #fef3c7; color: var(--menunggu); }
.badge-diproses { background: #dbeafe; color: var(--diproses); }
.badge-disetujui { background: #dcfce7; color: var(--disetujui); }
.badge-ditolak { background: #fee2e2; color: var(--ditolak); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); gap: 0.85rem; margin-bottom: 1.3rem; }
.stat {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--brand); }
.stat-num { display: block; font-size: 1.9rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-menunggu::before { background: var(--menunggu); }
.stat-diproses::before { background: var(--diproses); }
.stat-disetujui::before { background: var(--disetujui); }
.stat-ditolak::before { background: var(--ditolak); }

.detail { display: grid; grid-template-columns: 175px 1fr; gap: 0.5rem 1.2rem; margin: 0; }
.detail dt { font-weight: 600; color: var(--muted); font-size: 0.88rem; }
.detail dd { margin: 0; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line-soft); }
.timeline li { position: relative; padding: 0 0 0.95rem 0.85rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.42rem;
  top: 0.38rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px #fff;
}

.alert { padding: 0.68rem 0.88rem; border-radius: 10px; margin-bottom: 0.9rem; font-size: 0.88rem; font-weight: 500; }
.alert-error { background: #fef2f2; color: var(--ditolak); border: 1px solid #fbd5d5; }

.footer { text-align: center; color: #859894; font-size: 0.8rem; padding: 1.75rem 1rem; border-top: 1px solid var(--line-soft); }

@media (max-width: 720px) {
  .container { padding: 1.5rem 1rem 3rem; }
  .detail { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .detail dd { margin-bottom: 0.65rem; }
  .userbox { margin-left: 0; }
  h1 { font-size: 1.3rem; }
  .auth-card { margin: 1.5rem auto; padding: 1.6rem 1.3rem 1.3rem; }
}

/* ---------- Landing page ---------- */
.btn-light { background: #fff; border-color: #fff; color: var(--brand); }
.btn-light:hover { background: #eef4f2; }
.btn-outline { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: rgba(15, 118, 110, 0.08); }
.btn-lg { padding: 0.7rem 1.4rem; font-size: 1rem; }

.hero {
  background: linear-gradient(135deg, #0f766e 0%, #0b5d57 55%, #0a4a45 100%);
  color: #fff;
  padding: 3rem 1rem 3.5rem;
  margin: -2rem -1.25rem 0;
}
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.hero-title { font-size: 2.15rem; line-height: 1.2; margin: 0 0 0.75rem; color: #fff; }
.hero-sub { font-size: 1.02rem; color: rgba(255, 255, 255, 0.88); margin: 0 0 1.4rem; max-width: 34rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-actions .btn-primary { background: #fff; border-color: #fff; color: var(--brand); }
.hero-actions .btn-primary:hover { background: #eef4f2; }
.hero-actions .btn-outline { border-color: rgba(255, 255, 255, 0.75); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255, 255, 255, 0.14); }
.hero-note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); margin: 0.9rem 0 0; }

.hero-card {
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 18px 40px rgba(4, 40, 36, 0.28);
}
.hero-card h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border: 0; padding: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.steps li { display: flex; gap: 0.75rem; align-items: flex-start; }
.steps p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.step-num {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.section { margin: 2.5rem 0; }
.section-head { margin-bottom: 1rem; }
.section-head h2 { font-size: 1.35rem; margin: 0 0 0.25rem; border: 0; padding: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-card h3 { font-size: 1rem; margin: 0.5rem 0 0.35rem; }
.feature-card p { margin: 0; }
.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e6f2f0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.cta {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.cta h2 { margin: 0 0 0.25rem; font-size: 1.25rem; border: 0; padding: 0; }
.cta-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.75rem; }
}

@media (max-width: 640px) {
  .hero { padding: 2rem 1rem 2.5rem; margin: -1.5rem -1rem 0; }
}
