/* Teras 5491 — penyesuaian di atas template Datta Able */
:root {
  --teras-blue: #2e86ab;
  --teras-blue-light: #56a0c1;
  --teras-red: #d12346;
  --teras-red-dark: #b01d3b;
}

.text-teras-red { color: var(--teras-red) !important; }
.bg-teras-red { background-color: var(--teras-red) !important; }

/* Branding sidebar: blok putih berisi logo + nama + tagline */
:root { --teras-sidebar-brand-h: 96px; }
.pc-sidebar .m-header {
  height: var(--teras-sidebar-brand-h);
  background: #fff;
  padding: 16px 20px;
  position: relative;
}
.pc-sidebar .m-header::after { /* garis pemisah tipis */
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 0;
  border-bottom: 1px solid #e7eaee;
}
.pc-sidebar .navbar-content { height: calc(100vh - var(--teras-sidebar-brand-h)); }
.sidebar-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.sidebar-brand-logo { width: 52px; height: 60px; object-fit: contain; flex-shrink: 0; }
.sidebar-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar-brand-name { color: #2b6f8f; font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.sidebar-brand-tagline {
  color: #6f93a6; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em; margin-top: 6px;
}

/* Ikon menu sidebar dalam bingkai kotak membulat */
.pc-sidebar .pc-navbar > .pc-item > .pc-link { display: flex; align-items: center; }
.pc-sidebar .pc-micon {
  width: 34px; height: 34px; margin-right: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  transition: background-color .15s ease, border-color .15s ease;
}
.pc-sidebar .pc-micon i { font-size: 15px; vertical-align: middle; line-height: 1; }
.pc-sidebar .pc-item:hover > .pc-link .pc-micon { background: rgba(255, 255, 255, .16); }
.pc-sidebar .pc-item.active > .pc-link .pc-micon {
  background: var(--teras-blue); border-color: var(--teras-blue-light); color: #fff;
  box-shadow: 0 4px 12px rgba(46, 134, 171, .4);
}
.pc-sidebar .pc-item.active > .pc-link .pc-micon i { color: #fff; }
.pc-sidebar .pc-link .pc-badge {
  margin-left: auto; background: var(--teras-red); color: #fff;
  border-radius: 999px; padding: 2px 8px; font-size: .7rem; font-weight: 700;
}

/* Page header: judul di atas, breadcrumb di bawahnya, beri jarak ke konten */
.page-header { margin-bottom: 1.5rem; }
.page-header .page-header-title { display: block; }
.page-header .page-header-title h5 { font-size: 1.35rem; font-weight: 600; margin: 0 0 .35rem; padding: 0; color: var(--pc-heading-color); }
.page-header .breadcrumb { display: flex; margin: 0; font-size: .875rem; }
.page-header .page-header-title h5 { display: flex; align-items: center; gap: .6rem; }
.page-back { color: var(--teras-blue); font-size: 1.5rem; line-height: 1; transition: color .15s ease, transform .15s ease; }
.page-back:hover { color: #1f5f7a; transform: translateX(-2px); }
.page-header .breadcrumb .breadcrumb-item a:hover { color: var(--teras-blue); }

/* Jarak ikon pada tombol berteks (ikon di depan); ikon di belakang teks pakai class .icon-end */
.btn:not(.btn-action):not(.btn-icon-only) > i:first-child { margin-right: .5rem !important; margin-left: 0 !important; }
.btn:not(.btn-action) > i.icon-end { margin-right: 0 !important; margin-left: .5rem !important; }
.dropdown-item > i:first-child { width: 1.1rem; text-align: center; margin-right: .6rem !important; }

/* Sel anggota: avatar + nama + KIA */
.member-cell { display: flex; align-items: center; gap: .75rem; }
.member-cell .avatar-initial { flex: 0 0 auto; }
.member-name { font-weight: 600; color: var(--pc-heading-color); line-height: 1.3; }
.member-kia { font-size: .78rem; color: #8996a4; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* DataTables: kolom yang diurutkan dengan angka (mis. Kelas lewat data-order) tetap rata kiri */
table.dataTable th.dt-type-numeric, table.dataTable td.dt-type-numeric { text-align: left; }

/* DataTables: samakan ukuran kontrol dengan form template */
div.dt-container .dt-search input, div.dt-container .dt-length select { font-size: .875rem; border-color: #bec8d0; border-radius: 4px; }
div.dt-container .dt-search input { min-width: 260px; padding: .5rem .75rem; margin-left: 0; }
div.dt-container .dt-info { font-size: .8125rem; color: #8996a4; }
div.dt-container .dt-paging .page-link { font-size: .8125rem; }
table.dataTable thead > tr > th.dt-orderable-asc:hover, table.dataTable thead > tr > th.dt-ordering-asc,
table.dataTable thead > tr > th.dt-ordering-desc { color: var(--teras-blue); }
/* Tag daftar (keahlian, minat kegiatan): teks gelap di latar lembut agar mudah dibaca */
.tag-chip {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0 .4rem .5rem 0; padding: .4rem .85rem;
  font-size: .8125rem; font-weight: 500; line-height: 1.4; color: #1d2630;
  background: #f1f5f8; border: 1px solid #dbe4ea; border-radius: 999px;
}
.tag-chip > i { font-size: .7rem; color: var(--teras-blue); }

/* Profil anggota: kartu sampul */
.profile-hero { overflow: hidden; }
.profile-hero-cover {
  position: relative; height: 120px; overflow: hidden;
  background: linear-gradient(120deg, var(--teras-blue-light) 0%, var(--teras-blue) 55%, #1f5f7a 100%);
}
.profile-hero-cover::after { /* aksen merah logo */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: linear-gradient(90deg, var(--teras-red) 0 35%, transparent 35%);
}
.profile-hero-watermark {
  position: absolute; right: 24px; top: -14px; line-height: 1;
  font-size: 7.5rem; font-weight: 800; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .18);
  pointer-events: none; user-select: none;
}
/* Avatar | identitas | anggota sejak — semuanya rata tengah secara vertikal */
.profile-hero-body { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.profile-hero-avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 6px #e3eef3; }
.profile-hero-main { flex: 1 1 280px; }
.profile-hero-name { font-weight: 700; color: var(--pc-heading-color); }
.profile-hero-nick { color: #8996a4; font-style: italic; margin: .15rem 0 .75rem; }
.profile-hero-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: #5b6b79; }
.profile-hero-meta li { display: inline-flex; align-items: center; gap: .5rem; }
.profile-hero-meta i { color: var(--teras-blue); width: 1rem; text-align: center; }
.profile-hero-since {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem;
  background: #f5fafc; border: 1px solid #e3eef3; border-radius: 12px;
}
.profile-hero-since i { font-size: 1.4rem; color: var(--teras-blue); }
.profile-hero-since small { display: block; color: #8996a4; font-size: .75rem; }
.profile-hero-since strong { display: block; color: var(--pc-heading-color); }
@media (max-width: 575.98px) {
  .profile-hero-body { flex-direction: column; align-items: center; text-align: center; }
  .profile-hero-meta { justify-content: center; }
  .profile-hero-watermark { font-size: 5rem; }
}

/* Kotak ringkasan berikon */
.info-tile {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
  background: #fff; border: 1px solid #e7eaee; border-radius: 12px;
  box-shadow: 0 1px 20px 0 rgba(69, 90, 100, .08);
}
.info-tile.is-highlight { border-color: rgba(44, 168, 127, .35); background: linear-gradient(135deg, #fff 60%, #effaf6 100%); }
.info-tile-icon { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.info-tile-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #8996a4; }
.info-tile-value { font-size: 1rem; font-weight: 600; color: var(--pc-heading-color); margin-top: .15rem; }
.info-tile-value.is-empty { color: #aab4bd; font-weight: 400; font-style: italic; }

/* Judul kartu berikon */
.card-header.section-header { display: flex; align-items: center; gap: .85rem; }
/* Template memberi jarak 10px di bawah judul kartu; untuk judul + subjudul cukup rapat */
.card .card-header.section-header h5 + small { margin-top: .15rem; }
.section-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eaf3f6; color: var(--teras-blue);
}
.section-icon.section-icon-red { background: #fdeef1; color: var(--teras-red); }

/* Daftar teman sekelas */
.classmate-item {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem;
  color: inherit; text-decoration: none; border-bottom: 1px solid #f0f2f5;
  transition: background-color .15s ease;
}
.classmate-item:last-child { border-bottom: 0; }
.classmate-item:hover { background: #f5fafc; color: inherit; }
.classmate-item:hover .fa-chevron-right { color: var(--teras-blue) !important; }
/* Pencarian teman sekelas */
.classmates-search { position: relative; padding: .75rem 1.25rem; border-bottom: 1px solid #f0f2f5; }
.classmates-search i { position: absolute; left: 2rem; top: 50%; transform: translateY(-50%); color: #8996a4; font-size: .8rem; pointer-events: none; }
.classmates-search .form-control { padding-left: 2.1rem; border-radius: 999px; background: #f7f9fb; border-color: #e4ebf0; }
.classmates-search .form-control:focus { background: #fff; }
/* Saat mencari: semua hasil tampil (termasuk yang terlipat), tombol "Tampilkan semua" disembunyikan */
#classmates-card.is-searching #classmates-more { display: block !important; height: auto !important; }
#classmates-card.is-searching .card-footer { display: none; }

/* Garis pemisah ke tombol "Tampilkan semua" berasal dari item terakhir yang terlihat, bukan dari footer */
#classmates-more .classmate-item:last-child { border-bottom: 1px solid #f0f2f5; }
.card-footer:has(.classmates-toggle) { border-top: 0; }
.classmates-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem 1rem; border-radius: 999px; border: 0;
  font-weight: 600; font-size: .8125rem; text-decoration: none !important;
  background: #eaf3f6; color: var(--teras-blue);
  transition: background-color .15s ease, color .15s ease;
}
.classmates-toggle:hover, .classmates-toggle:focus-visible { background: var(--teras-blue); color: #fff; }
.classmates-toggle i { font-size: .7rem; margin-left: .35rem; }
.classmates-toggle .when-expanded,
.classmates-toggle[aria-expanded="true"] .when-collapsed { display: none; }
.classmates-toggle[aria-expanded="true"] .when-expanded { display: inline; }

/* Bilah filter ringkas (halaman verifikasi) */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  padding: .85rem; background: #fff; border: 1px solid #e4ebf0; border-radius: 14px;
}
.filter-bar .form-control, .filter-bar .form-select { height: 44px; border-color: #dde4ea; border-radius: 10px; font-size: .875rem; }
.filter-bar .form-select { width: auto; min-width: 140px; flex: 0 0 auto; }
.filter-bar-search { position: relative; flex: 1 1 260px; }
.filter-bar-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #8996a4; pointer-events: none; }
.filter-bar-search .form-control { padding-left: 2.6rem; }
.filter-bar-reset {
  width: 44px; height: 44px; padding: 0; flex: 0 0 auto; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eaf3f6; color: var(--teras-blue); border: 0; font-size: 1.05rem;
}
.filter-bar-reset i { margin: 0; line-height: 1; }
.filter-bar-reset:hover { background: var(--teras-blue); color: #fff; }
@media (max-width: 575.98px) { .filter-bar .form-select { flex: 1 1 calc(50% - 2rem); min-width: 0; } }

/* Detail registrasi */
.reg-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.reg-summary-main { flex: 1 1 280px; min-width: 0; }
.reg-summary .profile-hero-since small:last-child { color: #8996a4; font-size: .72rem; }
.detail-item { display: flex; gap: .75rem; align-items: flex-start; }
.detail-item-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f2f6f9; color: #6c7a86;
}
.detail-item-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #8996a4; }
.detail-item-value { font-weight: 600; color: var(--pc-heading-color); }
.min-w-0 { min-width: 0; }

.reg-timeline { list-style: none; margin: 0; padding: 0; }
.reg-timeline li { position: relative; padding: 0 0 1.1rem 1.75rem; }
.reg-timeline li:last-child { padding-bottom: 0; }
.reg-timeline li::before { /* titik */
  content: ""; position: absolute; left: 0; top: .3rem; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid #cfd8df;
}
.reg-timeline li:not(:last-child)::after { /* garis */
  content: ""; position: absolute; left: 5px; top: 1.1rem; bottom: .1rem; width: 2px; background: #e4ebf0;
}
.reg-timeline li.is-done::before { border-color: #2ca87f; background: #2ca87f; }
.reg-timeline li.is-current::before { border-color: #e58a00; box-shadow: 0 0 0 4px #fff3dd; }
.reg-timeline li.is-rejected::before { border-color: var(--teras-red); background: var(--teras-red); }
.reg-timeline strong { display: block; color: var(--pc-heading-color); font-size: .875rem; }
.reg-timeline small { color: #8996a4; }
.reg-timeline-note { margin-top: .4rem; padding: .5rem .75rem; font-size: .8125rem; background: #fdf1f3; border-radius: 8px; color: #8a1c33; }

.check-list { list-style: none; margin: 0; padding: 0; font-size: .8125rem; }
.check-list li { display: flex; gap: .55rem; padding: .3rem 0; }
.check-list i { margin-top: .15rem; }
.check-list .is-ok i { color: #2ca87f; }
.check-list .is-warn { color: #8a5a00; }
.check-list .is-warn i { color: #e58a00; }
.reg-absen {
  min-width: 28px; padding: .1rem .35rem; border-radius: 6px; text-align: center;
  font-size: .72rem; font-weight: 700; background: #eaf3f6; color: var(--teras-blue); font-variant-numeric: tabular-nums;
}

/* Modal verifikasi */
.verify-who { display: flex; align-items: center; gap: .75rem; padding: .75rem; margin-bottom: .9rem; background: #f5f9fb; border-radius: 12px; }
.verify-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.verify-option {
  display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .9rem .5rem; margin: 0;
  border: 2px solid #e4ebf0; border-radius: 12px; cursor: pointer; text-align: center; transition: all .15s ease;
}
.verify-option i { font-size: 1.5rem; color: #aab4bd; margin-bottom: .2rem; }
.verify-option strong { color: var(--pc-heading-color); }
.verify-option small { color: #8996a4; font-size: .75rem; }
.verify-option:hover { border-color: #cfd8df; }
.btn-check:checked + .verify-option.is-approve { border-color: #2ca87f; background: #effaf6; }
.btn-check:checked + .verify-option.is-approve i { color: #2ca87f; }
.btn-check:checked + .verify-option.is-reject { border-color: var(--teras-red); background: #fdf1f3; }
.btn-check:checked + .verify-option.is-reject i { color: var(--teras-red); }
.btn-check:focus-visible + .verify-option { box-shadow: 0 0 0 3px rgba(46, 134, 171, .25); }

/* Badge status keanggotaan: latar muda, teks tua agar tegas terbaca */
.badge-status { font-weight: 600; border: 1px solid transparent; }
.badge-status-aktif { background: #dcf3e6; color: #11663f; border-color: #b6e3c9; }
.badge-status-meninggal { background: #fde8ec; color: #a3172f; border-color: #f6c2cc; }

/* Menu Download (Data Anggota) */
.download-menu { min-width: 220px; padding: .4rem; }
.download-menu .dropdown-item { display: flex; align-items: center; gap: .75rem; padding: .55rem .65rem; border-radius: 8px; line-height: 1.25; }
.download-menu .dropdown-item small { font-size: .75rem; }
.download-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
/* Ikon tepat di tengah bingkai; menimpa aturan template ".dropdown-menu .dropdown-item i" (margin-right 10px). */
.dropdown-menu .dropdown-item .download-icon i { display: block; font-size: 1.35rem; line-height: 1; margin: 0; }
.download-icon.is-excel { background: #dcf3e6; color: #11663f; }
.download-icon.is-pdf { background: #fde8ec; color: #a3172f; }

/* Menu "Kelola" di Profil Anggota (pengurus) */
.member-manage-menu { min-width: 240px; }
.member-manage-menu .dropdown-item { display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem; }
.member-manage-menu .dropdown-item i { width: 1rem; text-align: center; }

/* Empty state */
.empty-state {
  text-align: center; padding: 3.5rem 1.5rem;
  border: 1px solid #e4ebf0; border-radius: 14px; background: #fff;
}
.empty-state-icon {
  width: 92px; height: 92px; border-radius: 50%; margin-bottom: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eaf3f6; color: var(--teras-blue); font-size: 2rem;
}
.empty-state-title { font-weight: 700; color: #1f3b4d; margin-bottom: .6rem; }
.empty-state-text { color: #8996a4; max-width: 460px; margin: 0 auto; }

/* Kontak anggota (khusus pengurus) */
.contact-item {
  display: flex; align-items: center; gap: .75rem; padding: .7rem 1.25rem; border-bottom: 1px solid #f0f2f5;
}
.contact-item:last-child { border-bottom: 0; }
.contact-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eaf3f6; color: var(--teras-blue);
}
.contact-item .fa-whatsapp { color: #25d366; }

.privacy-note {
  display: flex; gap: .75rem; padding: 1rem 1.1rem; margin-bottom: 1.5rem;
  font-size: .8125rem; color: #6c7a86; background: #f8f9fa; border: 1px dashed #d5dde3; border-radius: 12px;
}
.privacy-note i { color: #8996a4; margin-top: .15rem; }

.filter-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 500; padding: .3rem .35rem .3rem .75rem; border-radius: 999px;
}
.filter-chip-remove {
  width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #90a4ae; font-size: .6rem; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.filter-chip-remove:hover { background: #fdeef1; color: var(--teras-red); }

/* Tombol aksi bulat berikon (kolom aksi tabel) */
.btn.btn-action {
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; line-height: 1; vertical-align: middle;
}
.btn.btn-action + .btn.btn-action, .btn.btn-action + form, form + .btn.btn-action { margin-left: .35rem; }
.btn.btn-action:hover { transform: translateY(-1px); }

/* Avatar: inisial atau foto profil (<x-avatar>) */
.avatar-initial {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teras-blue); color: #fff; font-weight: 700; line-height: 1;
}
.avatar-initial.avatar-sm { width: 36px; height: 36px; min-width: 36px; font-size: .95rem; }
.avatar-initial.avatar-md { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; }
.avatar-initial.avatar-lg { width: 72px; height: 72px; min-width: 72px; font-size: 1.75rem; }
.avatar-initial.avatar-xl { width: 96px; height: 96px; min-width: 96px; font-size: 2.25rem; }
img.avatar-initial.avatar-photo { object-fit: cover; background: #eaf3f6; }

/* Unggah foto profil (Profil Saya) */
.avatar-uploader { position: relative; display: inline-block; }
.avatar-uploader .avatar-initial { box-shadow: 0 0 0 4px #fff, 0 0 0 6px #e3eef3; }
.avatar-uploader-btn {
  position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; margin: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: 50%; background: var(--teras-blue); color: #fff; font-size: .85rem;
  border: 3px solid #fff; box-shadow: 0 4px 10px rgba(29, 38, 48, .2);
  transition: background-color .15s ease, transform .15s ease;
}
.avatar-uploader-btn:hover { background: #1f5f7a; transform: scale(1.06); }
.avatar-link { cursor: pointer; font-size: .8125rem; text-decoration: none; vertical-align: baseline; }
.avatar-crop-area { background: #1d2630; border-radius: 8px; overflow: hidden; max-height: 60vh; text-align: center; }
.avatar-crop-area img { max-width: 100%; max-height: 60vh; display: block; margin: 0 auto; }
.avatar-crop-preview { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #e3eef3; background: #f1f5f8; flex-shrink: 0; }

/* Avatar header: overlay hover bawaan template (::before, z-index 1) menutupi avatar */
.pc-header .pc-head-link.header-avatar-link::before { display: none; }
/* Template mengunci link 44x44px + padding 7px sehingga avatar terjepit jadi lonjong */
.pc-header .header-user-profile .pc-head-link.header-avatar-link {
  width: auto; height: auto; padding: 4px 4px 4px 12px; gap: 12px;
  overflow: visible; border-radius: 999px;
}
.pc-header .pc-head-link.header-avatar-link:hover { background: rgba(46, 134, 171, .06); }
.pc-header .pc-head-link.header-avatar-link .avatar-initial {
  flex: 0 0 auto; position: relative; z-index: 5;
  transition: box-shadow .15s ease;
}
.header-greeting { text-align: right; line-height: 1.2; }
.header-greeting small { display: block; color: #8996a4; font-size: .75rem; font-weight: 400; }
.header-greeting strong { display: block; color: var(--pc-heading-color); font-size: .95rem; }
.pc-header .pc-head-link.header-avatar-link:hover .avatar-initial,
.pc-header .pc-head-link.header-avatar-link[aria-expanded="true"] .avatar-initial {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--teras-blue-light);
}

/* Auth pages (Datta Able login-v4) */
.auth-main .auth-wrapper.v4 { background:
  radial-gradient(circle at 0% 0%, rgba(86, 160, 193, .18) 0, transparent 40%),
  radial-gradient(circle at 100% 100%, rgba(209, 35, 70, .10) 0, transparent 40%),
  var(--bs-body-bg); }
.auth-main .auth-wrapper.v4 .auth-form .card { border: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(29, 38, 48, .12); }
/* .auth-form adalah item flex: tanpa min-width 0 ia melebar mengikuti kartu 980px sehingga
   max-width kartu tidak berlaku dan halaman meluber di layar HP. */
.auth-main .auth-wrapper.v4 .auth-form { width: 100%; min-width: 0; }
.auth-main .auth-wrapper.v4 .auth-form .card { max-width: 100%; }
.auth-main .auth-wrapper.v4 .auth-form .card.auth-card-split { width: 980px; }
.auth-main .auth-wrapper.v4 .auth-form .card.auth-card-wide { width: 1100px; }

/* Panel branding kiri */
.auth-panel {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, var(--teras-blue-light) 0%, var(--teras-blue) 55%, #1f5f7a 100%);
}
.auth-panel::before { /* lingkaran dekoratif */
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  right: -120px; top: -120px; border: 48px solid rgba(255, 255, 255, .07);
}
.auth-panel::after { /* aksen merah logo */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: linear-gradient(90deg, var(--teras-red) 0 60%, var(--teras-blue-light) 60% 100%);
}
.auth-panel-watermark {
  position: absolute; right: -24px; bottom: 6px; line-height: 1;
  font-size: 10rem; font-weight: 800; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .14);
  pointer-events: none; user-select: none;
}
.auth-panel-inner {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; padding: 44px 40px 32px;
}
.auth-panel-brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.auth-panel-brand:hover { color: #fff; }
.auth-panel-logo {
  flex-shrink: 0; width: 64px; height: 64px; padding: 6px; border-radius: 14px; background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18); display: flex; align-items: center; justify-content: center;
}
.auth-panel-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-panel-name { display: block; font-size: 1.6rem; font-weight: 600; line-height: 1.1; letter-spacing: .01em; }
.auth-panel-name strong { font-weight: 800; }
.auth-panel-sub { display: block; font-size: .8rem; opacity: .85; margin-top: 4px; }
.auth-panel-headline { color: #fff; font-size: 1.75rem; font-weight: 700; line-height: 1.25; margin: 48px 0 12px; }
.auth-panel-lead { opacity: .9; margin-bottom: 28px; max-width: 340px; }
.auth-panel-points { list-style: none; padding: 0; margin: 0 0 32px; }
.auth-panel-points li { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 500; }
.auth-panel-points li span {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); font-size: 1.15rem;
}
.auth-panel-points li:first-child span { background: var(--teras-red); }
.auth-panel-foot { margin-top: auto; font-size: .8rem; opacity: .7; }

/* Sisi form */
.auth-form-body { align-self: center; width: 100%; }
.auth-main .auth-wrapper.v4 .auth-form .card .card-body.auth-form-body { padding: 48px 44px; }
@media (max-width: 575.98px) {
  .auth-main .auth-wrapper.v4 .auth-form .card .card-body.auth-form-body { padding: 28px 22px; }
}
.auth-eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teras-red); background: #fdeef1; border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.auth-heading { font-weight: 700; margin-bottom: 6px; }
.auth-input .input-group-text { background: #f8f9fa; color: #8996a4; }
.auth-input .form-control { padding-top: .7rem; padding-bottom: .7rem; }
.auth-input:focus-within .input-group-text { color: var(--teras-blue); border-color: var(--teras-blue); }
.toggle-password { cursor: pointer; background: #f8f9fa; color: #8996a4; }
.toggle-password:hover { color: var(--teras-blue); }
.auth-input .toggle-password { border-left: 0; }

/* Alert SweetAlert selalu di atas modal Bootstrap (mis. konfirmasi dari dalam modal verifikasi). */
body .swal2-container { z-index: 2000 !important; }

/* Toast SweetAlert untuk flash message.
   CSS template memaksa margin ikon (auto, !important), latar gelap container, dan latar popup abu-abu;
   semuanya ditimpa khusus untuk toast agar tampil satu baris: ikon | pesan | tombol tutup. */
body .swal2-container:has(.teras-toast) {
  background: transparent !important;
  width: auto !important;
  top: 70px; /* di bawah header aplikasi */
  pointer-events: none;
}
.swal2-popup.swal2-toast.teras-toast {
  pointer-events: auto;
  width: 360px !important; max-width: calc(100vw - 32px);
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: .75rem;
  padding: .85rem 1rem !important;
  background: #fff !important;
  border: 1px solid #e7eaee;
  border-left: 4px solid var(--teras-toast-color, var(--teras-blue));
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(29, 38, 48, .14) !important;
  overflow: hidden;
}
.swal2-popup.swal2-toast.teras-toast .swal2-icon {
  grid-column: 1; grid-row: 1;
  margin: 0 !important;
  font-size: .8rem; /* seluruh bagian ikon berukuran em, jadi cukup skala lewat font-size (~26px) */
}
.swal2-popup.swal2-toast.teras-toast .swal2-title {
  grid-column: 2; grid-row: 1;
  margin: 0 !important; padding: 0;
  text-align: left; font-size: .875rem; font-weight: 500; line-height: 1.4; color: #1d2630;
}
.swal2-popup.swal2-toast.teras-toast .swal2-close {
  grid-column: 3; grid-row: 1;
  position: static; margin: 0; width: 1.5rem; height: 1.5rem;
  font-size: 1.25rem; color: #a0aab4; border-radius: 50%;
}
.swal2-popup.swal2-toast.teras-toast .swal2-close:hover { color: var(--teras-red); background: #fdeef1; }
.swal2-popup.swal2-toast.teras-toast .swal2-timer-progress-bar-container { grid-column: 1 / -1; }
.swal2-popup.swal2-toast.teras-toast .swal2-timer-progress-bar { background: var(--teras-toast-color, var(--teras-blue)); opacity: .5; }

/* Warna per jenis pesan */
.teras-toast.teras-toast-success { --teras-toast-color: #2ca87f; }
.teras-toast.teras-toast-warning { --teras-toast-color: #e58a00; }
.teras-toast.teras-toast-error { --teras-toast-color: var(--teras-red); }
.teras-toast.teras-toast-info { --teras-toast-color: var(--teras-blue); }
.swal2-popup.teras-toast .swal2-icon.swal2-success { border-color: rgba(44, 168, 127, .35) !important; color: #2ca87f !important; }
.swal2-popup.teras-toast .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(44, 168, 127, .3) !important; }
.swal2-popup.teras-toast .swal2-icon.swal2-success [class^=swal2-success-line] { background-color: #2ca87f !important; }
.swal2-popup.teras-toast .swal2-icon.swal2-error { border-color: var(--teras-red) !important; color: var(--teras-red) !important; }
.swal2-popup.teras-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { background-color: var(--teras-red) !important; }

/* Select2: samakan dengan .form-select template (font .875rem, padding .625rem 1rem, border #bec8d0) */
.select2-container--bootstrap-5 .select2-selection {
  min-height: calc(1.5em + 1.25rem + 2px);
  padding: .625rem 2rem .625rem 1rem;
  font-size: .875rem; line-height: 1.5; font-weight: 400;
  border-color: #bec8d0; border-radius: 4px;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered { color: #888; line-height: 1.5; }
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder { color: #aab4bd; }
.select2-container--bootstrap-5 .select2-selection--single { background-position: right 1rem center; background-size: 16px 12px; }
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear { right: 2.25rem; }
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--teras-blue); box-shadow: 0 0 0 .2rem rgba(46, 134, 171, .25);
}
/* Multi select: chip pilihan */
.select2-container--bootstrap-5 .select2-selection--multiple { padding: .4rem 1rem .4rem .5rem; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
  font-size: .8125rem; color: var(--teras-blue); background: #eaf3f6; border-color: #cfe3ec; border-radius: 999px;
  padding: .2rem .65rem;
}
/* Tombol hapus chip: ikon x kecil, merah saat hover */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove {
  width: .5rem; height: .5rem; padding: .3rem; margin-right: .35rem; border-radius: 50%;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2390a4ae'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") 50%/.45rem auto no-repeat;
  transition: background-color .15s ease;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove:hover {
  background: #fdeef1 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23d12346'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") 50%/.45rem auto no-repeat;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field { font-size: .875rem; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field::placeholder { color: #aab4bd; }
.select2-container--bootstrap-5 .select2-dropdown { font-size: .875rem; border-color: #bec8d0; border-radius: 4px; }
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
  font-size: .875rem; padding: .5rem .75rem; border-color: #bec8d0; border-radius: 4px;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
  font-size: .875rem; padding: .45rem 1rem; color: #5b6b79;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted {
  background-color: var(--teras-blue); color: #fff;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected {
  background-color: #eaf3f6; color: var(--teras-blue);
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] { padding: 0; }
.select2-container--bootstrap-5 .select2-results__group {
  padding: .5rem 1rem .25rem !important; color: var(--teras-blue);
  font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
}
.select2-container--bootstrap-5 .select2-results__group + .select2-results__options .select2-results__option { padding-left: 1.5rem; }
.auth-register-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 12px; background: #f5fafc; border: 1px solid #e3eef3;
}
.btn-outline-danger { --bs-btn-color: var(--teras-red); --bs-btn-border-color: var(--teras-red); --bs-btn-hover-bg: var(--teras-red); --bs-btn-hover-border-color: var(--teras-red); --bs-btn-active-bg: var(--teras-red-dark); --bs-btn-active-border-color: var(--teras-red-dark); }
.auth-mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-mobile-brand img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.auth-mobile-name { font-size: 1.25rem; line-height: 1.1; }
.auth-mobile-name strong { color: var(--teras-red); }
.teras-logo-header { width: 72px; height: auto; flex-shrink: 0; }
.consent-sticky { position: sticky; top: 1.5rem; }
@media (max-width: 991.98px) { .consent-sticky { position: static; } }
.auth-title { font-weight: 700; }
.auth-title span { color: var(--teras-red); }

/* Halaman login, registrasi, lupa/reset password di layar HP */
@media (max-width: 767.98px) {
  .auth-main .auth-wrapper.v4 { align-items: flex-start; }
  /* Jarak tepi layar 16px; kartu tidak menempel ke pinggir */
  .auth-main .auth-wrapper.v4 .auth-form { padding: 16px; }
  .auth-main .auth-wrapper.v4 .auth-form .card { margin: 0 !important; border-radius: 16px; box-shadow: 0 12px 32px rgba(29, 38, 48, .10); }
  .auth-main .auth-wrapper.v4 .auth-form .card .card-body,
  .auth-main .auth-wrapper.v4 .auth-form .card .card-body.auth-form-body { padding: 24px 18px; }

  .auth-mobile-brand { margin-bottom: 20px; }
  .auth-heading { font-size: 1.35rem; }
  .auth-title { font-size: 1.3rem; }
  .teras-logo-header { width: 56px; }

  /* Teks isian 16px agar Safari iPhone tidak memperbesar halaman saat kolom disentuh */
  .auth-main .form-control, .auth-main .form-select,
  .auth-main .select2-container--bootstrap-5 .select2-selection { font-size: 1rem; }

  /* Ajakan daftar di halaman login: bertumpuk, tombol selebar kartu */
  .auth-register-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .auth-register-cta .btn { width: 100%; padding-top: .6rem; padding-bottom: .6rem; }

  /* Registrasi: tombol kirim selebar layar */
  .auth-actions > * { width: 100%; }
  .auth-submit .btn { width: 100%; padding-top: .7rem; padding-bottom: .7rem; }
  .kia-preview .kia-number { font-size: 1.5rem; }
  .consent-box { font-size: .8125rem; }
}

/* Pratinjau KIA */
.kia-preview {
  border: 2px dashed var(--teras-blue-light);
  border-radius: 12px;
  background: #f5fafc;
  padding: 1rem 1.25rem;
  transition: border-color .2s, background-color .2s;
}
.kia-preview .kia-number { font-size: 1.75rem; font-weight: 700; letter-spacing: .12em; color: var(--teras-blue); font-variant-numeric: tabular-nums; }
.kia-preview.is-taken { border-color: var(--teras-red); background: #fdf1f3; }
.kia-preview.is-taken .kia-number { color: var(--teras-red); }
.kia-preview.is-available { border-style: solid; border-color: #2ca87f; background: #effaf6; }

.kia-badge {
  display: inline-block; font-weight: 700; letter-spacing: .08em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.form-section-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--teras-blue); border-bottom: 1px solid #e7eaee; padding-bottom: .5rem; margin-bottom: 1rem;
}

.consent-box { background: #f8f9fa; border-radius: 8px; padding: 1rem; font-size: .875rem; }

.dl-profile dt { font-weight: 600; color: #6c757d; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.dl-profile dd { margin-bottom: .9rem; }

.stat-card {
  border-radius: 16px; border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card:hover, .stat-card:focus-visible {
  transform: translateY(-3px);
  border-color: #d6e7ef;
  box-shadow: 0 10px 24px rgba(46, 134, 171, .14);
}
.stat-card .stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem;
  transition: transform .18s ease;
}
.stat-card:hover .stat-icon { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) {
  .stat-card, .stat-card .stat-icon { transition: none; }
  .stat-card:hover, .stat-card:hover .stat-icon { transform: none; }
}

/* Ringkasan teman sekelas / sekota (dashboard) */
.circle-card { border-radius: 16px; margin-bottom: 0; }
.circle-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.circle-number { font-size: 2rem; font-weight: 700; line-height: 1; color: var(--pc-heading-color); font-variant-numeric: tabular-nums; }
.circle-progress { height: 8px; border-radius: 999px; background: #eaf3f6; }
.circle-progress .progress-bar { border-radius: 999px; background: var(--teras-blue); }
.avatar-stack { display: flex; }
.avatar-stack > a { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px #fff; transition: transform .15s ease; }
.avatar-stack > a + a { margin-left: -8px; }
.avatar-stack > a:hover { transform: translateY(-2px); z-index: 1; }
.circle-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.circle-link i { font-size: .75rem; transition: transform .15s ease; }
.circle-link:hover i { transform: translateX(3px); }

/* Chart anggota per jurusan (drilldown kelas) */
.chart-card { border-radius: 16px; }
#members-chart { min-height: 320px; }
#members-chart .apexcharts-bar-area, #members-chart .apexcharts-xaxis-label { cursor: pointer; }
.chart-back { display: none; }
.chart-card.is-drilled .chart-back { display: inline-flex; align-items: center; }
/* Selektor sengaja lebih spesifik dari aturan jarak ikon tombol global (.btn:not(...) > i:first-child). */
.chart-card .btn.chart-back:not(.btn-action) > i:first-child { margin: 0 .35rem 0 0 !important; font-size: .8em; line-height: 1; }

.table td, .table th { vertical-align: middle; }
