@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:        #0B0D10;
  --surface:   #14171B;
  --surface-2: #1B1F24;
  --border:    #22262B;
  --text:      #EAEAEA;
  --muted:     #8B92A0;
  --accent:    #D4A24C;
  --accent-ink:#1A1406;
  --danger:    #C1554D;
  --success:   #4C9A6A;
  --radius:    10px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(212,162,76,0.07), transparent 40%),
    radial-gradient(circle at 100% 20%, rgba(76,154,106,0.05), transparent 35%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: var(--accent); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 9px; height: 9px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  border-radius: 0 6px 0 0;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.brand-text span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s ease, transform .1s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }

/* ---------- Toolbar / search ---------- */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  flex: 1 1 280px;
  max-width: 420px;
}
.search-box .prompt { color: var(--accent); font-family: var(--font-mono); font-size: 14px; }
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 0;
  width: 100%;
}
.search-box input::placeholder { color: var(--muted); }

.count-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  white-space: nowrap;
}

/* ---------- Alert / flash ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid;
}
.alert-success { background: rgba(76,154,106,0.1); border-color: var(--success); color: #9fd8b3; }
.alert-danger  { background: rgba(193,85,77,0.1); border-color: var(--danger); color: #f0b3ae; }

/* ---------- Table ---------- */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); border-left-color: var(--accent); }

tbody td { padding: 14px 16px; font-size: 14px; vertical-align: top; }

td.col-nama { font-weight: 600; }
td.col-link a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}
td.col-link a:hover { color: var(--accent); border-color: var(--accent); }

td.col-desc {
  color: var(--muted);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td.col-aksi { text-align: right; white-space: nowrap; }
td.col-aksi .btn { margin-left: 6px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .glyph {
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.pagination a, .pagination span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  padding: 0 8px;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.pagination .disabled { color: var(--muted); opacity: .4; pointer-events: none; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 620px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field input, .field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease;
}
.field textarea { resize: vertical; min-height: 100px; font-family: var(--font-mono); font-size: 13px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field .error { color: var(--danger); font-size: 12.5px; margin-top: 6px; }

.form-actions { display: flex; gap: 10px; margin-top: 22px; }

/* ---------- Detail view ---------- */
.detail-grid { display: grid; gap: 18px; }
.detail-row .label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-row .value { font-size: 15px; }
.detail-row .value.mono { font-family: var(--font-mono); font-size: 13.5px; word-break: break-all; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 6px 4px;
    background: var(--surface-2);
  }
  tbody tr:hover { border-left: 1px solid var(--accent); }
  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px dashed var(--border);
  }
  tbody td:last-child { border-bottom: none; }
  tbody td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    color: var(--muted);
    flex-shrink: 0;
    padding-top: 2px;
  }
  td.col-desc { white-space: normal; max-width: none; text-align: right; }
  td.col-aksi { justify-content: flex-end; }
  td.col-aksi .btn { margin-left: 8px; }

  .form-card { padding: 18px; }
}
