/* CV Study in Saudi › sistem desain "Tenang".
   Perluasan resep modul terbaru (BERSERI, Serah Rapor, Periksa 5K): token --app-*, satu aksen hijau hutan, kontrol pil 44px,
   pemisah dengan selisih nada (garis hanya pada tabel & kertas CV). Root .scv dipakai view staf (#saudiCvView) dan portal santri.
   Prinsip: satu layar satu tombol utama · sistem selalu menunjukkan langkah berikutnya · status = ikon + teks (bukan warna saja)
   · aksi yang dapat dibatalkan memakai toast "Urungkan"; dialog konfirmasi hanya untuk aksi permanen. */

@font-face { font-family: 'ScvAmiri'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/saudi-cv/fonts/amiri-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'ScvAmiri'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/saudi-cv/fonts/amiri-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

.scv {
  --scv-bg: var(--app-bg, #f0f4ed);
  --scv-card: var(--app-card, #ffffff);
  --scv-ink: var(--app-text, #1e293b);
  --scv-dim: color-mix(in srgb, var(--scv-ink) 72%, var(--scv-card));
  --scv-faint: color-mix(in srgb, var(--scv-ink) 52%, var(--scv-card));
  --scv-fill: color-mix(in srgb, var(--scv-ink) 6%, var(--scv-card));
  --scv-fill-2: color-mix(in srgb, var(--scv-ink) 10%, var(--scv-card));
  --scv-sunken: color-mix(in srgb, var(--scv-ink) 4%, var(--scv-card));
  --scv-line: color-mix(in srgb, var(--scv-ink) 14%, transparent);
  --scv-accent: #2f6f4e;
  --scv-accent-soft: #e3f1e8;
  --scv-on-accent: #ffffff;
  --scv-focus: color-mix(in srgb, var(--scv-accent) 55%, transparent);
  /* Tingkat masalah: bentuk ikon berbeda (● ▲ ◆) agar tidak bergantung pada warna. */
  --scv-error: #b54a3c; --scv-error-bg: #fbe5e1;
  --scv-warn: #8a5a00; --scv-warn-bg: #fdf0d2;
  --scv-saran: #0369a1; --scv-saran-bg: #dff0fa;
  /* Status kandidat */
  --scv-s-data: #64748b; --scv-s-draft: #0369a1; --scv-s-kurang: #8a5a00; --scv-s-siap: #0e7490; --scv-s-review: #4f46e5;
  --scv-s-revisi: #b54a3c; --scv-s-ubah: #8a5a00; --scv-s-setuju: #2f6f4e; --scv-s-pdf: #14532d; --scv-s-arsip: #94a3b8;
  --scv-r-lg: 20px; --scv-r: 14px; --scv-r-sm: 10px;
  --scv-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --scv-ar: 'ScvAmiri', 'IjazahAmiri', 'Amiri', 'Traditional Arabic', 'Noto Naskh Arabic', serif;
  color: var(--scv-ink);
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
[data-theme="dark"] .scv {
  --scv-accent: #7cc49a; --scv-accent-soft: rgba(124, 196, 154, 0.16); --scv-on-accent: #0b1f14;
  --scv-error: #ff9a8b; --scv-error-bg: rgba(240, 110, 95, 0.18);
  --scv-warn: #f0c46b; --scv-warn-bg: rgba(240, 196, 107, 0.16);
  --scv-saran: #7cc4f0; --scv-saran-bg: rgba(56, 189, 248, 0.14);
  --scv-s-data: #94a3b8; --scv-s-draft: #7cc4f0; --scv-s-kurang: #f0c46b; --scv-s-siap: #5fd0dc; --scv-s-review: #a5a8ff;
  --scv-s-revisi: #ff9a8b; --scv-s-ubah: #f0c46b; --scv-s-setuju: #7cc49a; --scv-s-pdf: #a6e3bd; --scv-s-arsip: #64748b;
}
#saudiCvView { display: none; }
#saudiCvView.active { display: block; }

/* ── Dasar & pengganti aturan global main.css ── */
.scv *, .scv *::before, .scv *::after { box-sizing: border-box; }
.scv :is(p, figure, ol, ul, h1, h2, h3, h4, dl, dd) { margin: 0; }
.scv :is(ol, ul) { padding: 0; list-style: none; }
.scv :is(th, td, label, legend, caption, summary, figcaption, small, span) { text-transform: none; letter-spacing: normal; }
.scv button, .scv select, .scv input, .scv textarea { font: inherit; color: inherit; }
.scv svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scv .scv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scv [hidden] { display: none !important; }
.scv .scv-shell { max-width: 1240px; margin: 0 auto; padding: 16px 24px 128px; }
.scv .scv-ar, .scv [lang="ar"] { font-family: var(--scv-ar); font-size: 1.2em; line-height: 1.9; direction: rtl; unicode-bidi: isolate; }
.scv .scv-ltr { direction: ltr; unicode-bidi: isolate; }
.scv .scv-num { font-variant-numeric: tabular-nums; }
.scv h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.scv h2 { font-size: 20px; line-height: 1.2; letter-spacing: -0.015em; font-weight: 750; }
.scv h3 { font-size: 16px; line-height: 1.3; font-weight: 700; }
.scv .scv-redup { color: var(--scv-dim); }
.scv .scv-kecil { font-size: 13px; }

/* ── Tombol: pil 44px; satu .scv-utama per layar ── */
.scv button, .scv .scv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px !important;
  background: var(--scv-fill); color: var(--scv-ink); font-size: 14px; font-weight: 650; line-height: 1.2; text-decoration: none;
  box-shadow: none; /* taste-skill-ignore: reset bayangan tombol main.css */
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--scv-ease), background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}
@media (hover: hover) { .scv button:hover:not(:disabled), .scv .scv-btn:hover { background: var(--scv-fill-2); } }
.scv button:active:not(:disabled) { transform: scale(0.97); }
.scv button:disabled { opacity: 0.45; cursor: not-allowed; }
.scv :is(button, a, select, input, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--scv-focus); outline-offset: 2px; }
.scv [tabindex="-1"]:focus { outline: none; }
.scv .scv-utama { background: var(--scv-accent); color: var(--scv-on-accent); }
@media (hover: hover) { .scv .scv-utama:hover:not(:disabled) { background: color-mix(in srgb, var(--scv-accent) 86%, var(--scv-ink)); } }
.scv .scv-hantu { background: transparent; }
.scv .scv-bahaya { background: var(--scv-error-bg); color: var(--scv-error); }
.scv .scv-mini { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.scv .scv-ikon { width: 44px; padding: 0; }
.scv .scv-ikon.scv-mini { width: 36px; }
.scv .scv-tautan { min-height: 0; padding: 0; background: none !important; color: var(--scv-accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 650; }
.scv .scv-baris { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scv .scv-baris-antara { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* ── Kepala & navigasi modul ── */
.scv .scv-kepala { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 4px 0 18px; }
.scv .scv-kepala p { margin-top: 6px; color: var(--scv-dim); }
.scv .scv-nav { position: relative; display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; border-radius: 999px; background: var(--scv-fill); overflow-x: auto; scrollbar-width: none; }
.scv .scv-nav::-webkit-scrollbar { display: none; }
.scv .scv-nav button { flex: 1 0 auto; min-width: 104px; background: transparent; color: var(--scv-dim); }
.scv .scv-nav button[aria-current="page"] { background: var(--scv-card); color: var(--scv-ink); }
.scv .scv-nav .scv-hitung { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--scv-accent); color: var(--scv-on-accent); font-size: 12px; font-weight: 750; display: inline-grid; place-items: center; }
.scv .scv-lonceng { position: relative; }
.scv .scv-lonceng .scv-titik { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--scv-error); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ── Panel ── */
.scv .scv-panel { padding: 20px; border-radius: var(--scv-r-lg); background: var(--scv-card); }
.scv .scv-panel + .scv-panel, .scv .scv-panel + section, .scv section + .scv-panel { margin-top: 16px; }
.scv .scv-panel-kepala { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.scv .scv-panel-kepala p { color: var(--scv-dim); font-size: 14px; }
.scv .scv-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.scv .scv-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ── Jalur Cepat: 5 langkah + satu tombol "Langkah berikutnya" ── */
.scv .scv-jalur { padding: 20px; border-radius: var(--scv-r-lg); background: var(--scv-card); }
.scv .scv-jalur ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; counter-reset: langkah; }
.scv .scv-jalur li { position: relative; }
.scv .scv-jalur li > button {
  width: 100%; height: 100%; min-height: 96px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px;
  padding: 14px 16px; border-radius: var(--scv-r) !important; background: var(--scv-sunken); text-align: left;
}
.scv .scv-jalur .scv-jalur-no { display: inline-flex; align-items: center; gap: 6px; color: var(--scv-dim); font-size: 13px; font-weight: 700; }
.scv .scv-jalur .scv-jalur-no i { width: 22px; height: 22px; border-radius: 999px; display: inline-grid; place-items: center; font-style: normal; background: var(--scv-fill-2); color: var(--scv-ink); font-size: 12px; }
.scv .scv-jalur strong { font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.scv .scv-jalur small { color: var(--scv-dim); font-size: 13px; font-weight: 600; }
.scv .scv-jalur li.is-selesai i { background: var(--scv-accent); color: var(--scv-on-accent); }
.scv .scv-jalur li.is-kini > button { background: var(--scv-accent-soft); box-shadow: inset 0 0 0 2px var(--scv-accent); /* taste-skill-ignore: penanda langkah aktif */ }
.scv .scv-jalur li.is-kini i { background: var(--scv-accent); color: var(--scv-on-accent); }
.scv .scv-jalur-aksi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.scv .scv-jalur-aksi p { color: var(--scv-dim); font-size: 14px; max-width: 640px; }
.scv .scv-jalur-aksi .scv-utama { min-height: 48px; padding: 10px 22px; font-size: 15px; }

/* ── KPI ── */
.scv .scv-kpi { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.scv .scv-kpi button { min-height: 84px; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border-radius: var(--scv-r) !important; background: var(--scv-card); text-align: left; }
.scv .scv-kpi strong { font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.scv .scv-kpi span { color: var(--scv-dim); font-size: 13px; font-weight: 650; }
.scv .scv-kpi button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--scv-accent); /* taste-skill-ignore: saring aktif */ }
/* Kartu angka tanpa aksi (Analitik admin). */
.scv .scv-kpi-kartu { display: flex; min-height: 84px; flex-direction: column; justify-content: space-between; gap: 4px; padding: 12px 14px; border-radius: var(--scv-r); background: var(--scv-card); }
.scv .scv-kpi-kartu small { color: var(--scv-faint); font-size: 12px; }

/* ── Chip status & masalah ── */
.scv .scv-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 7px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--c, var(--scv-s-data)); background: color-mix(in srgb, var(--c, var(--scv-s-data)) 13%, transparent); }
.scv .scv-status svg { width: 14px; height: 14px; stroke-width: 2.4; }
.scv .scv-status[data-s="DATA"] { --c: var(--scv-s-data); }
.scv .scv-status[data-s="DRAFT"] { --c: var(--scv-s-draft); }
.scv .scv-status[data-s="INCOMPLETE"] { --c: var(--scv-s-kurang); }
.scv .scv-status[data-s="READY_FOR_REVIEW"] { --c: var(--scv-s-siap); }
.scv .scv-status[data-s="IN_REVIEW"] { --c: var(--scv-s-review); }
.scv .scv-status[data-s="REVISION_REQUIRED"] { --c: var(--scv-s-revisi); }
.scv .scv-status[data-s="CHANGES_AFTER_APPROVAL"] { --c: var(--scv-s-ubah); }
.scv .scv-status[data-s="APPROVED"] { --c: var(--scv-s-setuju); }
.scv .scv-status[data-s="EXPORTED"] { --c: var(--scv-s-pdf); }
.scv .scv-status[data-s="ARCHIVED"] { --c: var(--scv-s-arsip); }
.scv .scv-mas { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.scv .scv-mas::before { content: ''; width: 9px; height: 9px; flex: none; background: currentColor; }
.scv .scv-mas[data-t="error"] { color: var(--scv-error); }
.scv .scv-mas[data-t="error"]::before { border-radius: 999px; }
.scv .scv-mas[data-t="warning"] { color: var(--scv-warn); }
.scv .scv-mas[data-t="warning"]::before { width: 10px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.scv .scv-mas[data-t="saran"] { color: var(--scv-saran); }
.scv .scv-mas[data-t="saran"]::before { transform: rotate(45deg) scale(0.85); }
.scv .scv-asal { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--scv-fill); color: var(--scv-dim); }
.scv .scv-asal[data-a="sigapp"] { background: var(--scv-accent-soft); color: var(--scv-accent); }
.scv .scv-asal[data-a="santri"] { background: var(--scv-saran-bg); color: var(--scv-saran); }
.scv .scv-asal[data-a="excel"] { background: color-mix(in srgb, var(--scv-s-review) 14%, transparent); color: var(--scv-s-review); }
.scv .scv-asal[data-a="cek"] { background: var(--scv-warn-bg); color: var(--scv-warn); }
.scv .scv-meter { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; }
.scv .scv-meter i { position: relative; width: 56px; height: 6px; border-radius: 999px; background: var(--scv-fill-2); overflow: hidden; }
.scv .scv-meter i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: 999px; background: var(--scv-accent); }
.scv .scv-meter[data-rendah] i::after { background: var(--scv-warn); }

/* ── Kanban ── */
.scv .scv-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(208px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.scv .scv-kolom { display: flex; flex-direction: column; min-height: 220px; padding: 10px; border-radius: var(--scv-r); background: var(--scv-sunken); scroll-snap-align: start; transition: background-color 160ms ease, box-shadow 160ms ease; }
.scv .scv-kolom-kepala { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 4px 10px; font-size: 13px; font-weight: 750; color: var(--scv-dim); }
.scv .scv-kolom-kepala b { font-variant-numeric: tabular-nums; color: var(--scv-ink); }
.scv .scv-kolom ul { display: grid; gap: 8px; }
.scv .scv-kolom.is-sah { background: var(--scv-accent-soft); box-shadow: inset 0 0 0 2px var(--scv-accent); /* taste-skill-ignore: target seret yang sah */ }
.scv .scv-kolom.is-tolak { opacity: 0.45; }
.scv .scv-kartu {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: start; min-height: 0; padding: 10px 12px;
  border-radius: 12px !important; background: var(--scv-card); text-align: left; font-weight: 500; cursor: grab;
}
.scv .scv-kartu[aria-grabbed="true"] { opacity: 0.5; }
.scv .scv-kartu .scv-avatar { grid-row: span 3; }
.scv .scv-kartu b { font-size: 14px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.scv .scv-kartu small { color: var(--scv-dim); font-size: 12px; }
.scv .scv-kolom .scv-lagi { width: 100%; min-height: 36px; font-size: 13px; background: transparent; color: var(--scv-dim); }
.scv .scv-avatar { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--scv-fill-2); color: var(--scv-dim); font-weight: 800; font-size: 14px; overflow: hidden; }
.scv .scv-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Bilah alat & tabel kandidat ── */
.scv .scv-alat { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 12px; }
.scv .scv-cari { position: relative; flex: 1 1 260px; }
.scv .scv-cari svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--scv-dim); }
.scv .scv-cari input { width: 100%; padding-left: 42px !important; }
.scv .scv-tabel-wrap { overflow-x: auto; border-radius: var(--scv-r-lg); background: var(--scv-card); }
.scv table.scv-tabel { width: 100% !important; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.scv table.scv-tabel :is(th, td) { height: auto !important; padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--scv-line); white-space: nowrap; }
.scv table.scv-tabel thead th { position: sticky; top: 0; z-index: 2; background: var(--scv-card); color: var(--scv-dim); font-size: 12.5px; font-weight: 750; }
.scv table.scv-tabel thead th button { min-height: 32px; padding: 4px 8px; margin: -4px -8px; background: transparent; color: inherit; font-size: inherit; font-weight: inherit; }
.scv table.scv-tabel tbody tr { cursor: pointer; }
@media (hover: hover) { .scv table.scv-tabel tbody tr:hover > * { background: var(--scv-sunken); } }
.scv table.scv-tabel tbody tr.is-pilih > * { background: var(--scv-accent-soft); }
.scv table.scv-tabel .scv-col-cek { width: 44px; position: sticky; left: 0; z-index: 1; background: inherit; }
.scv table.scv-tabel tbody .scv-col-cek { background: var(--scv-card); }
.scv table.scv-tabel .scv-col-nama { min-width: 220px; white-space: normal; }
.scv table.scv-tabel .scv-col-nama b { display: block; font-weight: 700; }
.scv table.scv-tabel tr:last-child > td { border-bottom: 0; }
.scv input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--scv-accent); cursor: pointer; }
.scv .scv-halaman { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px 0; color: var(--scv-dim); font-size: 13px; }

/* ── Bilah aksi massal: menempel di dasar saat ada pilihan ── */
.scv .scv-bar {
  position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px;
  padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--scv-ink); color: var(--scv-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); /* taste-skill-ignore: bilah mengambang di atas tabel */
}
.scv .scv-bar strong { margin-right: auto; font-variant-numeric: tabular-nums; }
.scv .scv-bar button { background: color-mix(in srgb, var(--scv-card) 14%, transparent); color: var(--scv-card); min-height: 40px; }
.scv .scv-bar .scv-utama { background: var(--scv-accent); color: var(--scv-on-accent); }
@media (hover: hover) { .scv .scv-bar button:hover:not(:disabled) { background: color-mix(in srgb, var(--scv-card) 24%, transparent); } }

/* ── Isian ── */
.scv .scv-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.scv .scv-field > label, .scv .scv-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--scv-ink); }
.scv .scv-field .scv-wajib { color: var(--scv-error); font-weight: 800; }
.scv .scv-field .scv-bantu { color: var(--scv-dim); font-size: 12.5px; }
.scv :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="search"], input:not([type]), select, textarea) {
  width: 100%; min-height: 44px; padding: 9px 14px; border: 1px solid var(--scv-line); border-radius: var(--scv-r-sm) !important;
  background: var(--scv-card); color: var(--scv-ink); font-size: 15px; box-shadow: none; /* taste-skill-ignore */
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.scv textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
.scv :is(input, select, textarea):focus { border-color: var(--scv-accent); outline: none; box-shadow: 0 0 0 3px var(--scv-focus); }
.scv :is(input, select, textarea)::placeholder { color: var(--scv-faint); }
.scv :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--scv-error); }
/* Isian terkunci (reviewer, arsip, data sekolah di portal santri): abu-abu, tetap terbaca. */
.scv :is(input, select, textarea):disabled:not([type="checkbox"]) { background: var(--scv-fill); color: var(--scv-dim); -webkit-text-fill-color: var(--scv-dim); border-color: transparent; cursor: not-allowed; opacity: 1; }
.scv :is(input, textarea).scv-ar { font-size: 19px; line-height: 1.8; padding-top: 6px; padding-bottom: 6px; }
.scv .scv-galat { display: flex; align-items: flex-start; gap: 6px; color: var(--scv-error); font-size: 13px; font-weight: 650; }
.scv .scv-galat::before { content: ''; width: 8px; height: 8px; margin-top: 6px; border-radius: 999px; background: currentColor; flex: none; }
.scv .scv-galat.is-warn { color: var(--scv-warn); }
.scv .scv-galat.is-warn::before { border-radius: 0; width: 9px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.scv .scv-isian { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.scv .scv-isian .scv-lebar { grid-column: 1 / -1; }
.scv .scv-tiga { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scv .scv-tiga > div { display: grid; gap: 4px; }
.scv .scv-tiga small { color: var(--scv-dim); font-size: 12px; font-weight: 700; }
.scv .scv-sorot { animation: scv-sorot 1.6s var(--scv-ease); border-radius: var(--scv-r-sm); }
@keyframes scv-sorot { 0%, 30% { box-shadow: 0 0 0 4px var(--scv-focus); } 100% { box-shadow: 0 0 0 0 transparent; } }
.scv .scv-pilihan { display: flex; flex-wrap: wrap; gap: 6px; }
.scv .scv-pilihan button[aria-pressed="true"] { background: var(--scv-accent); color: var(--scv-on-accent); }
.scv .scv-saklar { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 650; cursor: pointer; }
.scv .scv-saklar input { appearance: none; width: 44px !important; height: 26px !important; border-radius: 999px; background: var(--scv-fill-2); position: relative; transition: background-color 160ms ease; flex: none; }
.scv .scv-saklar input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 200ms var(--scv-ease); }
.scv .scv-saklar input:checked { background: var(--scv-accent); }
.scv .scv-saklar input:checked::after { transform: translateX(18px); }

/* ── Kosong, galat, kerangka muat ── */
.scv .scv-kosong { display: grid; justify-items: start; gap: 12px; padding: 28px 24px; border-radius: var(--scv-r-lg); background: var(--scv-sunken); }
.scv .scv-kosong p { color: var(--scv-dim); max-width: 560px; }
.scv .scv-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-radius: var(--scv-r); background: var(--scv-error-bg); color: var(--scv-error); font-weight: 650; }
.scv .scv-alert.is-info { background: var(--scv-saran-bg); color: var(--scv-saran); }
.scv .scv-alert.is-warn { background: var(--scv-warn-bg); color: var(--scv-warn); }
.scv .scv-alert.is-ok { background: var(--scv-accent-soft); color: var(--scv-accent); }
.scv .scv-alert p { flex: 1 1 280px; }
.scv .scv-skeleton { display: grid; gap: 8px; }
.scv .scv-skeleton span { display: block; height: 52px; border-radius: var(--scv-r); background: var(--scv-card); animation: scv-denyut 1.4s ease-in-out infinite; }
.scv .scv-skeleton.is-tinggi span { height: 120px; }
@keyframes scv-denyut { 50% { opacity: 0.5; } }
.scv .scv-offline { position: sticky; top: 0; z-index: 30; margin: -4px 0 12px; padding: 10px 16px; border-radius: var(--scv-r); background: var(--scv-warn-bg); color: var(--scv-warn); font-weight: 700; }

/* ── Toast "Urungkan": satu-satunya permukaan mengambang ── */
.scv .scv-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px); padding: 7px 7px 7px 18px; border-radius: 999px; background: var(--scv-ink); color: var(--scv-card);
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22); /* taste-skill-ignore */
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: transform 300ms var(--scv-ease), opacity 200ms ease;
}
.scv .scv-toast.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.scv .scv-toast.is-galat { background: var(--scv-error); color: #fff; }
.scv .scv-toast button { min-height: 36px; background: color-mix(in srgb, var(--scv-card) 18%, transparent); color: inherit; }
.scv .scv-toast:not(:has(button)) { padding-right: 18px; min-height: 50px; }

/* ── Dialog (aksi permanen) & laci ── */
.scv dialog.scv-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--scv-r-lg); background: var(--scv-card); color: var(--scv-ink); box-shadow: 0 24px 64px rgba(0,0,0,.28); /* taste-skill-ignore */ }
.scv dialog.scv-dialog.is-lebar { width: min(920px, calc(100vw - 32px)); }
.scv dialog.scv-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.scv .scv-dialog-isi { display: grid; gap: 14px; padding: 22px 22px 8px; overflow-y: auto; max-height: calc(100dvh - 140px); }
.scv .scv-dialog-isi > p { color: var(--scv-dim); }
.scv .scv-dialog-aksi { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
.scv .scv-laci { position: fixed; inset: 0 0 0 auto; z-index: 55; width: min(460px, 100vw); display: flex; flex-direction: column; background: var(--scv-card); box-shadow: -16px 0 48px rgba(0,0,0,.18); /* taste-skill-ignore */ transform: translateX(105%); transition: transform 320ms var(--scv-ease); }
.scv .scv-laci.is-on { transform: none; }
.scv .scv-laci-kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 10px 20px; }
.scv .scv-laci-isi { flex: 1; overflow-y: auto; padding: 0 20px 24px; }
.scv .scv-tirai { position: fixed; inset: 0; z-index: 54; background: rgba(15, 23, 42, 0.32); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.scv .scv-tirai.is-on { opacity: 1; pointer-events: auto; }

/* ── Daftar masalah ── */
.scv .scv-masalah { display: grid; gap: 8px; }
.scv .scv-masalah li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 10px 10px 14px; border-radius: var(--scv-r); background: var(--scv-sunken); }
.scv .scv-masalah li .scv-mas { font-size: 0; }
.scv .scv-masalah li p { font-size: 14px; }
.scv .scv-masalah li small { grid-column: 2; color: var(--scv-dim); font-size: 12px; }
/* Baris dokumen: tombol aksi di bawah keterangan agar nama berkas tidak terjepit. */
.scv .scv-masalah.is-dok li { grid-template-columns: auto minmax(0, 1fr); }
.scv .scv-masalah.is-dok li > .scv-baris { grid-column: 2; order: 3; }
.scv .scv-masalah.is-dok li > small { order: 2; }
.scv .scv-masalah-grup { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 13px; font-weight: 750; color: var(--scv-dim); }

/* ── Kartu pilihan besar (Lengkapi, template) ── */
.scv .scv-pilih-kartu { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.scv .scv-pilih-kartu > button, .scv .scv-pilih-kartu > div {
  display: flex; min-height: 150px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; padding: 18px;
  border-radius: var(--scv-r-lg) !important; background: var(--scv-card); text-align: left; font-weight: 500;
}
.scv .scv-pilih-kartu b { font-size: 16px; font-weight: 750; }
.scv .scv-pilih-kartu p { color: var(--scv-dim); font-size: 14px; }
.scv .scv-pilih-kartu .scv-lencana { margin-top: auto; }
.scv .scv-pilih-kartu [aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--scv-accent); /* taste-skill-ignore */ }
.scv .scv-lencana { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--scv-fill); font-size: 12.5px; font-weight: 700; color: var(--scv-dim); }
.scv .scv-lencana.is-aksen { background: var(--scv-accent-soft); color: var(--scv-accent); }

/* ── Editor: rel langkah + formulir + pratinjau ── */
.scv .scv-editor { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 520px); gap: 16px; align-items: start; }
.scv .scv-editor.tanpa-pratinjau { grid-template-columns: 220px minmax(0, 1fr); }
.scv .scv-ed-kepala { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.scv .scv-ed-kepala h1 { font-size: clamp(22px, 2.6vw, 30px); }
.scv .scv-ed-kepala .scv-ar { display: inline-block; font-size: 22px; line-height: 1.6; color: var(--scv-dim); }
.scv .scv-simpan { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--scv-dim); }
.scv .scv-simpan.is-ok { color: var(--scv-accent); }
.scv .scv-simpan.is-galat { color: var(--scv-error); }
.scv .scv-rail { position: sticky; top: 72px; display: grid; gap: 4px; }
.scv .scv-rail button { justify-content: flex-start; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 12px !important; background: transparent; color: var(--scv-dim); text-align: left; }
.scv .scv-rail button[aria-current="step"] { background: var(--scv-card); color: var(--scv-ink); }
.scv .scv-rail .scv-rail-no { width: 24px; height: 24px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--scv-fill-2); color: var(--scv-ink); font-size: 12px; font-weight: 800; flex: none; }
.scv .scv-rail [data-k="selesai"] .scv-rail-no { background: var(--scv-accent); color: var(--scv-on-accent); }
.scv .scv-rail [data-k="masalah"] .scv-rail-no { background: var(--scv-error); color: #fff; }
.scv .scv-rail [data-k="peringatan"] .scv-rail-no { background: var(--scv-warn); color: #fff; }
.scv .scv-langkah { display: grid; gap: 16px; }
.scv .scv-langkah > header h2 { font-size: 22px; }
.scv .scv-langkah > header p { margin-top: 4px; color: var(--scv-dim); }
.scv .scv-langkah-kaki { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.scv .scv-catatan-rev { display: grid; gap: 6px; padding: 12px 16px; border-radius: var(--scv-r); background: var(--scv-warn-bg); color: var(--scv-warn); font-size: 14px; }
.scv .scv-catatan-rev b { font-weight: 750; }

/* Entri berulang */
.scv .scv-ulang { display: grid; gap: 10px; }
.scv .scv-entri { border-radius: var(--scv-r); background: var(--scv-sunken); }
.scv .scv-entri > header { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; }
.scv .scv-entri > header .scv-judul-entri { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scv .scv-entri > header .scv-pegangan { cursor: grab; color: var(--scv-faint); background: transparent; width: 36px; min-height: 36px; padding: 0; }
.scv .scv-entri > .scv-isian { padding: 4px 14px 16px; }
.scv .scv-entri.is-tutup > .scv-isian { display: none; }
.scv .scv-entri.is-seret { opacity: 0.5; }
.scv .scv-entri.is-sasaran { box-shadow: inset 0 3px 0 var(--scv-accent); /* taste-skill-ignore: penanda posisi seret */ }
.scv .scv-tidak-ada { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--scv-dim); font-weight: 600; cursor: pointer; min-height: 44px; }

/* Pratinjau A4 */
.scv .scv-pratinjau { position: sticky; top: 72px; display: grid; gap: 10px; }
.scv .scv-pratinjau-alat { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.scv .scv-pratinjau-bingkai { position: relative; height: calc(100dvh - 180px); min-height: 420px; overflow: auto; border-radius: var(--scv-r-lg); background: var(--scv-fill-2); }
.scv .scv-pratinjau-bingkai iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.scv .scv-panjang { font-weight: 750; }
.scv .scv-panjang[data-k="excellent"] { color: var(--scv-accent); }
.scv .scv-panjang[data-k="long"] { color: var(--scv-warn); }
.scv .scv-panjang[data-k="too-long"] { color: var(--scv-error); }
.scv .scv-tab-hp { display: none; }

/* Pengatur bagian & template */
.scv .scv-susun { display: grid; gap: 6px; }
.scv .scv-susun li { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--scv-sunken); }
.scv .scv-susun li.is-mati { opacity: 0.6; }
.scv .scv-susun li span { flex: 1; font-weight: 650; }
.scv .scv-template { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.scv .scv-template button { flex-direction: column; align-items: stretch; gap: 8px; min-height: 0; padding: 10px; border-radius: var(--scv-r) !important; background: var(--scv-sunken); font-weight: 650; }
.scv .scv-template button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--scv-accent); /* taste-skill-ignore */ }
.scv .scv-template .scv-mini-a4 { aspect-ratio: 210 / 297; border-radius: 6px; background: #fff; display: grid; align-content: start; gap: 5px; padding: 10% 9%; }
.scv .scv-mini-a4 i { display: block; height: 4px; border-radius: 2px; background: #cbd5e1; }
.scv .scv-mini-a4 i.k { height: 7px; width: 60%; background: #1f4d3a; justify-self: end; }
.scv .scv-mini-a4 i.p { width: 80%; justify-self: end; }
.scv .scv-mini-a4[data-t="modern"] i.k { justify-self: stretch; width: 100%; }
.scv .scv-mini-a4[data-t="institusi"]::before { content: ''; height: 12px; border-radius: 3px; background: #1f4d3a; opacity: .85; }
/* Academic CV (ATS): kepala navy bergaris, kolom samping abu-abu terang. */
.scv .scv-mini-a4[data-t="akademik"] { grid-template-columns: 30% 1fr; column-gap: 8%; }
.scv .scv-mini-a4[data-t="akademik"] i { grid-column: 2; }
.scv .scv-mini-a4[data-t="akademik"] i.k { grid-column: 1 / -1; width: 100%; background: #0A192F; }
.scv .scv-mini-a4[data-t="akademik"]::before { content: ''; grid-column: 1; grid-row: 2 / span 5; border-radius: 2px; background: #e4e8ee; }
.scv .scv-akd { display: grid; gap: 10px; }
.scv .scv-warna { width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 6px; display: inline-block; vertical-align: -1px; }
.scv .scv-warna[data-w="navy"] { background: #0A192F; }
.scv .scv-warna[data-w="emerald"] { background: #006C35; }

/* ── Edit Cepat (grid ala spreadsheet) ── */
.scv .scv-grid-wrap { overflow: auto; max-height: calc(100dvh - 260px); border-radius: var(--scv-r-lg); background: var(--scv-card); }
.scv table.scv-grid { border-collapse: separate; border-spacing: 0; font-size: 14px; width: max-content !important; min-width: 100%; }
.scv table.scv-grid :is(th, td) { height: auto !important; border-bottom: 1px solid var(--scv-line); border-right: 1px solid var(--scv-line); padding: 0; }
.scv table.scv-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--scv-card); padding: 10px 12px; font-size: 12.5px; font-weight: 750; color: var(--scv-dim); text-align: left; }
.scv table.scv-grid th.scv-col-nama, .scv table.scv-grid td.scv-col-nama { position: sticky; left: 0; z-index: 1; background: var(--scv-card); padding: 8px 12px; min-width: 200px; font-weight: 650; text-align: left; }
.scv table.scv-grid thead th.scv-col-nama { z-index: 3; }
.scv table.scv-grid input, .scv table.scv-grid select { min-width: 180px; min-height: 42px; border: 0 !important; border-radius: 0 !important; background: transparent; }
.scv table.scv-grid input:focus, .scv table.scv-grid select:focus { box-shadow: inset 0 0 0 2px var(--scv-accent); }
.scv table.scv-grid td.is-ubah { background: var(--scv-accent-soft); }
.scv table.scv-grid td.is-galat { background: var(--scv-error-bg); }

/* ── Progress batch ── */
.scv .scv-progress { display: grid; gap: 10px; }
.scv .scv-progress-bar { height: 10px; border-radius: 999px; background: var(--scv-fill-2); overflow: hidden; }
.scv .scv-progress-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: 999px; background: var(--scv-accent); transition: width 300ms var(--scv-ease); }
.scv .scv-progress-daftar { display: grid; gap: 4px; max-height: 280px; overflow-y: auto; font-size: 14px; }
.scv .scv-progress-daftar li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--scv-sunken); }

/* ── Panduan komponen (harness ?mode=komponen) ── */
.scv .scv-token { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.scv .scv-token div { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--scv-sunken); font-size: 12px; }
.scv .scv-token i { display: block; height: 36px; border-radius: 8px; background: var(--w); }

/* ── Layar ── */
@media (max-width: 1100px) {
  .scv .scv-editor { grid-template-columns: 200px minmax(0, 1fr); }
  .scv .scv-editor > .scv-pratinjau { position: fixed; inset: 0 0 0 auto; z-index: 55; width: min(560px, 100vw); padding: 12px; background: var(--scv-bg); transform: translateX(105%); transition: transform 320ms var(--scv-ease); box-shadow: -16px 0 48px rgba(0,0,0,.18); /* taste-skill-ignore */ }
  .scv .scv-editor > .scv-pratinjau.is-on { transform: none; }
  .scv .scv-editor > .scv-pratinjau .scv-pratinjau-bingkai { height: calc(100dvh - 90px); }
  .scv .scv-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scv .scv-tab-pratinjau { display: inline-flex; }
}
@media (min-width: 1101px) { .scv .scv-tab-pratinjau { display: none; } }
@media (max-width: 760px) {
  .scv .scv-shell { padding: 12px 16px 120px; }
  .scv .scv-jalur ol { grid-template-columns: minmax(0, 1fr); }
  .scv .scv-jalur li > button { min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .scv .scv-jalur strong { font-size: 20px; order: 2; }
  .scv .scv-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scv .scv-grid-2, .scv .scv-grid-3, .scv .scv-isian, .scv .scv-template { grid-template-columns: minmax(0, 1fr); }
  .scv .scv-tiga { grid-template-columns: minmax(0, 1fr); }
  .scv .scv-editor, .scv .scv-editor.tanpa-pratinjau { grid-template-columns: minmax(0, 1fr); }
  .scv .scv-rail { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: none; }
  .scv .scv-rail button { flex: none; }
  .scv .scv-rail .scv-rail-teks { display: none; }
  .scv .scv-rail button[aria-current="step"] .scv-rail-teks { display: inline; }
  .scv .scv-bar { border-radius: var(--scv-r-lg); padding: 10px; }
  .scv .scv-bar strong { flex: 1 1 100%; padding-left: 6px; }
  .scv .scv-panel { padding: 16px; }
  .scv table.scv-tabel .scv-col-opsional { display: none; }
  .scv .scv-dialog-aksi > button { flex: 1 1 auto; }
}

/* ── Cetak: hanya halaman CV dari pratinjau ── */
@media print {
  html.scv-printing, body.scv-printing, body.scv-printing #appShell { background: #fff !important; height: auto !important; overflow: visible !important; }
  body.scv-printing > *:not(#appShell):not(.scv-cetak) { display: none !important; }
  body.scv-printing #appShell { display: none !important; }
  body.scv-printing .scv-cetak { display: block !important; }
}
.scv-cetak { display: none; }

/* ── Preferensi aksesibilitas ── */
@media (prefers-reduced-motion: reduce) {
  .scv *, .scv *::before, .scv *::after { animation: none !important; transition-duration: 1ms !important; }
  .scv button:active:not(:disabled) { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .scv .scv-tirai, .scv dialog.scv-dialog::backdrop { background: rgba(15, 23, 42, 0.6); }
}
@media (prefers-contrast: more) {
  .scv { --scv-line: color-mix(in srgb, var(--scv-ink) 45%, transparent); --scv-dim: var(--scv-ink); }
  .scv .scv-panel, .scv .scv-jalur, .scv .scv-kolom, .scv .scv-entri, .scv .scv-kartu { outline: 1px solid var(--scv-line); }
  .scv .scv-status { outline: 1px solid currentColor; }
}
