/* Senada dengan halaman login app.kerjoo.com: Rubik, hijau Kerjoo, card putih membulat, input 8px, tombol 4px */
:root {
  --bg: #f1fcfa;
  --card: #ffffff;
  --text: #2b2b2b;
  --muted: #6c757d;
  --primary: #25a091;
  --primary-hover: #3ba99c;
  --primary-ring: rgba(37, 160, 145, 0.18);
  --primary-text: #ffffff;
  --link: #7366ff;
  --danger: #dc3545;
  --border: #e6edef;
  --divider: rgba(0, 0, 0, 0.1);
  --input-bg: #ffffff;
  --input-border: #dfe3e8;
  --google: #333333;
  --google-text: #ffffff;
  --notice: #e3f5f2;
  --alert: #fdecea;
  --alert-text: #a12a1f;
  --shadow: 0 0 20px rgba(8, 21, 66, 0.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1e26;
    --card: #262932;
    --text: rgba(255, 255, 255, 0.78);
    --muted: rgba(255, 255, 255, 0.5);
    --primary-hover: #2bb3a3;
    --primary-ring: rgba(37, 160, 145, 0.35);
    --link: #9d93ff;
    --danger: #f2737f;
    --border: #374558;
    --divider: rgba(255, 255, 255, 0.1);
    --input-bg: #1d1e26;
    --input-border: rgba(255, 255, 255, 0.22);
    --google: #111217;
    --notice: #173a36;
    --alert: #3a1d1b;
    --alert-text: #f5b4ad;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 Rubik, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  padding: 48px 16px;
}
.card {
  width: 100%;
  max-width: 450px;
  margin: auto;
  background: var(--card);
  border-radius: 15px;
  box-shadow: var(--shadow);
  padding: 30px;
}
.card.wide { max-width: 820px; }
.brand { display: block; line-height: 0; }
.brand img { width: 112px; height: auto; }
h1 { font-size: 22px; font-weight: 500; line-height: 1.25; margin: 24px 0 8px; }
h2 { font-size: 16px; font-weight: 500; margin: 28px 0 10px; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 20px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.lead { font-size: 12px; margin-bottom: 20px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.notice { background: var(--notice); padding: 10px 14px; border-radius: 8px; }
.alert { background: var(--alert); color: var(--alert-text); padding: 10px 14px; border-radius: 8px; }
.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;
}

.field { display: block; margin-bottom: 16px; }
input[type="email"], input[type="password"], input[type="date"], select {
  display: block;
  width: 100%;
  height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--muted); }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.forgot { margin: -6px 0 20px; font-size: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.5;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--input-border); color: var(--text); }
.btn-outline:hover { border-color: var(--muted); }
/* sama dengan .btn-login-google app.kerjoo.com: ikon 18px dengan jarak 8px, teks 13px, letter-spacing 0.7px */
.btn-google { gap: 0; min-height: 36px; background: var(--google); color: var(--google-text); letter-spacing: 0.7px; }
.btn-google img { flex: none; margin: 0 8px; }
.btn-google span { font-size: 13px; line-height: 1.5; }
.btn-danger { border-color: var(--danger); color: var(--danger); padding: 4px 12px; font-size: 12px; }
.btn-danger:hover { background: var(--danger); color: #ffffff; }
.btn-link { border: 0; padding: 0; color: var(--link); font-size: inherit; }
.btn-link:hover { text-decoration: underline; }

.divider { border: 0; border-top: 1px solid var(--divider); margin: 16px 0; }
.actions { display: flex; gap: 12px; justify-content: flex-end; margin: 24px 0 16px; }
.footer { margin-top: 20px; }
/* judul halaman dengan aksi di kanan (mis. tombol Keluar di /connections) */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.page-head form { margin-top: 24px; flex: none; }
.btn-sm { padding: 4px 14px; font-size: 13px; }
.footer form { display: inline; }

.scopes { list-style: none; padding: 0; margin: 0 0 16px; }
.scopes li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px solid var(--border); }
.scopes li:last-child { border-bottom: 0; }
.scopes li::before {
  content: "";
  position: absolute; left: 4px; top: 13px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

.write-option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin: 16px 0 0; cursor: pointer; }
.write-option input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.write-option strong { display: block; margin-bottom: 2px; }
.write-actions { margin: 4px 0 6px; padding-left: 18px; }
.write-actions li { padding: 2px 0; }
.write-option:has(input:checked) { border-color: var(--primary); background: var(--notice); }

.stat { display: inline-block; background: var(--notice); border-radius: 8px; padding: 8px 14px; margin-bottom: 4px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { font-weight: 500; color: var(--muted); }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }

/* riwayat pemakaian: filter (GET, tanpa JavaScript) & navigasi halaman keyset */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.filters label { display: block; }
.filters label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.filters select, .filters input { padding: 6px 12px; }
.filter-actions { display: flex; gap: 8px; }
.filter-actions .btn { padding: 8px 18px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 4px; }
.pager span { display: inline-flex; align-items: center; gap: 12px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.badge-ok { background: var(--notice); color: var(--primary); }
.badge-error { background: var(--alert); color: var(--alert-text); }

@media (max-width: 480px) {
  body { padding: 24px 16px; }
  .card { padding: 22px; }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  td { border: 0; padding: 2px 0; }
  tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
}
