/* iPlatinum - gaya halaman portal, di atas sipema-blue.css + telu.css.
   Warna logo Telkom University (token --telu-* dan --sp-*) ada di telu.css,
   dipakai bersama Portal Admin. Berkas ini hanya dimuat oleh portal. */

:root {
    --ipl-sipema:  #2563EB;  /* biru */
    --ipl-sipasi:  #7C3AED;  /* ungu */
    --ipl-sipenta: #DC2626;  /* merah */
    --ipl-sejura:  #059669;  /* hijau */
    --ipl-admin:   #1C1D1F;  /* hitam - Portal Admin (sama dengan temanya) */
    --ipl-trecs:   #0E7490;  /* teal - TRECS (situs luar) */
}

body { background: var(--sp-bg); }

.ipl-container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.ipl-page { padding-top: 2rem; padding-bottom: 3rem; }
.ipl-narrow { max-width: 720px; }

/* Topbar */
.ipl-topbar { background: var(--sp-surface); border-bottom: 1px solid var(--sp-border); }  /* ditimpa tema Platinum di bawah */
.ipl-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.ipl-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--sp-navy-900); text-decoration: none; }
.ipl-brand img { width: 32px; height: 32px; border-radius: 8px; }
.ipl-user { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.ipl-user-name { font-weight: 600; color: var(--sp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }

/* Judul halaman */
.ipl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.ipl-title { font-size: 1.6rem; margin: 0 0 .25rem; }
.ipl-subtitle { color: var(--sp-text-soft); margin: 0; }
.ipl-back { display: inline-block; margin-bottom: 1rem; color: var(--sp-text-soft); text-decoration: none; font-size: .9rem; }
.ipl-back:hover { color: var(--sp-blue-600); }

/* Kartu aplikasi */
.ipl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.ipl-card {
    display: flex; flex-direction: column; background: var(--sp-surface);
    border: 1px solid var(--sp-border); border-top: 4px solid var(--accent, var(--sp-blue-600));
    border-radius: var(--sp-radius); padding: 1.25rem; color: var(--sp-text);
    text-decoration: none; box-shadow: var(--sp-shadow-xs);
    transition: box-shadow .15s ease, transform .15s ease;
}
.ipl-card:hover { box-shadow: var(--sp-shadow-md); transform: translateY(-2px); color: var(--sp-text); }
.ipl-card:focus-visible { outline: none; box-shadow: var(--sp-ring); }
.ipl-card-sipema  { --accent: var(--ipl-sipema); }
.ipl-card-sipasi  { --accent: var(--ipl-sipasi); }
.ipl-card-sipenta { --accent: var(--ipl-sipenta); }
.ipl-card-sejura  { --accent: var(--ipl-sejura); }
.ipl-card-admin   { --accent: var(--ipl-admin); }
.ipl-card-trecs   { --accent: var(--ipl-trecs); }
.ipl-badge.ipl-badge-luar { color: var(--sp-text-soft); background: var(--sp-bg); border: 1px solid var(--sp-border); }

.ipl-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.ipl-card-mark {
    width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; background: var(--accent); letter-spacing: .02em;
}
.ipl-card-mark svg { width: 24px; height: 24px; }
.ipl-badge { font-size: .72rem; font-weight: 600; color: var(--sp-success); background: rgba(15, 157, 88, .1); border-radius: 999px; padding: .2rem .6rem; }
.ipl-badges { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.ipl-badge-peran { color: var(--accent, var(--sp-blue-600)); background: color-mix(in srgb, var(--accent, var(--sp-blue-600)) 12%, transparent); }
.ipl-card-disabled { cursor: not-allowed; opacity: .55; filter: grayscale(.85); box-shadow: none; }
.ipl-card-disabled:hover { transform: none; box-shadow: none; }
.ipl-lock { width: 16px; height: 16px; color: var(--sp-muted); }
.ipl-card-name { font-size: 1.2rem; font-weight: 700; color: var(--sp-navy-900); }
.ipl-card-judul { font-size: .85rem; color: var(--accent); font-weight: 600; margin-bottom: .6rem; }
.ipl-card-desc { font-size: .9rem; color: var(--sp-text-soft); flex: 1; margin-bottom: 1rem; }
.ipl-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; }
.ipl-card-note { color: var(--sp-muted); }
.ipl-card-go { font-weight: 600; color: var(--accent); }

/* Pilihan skema (SEJURA) */
.ipl-mode-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.ipl-mode {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--sp-surface); border: 1px solid var(--sp-border); border-left: 4px solid var(--accent, var(--sp-blue-600));
    border-radius: var(--sp-radius); padding: 1.1rem 1.25rem; text-decoration: none; color: var(--sp-text);
    box-shadow: var(--sp-shadow-xs); transition: box-shadow .15s ease;
}
.ipl-mode:hover { box-shadow: var(--sp-shadow-md); color: var(--sp-text); }
.ipl-mode-label { font-weight: 700; color: var(--sp-navy-900); }
.ipl-mode-desc { font-size: .9rem; color: var(--sp-text-soft); }

/* Halaman serah-terima / error */
.ipl-handoff { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .75rem; padding: 16px; }
.ipl-spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--sp-blue-100); border-top-color: var(--sp-blue-600); animation: ipl-spin .8s linear infinite; }
@keyframes ipl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ipl-spinner { animation: none; } .ipl-card { transition: none; } }

@media (max-width: 575.98px) {
    .ipl-user-name { max-width: 55vw; font-size: .9rem; }
    .ipl-title { font-size: 1.35rem; }
}

/* Topbar: tautan Kelola Admin */
.ipl-topbar-link { font-size: .9rem; font-weight: 600; color: var(--sp-blue-600); text-decoration: none; white-space: nowrap; }
.ipl-topbar-link:hover { color: var(--sp-blue-700); text-decoration: underline; }

/* Kelola Admin */
.ipl-kelola { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.ipl-kelola-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; min-width: 0; }
.ipl-kelola-list > .ipl-panel { min-width: 0; }
.ipl-kelola-form { position: sticky; top: 1rem; }
.ipl-panel {
    background: var(--sp-surface); border: 1px solid var(--sp-border);
    border-top: 4px solid var(--accent, var(--sp-navy-700));
    border-radius: var(--sp-radius); padding: 1.1rem 1.25rem; box-shadow: var(--sp-shadow-xs);
}
.ipl-card-iplatinum { --accent: var(--sp-navy-800); }
.ipl-card-lama { --accent: var(--sp-warning); }
.ipl-panel-bahaya { --accent: var(--sp-danger); }
.ipl-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.ipl-panel-head h2 { font-size: 1.05rem; margin: 0; }
.ipl-panel-count, .ipl-panel-empty, .ipl-panel-note { font-size: .85rem; color: var(--sp-text-soft); }
.ipl-panel-empty { margin: 0; }
.ipl-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--sp-muted); font-weight: 600; }
.ipl-table td { font-size: .9rem; }
.ipl-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.ipl-akun { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: .15rem .55rem; background: var(--sp-blue-50); color: var(--sp-blue-700); }
.ipl-akun-sso { background: rgba(15, 157, 88, .1); color: var(--sp-success); }
.ipl-akun-belum-ada-akun { background: rgba(233, 162, 59, .15); color: #9a6212; }
.ipl-aksi { display: inline-flex; gap: .4rem; align-items: flex-start; justify-content: flex-end; }
.ipl-reset { position: relative; }
.ipl-reset summary { list-style: none; cursor: pointer; }
.ipl-reset summary::-webkit-details-marker { display: none; }
.ipl-reset-form {
    position: absolute; right: 0; top: calc(100% + .35rem); z-index: 5; width: 220px; display: grid; gap: .4rem;
    background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-sm);
    padding: .6rem; box-shadow: var(--sp-shadow-md); text-align: left;
}
.ipl-rencana { margin: 0 0 1.25rem; padding-left: 1.1rem; }
.ipl-rencana li { margin-bottom: .35rem; }
.ipl-konfirmasi-aksi { display: flex; justify-content: flex-end; gap: .5rem; }

@media (max-width: 1199.98px) {
    .ipl-kelola { grid-template-columns: 1fr; }
    .ipl-kelola-form { position: static; }
}
@media (max-width: 575.98px) {
    .ipl-topbar-link { font-size: .8rem; }
}

/* Footer halaman portal */
.ipl-footer { border-top: 1px solid var(--sp-border); background: var(--sp-surface); padding: 1.25rem 0; margin-top: 1rem; font-size: .9rem; color: var(--sp-text-soft); }

/* Identitas iPlatinum */
.ipl-eyebrow { margin: 0 0 .4rem; font-size: .9rem; color: var(--sp-text-soft); line-height: 1.45; }
.ipl-eyebrow strong { color: var(--sp-blue-600); font-weight: 700; }


/* =====================================================================
   Aksen merah portal, login & topbar
   ===================================================================== */
.ipl-back:hover { color: var(--telu-merah); }
.ipl-eyebrow strong { color: var(--telu-merah); }
.ipl-spinner { border-color: var(--sp-blue-100); border-top-color: var(--telu-merah); }
.ipl-akun { background: #FDECEC; color: var(--telu-merah-tua); }
.ipl-card-iplatinum { --accent: var(--telu-merah); }
.ipl-footer { border-top: 0; position: relative; }
.ipl-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--telu-buku); }

/* Topbar warna logo Telkom University: arang, garis merah "buku" di atas. */
.ipl-topbar { background: var(--telu-arang); border-bottom: 0; color: #fff; }
.ipl-topbar::before { content: ""; display: block; height: 4px; background: var(--telu-buku); }
.ipl-topbar .ipl-brand, .ipl-topbar .ipl-brand:hover { color: #fff; }
.ipl-topbar .ipl-brand img { background: #fff; padding: 2px; }
.ipl-topbar .ipl-user-name { color: #fff; }
.ipl-topbar .ipl-topbar-link { color: #D4D4D6; }
.ipl-topbar .ipl-topbar-link:hover { color: #fff; }
.ipl-topbar .btn-outline-gray-600 { color: #fff; border-color: var(--telu-abu); background: transparent; }
.ipl-topbar .btn-outline-gray-600:hover,
.ipl-topbar .btn-outline-gray-600:focus { color: #fff; background: var(--telu-merah); border-color: var(--telu-merah); }
.ipl-topbar .btn-link.text-gray-600 { color: #B9B9BC !important; }
.ipl-topbar .btn-link.text-gray-600:hover { color: #fff !important; }
@media (max-width: 575.98px) {
    /* Layar sempit: baris pengguna turun ke bawah logo agar tidak bertumpuk. */
    .ipl-topbar-inner { flex-wrap: wrap; row-gap: .35rem; padding-top: .6rem; padding-bottom: .6rem; }
    .ipl-topbar .ipl-user { width: 100%; flex-wrap: wrap; gap: .4rem .75rem; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: .5rem; }
    .ipl-topbar .ipl-user-name { order: -1; flex: 1 1 100%; max-width: none; font-size: .85rem; color: #B9B9BC; }
}
