/* ============================================================
   SuperApp — Design System
   Tema: Logo SMK Pujangga (hijau #1c9838)
   Mobile-first, modern, soft, profesional
   ============================================================ */

:root {
  --primary: #1c9838;
  --primary-dark: #0f7a2c;
  --primary-deep: #0b5c22;
  --primary-soft: #e8f7ec;
  --primary-faint: #f2fbf4;
  --primary-300: #7fd493;

  --bg: #f3f7f4;
  --surface: #ffffff;
  --line: #e4ebe6;
  --ink: #193b26;
  --ink-2: #33503f;
  --muted: #61776a;
  --muted-2: #84968c;

  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warning: #e8a13c;
  --warning-soft: #fdf3e4;
  --info: #2f7fd6;
  --info-soft: #e8f1fb;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16, 48, 32, 0.05), 0 2px 8px rgba(16, 48, 32, 0.04);
  --shadow: 0 8px 24px rgba(16, 48, 32, 0.08), 0 2px 6px rgba(16, 48, 32, 0.04);
  --shadow-lg: 0 18px 44px rgba(16, 48, 32, 0.16);

  --sidebar-w: 264px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary-deep); }

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 .5rem;
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  flex: none;
}
.brand-logo svg { display: none; }
.brand-name { font-weight: 800; font-size: 1.05rem; letter-spacing: .2px; color: var(--ink); line-height: 1.1; }
.brand-sub { font-size: .7rem; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; font-weight: 600; }

/* ---------- Layout shell ---------- */
.shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #ffffff, #f7fbf8);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(12, 40, 24, .45);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  z-index: 55;
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group-title {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted-2);
  padding: 16px 12px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600; font-size: .9rem;
  transition: background .15s, color .15s;
}
.nav-link svg { width: 19px; height: 19px; flex: none; color: var(--muted); transition: color .15s; }
.nav-link:hover { background: var(--primary-soft); color: var(--primary-deep); }
.nav-link:hover svg { color: var(--primary); }
.nav-link.active { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(28,152,56,.28); }
.nav-link.active svg { color: #fff; }
.nav-link .nav-badge {
  margin-left: auto;
  background: var(--primary-soft); color: var(--primary-deep);
  font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 1px 8px;
}
.nav-link.active .nav-badge { background: rgba(255,255,255,.22); color: #fff; }

.sidebar-foot {
  margin-top: auto;
  padding: 12px; border-radius: 12px;
  background: var(--primary-soft);
  font-size: .78rem; color: var(--ink-2);
}

/* ---------- Main ---------- */
.main {
  margin-left: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
}
.topbar-title { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary-deep); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-toggle { display: grid; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-size: .82rem; text-align: left;
}
.user-chip:active { transform: scale(.98); }
.avatar {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(145deg, var(--primary), var(--primary-deep));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .8rem; flex: none;
}
.user-chip .uname { font-weight: 700; color: var(--ink); }
.user-chip .urole { display: block; font-size: .68rem; color: var(--muted); }
.chip-text { display: none; flex-direction: column; line-height: 1.25; }

/* Auth blob dekoratif (gambar lingkaran lembut) */
.auth-blob-deco { position: absolute; background: radial-gradient(circle at 40% 40%, rgba(28,152,56,.22), rgba(28,152,56,0) 70%); border-radius: 50%; pointer-events: none; filter: blur(2px); }
.auth-blob { position: absolute; right: -60px; top: -40px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(28,152,56,.18), rgba(28,152,56,0)); filter: blur(4px); pointer-events: none; }
.auth-blob2 { position: absolute; left: -80px; bottom: -50px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle at 70% 70%, rgba(15,122,44,.14), rgba(15,122,44,0)); filter: blur(6px); pointer-events: none; }

.content {
  flex: 1;
  padding: 20px 16px 48px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

/* ---------- Page head ---------- */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px; margin-bottom: 20px;
}
.page-title { font-size: 1.35rem; font-weight: 800; margin: 0; }
.page-desc { color: var(--muted); font-size: .87rem; margin-top: 2px; }

/* ---------- Cards & stats ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-title { font-weight: 700; font-size: .95rem; margin: 0; }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: flex-start; gap: 12px;
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-num { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .78rem; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700; font-size: .88rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: .8rem; border-radius: 8px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(28,152,56,.25); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-secondary:hover { background: var(--primary-faint); border-color: var(--primary-300); color: var(--primary-deep); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #cf3f43; color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary-deep); }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.label {
  display: block; margin-bottom: 6px;
  font-weight: 700; font-size: .82rem; color: var(--ink-2);
}
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28,152,56,.15);
}
.input:hover:not(:focus), .select:hover:not(:focus), .textarea:hover:not(:focus) { border-color: #cbd8d0; }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2361776a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input-error { border-color: var(--danger) !important; }
.error-text { color: var(--danger); font-size: .78rem; margin-top: 4px; }
.hint { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 18px 16px; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.checkbox { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--primary-soft); color: var(--primary-deep); }
.badge-warning { background: var(--warning-soft); color: #a2681a; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: #eef2ef; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table thead th {
  text-align: left;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafcfa;
  white-space: nowrap;
}
.table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .88rem; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--primary-faint); }
.table .cell-strong { font-weight: 700; color: var(--ink); }
.table .cell-muted { color: var(--muted); font-size: .8rem; }
.row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.row-actions .btn { padding: 7px 9px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.pagination .info { color: var(--muted); font-size: .8rem; }
.pagination-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination-links a, .pagination-links span {
  display: grid; place-items: center;
  min-width: 34px; height: 34px; padding: 0 6px;
  border-radius: 9px; font-size: .82rem; font-weight: 700;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.pagination-links a:hover { background: var(--primary-soft); color: var(--primary-deep); }
.pagination-links .active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination-links .disabled { opacity: .45; pointer-events: none; }

/* ---------- Alerts ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: 12px; padding: 12px 14px;
  font-size: .87rem; font-weight: 600;
  margin-bottom: 16px;
  animation: slideDown .3s ease;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-success { background: var(--primary-soft); color: var(--primary-deep); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: #a2681a; }
.alert .alert-close { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: .6; }
.alert .import-errors { margin-top: 8px; font-weight: 500; font-size: .82rem; line-height: 1.5; }
.alert .import-errors ol { margin: 4px 0 0; padding-left: 18px; }
.alert .import-errors li { margin-bottom: 2px; word-break: break-word; }

/* Token highlight */
.token-box {
  background: #0f2b1b; color: #7fd493;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border-radius: 10px; padding: 12px 14px;
  font-size: .8rem; word-break: break-all;
  position: relative;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty-state svg { width: 44px; height: 44px; color: var(--primary-300); margin-bottom: 10px; }
.empty-state p { margin: 0 0 4px; font-weight: 700; color: var(--ink-2); font-size: .95rem; }
.empty-state span { font-size: .82rem; }

/* ---------- Charts ---------- */
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 200px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-track { width: 100%; max-width: 46px; background: var(--primary-soft); border-radius: 8px 8px 3px 3px; position: relative; overflow: hidden; }
.bar-fill { background: linear-gradient(180deg, #34c25a, var(--primary-deep)); border-radius: inherit; width: 100%; display: block; }
.bar-label { font-size: .66rem; color: var(--muted); font-weight: 700; white-space: nowrap; transform: rotate(0); }

/* ---------- Footer ---------- */
.page-foot {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: .78rem;
  text-align: center;
}

/* ---------- Utility ---------- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--muted); }
.text-sm { font-size: .82rem; }
.font-mono { font-family: ui-monospace, Menlo, monospace; }
.d-none { display: none; }

/* ---------- Animation ---------- */
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: rgba(12, 40, 24, .45);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 100;
  padding: 20px;
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px 24px 20px;
  max-width: 360px; width: 100%;
  text-align: center;
  transform: scale(.94);
  transition: transform .2s ease;
}
.modal.show .modal-card { transform: scale(1); }
.modal-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--danger-soft); color: var(--danger);
  display: grid; place-items: center; margin: 0 auto 12px;
}
.modal-icon svg { width: 26px; height: 26px; }
.modal-card h3 { margin: 0 0 6px; }
.modal-card p { color: var(--muted); font-size: .88rem; margin: 0 0 18px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* Import/Export Excel */
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.modal-card-lg { max-width: 680px; max-height: 90vh; overflow-y: auto; text-align: left; }
.modal-card-lg p { text-align: left; }
.import-lead { margin-bottom: 14px; }
.import-steps {
  background: var(--bg, #f6faf7); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px 8px; margin-bottom: 14px;
}
.import-steps-title {
  font-weight: 800; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--primary-deep); margin-bottom: 6px;
}
.import-steps ol { margin: 0; padding-left: 20px; }
.import-steps li { font-size: .85rem; line-height: 1.6; color: var(--ink-soft); }
.import-cols-wrap { max-height: 235px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.import-cols { margin: 0; font-size: .82rem; }
.import-cols td, .import-cols th { white-space: normal; }
.import-form .modal-actions { margin-top: 6px; }
.file-btn {
  cursor: pointer; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
}
.file-btn .file-name { font-weight: 600; color: var(--primary-deep); }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
code { background: var(--bg, #f0f5f1); padding: 1px 6px; border-radius: 5px; font-size: .76em; }

.field-hint { display: block; margin-top: 6px; font-size: .74rem; color: var(--muted); background: transparent; padding: 0; }

/* ---------- Detail guru & pemberkasan ---------- */
.card-head .card-sub { margin: 2px 0 0; font-size: .76rem; color: var(--muted); }
.card-title { display: flex; align-items: center; gap: 8px; }
.card-title-ic { width: 16px; height: 16px; color: var(--primary); flex: none; }

.profile-card { position: relative; overflow: hidden; padding: 0; margin-bottom: 18px; }
.profile-deco {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(620px 240px at 100% -10%, rgba(28, 152, 56, .16), transparent 60%),
    radial-gradient(460px 220px at 0% 0%, rgba(127, 212, 147, .12), transparent 55%);
}
.profile-inner { position: relative; padding: 24px 22px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.profile-avatar {
  width: 86px; height: 86px; border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), var(--primary-deep));
  color: #fff; font-size: 2rem; font-weight: 800;
  display: grid; place-items: center; flex: none;
  box-shadow: 0 10px 22px rgba(28, 152, 56, .35);
  border: 3px solid #fff;
}
.profile-avatar.avatar-img { overflow: hidden; padding: 0; }
.profile-avatar.avatar-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-main { flex: 1; min-width: 240px; }
.profile-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-name { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.online-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 3px var(--primary-soft); } 50% { box-shadow: 0 0 0 7px var(--primary-soft); } }
.profile-role { color: var(--primary-deep); font-weight: 700; font-size: .95rem; margin: 4px 0 10px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.contact-chip {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--bg, #f5f9f6); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 12px; min-width: 130px;
}
.contact-chip .k { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); }
.contact-chip .v { font-weight: 700; font-size: .84rem; color: var(--ink-2); word-break: break-all; }

.profile-stats {
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fcfefd, #f5faf6);
  padding: 16px 22px;
  display: flex; gap: 12px 26px; flex-wrap: wrap;
}
.mini-stat { display: flex; align-items: center; gap: 12px; min-width: 150px; }
.ms-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.ms-icon svg { width: 19px; height: 19px; }
.ms-num { font-size: 1.15rem; font-weight: 800; line-height: 1.15; color: var(--ink); }
.ms-label { font-size: .72rem; color: var(--muted); font-weight: 600; }

.meta-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.meta-table th, .meta-table td { text-align: left; padding: 9px 4px; vertical-align: top; }
.meta-table th { width: 36%; color: var(--muted); font-weight: 600; white-space: nowrap; }
.meta-table tr + tr th, .meta-table tr + tr td { border-top: 1px solid var(--line); }
.txt-ago { color: var(--muted); font-size: .78rem; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg, #f4f8f5); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 999px; font-size: .8rem; color: var(--ink-2);
}
.pill svg { color: var(--primary); }
.pill b { color: var(--primary-deep); }
.mt-2 { margin-top: 10px; }
.col-span-2 { grid-column: 1 / -1; }

/* Dokumen / pemberkasan */
.doc-summary { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ds-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.ds-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.ds-icon svg { width: 18px; height: 18px; }
.ds-icon-green { background: var(--primary-soft); color: var(--primary); }
.ds-icon-blue { background: var(--info-soft); color: var(--info); }
.ds-icon-amber { background: var(--warning-soft); color: #a2681a; }
.ds-num { font-size: 1.02rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.ds-label { font-size: .7rem; color: var(--muted); font-weight: 600; }

.doc-groups { padding: 4px 18px 14px; }
.doc-group + .doc-group { border-top: 1px solid var(--line); margin-top: 6px; }
.doc-group-head { display: flex; align-items: center; gap: 10px; padding: 14px 2px 6px; }
.doc-cat { font-weight: 800; font-size: .86rem; color: var(--ink); }
.doc-cat-count { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--bg, #f1f6f2); padding: 2px 9px; border-radius: 999px; }
.doc-cat-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.doc-cat-ic svg { width: 16px; height: 16px; }
.doc-cat-ktp, .doc-cat-sk { background: var(--info-soft); color: var(--info); }
.doc-cat-kk, .doc-cat-sertifikat { background: var(--warning-soft); color: #a2681a; }
.doc-cat-ijazah { background: var(--primary-soft); color: var(--primary-deep); }
.doc-cat-transkrip { background: #eef0fb; color: #4f5bb5; }
.doc-cat-sertifikat_pendidik { background: #f3e7fb; color: #9d4dc9; }
.doc-cat-skp { background: #e2f3ea; color: #127a55; }
.doc-cat-lainnya { background: #eef2ef; color: var(--muted); }

.doc-list { padding: 2px 2px 6px; }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px dashed var(--line); }
.doc-row:last-child { border-bottom: none; }
.doc-file {
  width: 40px; height: 44px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3px;
}
.doc-file.pdf { background: var(--danger-soft); color: var(--danger); }
.doc-file.jpg, .doc-file.jpeg, .doc-file.png { background: var(--info-soft); color: var(--info); }
.doc-file.default { background: var(--primary-soft); color: var(--primary-deep); }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-weight: 800; font-size: .9rem; color: var(--ink); word-break: break-word; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--muted); font-size: .75rem; margin-top: 3px; align-items: center; }
.doc-meta b { color: var(--muted); font-weight: 700; }
.doc-meta .ukuran { color: var(--primary-deep); font-weight: 700; }
.doc-meta .ket { color: var(--muted-2); }
.doc-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.doc-actions .btn svg { width: 13px; height: 13px; }
.doc-actions form { margin: 0; }

.empty-state .empty-cta { margin-top: 16px; display: flex; justify-content: center; }

/* ---------- Auth pages ---------- */
.auth-page { background: radial-gradient(1100px 600px at 85% -10%, #dff3e6 0%, rgba(223,243,230,0) 55%), radial-gradient(900px 500px at -5% 110%, #d4eee0 0%, rgba(212,238,224,0) 55%), var(--bg); min-height: 100vh; }
.auth-bg { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 18px; position: relative; }
.auth-card { position: relative; width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 30px 30px 26px; }
.auth-title { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.auth-sub { color: var(--muted); font-size: .87rem; margin: 4px 0 22px; }
.auth-foot { color: var(--muted-2); font-size: .76rem; margin-top: 22px; text-align: center; }

/* ---------- Login switch ---------- */
.auth-alt { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 16px; }

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  .sidebar { transform: translateX(0); }
  .sidebar-overlay { display: none; }
  .menu-toggle { display: none; }
  .main { margin-left: var(--sidebar-w); }
  .content { padding: 24px 28px 56px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .chip-text { display: flex; }
  .user-chip { padding: 6px 12px 6px 6px; }
}

@media (max-width: 640px) {
  .profile-inner { padding: 18px 16px; gap: 14px; }
  .profile-avatar { width: 66px; height: 66px; font-size: 1.5rem; }
  .contact-chip { min-width: 100%; }
  .profile-stats { padding: 14px 16px; gap: 14px; }
  .mini-stat { min-width: calc(50% - 20px); }
  .doc-summary { padding: 12px; }
  .ds-item { flex: 1 1 42%; min-width: 130px; padding: 9px 11px; }
  .doc-groups { padding: 2px 12px 12px; }
  .doc-row { flex-wrap: wrap; gap: 10px; }
  .doc-actions { width: 100%; justify-content: flex-start; padding-left: 54px; }
  .doc-actions .btn { padding: 6px 10px; }
}