/* ================================================================
   STYLING untuk Sistem Akun Siswa & Peminjaman
   ================================================================ */

/* ---------- Profile Page ---------- */
.pc-profile-card {
  background: var(--white);
  border-radius: var(--radius-card, 14px);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  margin-bottom: 18px;
}
.pc-profile-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}
.pc-profile-avatar {
  width: 64px;
  height: 64px;
  background: var(--navy-900, #0E2A20);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}
.pc-profile-info { flex: 1; min-width: 200px; }
.pc-profile-info h3 { margin: 0 0 4px; font-size: 22px; }
.pc-profile-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 18px;
  margin-top: 8px;
}
.pc-meta-row {
  display: flex; gap: 8px;
  font-size: 13.5px; color: var(--slate-500, #6b7a6f);
}
.pc-meta-row .pc-meta-k { font-weight: 600; color: var(--navy-900, #0E2A20); }
.pc-meta-row .pc-meta-v { font-weight: 500; }
.pc-profile-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-left: auto;
}

/* Stat tiles */
.pc-profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.pc-stat-tile {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 16px;
  text-align: center;
}
.pc-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy-900, #0E2A20);
  font-family: 'Fraunces', serif;
}
.pc-stat-lbl {
  font-size: 12px;
  color: var(--slate-500, #6b7a6f);
  margin-top: 4px;
}
.pc-section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--slate-500, #6b7a6f);
  margin: 18px 0 10px;
  font-weight: 600;
}
.pc-profile-summary {
  padding: 16px;
}
.pc-profile-empty {
  padding: 36px;
  text-align: center;
}
.pc-profile-empty .pc-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.7;
}
.pc-profile-empty p a { color: var(--navy-900); text-decoration: underline; font-weight: 600; }

/* ---------- Pinjaman Saya table ---------- */
.pc-minicell {
  display: flex;
  gap: 12px;
  align-items: center;
}
.book-cover-sm {
  width: 38px !important;
  height: 52px !important;
  border-radius: 4px;
  flex-shrink: 0;
  margin: 0 !important;
  font-size: 8px !important;
}
.book-cover-sm .pc-cover-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.pc-minicell-info {
  min-width: 0;
  flex: 1;
}
.pc-minicell-info .cell-strong {
  font-weight: 600;
  color: var(--navy-900);
}
.pc-sisa {
  display: inline-block;
  font-size: 13px;
}
.pc-sisa-late { color: #B33A2D; font-weight: 600; }
.pc-sisa-soon { color: #B7692A; font-weight: 600; }

/* ---------- Borrow button state ---------- */
button.is-disabled,
.icon-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: auto; /* still allow showing toast */
}

/* ---------- Modals ---------- */
#pc-modal-login-siswa .modal,
#pc-modal-register-siswa .modal,
#pc-modal-edit-profile .modal {
  max-width: 460px;
}
.pc-shake { animation: pc-shake 0.32s ease-in-out 1; }
@keyframes pc-shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}
.pc-switcher {
  text-align: center;
  font-size: 13px;
  color: var(--slate-500);
  margin-top: 10px;
}
.pc-switcher a {
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.pc-switcher a:hover { text-decoration: underline; }

.pc-pwd-toggle.is-on svg .eye-on,
.pwd-toggle.is-on svg .eye-on { display: none; }
.pwd-toggle:not(.is-on) svg .eye-off { display: none; }

/* tombol bantuan masuk cepat untuk halaman petugas (opsional) */
.pc-quicklogin {
  display: inline-block;
  background: rgba(11, 42, 32, 0.08);
  color: var(--navy-900);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  margin-left: 8px;
  cursor: pointer;
  border: 1px dashed var(--line);
}
.pc-quicklogin:hover {
  background: rgba(11, 42, 32, 0.14);
}

/* pwd wrap reusable */
.field .pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field .pwd-wrap input { flex: 1; padding-right: 38px; }
.field .pwd-wrap .pwd-toggle {
  position: absolute;
  right: 4px;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--slate-500);
}
.field .pwd-wrap .pwd-toggle svg { width: 18px; height: 18px; }

@media (max-width: 600px) {
  .pc-profile-head { flex-direction: column; align-items: flex-start; }
  .pc-profile-actions { width: 100%; }
}
