/* =========================================================
   IKON PHOSPHOR DUOTONE - Sistem Evaluasi PBM
   Satu set ikon (Phosphor Duotone v2.1.1, MIT) untuk sidebar, topbar, kartu, tombol, dan halaman publik.
   - Garis utama mengikuti warna teks (currentColor).
   - Lapisan duotone diatur lewat --ph-duo (warna) dan --ph-duo-o (opacity).
   - Ikon fitur tampil di TILE TIMBUL berwarna; satu fitur = satu warna di seluruh aplikasi:
       indigo = Utama (Dashboard, Rekap, Pusat Export)   ungu  = Evaluasi PBM
       gold   = Evaluasi Sikap                            teal  = Sarana Prasarana / Fasilitas
       rose   = Surat Evaluasi Dosen                      hijau = Tindak Lanjut
       biru   = Data Master (Dosen, Kelas, Prodi, ...)    slate = lain-lain
   Dimuat setelah CSS lain, sehingga aturan di sini menang pada spesifisitas yang sama.
   ========================================================= */
svg.ph {
  width: 1em; height: 1em;
  display: inline-block; flex: none;
  vertical-align: -0.14em;
  fill: currentColor;
  overflow: visible;
  --ph-duo: currentColor; --ph-duo-o: .22;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), color .2s, opacity .2s;
}
svg.ph use { pointer-events: none; }
svg.ph.fa-fw { width: 1.28em; }
svg.ph.fa-lg { width: 1.33em; height: 1.33em; vertical-align: -0.25em; }
svg.ph.fa-2x { width: 2em; height: 2em; } svg.ph.fa-3x { width: 3em; height: 3em; }

/* =========================================================
   TILE TIMBUL BERWARNA
   ========================================================= */
.sb-tile, .kpi-icon, .mhs-ico, .jenis-ico, .notif-ico, .list-ico, .ringkas-ico, .se-ico, .tl-header-icon, .tls-icon, .dt-ico,
.lp-feature .ico, .pa-card .ico, .lp-board-tile .ico, .lp-float .ico, .auth-mini svg.fa {
  /* nada bawaan: ungu (Evaluasi PBM / identitas utama) */
  --g1: #A07AD8; --g2: #5B2A86; --fg: #fff; --duo: #fff; --sh: rgba(76,29,120,.42);
  background: linear-gradient(180deg, var(--g1) 0%, var(--g2) 100%) !important;
  color: var(--fg) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(0,0,0,.14), 0 2px 3px -1px var(--sh), 0 6px 12px -6px var(--sh);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, filter .25s;
}
.sb-tile svg.ph, .kpi-icon svg.ph, .mhs-ico svg.ph, .jenis-ico svg.ph, .notif-ico svg.ph, .list-ico svg.ph, .ringkas-ico svg.ph,
.se-ico svg.ph, .tl-header-icon svg.ph, .tls-icon svg.ph, .dt-ico svg.ph,
.lp-feature .ico svg.ph, .pa-card .ico svg.ph, .lp-board-tile .ico svg.ph, .lp-float .ico svg.ph {
  width: 1.3em; height: 1.3em; vertical-align: 0; color: inherit; opacity: 1;
  --ph-duo: var(--duo); --ph-duo-o: .38;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.12));
}

/* --- Nada per fitur (kelas .tone-* + pengubah lama .gold/.teal/.blue/.rose) --- */
.tone-ungu { --g1: #A07AD8; --g2: #5B2A86; --fg: #fff; --duo: #fff; --sh: rgba(76,29,120,.42); }
.tone-indigo, .pa-card.admin .ico, .auth-mini:nth-child(2) svg.fa {
  --g1: #8D95FF; --g2: #4338CA; --fg: #fff; --duo: #fff; --sh: rgba(67,56,202,.40); }
.tone-gold, .kpi-icon.gold, .se-ico.gold, .mhs-card.gold .mhs-ico, .jenis-ico.gold, .notif-item.t-sikap .notif-ico, .lp-feature.gold .ico,
.pa-card.gold .ico, .lp-board-tile:nth-child(2) .ico, .lp-float.f2 .ico, .pa-card.featured .ico {
  --g1: #FAD47A; --g2: #C98A12; --fg: #4A2C00; --duo: #fff; --sh: rgba(201,138,18,.42); }
.tone-teal, .kpi-icon.teal, .mhs-card.teal .mhs-ico, .jenis-ico.teal, .notif-item.t-fasilitas .notif-ico, .lp-feature.teal .ico,
.pa-card.teal .ico, .lp-board-tile:nth-child(3) .ico {
  --g1: #4FD8C6; --g2: #0B7A6F; --fg: #fff; --duo: #fff; --sh: rgba(11,122,111,.40); }
.tone-biru, .kpi-icon.blue { --g1: #7DB2FF; --g2: #2357D6; --fg: #fff; --duo: #fff; --sh: rgba(35,87,214,.40); }
.tone-rose, .kpi-icon.rose, .mhs-card.rose .mhs-ico, .se-ico:not(.gold) { --g1: #FB8BA0; --g2: #BE123C; --fg: #fff; --duo: #fff; --sh: rgba(190,18,60,.38); }
.tone-hijau, .auth-mini:nth-child(3) svg.fa, .tl-header-icon, .tls-icon { --g1: #5EE39A; --g2: #15803D; --fg: #fff; --duo: #fff; --sh: rgba(21,128,61,.38); }
.tone-slate, .pa-card.slate .ico { --g1: #A3ABBD; --g2: #4B5263; --fg: #fff; --duo: #fff; --sh: rgba(55,60,75,.38); }
/* Tile di atas latar ungu gelap: bayangan lebih dalam */
.pa-card.featured .ico, .auth-mini svg.fa, .lp-float .ico { --sh: rgba(0,0,0,.45); }

/* --- Interaksi: diarahkan -> terangkat; ditekan -> tertekan --- */
.kpi:hover .kpi-icon, .sum-card:hover .kpi-icon, .mhs-card:hover .mhs-ico, .jenis-kartu:hover .jenis-ico, .lp-feature:hover .ico,
.pa-card:hover .ico, .notif-item:hover .notif-ico, .auth-mini:hover svg.fa, .lp-board-tile:hover .ico {
  transform: translateY(-2px) scale(1.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), inset 0 -1px 0 rgba(0,0,0,.14), 0 4px 6px -2px var(--sh), 0 12px 20px -8px var(--sh);
}
.kpi:hover .kpi-icon svg.ph, .sum-card:hover .kpi-icon svg.ph, .mhs-card:hover .mhs-ico svg.ph, .jenis-kartu:hover .jenis-ico svg.ph,
.lp-feature:hover .ico svg.ph, .pa-card:hover .ico svg.ph, .notif-item:hover .notif-ico svg.ph { --ph-duo-o: .6; }
.kpi:active .kpi-icon, .sum-card:active .kpi-icon, .mhs-card:active .mhs-ico, .jenis-kartu:active .jenis-ico, .pa-card:active .ico {
  transform: translateY(0) scale(.95);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.18), 0 1px 2px -1px var(--sh);
}
.jenis-kartu.aktif .jenis-ico { box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 0 0 3px color-mix(in srgb, var(--g2) 22%, transparent), 0 6px 12px -6px var(--sh); }

/* Tile ikon pada daftar & ringkasan (dibuat JS dashboard) */
.list-ico, .ringkas-ico { display: inline-grid !important; place-items: center; flex: none; }
.auth-mini svg.fa { width: 36px; height: 36px; padding: 9px; box-sizing: border-box; border-radius: 10px; flex: none; vertical-align: 0;
  --ph-duo: #fff; --ph-duo-o: .38; }

/* =========================================================
   SIDEBAR: tile timbul berwarna per fitur
   ========================================================= */
.sb-tile {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: inline-grid; place-items: center; font-style: normal; font-size: 12.5px;
}
.app-nav .sb-tile svg.fa { width: 16px; height: 16px; opacity: 1 !important; color: inherit !important; text-align: initial; }
.app-nav a, .app-nav-toggle { gap: 11px; padding-top: 6px; padding-bottom: 6px; }
.app-nav-sub a .sb-tile { width: 26px; height: 26px; border-radius: 7px; }
.app-nav-sub a .sb-tile svg.fa { width: 15px; height: 15px; }
.app-nav a:not(.active) .sb-tile, .app-nav-toggle .sb-tile { filter: saturate(.9) brightness(.96); }
.app-nav a:hover .sb-tile, .app-nav-toggle:hover .sb-tile {
  filter: none; transform: translateY(-1px) scale(1.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), inset 0 -1px 0 rgba(0,0,0,.14), 0 4px 10px -3px rgba(0,0,0,.55);
}
.app-nav a:active .sb-tile, .app-nav-toggle:active .sb-tile { transform: scale(.94); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.app-nav a.active .sb-tile, .app-nav-group[data-has-active="1"] > .app-nav-toggle .sb-tile {
  filter: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 0 2px rgba(255,255,255,.22), 0 4px 12px -3px var(--sh);
}
svg.fa.app-nav-caret { width: 12px; height: 12px; --ph-duo-o: 0; }
/* Flyout saat sidebar diperkecil */
.sb-flyout .sb-tile { width: 24px; height: 24px; border-radius: 7px; }
.sb-flyout .sb-tile svg.fa { width: 14px; height: 14px; opacity: 1 !important; color: inherit !important; }

/* =========================================================
   Ikon di luar tile (topbar, tombol, teks)
   ========================================================= */
.app-icon-btn svg.ph { width: 18px; height: 18px; vertical-align: 0; --ph-duo-o: .25; }
.app-icon-btn:hover svg.ph { --ph-duo: var(--c-accent, #E0A526); --ph-duo-o: .5; transform: scale(1.06); }
.app-icon-btn:active svg.ph { transform: scale(.94); }
.app-role-badge svg.ph, .dash-eyebrow svg.ph, .lp-eyebrow svg.ph, .filter-eyebrow svg.ph, .auth-role svg.ph { --ph-duo: var(--c-accent, #E0A526); --ph-duo-o: .45; }

.btn svg.ph { width: 1.08em; height: 1.08em; vertical-align: -0.18em; --ph-duo-o: .25; }
.btn:hover svg.ph { --ph-duo-o: .45; }
.btn-primary svg.ph, .btn-success svg.ph, .btn-danger svg.ph, .btn-info svg.ph { --ph-duo: #fff; --ph-duo-o: .3; }
.btn-primary:hover svg.ph { --ph-duo: var(--c-accent, #E0A526); --ph-duo-o: .6; }
.btn:active svg.ph { transform: scale(.92); }
svg.ph-arrow-right, svg.ph-caret-right, svg.ph-arrow-square-out { transition: transform .2s cubic-bezier(.2,.7,.3,1); }
a:hover > svg.ph-arrow-right, button:hover > svg.ph-arrow-right, .mhs-card:hover .mhs-go svg.ph, .pa-card:hover .go svg.ph,
a:hover > svg.ph-caret-right { transform: translateX(3px); }
a:hover > svg.ph-arrow-square-out { transform: translate(1px, -1px); }
a:hover > svg.ph-arrow-left, button:hover > svg.ph-arrow-left { transform: translateX(-3px); }

.empty-state svg.fa { width: 30px; height: 30px; display: block; margin: 0 auto 8px; color: var(--c-primary-200, #D9C6EC); --ph-duo: var(--c-primary, #5B2A86); --ph-duo-o: .18; }
.bintang, svg.ph-star { --ph-duo: currentColor; --ph-duo-o: .55; }
.chart-note svg.ph, .u-subtle svg.ph { --ph-duo-o: .3; }
.ringkas-daftar svg.ph { width: 18px; height: 18px; vertical-align: -0.2em; --ph-duo-o: .3; }
.lp-feature li svg.ph, .pa-card li svg.ph { --ph-duo-o: .3; }
svg.ph-check { --ph-duo-o: .14 !important; }
.lp-feature li svg.ph-check { width: 1.1em; height: 1.1em; margin-top: 2px; }
.dropdown-menu svg.ph, .app-dropdown svg.ph { width: 16px; height: 16px; vertical-align: -0.2em; }

/* Ikon pemberitahuan (pengganti emoji) */
.pbm-friday-icon svg.ph { width: 22px; height: 22px; vertical-align: 0; color: var(--c-primary, #5B2A86); --ph-duo: var(--c-accent, #E0A526); --ph-duo-o: .55; }
.notice.info .pbm-friday-icon svg.ph { color: #2357D6; --ph-duo: #6EA8FF; --ph-duo-o: .45; }
.tls-icon svg.ph, .tl-header-icon svg.ph { width: .95em; height: .95em; }
.tl-info-icon svg.ph { width: 1em; height: 1em; vertical-align: 0; color: #A96F05; --ph-duo: #F2B93B; --ph-duo-o: .55; }

/* Gerak dikurangi bila pengguna meminta */
@media (prefers-reduced-motion: reduce) {
  svg.ph, .sb-tile, .kpi-icon, .mhs-ico, .jenis-ico, .notif-ico, .lp-feature .ico, .pa-card .ico, .auth-mini svg.fa { transition: none !important; }
  .kpi:hover .kpi-icon, .sum-card:hover .kpi-icon, .mhs-card:hover .mhs-ico, .jenis-kartu:hover .jenis-ico, .lp-feature:hover .ico, .pa-card:hover .ico,
  .notif-item:hover .notif-ico, .auth-mini:hover svg.fa, .app-nav a:hover .sb-tile, .app-nav-toggle:hover .sb-tile,
  a:hover > svg.ph, button:hover > svg.ph, .app-icon-btn:hover svg.ph { transform: none !important; }
}
