/* IKA Psikologi UNJANI · Pulang Kampus. Tema terang saja; warna dari deck proposal. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f4f7;
  --ink: #251d2e;
  --muted: #6e6873;
  --line: #e3dee9;
  --accent: #4b2a7b;
  --accent-soft: #ece6f4;
  --ok: #3e8e41;
  --ok-soft: #e3f1e3;
  --amber: #a86a0c;
  --amber-soft: #f7ecd6;
  --sage: #b9d7a9;
  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --r: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 28px 56px;
  overflow-x: hidden;
}
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.content { display: flex; flex-direction: column; gap: 28px; width: 100%; min-width: 0; }
.panel, .proposal, .actions-block, .table-scroll { min-width: 0; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: 0.92rem; font-weight: 700; }
.eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.eyebrow.dim { color: var(--muted); }
p { margin: 0; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.xsmall { font-size: 0.8rem; }
.stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stack-2 { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: 16px; top: -40px; background: var(--accent); color: #fff; padding: 6px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }

/* ---------- Kepala ---------- */
header.intro { display: flex; flex-direction: column; gap: 8px; }
.brand { align-self: flex-start; display: flex; align-items: center; gap: 18px; background: #ffffff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 20px; margin-bottom: 10px; max-width: 100%; }
.brand img { display: block; height: auto; max-width: 100%; }
.logo-ika { width: 168px; }
.logo-psy { width: 100px; }
.brand-div { width: 1px; align-self: stretch; background: #dcd6e4; }
@media (max-width: 420px) { .logo-ika { width: 130px; } .logo-psy { width: 78px; } .brand { gap: 12px; padding: 10px 14px; } }
.stripe { display: flex; gap: 4px; margin-bottom: 4px; }
.stripe i { display: block; height: 5px; border-radius: 99px; }
.stripe i:first-child { width: 56px; background: var(--accent); }
.stripe i:last-child { width: 28px; background: var(--ok); }
.lead { max-width: 62ch; color: var(--muted); }
.h-big { font-size: 1.35rem; font-weight: 800; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.jump a { font-size: 0.82rem; font-weight: 600; color: var(--accent); text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; background: var(--surface); }
.jump a:hover { border-color: var(--accent); }

/* ---------- Proposal ---------- */
.proposal { background: var(--accent); color: #ffffff; border-radius: 14px; padding-block: 22px; padding-inline: clamp(16px, 3vw, 28px); display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 16px; }
.prop-top { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.prop-text { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; min-width: 0; }
.proposal h2 { font-size: 1.3rem; font-weight: 800; color: #ffffff; }
.proposal p { color: #e6def1; font-size: 0.9rem; max-width: 62ch; }
.prop-eyebrow { color: var(--sage); }
.prop-btn { display: inline-flex; align-items: center; gap: 8px; background: #ffffff; color: var(--accent); font-weight: 700; text-decoration: none; padding: 11px 18px; border-radius: 10px; white-space: nowrap; }
.prop-btn:hover { background: #f1ecf8; }
.prop-btn:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
.embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #3a2063; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-note { font-size: 0.78rem; color: #d8cdea; }

/* ---------- Notulensi ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding-block: 22px; padding-inline: clamp(16px, 3vw, 28px); display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 16px; }
.mom-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 22px; margin: 8px 0 0; }
.meta div { min-width: 0; }
.meta dt { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 2px 0 0; font-size: 0.9rem; }
.mom-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
@media (max-width: 760px) { .mom-body { grid-template-columns: 1fr; } }
.topic { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.topic h3 { font-size: 0.95rem; }
.topic .by { display: block; font-family: var(--body); font-weight: 500; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.topic ul, .update ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; max-width: 70ch; }
.topic li::marker, .update li::marker { color: var(--accent); }
.actions-block { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
.mom table { min-width: 520px; }
.mom td:first-child { width: 52%; }
th { text-align: left; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1.5px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
.contact { font-size: 0.85rem; color: var(--muted); max-width: 70ch; }
.update { background: var(--accent-soft); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Struktur ---------- */
.struct-head { display: grid; gap: 14px; grid-template-columns: 1fr auto; align-items: end; scroll-margin-top: 16px; }
.progress { display: grid; gap: 6px; min-width: 210px; }
.progress .num { font-family: var(--display); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
@media (max-width: 640px) { .struct-head { grid-template-columns: 1fr; } }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.82rem; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); }
.dot.us { background: var(--amber); }
.dot.em { border: 1.5px dashed var(--muted); }
.sync-note { font-size: 0.82rem; color: var(--muted); }
.sync-note.warn { color: var(--amber); }
.role-note { font-size: 0.82rem; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin: -12px 0 0; }

.tier { display: flex; flex-direction: column; align-items: center; gap: 0; }
.connector { width: 2px; height: 22px; background: var(--line); }
.patrons { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 14px; justify-content: center; width: 100%; }
.patron { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 12px 14px; background: transparent; }
.patron .role { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.patron .who { font-weight: 600; margin-top: 2px; }
.patron .state { font-size: 0.78rem; color: var(--amber); margin-top: 4px; }

.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; width: 100%; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.block.core { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); max-width: 760px; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; align-items: baseline; }
.block-head p { font-size: 0.85rem; }

.split-line { position: relative; width: 100%; height: 26px; }
.split-line::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 13px; background: var(--line); }
.split-line::after { content: ""; position: absolute; left: 25%; right: 25%; top: 12px; height: 2px; background: var(--line); }
.wings { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; align-items: start; }
.wing { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: relative; }
.wing::before { content: ""; display: block; width: 2px; height: 14px; background: var(--line); margin: -14px auto 0; }
.wing-title { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.wing-title .tag { align-self: flex-start; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; margin-bottom: 4px; }
.tag.alumni { background: var(--accent-soft); color: var(--accent); }
.tag.mhs { background: var(--amber-soft); color: var(--amber); }
@media (max-width: 860px) {
  .wings { grid-template-columns: 1fr; }
  .split-line::after { display: none; }
  .split-line { height: 14px; }
  .split-line::before { height: 14px; }
  .wing::before { display: none; }
}
@media (max-width: 520px) { .patrons { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card.new { border-color: var(--amber); }
.card .scope { font-size: 0.8rem; color: var(--muted); }
.card .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.badge-new { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); }
.note { font-size: 0.8rem; color: var(--muted); border-left: 2px solid var(--line); padding-left: 10px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot {
  appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px;
  border: 1.5px dashed var(--line); background: transparent; min-height: 54px; min-width: 0;
  transition: border-color .15s, background .15s;
}
.slot:hover { border-color: var(--accent); background: var(--surface-2); }
.slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.slot .r { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.slot .n { font-weight: 600; overflow-wrap: anywhere; }
.slot .a { font-size: 0.76rem; color: var(--muted); }
.slot.empty .n { color: var(--muted); font-weight: 500; }
.slot.filled { border-style: solid; background: var(--surface); }
.slot.filled.st-konfirmasi { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.slot.filled.st-usulan { border-color: var(--amber); box-shadow: inset 3px 0 0 var(--amber); }

.pool { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line); padding-top: 12px; }
.pool h3 { font-size: 0.82rem; color: var(--muted); }

/* ---------- Bank pelatihan ---------- */
.bank-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .bank-grid { grid-template-columns: 1fr; } }
.train-form { display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); border-radius: var(--r); padding: 16px; min-width: 0; position: relative; }
.train-form .btn { align-self: flex-start; }
.form-msg { font-size: 0.8rem; color: var(--amber); min-height: 1em; }
.form-msg.ok { color: var(--ok); }
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.count { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.train-list { display: flex; flex-direction: column; gap: 16px; }
.area-group { display: flex; flex-direction: column; gap: 8px; }
.area-group > h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.train { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.train .t-title { font-weight: 700; overflow-wrap: anywhere; }
.train .t-skill { align-self: flex-start; font-size: 0.75rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 8px; overflow-wrap: anywhere; }
.train .t-def { font-size: 0.88rem; overflow-wrap: anywhere; white-space: pre-line; }
.train .t-meta { font-size: 0.78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.train .t-act { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.pending { font-size: 0.76rem; color: var(--amber); }
.empty-state { font-size: 0.88rem; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r); padding: 18px; margin: 0; }

footer { font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Formulir & tombol ---------- */
label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; }
.req-mark { color: var(--amber); font-weight: 700; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 92px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.check input { width: auto; margin-top: 2px; accent-color: var(--accent); flex: none; }
.char-count { font-size: 0.72rem; font-weight: 500; color: var(--muted); align-self: flex-end; font-variant-numeric: tabular-nums; }
.hint { font-size: 0.8rem; color: var(--muted); }
.hint.warn { color: var(--amber); background: var(--amber-soft); border-radius: 8px; padding: 8px 10px; }
.hint.ok { color: var(--ok); }
.btn { font: inherit; font-weight: 600; border-radius: 8px; padding: 9px 14px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn.ghost { border-color: transparent; color: var(--muted); background: transparent; }
.btn.danger { border-color: var(--amber); color: var(--amber); }
.btn.sm { padding: 4px 10px; font-size: 0.78rem; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); padding: 0; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
dialog::backdrop { background: rgba(20, 12, 30, 0.5); }
dialog form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
dialog .ctx { font-size: 0.8rem; color: var(--muted); }
.pane { display: flex; flex-direction: column; gap: 12px; }
.actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.actions .right { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.form-err { font-size: 0.8rem; color: var(--amber); min-height: 1em; }
.form-err.ok { color: var(--ok); }
.current { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
.current .r { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.current .n { font-weight: 600; overflow-wrap: anywhere; }
.current .a { font-size: 0.78rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
