/* =========================================================
   IBPR Check — login, menu akun, form, panel admin
   (memakai token warna dari style.css)
   ========================================================= */
a.icon-btn { text-decoration: none; }
.icon-btn.is-on { background: rgba(255,255,255,.16); }
.crumb__ds { color: var(--muted); font-weight: 600; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.picker__item mark { background: rgba(255,90,79,.3); color: inherit; border-radius: 3px; padding: 0 1px; }
.small { font-size: 12.5px; } .d-block { display: block; } .ta-r { text-align: right; } .pad { padding: 18px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; transition: all .15s; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn svg { font-size: 17px; }
.btn--primary { border: 0; color: #fff; background: linear-gradient(135deg, var(--accent), #ff3b30); box-shadow: 0 4px 14px rgba(227,6,19,.35); }
.btn--primary:hover { box-shadow: 0 8px 20px rgba(227,6,19,.45); transform: translateY(-1px); }
.btn--danger { border: 0; color: #fff; background: var(--crit); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn.is-busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-block { width: 100%; justify-content: center; }
.btn-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.form { display: grid; gap: 14px; margin-top: 14px; }
.form__row { display: grid; gap: 14px; }
@media (min-width: 700px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field[hidden] { display: none; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.field em { font-weight: 500; color: var(--muted); font-style: normal; }
.field input, .field select, .card__tools input {
  width: 100%; height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 15px; padding: 0 12px; outline: 0; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .card__tools input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.field input:disabled { opacity: .6; }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
.alert[hidden] { display: none; }
.alert--err { background: var(--crit-bg); color: var(--crit); }
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.pw__toggle { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; font-size: 18px; }

/* role picker */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); transition: all .15s; height: 100%; }
.seg b { display: block; font-size: 14px; }
.seg small { color: var(--muted); font-size: 12px; }
.seg input:checked + span { border-color: var(--accent); background: rgba(227,6,19,.08); box-shadow: 0 0 0 3px var(--focus); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; user-select: none; position: relative; }
.switch[hidden] { display: none; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 40px; height: 23px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--low); }
.switch input:checked + span::after { transform: translateX(17px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch em { font-style: normal; font-size: 12.5px; color: var(--muted); min-width: 58px; }

.modal__dialog--sm { max-width: 460px; }
.modal__close[hidden] { display: none; }

/* ---------- User menu ---------- */
.umenu { position: relative; }
.umenu__btn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: none; padding: 0; display: grid; place-items: center; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.avatar--user { background: linear-gradient(135deg, #3b82f6, #0284c7); }
.umenu__pop { position: absolute; right: 0; top: calc(100% + 10px); width: 240px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; animation: rise .15s ease; }
.umenu__pop[hidden] { display: none; }
.umenu__who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.umenu__who b { display: block; font-size: 14.5px; }
.umenu__who small { color: var(--muted); display: block; margin-bottom: 8px; }
.umenu__pop a, .umenu__pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.umenu__pop a:hover, .umenu__pop button:hover { background: var(--surface-2); }
.umenu__pop form { margin: 0; }
.umenu__pop .danger { color: var(--crit); }
.role { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.role--admin { background: rgba(227,6,19,.14); color: var(--accent); }
.role--user { background: var(--p3-bg); color: var(--p3); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 80; background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); width: max-content; max-width: calc(100% - 32px); }
.toast[hidden] { display: none; }
.toast--ok { background: #0f7a3d; } .toast--err { background: var(--crit); }

/* ---------- Login ---------- */
body.auth { min-height: 100vh; background: var(--brand); color: #fff; position: relative; }
.auth__bg { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(700px 400px at 90% 0%, rgba(227,6,19,.35), transparent 70%), radial-gradient(600px 400px at 0% 100%, rgba(0,128,0,.22), transparent 70%), linear-gradient(180deg, #17191e, #262a32); }
.auth__bg::after { content: ""; position: absolute; inset: 0; opacity: .07; background-image: repeating-linear-gradient(135deg, #fff 0 2px, transparent 2px 22px); }
.auth__wrap { position: relative; min-height: 100vh; max-width: 1080px; margin: 0 auto; padding: 32px 16px; display: grid; gap: 28px; align-content: center; }
@media (min-width: 900px) { .auth__wrap { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 56px; padding: 40px 24px; } }
.auth__mark { width: 52px; height: 52px; border-radius: 14px; font-size: 30px; margin-bottom: 18px; }
.auth__intro h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 800; margin: 14px 0 10px; }
.auth__intro h1 .accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth__intro > p { color: rgba(255,255,255,.75); max-width: 460px; }
.auth__points { list-style: none; padding: 0; margin: 18px 0 0; display: none; gap: 8px; }
@media (min-width: 900px) { .auth__points { display: grid; } }
.auth__points li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.85); font-size: 14.5px; }
.auth__points li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,90,79,.18); color: var(--accent-2); font-weight: 800; font-size: 12px; }
.auth__card { background: var(--surface); color: var(--text); border-radius: 22px; padding: 26px 22px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
@media (min-width: 640px) { .auth__card { padding: 32px; } }
.auth__card h2 { font-size: 24px; font-weight: 800; }
.auth__card .btn-check { margin-top: 4px; justify-content: center; }
.auth__foot { text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- Admin ---------- */
.adm-hero { background: linear-gradient(180deg, #17191e, #262a32); color: #fff; padding: 30px 0 0; }
.adm-hero h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin: 12px 0 18px; }
.adm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 22px; }
@media (min-width: 760px) { .adm-stats { grid-template-columns: repeat(4, 1fr); } }
.adm-stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 14px; min-height: 70px; }
.adm-stat b { display: block; font-size: 24px; font-weight: 800; }
.adm-stat small { color: rgba(255,255,255,.65); font-size: 12.5px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: rgba(255,255,255,.7); padding: 12px 16px; font-weight: 700; font-size: 14px; border-radius: 12px 12px 0 0; }
.tab svg { font-size: 18px; }
.tab:hover { color: #fff; }
.tab.is-on { background: var(--bg); color: var(--text); }
.adm-main { padding-top: 22px; padding-bottom: 40px; }
.panel { display: grid; gap: 18px; }
.panel[hidden] { display: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card h2 { font-size: 18px; font-weight: 800; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card__tools { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.card__tools input { max-width: 260px; height: 42px; flex: 1; min-width: 160px; }
@media (max-width: 600px) { .card__tools { flex-basis: 100%; } .card__tools input { max-width: none; } }
@media (max-width: 440px) { .brand__text small { display: none; } .topbar__actions { gap: 6px; } }
.upload { display: grid; gap: 8px; }
@media (min-width: 960px) { .upload { grid-template-columns: .8fr 1.2fr; gap: 28px; } .upload .form { margin-top: 0; } }
.upload__intro p { margin-top: 6px; font-size: 14px; }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 4px; padding: 24px 16px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: all .15s; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: rgba(227,6,19,.06); }
.drop.has-file { border-style: solid; border-color: var(--low); background: var(--low-bg); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop svg { font-size: 30px; color: var(--accent); }
.drop b { font-size: 14.5px; overflow-wrap: anywhere; }
.drop small { color: var(--muted); font-size: 12px; }
.list { display: grid; gap: 10px; }
.dbrow { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
@media (min-width: 800px) { .dbrow { grid-template-columns: auto 1fr auto; } }
.dbrow.is-off { opacity: .6; }
.dbrow__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: var(--accent-2); font-size: 20px; align-self: start; }
.dbrow__main { min-width: 0; }
.dbrow__main > b { font-size: 15.5px; }
.dbrow__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.dbrow__file { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.dbrow__act { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.dbrow__act .switch { margin-right: auto; }
@media (min-width: 800px) { .dbrow__act { grid-column: auto; border-top: 0; padding-top: 0; } .dbrow__act .switch { margin-right: 6px; } }
.ibtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: grid; place-items: center; font-size: 16px; transition: all .15s; }
.ibtn:hover { color: var(--text); border-color: var(--muted); }
.ibtn--danger:hover { color: var(--crit); border-color: var(--crit); background: var(--crit-bg); }
.roles-note { font-size: 13px; color: var(--text-2); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table th.ta-r { text-align: right; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.is-off td { opacity: .55; }
.uc { display: flex; align-items: center; gap: 10px; }
.uc b { display: block; font-size: 14.5px; }
.uc small { color: var(--muted); font-size: 12.5px; }
.you { font-size: 10.5px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.status.on { color: var(--low); } .status.on::before { background: var(--low); }
.status.off { color: var(--muted); } .status.off::before { background: var(--muted); }
.row-act { display: inline-flex; gap: 6px; }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 14px; padding: 6px 4px; margin-bottom: 10px; background: var(--surface-2); }
  .table td { border: 0; padding: 6px 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .table td[data-label]::before { content: attr(data-label); font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .table td[data-label="Pengguna"]::before { display: none; }
  .table td.ta-r { justify-content: flex-end; }
}
