/* =====================================================================
   Portal Mahasiswa & Dosen (Nov 2026) — tampilan modern + progres ala game.
   Hanya dimuat oleh profil.php, dosen.php dan gabung-meet.php ($pakaiPortal).
   Semua kelas berawalan .pt- supaya tidak mengganggu halaman lain.
   ===================================================================== */
:root {
  --pt-emas: #E0A100;
  --pt-emas-muda: #FFF6DB;
  --pt-ungu: #6A4BC4;
  --pt-ungu-muda: #F0ECFB;
  --pt-gelap: #0F2A3F;
  --pt-kartu: #ffffff;
  --pt-garis: #E3E8EC;
  --pt-muted: #5B6572;
}

body.portal { background: linear-gradient(180deg, #EEF4F8 0, #F6F8FA 320px); }
body.portal .container { max-width: 1080px; padding: 20px 16px 72px; }

/* ---------- Hero ---------- */
.pt-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #123B57 0%, #1D6FA5 55%, #2F9E52 130%);
  color: #fff; border-radius: 20px; padding: 22px 22px 20px;
  box-shadow: 0 14px 34px rgba(18, 59, 87, .22);
}
.pt-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.pt-hero-atas { display: flex; gap: 16px; align-items: center; position: relative; z-index: 1; }
.pt-avatar {
  width: 68px; height: 68px; border-radius: 50%; flex: none; object-fit: cover;
  border: 3px solid rgba(255,255,255,.85); background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; color: #fff;
}
.pt-hero h1 { margin: 0; font-family: var(--font-judul); font-size: 24px; line-height: 1.2; color: #fff; }
.pt-hero p { margin: 2px 0 0; opacity: .9; font-size: 14.5px; }
.pt-level {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
}
.pt-level b { color: #FFD866; }
.pt-xp { position: relative; z-index: 1; margin-top: 16px; }
.pt-xp-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; opacity: .95; margin-bottom: 6px; gap: 10px; }
.pt-xp-track { height: 12px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; }
.pt-xp-isi { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FFD866, #FFB703); box-shadow: 0 0 12px rgba(255, 200, 60, .7); transition: width .8s ease; }

/* ---------- Statistik ---------- */
.pt-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 4px; }
.pt-stat { background: var(--pt-kartu); border: 1px solid var(--pt-garis); border-radius: 16px; padding: 14px 16px; box-shadow: 0 4px 14px rgba(18,59,87,.05); }
.pt-stat-angka { font-size: 26px; font-weight: 800; color: var(--biru-tua); line-height: 1.1; }
.pt-stat-label { font-size: 13px; color: var(--pt-muted); font-weight: 600; margin-top: 2px; }
.pt-stat-ikon { font-size: 20px; float: right; }

/* ---------- Tab ---------- */
.pt-tabs {
  position: sticky; top: 66px; z-index: 30; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 18px 0 16px; padding: 6px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border: 1px solid var(--pt-garis); border-radius: 16px; box-shadow: 0 6px 18px rgba(18,59,87,.06);
}
.pt-tabs::-webkit-scrollbar { display: none; }
.pt-tab {
  flex: none; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 700;
  color: var(--pt-muted); padding: 9px 14px; border-radius: 11px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.pt-tab:hover { background: #F1F5F8; color: var(--biru-tua); }
.pt-tab[aria-selected="true"] { background: var(--biru-tua); color: #fff; }
.pt-tab .pt-titik { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #E74C3C; color: #fff; font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center; }
.pt-panel[hidden] { display: none !important; }

/* ---------- Kartu umum ---------- */
.pt-kartu { background: var(--pt-kartu); border: 1px solid var(--pt-garis); border-radius: 18px; padding: 18px; margin-bottom: 16px; box-shadow: 0 4px 16px rgba(18,59,87,.05); }
.pt-kartu > h2, .pt-kartu > h3 { margin: 0 0 4px; font-size: 18px; color: var(--biru-tua); font-family: var(--font-teks); font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-sub { margin: 0 0 12px; color: var(--pt-muted); font-size: 14px; }
.pt-dua { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pt-dua > * { min-width: 0; }
@media (min-width: 900px) { .pt-dua { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } }

.pt-info { background: var(--biru-muda); border: 1px solid #CFE3F2; color: #123B57; border-radius: 14px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 12px; }
.pt-info.hijau { background: var(--hijau-muda); border-color: #BFE6CB; color: #1B5E31; }
.pt-info.kuning { background: var(--pt-emas-muda); border-color: #F3DB9A; color: #7A5300; }
.pt-info.merah { background: #FDECEA; border-color: #F5C2BC; color: #8E2B20; }

.pt-tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; text-decoration: none;
  font: inherit; font-weight: 700; font-size: 14.5px; padding: 10px 18px; border-radius: 12px;
  background: var(--hijau); color: #fff; box-shadow: 0 4px 0 #217A3E; transition: transform .08s, box-shadow .08s;
}
.pt-tombol:hover { filter: brightness(1.05); color: #fff; }
.pt-tombol:active { transform: translateY(3px); box-shadow: 0 1px 0 #217A3E; }
.pt-tombol.biru { background: var(--biru); box-shadow: 0 4px 0 #123B57; }
.pt-tombol.emas { background: var(--pt-emas); box-shadow: 0 4px 0 #A87800; }
.pt-tombol.garis { background: #fff; color: var(--biru-tua); border: 1.5px solid var(--pt-garis); box-shadow: 0 3px 0 var(--pt-garis); }
.pt-tombol.kecil { padding: 7px 13px; font-size: 13.5px; border-radius: 10px; }
.pt-tombol.penuh { width: 100%; }
.pt-tombol[disabled], .pt-tombol.mati { background: #C9D1D8; box-shadow: 0 4px 0 #AEB8C1; cursor: not-allowed; }

.pt-pil { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pt-pil.hijau { background: var(--hijau-muda); color: #1B6B35; }
.pt-pil.biru { background: var(--biru-muda); color: #145480; }
.pt-pil.kuning { background: var(--pt-emas-muda); color: #8A5D00; }
.pt-pil.merah { background: #FDECEA; color: #A93226; }
.pt-pil.abu { background: #EEF1F4; color: #5B6572; }
.pt-pil.ungu { background: var(--pt-ungu-muda); color: var(--pt-ungu); }

/* ---------- Misi (checklist) ---------- */
.pt-misi { list-style: none; margin: 0; padding: 0; }
.pt-misi li { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--pt-garis); margin-top: 10px; background: #fff; }
.pt-misi li.selesai { background: #F7FBF8; border-color: #D6EEDD; }
.pt-misi li.selesai .pt-misi-teks { opacity: .7; }
.pt-misi-ikon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; border: 2.5px dashed #C3CDD6; color: #9AA6B2; }
li.selesai .pt-misi-ikon { border: 0; background: var(--hijau); color: #fff; }
li.mendesak .pt-misi-ikon { border-color: var(--pt-emas); color: var(--pt-emas); }
.pt-misi-teks { flex: 1; min-width: 0; }
.pt-misi-teks strong { display: block; font-size: 14.5px; line-height: 1.35; }
.pt-misi-teks span { display: block; font-size: 12.8px; color: var(--pt-muted); margin-top: 2px; }
.pt-xp-kecil { flex: none; font-size: 12px; font-weight: 800; color: #8A5D00; background: var(--pt-emas-muda); padding: 3px 8px; border-radius: 999px; }
li.selesai .pt-xp-kecil { color: #1B6B35; background: var(--hijau-muda); }
@media (max-width: 560px) {
  .pt-misi li { flex-wrap: wrap; }
  .pt-misi li .pt-tombol { width: 100%; margin-left: 46px; width: calc(100% - 46px); }
}

/* ---------- Lencana ---------- */
.pt-lencana-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.pt-lencana { text-align: center; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--pt-garis); background: #fff; }
.pt-lencana-ikon { width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; background: linear-gradient(135deg, #FFE8A3, #FFC93C); box-shadow: 0 3px 0 #D9A21B; }
.pt-lencana-nama { font-size: 11.8px; font-weight: 700; line-height: 1.25; color: var(--biru-tua); }
.pt-lencana.terkunci .pt-lencana-ikon { background: #EEF1F4; box-shadow: 0 3px 0 #D5DCE2; filter: grayscale(1); opacity: .55; }
.pt-lencana.terkunci .pt-lencana-nama { color: #9AA6B2; }

/* ---------- Peta perjalanan mata kuliah ---------- */
.pt-kelas-kepala { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.pt-kelas-kepala h3 { margin: 0; font-size: 18px; color: var(--biru-tua); }
.pt-kelas-kepala p { margin: 2px 0 0; color: var(--pt-muted); font-size: 13.5px; }
.pt-jalur { list-style: none; margin: 16px 0 0; padding: 0; position: relative; }
.pt-jalur::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px; background: #E3E8EC; }
.pt-langkah { position: relative; display: flex; gap: 14px; padding: 0 0 16px; }
.pt-langkah:last-child { padding-bottom: 0; }
.pt-simpul { position: relative; z-index: 1; flex: none; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #fff; border: 3px solid #D5DCE2; color: #9AA6B2; }
.pt-langkah.selesai .pt-simpul { background: var(--hijau); border-color: var(--hijau); color: #fff; }
.pt-langkah.aktif .pt-simpul { background: #fff; border-color: var(--biru); color: var(--biru); box-shadow: 0 0 0 6px rgba(29,111,165,.15); animation: pt-denyut 2s infinite; }
.pt-langkah.perhatian .pt-simpul { border-color: var(--pt-emas); color: var(--pt-emas); }
@keyframes pt-denyut { 0%,100% { box-shadow: 0 0 0 6px rgba(29,111,165,.15); } 50% { box-shadow: 0 0 0 10px rgba(29,111,165,.05); } }
.pt-langkah-isi { flex: 1; min-width: 0; background: #FAFBFC; border: 1px solid var(--pt-garis); border-radius: 14px; padding: 11px 13px; }
.pt-langkah.aktif .pt-langkah-isi { background: #fff; border-color: #9CC6E4; box-shadow: 0 6px 18px rgba(29,111,165,.1); }
.pt-langkah-atas { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-langkah-atas strong { font-size: 15px; }
.pt-langkah-isi p { margin: 4px 0 0; font-size: 13.5px; color: var(--pt-muted); }
.pt-langkah-isi .pt-tombol { margin-top: 10px; }
.pt-mini-bar { height: 8px; border-radius: 999px; background: #E3E8EC; overflow: hidden; margin-top: 8px; }
.pt-mini-bar > div { height: 100%; background: linear-gradient(90deg, #2F9E52, #6BCB77); border-radius: 999px; }

/* ---------- Peta kurikulum (level) ---------- */
.pt-level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pt-level-kotak { position: relative; border-radius: 14px; padding: 12px; border: 1.5px solid var(--pt-garis); background: #fff; min-height: 104px; display: flex; flex-direction: column; gap: 6px; }
.pt-level-no { font-size: 11.5px; font-weight: 800; color: #9AA6B2; letter-spacing: .04em; }
.pt-level-nama { font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--biru-tua); flex: 1; }
.pt-level-kotak.selesai { background: linear-gradient(160deg, #F2FBF4, #fff); border-color: #A8DDB7; }
.pt-level-kotak.aktif { background: linear-gradient(160deg, #EAF4FB, #fff); border-color: var(--biru); box-shadow: 0 6px 16px rgba(29,111,165,.15); }
.pt-level-kotak.gagal { background: #FFF7F6; border-color: #F2B8B0; }
.pt-level-kotak.belum .pt-level-nama { color: #7D8894; }
.pt-level-bintang { position: absolute; right: 10px; top: 8px; font-size: 16px; }
.pt-level-kotak a { font-size: 12.5px; font-weight: 700; color: var(--biru); text-decoration: none; }
.pt-semester { font-size: 13px; font-weight: 800; color: var(--pt-muted); text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 8px; }
.pt-semester:first-child { margin-top: 0; }

/* ---------- Cincin progres ---------- */
.pt-cincin { --p: 0; width: 92px; height: 92px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--hijau) calc(var(--p) * 1%), #E3E8EC 0); }
.pt-cincin > span { width: 70px; height: 70px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; color: var(--biru-tua); }
.pt-cincin-baris { display: flex; gap: 16px; align-items: center; }
.pt-nilai-tabel { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.pt-nilai-tabel td { padding: 8px 4px; border-top: 1px solid var(--pt-garis); }
.pt-nilai-tabel td:last-child { text-align: right; font-weight: 700; }

/* ---------- Data diri ---------- */
.pt-data { display: grid; grid-template-columns: 1fr; gap: 0; }
.pt-data div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pt-garis); font-size: 14.5px; }
.pt-data div:first-child { border-top: 0; }
.pt-data dt, .pt-data span.l { color: var(--pt-muted); }
.pt-data b { text-align: right; overflow-wrap: anywhere; }

/* ---------- Tagihan ---------- */
.pt-tagihan { border: 1.5px solid var(--pt-garis); border-radius: 14px; padding: 14px; margin-top: 12px; }
.pt-tagihan.lunas { border-color: #A8DDB7; background: #F7FBF8; }
.pt-tagihan.menunggu { border-color: #F3DB9A; background: #FFFCF2; }
.pt-tagihan-atas { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.pt-tagihan-atas small { display: block; color: var(--pt-muted); font-size: 13px; margin-top: 2px; }
.pt-bayar { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; background: #F6F8FA; border: 1px solid var(--pt-garis); border-radius: 14px; padding: 14px; }
.pt-bayar .rek { font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: .05em; font-weight: 700; }
.pt-form label { display: block; font-size: 13px; font-weight: 700; margin: 10px 0 4px; color: var(--biru-tua); }
.pt-form input[type=text], .pt-form select, .pt-form textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--pt-garis); border-radius: 10px; font: inherit; font-size: 14.5px; background: #fff; margin: 0; }
.pt-form input:focus, .pt-form select:focus, .pt-form textarea:focus { outline: none; border-color: var(--biru); box-shadow: 0 0 0 3px rgba(29,111,165,.15); }
.pt-form-baris { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; }

/* ---------- Login ---------- */
.pt-login { max-width: 440px; margin: 24px auto; }
.pt-login .pt-kartu { padding: 26px; }
.pt-login h1 { font-family: var(--font-judul); color: var(--biru-tua); font-size: 26px; margin: 0 0 4px; text-align: center; }
.pt-login .pt-sub { text-align: center; }
.pt-login .pt-ikon-besar { font-size: 44px; text-align: center; margin-bottom: 4px; }

/* ---------- Halaman aturan sesi ---------- */
.pt-aturan { max-width: 720px; margin: 0 auto; }
.pt-aturan-list { list-style: none; margin: 0; padding: 0; counter-reset: aturan; }
.pt-aturan-list li { counter-increment: aturan; display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--pt-garis); }
.pt-aturan-list li:first-child { border-top: 0; }
.pt-aturan-list li::before { content: counter(aturan); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--biru-tua); color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.pt-aturan-list li > div { flex: 1; font-size: 14.8px; }
.pt-aturan-list li strong { display: block; color: var(--biru-tua); }
.pt-meter { display: flex; height: 26px; border-radius: 10px; overflow: hidden; margin: 10px 0 6px; font-size: 12px; font-weight: 800; color: #fff; }
.pt-meter div { display: flex; align-items: center; justify-content: center; }
.pt-setuju { display: flex; gap: 10px; align-items: flex-start; background: var(--pt-emas-muda); border: 1.5px solid #F3DB9A; border-radius: 14px; padding: 14px; font-weight: 600; font-size: 14.5px; cursor: pointer; margin: 14px 0; }
.pt-setuju input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--hijau); }

/* ---------- Dosen ---------- */
.pt-sesi-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
@media (min-width: 760px) { .pt-sesi-grid { grid-template-columns: 1fr 1fr; } }
.pt-sesi { border: 1.5px solid var(--pt-garis); border-radius: 16px; padding: 14px; background: #FAFBFC; }
.pt-sesi.siap { border-color: #A8DDB7; background: #F7FBF8; }
.pt-sesi.tunggu { border-color: #F3DB9A; background: #FFFCF2; }
.pt-sesi.isi { border-color: #9CC6E4; background: #fff; }
.pt-sesi h4 { margin: 0; font-size: 15.5px; color: var(--biru-tua); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.pt-tahap { display: flex; gap: 4px; margin: 12px 0; }
.pt-tahap div { flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: #9AA6B2; }
.pt-tahap div::before { content: ""; display: block; height: 6px; border-radius: 999px; background: #E3E8EC; margin-bottom: 5px; }
.pt-tahap div.ok { color: #1B6B35; }
.pt-tahap div.ok::before { background: var(--hijau); }
.pt-tahap div.kini { color: var(--biru); }
.pt-tahap div.kini::before { background: var(--biru); }
.pt-opsi-baris { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pt-opsi-baris .pt-opsi-label { grid-column: 1 / -1; font-size: 12.5px; font-weight: 800; color: var(--pt-muted); margin-top: 6px; }
.pt-opsi-baris select { width: 100%; margin: 0; padding: 9px 10px; border: 1.5px solid var(--pt-garis); border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
.pt-minggu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.pt-minggu div { text-align: center; padding: 8px 4px; border-radius: 10px; background: #F1F4F7; font-size: 11.5px; font-weight: 700; color: var(--pt-muted); line-height: 1.3; }
.pt-minggu div b { display: block; font-size: 13px; color: var(--biru-tua); }
.pt-minggu div.lewat { background: var(--hijau-muda); color: #1B6B35; }
.pt-minggu div.kini { background: var(--biru); color: #fff; }
.pt-minggu div.kini b { color: #fff; }

@media (max-width: 899px) { .pt-tabs { top: 56px; } }
@media (max-width: 560px) {
  .pt-hero { padding: 18px 16px; border-radius: 18px; }
  .pt-hero h1 { font-size: 20px; }
  .pt-avatar { width: 56px; height: 56px; font-size: 20px; }
  .pt-kartu { padding: 15px; border-radius: 16px; }
  .pt-stat-angka { font-size: 22px; }
  .pt-opsi-baris { grid-template-columns: 1fr; }
}
