/* ============================================
   PUBLIC PAGES STYLESHEET - Sipus Library
   ============================================
   Used by: index.php, nav_bar.php, profil.php, 
   and other public/member pages in views/
   ============================================ */

/* ──────────────────────────────────────────
   1. IMPORTS & FONTS
   ────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap");
@import url("../icons/font-awesome/css/all.min.css");

/* ──────────────────────────────────────────
   2. DESIGN SYSTEM - Color & Variables
   ────────────────────────────────────────── */
:root {
  /* Primary Colors */
  --ink: #1f2937;
  --ink-soft: #4b5563;
  --ink-mute: #6b7280;
  --cream: #f5f7fb;
  --white: #ffffff;
  --accent: #5bcfc5;
  --accent-dk: #217069;
  --accent-lt: rgba(91, 207, 197, 0.12);

  /* Status Colors */
  --success: #1d7a55;
  --danger: #c0392b;
  --warn: #d97706;

  /* Utilities */
  --border: rgba(31, 41, 55, 0.1);
  --border-dk: rgba(31, 41, 55, 0.2);
  --radius: 14px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 28px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  /* Typography */
  --font-serif: "Roboto", sans-serif;
  --font-sans: "Roboto", sans-serif;
  --line-height: 1.5;
}

/* ──────────────────────────────────────────
   3. RESET & BASE
   ────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: var(--line-height);
  min-height: 100vh;
}

/* ──────────────────────────────────────────
   4. NAVBAR / HEADER STYLES
   ────────────────────────────────────────── */
header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(30, 30, 60, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

.logo:hover {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
}

/* Navigation Buttons */
.btn-login,
.btn-register {
  background: var(--accent-lt);
  color: var(--accent-dk) !important;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
}

.btn-login:hover,
.btn-register:hover {
  background: var(--accent);
  color: var(--white) !important;
}

/* Profile Dropdown */
.profile-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-profile {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 12px;
  transition: background 0.2s;
  border-radius: 8px;
}

.btn-profile:hover {
  background: var(--accent-lt);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  margin-top: 8px;
  display: none;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}

.dropdown.show {
  display: flex;
}

.dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.d-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.d-email {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.dropdown a {
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  transition:
    background 0.15s,
    color 0.15s;
}

.dropdown a:hover {
  background: var(--cream);
  color: var(--accent);
}

.d-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.d-logout {
  color: var(--danger) !important;
}

.d-logout:hover {
  background: #fdf0ee !important;
}

/* Visibility Control */
.guest-only {
  display: none;
}

.member-only {
  display: none;
}

body.is-guest .guest-only {
  display: flex;
}

body.is-member .member-only {
  display: flex;
}

li.guest-only {
  display: none;
}

li.member-only {
  display: none;
}

body.is-guest li.guest-only {
  display: list-item;
}

body.is-member li.member-only {
  display: list-item;
}

/* ──────────────────────────────────────────
   5. HERO SECTION
   ────────────────────────────────────────── */
.hero {
  max-width: 1200px;
  margin: 40px auto;
  padding: 60px 24px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--ink);
}

.hero p {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ──────────────────────────────────────────
   6B. INFORMATION PAGE
   ────────────────────────────────────────── */
.info-page .page-hero {
  background: var(--ink);
  padding: 56px 28px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.info-page .page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 80% at 50% 120%,
    rgba(61, 90, 153, 0.4) 0%,
    transparent 70%
  );
}

.info-page .page-hero h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  color: var(--white);
  position: relative;
  margin-bottom: 10px;
}

.info-page .page-hero h1 i {
  margin-right: 10px;
}

.info-page .page-hero p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  position: relative;
}

.info-page .page-wrap {
  max-width: 1000px;
  margin: 56px auto 80px;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.info-page .info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.info-page .info-card-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.info-page .info-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.info-page .info-card-icon i {
  color: var(--accent);
}
}

.info-page .info-card-header h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
}

.info-page .info-card-header p {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.info-page .info-card-body {
  padding: 28px 32px;
}

.info-page .info-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.info-page .info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-page .info-row:first-child {
  padding-top: 0;
}

.info-page .info-row-icon {
  font-size: 20px;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  color: var(--accent);
}

.info-page .info-row-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}

.info-page .info-row-value {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
}

.info-page .info-row-value.muted {
  color: var(--ink-soft);
  font-weight: 400;
}

.info-page .rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-page .rules-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  background: var(--cream);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.info-page .rules-list li .rule-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-page .stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.info-page .stat-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}

.info-page .stat-num {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 4px;
}

.info-page .stat-label {
  font-size: 12px;
  color: var(--ink-mute);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-page .denda-box {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dk) 100%);
  border-radius: var(--radius);
  padding: 24px 28px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 20px;
}

.info-page .denda-icon {
  font-size: 36px;
  flex-shrink: 0;
  color: var(--white);
}

.info-page .denda-title {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.info-page .denda-value {
  font-family: var(--font-serif);
  font-size: 28px;
}

.info-page .denda-note {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 4px;
}

/* ──────────────────────────────────────────
   6B.1 RIWAYAT TRANSAKSI PAGE
   ────────────────────────────────────────── */
.info-page .history-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-page .history-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  transition: box-shadow 0.2s;
}

.info-page .history-card:hover {
  box-shadow: 0 8px 32px rgba(30, 30, 80, 0.12);
}

.info-page .history-stripe {
  width: 5px;
  flex-shrink: 0;
}

.info-page .history-stripe.borrowed { background: var(--accent); }
.info-page .history-stripe.terlambat { background: var(--danger); }
.info-page .history-stripe.returned { background: var(--success); }
.info-page .history-stripe.requested { background: var(--warn); }
.info-page .history-stripe.pending { background: #9ca3af; }
.info-page .history-stripe.rejected { background: #374151; }

.info-page .history-inner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  flex: 1;
}

.info-page .history-cover {
  width: 56px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #ddd;
}

.info-page .history-info { flex: 1; }
.info-page .history-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.info-page .history-author { font-size: 13px; color: var(--ink-mute); margin-bottom: 8px; }
.info-page .history-dates { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.info-page .history-date-item { font-size: 12px; color: var(--ink-soft); }
.info-page .history-date-item span { display: block; font-weight: 700; color: var(--ink); font-size: 13px; }

.info-page .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.info-page .badge.borrowed { background: var(--accent-lt); color: var(--accent-dk); }
.info-page .badge.terlambat { background: var(--danger-lt); color: var(--danger); }
.info-page .badge.returned { background: #e6f9f0; color: var(--success); }
.info-page .badge.requested { background: var(--warn-lt); color: #92400e; }
.info-page .badge.pending { background: #f3f4f6; color: #6b7280; }
.info-page .badge.rejected { background: #f3f4f6; color: #374151; }

.info-page .history-extra {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.info-page .history-extra strong { color: var(--ink); }

.info-page .status-line { font-size: 12px; margin-top: 6px; color: var(--ink-soft); }
.info-page .status-line.warn { color: var(--danger); font-weight: 600; }
.info-page .status-line.info { color: #92400e; font-weight: 600; }

.info-page .history-empty {
  text-align: center;
  color: var(--ink-mute);
  padding: 60px 0;
}

.info-page .history-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.info-page .history-empty p {
  font-size: 15px;
  margin-bottom: 16px;
}

.info-page .btn-detail {
  background: var(--accent-lt);
  color: var(--accent-dk);
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}

.info-page .btn-detail:hover { background: #d5e0f5; }

.info-page .filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.info-page .filter-btn {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.2s;
}

.info-page .filter-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.info-page .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

.info-page .filter-count.dark {
  background: var(--accent-lt);
  color: var(--accent);
}

@media (max-width: 768px) {
  .info-page .history-inner {
    flex-wrap: wrap;
  }
}

.info-page .skel {
  background: linear-gradient(90deg, #e8e8f0 25%, #f2f2f8 50%, #e8e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 6px;
  display: inline-block;
}

.info-page .cta-login {
  background: var(--ink);
  border-radius: 20px;
  padding: 40px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.info-page .cta-login h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--white);
  margin-bottom: 6px;
}

.info-page .cta-login p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.info-page .btn-cta {
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.info-page .btn-cta:hover {
  background: var(--accent-lt);
}

/* ──────────────────────────────────────────
   6B.3 PEMINJAMAN PAGE
   ────────────────────────────────────────── */
.loan-page .page-wrap {
  max-width: 1180px;
  margin: 40px auto 72px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.loan-page .page-hero {
  background: var(--ink);
  padding: 56px 28px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.loan-page .page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 120%, rgba(61,90,153,0.4) 0%, transparent 70%);
}

.loan-page .page-hero h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  color: var(--white);
  margin-bottom: 10px;
  position: relative;
}

.loan-page .page-hero p {
  color: rgba(255,255,255,0.55);
  font-size: 15px;
  position: relative;
}

.loan-page .loan-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.loan-page .search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.loan-page .search-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: var(--cream);
}

.loan-page .search-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61,90,153,.1);
  background: var(--white);
}

.loan-page .btn-search {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
  white-space: nowrap;
}

.loan-page .btn-search:hover { background: var(--accent-dk); }

.loan-page .search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.loan-page .search-result-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .18s;
  background: var(--cream);
}

.loan-page .search-result-item:hover {
  border-color: var(--accent);
  background: var(--accent-lt);
}

.loan-page .search-result-item.selected {
  border-color: var(--accent);
  background: var(--accent-lt);
  box-shadow: 0 0 0 2px rgba(61,90,153,.15);
}

.loan-page .sri-cover {
  width: 40px;
  height: 55px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #ddd;
}

.loan-page .sri-info { flex: 1; }
.loan-page .sri-title { font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.loan-page .sri-author { font-size: 12px; color: var(--ink-mute); }
.loan-page .sri-stock { font-size: 12px; font-weight: 600; }
.loan-page .sri-stock.avail { color: var(--success); }
.loan-page .sri-stock.empty { color: var(--danger); }
.loan-page .search-empty { text-align: center; color: var(--ink-mute); font-size: 14px; padding: 28px 0; }

.loan-page .selected-book-preview {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: var(--accent-lt);
  border-radius: 10px;
  margin-bottom: 18px;
  border: 1px solid rgba(61,90,153,.15);
}

.loan-page .sbp-cover {
  width: 56px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.loan-page .sbp-info { flex: 1; }
.loan-page .sbp-title { font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.loan-page .sbp-meta { font-size: 12px; color: var(--ink-soft); }
.loan-page .sbp-empty { text-align: center; color: var(--ink-mute); font-size: 14px; padding: 20px; }

.loan-page .loan-info-box {
  background: var(--warn-lt);
  border: 1px solid rgba(217,119,6,.2);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--warn);
  line-height: 1.6;
}

.loan-page .loan-info-box strong { color: #92400e; }

.loan-page .btn-pinjam {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .3px;
}

.loan-page .btn-pinjam:hover:not(:disabled) {
  background: var(--accent-dk);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(61,90,153,.3);
}

.loan-page .btn-pinjam:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.loan-page .loan-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.loan-page .loan-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  gap: 0;
  animation: fadeUp .3s ease;
  transition: box-shadow .2s;
}

.loan-page .loan-card:hover { box-shadow: 0 8px 32px rgba(30,30,80,0.12); }
.loan-page .loan-card-stripe { width: 5px; flex-shrink: 0; }
.loan-page .loan-card-stripe.borrowed { background: var(--accent); }
.loan-page .loan-card-stripe.terlambat { background: var(--danger); }
.loan-page .loan-card-stripe.returned { background: var(--success); }
.loan-page .loan-card-stripe.requested { background: var(--warn); }
.loan-page .loan-card-stripe.pending { background: #9ca3af; }

.loan-page .loan-card-inner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  flex: 1;
}

.loan-page .loan-cover {
  width: 56px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #ddd;
}

.loan-page .loan-info { flex: 1; }
.loan-page .loan-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.loan-page .loan-author { font-size: 13px; color: var(--ink-mute); margin-bottom: 8px; }
.loan-page .loan-dates { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.loan-page .loan-date-item { font-size: 12px; color: var(--ink-soft); }
.loan-page .loan-date-item span { display: block; font-weight: 700; color: var(--ink); font-size: 13px; }
.loan-page .loan-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.loan-page .badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.loan-page .badge.borrowed { background: var(--accent-lt); color: var(--accent-dk); }
.loan-page .badge.terlambat { background: var(--danger-lt); color: var(--danger); }
.loan-page .badge.returned { background: var(--success-lt); color: var(--success); }
.loan-page .badge.requested { background: var(--warn-lt); color: #92400e; }
.loan-page .badge.pending { background: #f3f4f6; color: #6b7280; }

.loan-page .btn-kembali {
  background: var(--success);
  color: var(--white);
  border: none;
  padding: 7px 16px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.loan-page .btn-kembali:hover { background: #166044; }

.loan-page .btn-detail {
  background: var(--accent-lt);
  color: var(--accent-dk);
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
}

.loan-page .btn-detail:hover { background: #d5e0f5; }

.loan-page .overdue-days { font-size: 12px; font-weight: 700; color: var(--danger); margin-top: 4px; }
.loan-page .sisa-days { font-size: 12px; color: var(--ink-mute); margin-top: 4px; }
.loan-page .sisa-days.warn { color: var(--warn); font-weight: 600; }
.loan-page .waiting-approval { font-size: 12px; color: #92400e; margin-top: 4px; font-weight: 600; }

.loan-page .loans-empty { text-align: center; color: var(--ink-mute); padding: 60px 0; }
.loan-page .loans-empty .empty-icon { font-size: 48px; margin-bottom: 12px; }
.loan-page .loans-empty p { font-size: 15px; margin-bottom: 16px; }

.loan-page .filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.loan-page .filter-btn { padding: 7px 16px; border: 1px solid var(--border); border-radius: 20px; background: var(--white); font-family: var(--font-sans); font-size: 13px; cursor: pointer; color: var(--ink-soft); transition: all .2s; }
.loan-page .filter-btn.active { background: var(--accent); color: var(--white); border-color: var(--accent); }
.loan-page .filter-count { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.25); font-size: 11px; font-weight: 700; margin-left: 4px; }
.loan-page .filter-count.dark { background: var(--accent-lt); color: var(--accent); }

.loan-page .card-spaced .section-card-body { padding: 20px 24px; }

@media (max-width: 900px) {
  .loan-page .loan-layout { grid-template-columns: 1fr; }
  .loan-page .page-hero h1 { font-size: 28px; }
}

@media (max-width: 600px) {
  .loan-page .page-wrap { padding: 0 16px; margin-top: 24px; }
  .loan-page .loan-card-inner { flex-wrap: wrap; }
  .loan-page .search-row { flex-direction: column; }
  .loan-page .btn-search { width: 100%; }
}

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-page .loan-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  transition: box-shadow 0.2s;
}

.info-page .loan-card:hover {
  box-shadow: 0 8px 32px rgba(30, 30, 80, 0.12);
}

.info-page .loan-card-stripe {
  width: 5px;
  flex-shrink: 0;
}

.info-page .loan-card-stripe.borrowed { background: var(--accent); }
.info-page .loan-card-stripe.terlambat { background: var(--danger); }
.info-page .loan-card-stripe.returned { background: var(--success); }
.info-page .loan-card-stripe.requested { background: var(--warn); }
.info-page .loan-card-stripe.pending { background: #9ca3af; }

.info-page .loan-card-inner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  flex: 1;
}

.info-page .loan-cover {
  width: 56px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #ddd;
}

.info-page .loan-info { flex: 1; }
.info-page .loan-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.info-page .loan-author { font-size: 13px; color: var(--ink-mute); margin-bottom: 8px; }
.info-page .loan-dates { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.info-page .loan-date-item { font-size: 12px; color: var(--ink-soft); }
.info-page .loan-date-item span { display: block; font-weight: 700; color: var(--ink); font-size: 13px; }
.info-page .loan-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.info-page .btn-kembali {
  background: var(--success);
  color: var(--white);
  border: none;
  padding: 7px 16px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.info-page .btn-kembali:hover { background: #166044; }

.info-page .overdue-days {
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
  margin-top: 4px;
}

.info-page .sisa-days {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 4px;
}

.info-page .sisa-days.warn {
  color: var(--warn);
  font-weight: 600;
}

.info-page .waiting-approval {
  font-size: 12px;
  color: #92400e;
  margin-top: 4px;
  font-weight: 600;
}

.info-page .loans-empty {
  text-align: center;
  color: var(--ink-mute);
  padding: 60px 0;
}

.info-page .loans-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.info-page .loans-empty p {
  font-size: 15px;
  margin-bottom: 16px;
}

.info-page .toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  z-index: 500;
  max-width: 320px;
}

.info-page .toast.show {
  transform: translateY(0);
  opacity: 1;
}

.info-page .toast.success { background: var(--success); }
.info-page .toast.error { background: var(--danger); }
.info-page .toast.warn { background: var(--warn); }

/* ──────────────────────────────────────────
   6C. LOGIN PAGE
   ────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background: var(--cream);
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 50% at 10% 20%,
      rgba(61, 90, 153, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 40% 60% at 90% 80%,
      rgba(61, 90, 153, 0.06) 0%,
      transparent 60%
    );
  pointer-events: none;
}

.login-page .bg-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.4;
}

.login-page .bg-lines span {
  position: absolute;
  display: block;
  background: var(--accent);
  opacity: 0.06;
  border-radius: 2px;
}

.login-page .bg-lines span:nth-child(1) {
  width: 1px;
  height: 100%;
  left: 20%;
}
.login-page .bg-lines span:nth-child(2) {
  width: 1px;
  height: 100%;
  left: 40%;
}
.login-page .bg-lines span:nth-child(3) {
  width: 1px;
  height: 100%;
  left: 60%;
}
.login-page .bg-lines span:nth-child(4) {
  width: 1px;
  height: 100%;
  left: 80%;
}
.login-page .bg-lines span:nth-child(5) {
  width: 100%;
  height: 1px;
  top: 25%;
}
.login-page .bg-lines span:nth-child(6) {
  width: 100%;
  height: 1px;
  top: 50%;
}
.login-page .bg-lines span:nth-child(7) {
  width: 100%;
  height: 1px;
  top: 75%;
}

.login-page .deco {
  position: fixed;
  font-size: 64px;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
}

.login-page .deco-1 {
  top: 8%;
  left: 5%;
  font-size: 80px;
  transform: rotate(-15deg);
}
.login-page .deco-2 {
  bottom: 10%;
  right: 6%;
  font-size: 96px;
  transform: rotate(12deg);
}
.login-page .deco-3 {
  top: 50%;
  left: 2%;
  font-size: 48px;
  transform: rotate(5deg);
}

.login-page .container {
  display: flex;
  width: 900px;
  max-width: 96vw;
  min-height: 540px;
  background: var(--white);
  border-radius: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(30, 30, 80, 0.1),
    0 2px 8px rgba(30, 30, 80, 0.06);
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-page .panel-left {
  width: 340px;
  min-width: 340px;
  background: var(--ink);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-page .panel-left::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(61, 90, 153, 0.25);
  top: -80px;
  right: -80px;
  pointer-events: none;
}

.login-page .panel-left::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(61, 90, 153, 0.15);
  bottom: -60px;
  left: -40px;
  pointer-events: none;
}

.login-page .brand {
  position: relative;
  z-index: 1;
}

.login-page .brand-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.login-page .brand-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--white);
}

.login-page .brand-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.login-page .brand-name {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 8px;
}

.login-page .brand-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.login-page .panel-tagline {
  position: relative;
  z-index: 1;
}

.login-page .panel-tagline p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

.login-page .panel-tagline span {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 14px;
  border-radius: 2px;
}

.login-page .panel-right {
  flex: 1;
  padding: 48px 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-page .form-heading {
  margin-bottom: 32px;
}

.login-page .form-heading h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--ink);
  margin-bottom: 6px;
}

.login-page .form-heading p {
  font-size: 13px;
  color: var(--ink-mute);
}

.login-page .form-group {
  margin-bottom: 20px;
}

.login-page label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-page .input-wrap {
  position: relative;
}

.login-page .input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--ink-mute);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.login-page input[type="email"],
.login-page input[type="password"],
.login-page input[type="text"] {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.login-page input:focus {
  border-color: var(--accent);
  background: var(--white);
}

.login-page input::placeholder {
  color: var(--ink-mute);
}

.login-page .toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--ink-mute);
  display: flex;
}

.login-page .toggle-pw svg {
  position: static;
  transform: none;
  width: 16px;
  height: 16px;
}

.login-page .alert {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
  align-items: center;
  gap: 8px;
}

.login-page .alert.show {
  display: flex;
}

.login-page .alert-error {
  background: #fdf0ee;
  border: 1px solid #f5c6c2;
  color: var(--danger);
}

.login-page .alert-success {
  background: #edf7f3;
  border: 1px solid #b8e4d2;
  color: var(--success);
}

.login-page .alert svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.login-page .btn-login {
  width: 100%;
  height: 48px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.2s,
    transform 0.15s;
  margin-top: 4px;
}

.login-page .btn-login:hover {
  background: var(--accent-dk);
}

.login-page .btn-login:active {
  transform: scale(0.98);
}

.login-page .btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-page .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.login-page .btn-login.loading .spinner {
  display: block;
}

.login-page .btn-login.loading .btn-text {
  display: none;
}

.login-page .form-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-page .form-footer p {
  font-size: 12px;
  color: var(--ink-mute);
}

.login-page .role-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-lt);
  color: var(--accent-dk);
  font-weight: 500;
}

@media (max-width: 680px) {
  .login-page .panel-left {
    display: none;
  }
  .login-page .panel-right {
    padding: 36px 28px;
  }
  .login-page .container {
    border-radius: 16px;
  }
}

/* ──────────────────────────────────────────
   6D. REGISTER PAGE
   ────────────────────────────────────────── */
.register-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  background: var(--cream);
  position: relative;
}

.register-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse 50% 40% at 80% 10%,
    rgba(61, 90, 153, 0.07) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.register-page .info-banner {
  width: 100%;
  max-width: 480px;
  background: var(--accent-lt);
  border: 1px solid rgba(61, 90, 153, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeUp 0.4s ease both;
}

.register-page .info-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--accent-dk);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  margin-top: 1px;
}

.register-page .info-banner p {
  font-size: 12.5px;
  color: var(--accent-dk);
  line-height: 1.6;
}

.register-page .info-banner strong {
  font-weight: 500;
}

.register-page .card {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(30, 30, 80, 0.09);
  animation: fadeUp 0.5s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.register-page .card-header {
  background: var(--ink);
  padding: 28px 32px 24px;
  position: relative;
  overflow: hidden;
}

.register-page .card-header::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(61, 90, 153, 0.2);
  right: -60px;
  top: -60px;
  pointer-events: none;
}

.register-page .header-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.register-page .header-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--white);
}

.register-page .card-header h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--white);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.register-page .card-header p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  position: relative;
  z-index: 1;
}

.register-page .card-body {
  padding: 28px 32px 32px;
}

.register-page .step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.register-page .step-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.register-page .step-dot.active {
  background: var(--accent);
}

.register-page .step-dot.done {
  background: var(--success);
}

.register-page .form-group {
  margin-bottom: 18px;
}

.register-page label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.register-page .input-wrap {
  position: relative;
}

.register-page .input-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: var(--ink-mute);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.register-page input[type="text"],
.register-page input[type="email"],
.register-page input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.register-page input:focus {
  border-color: var(--accent);
  background: var(--white);
}

.register-page input::placeholder {
  color: var(--ink-mute);
}

.register-page input.error-input {
  border-color: var(--danger);
}

.register-page .field-hint {
  font-size: 11.5px;
  color: var(--ink-mute);
  margin-top: 5px;
}

.register-page .field-error {
  font-size: 11.5px;
  color: var(--danger);
  margin-top: 5px;
  display: none;
}

.register-page .field-error.show {
  display: block;
}

.register-page .pw-wrap {
  position: relative;
}

.register-page .pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--ink-mute);
  display: flex;
}

.register-page .pw-toggle svg {
  position: static;
  transform: none;
  width: 15px;
  height: 15px;
  stroke: var(--ink-mute);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.register-page .strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.register-page .strength-seg {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.register-page .alert {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  align-items: center;
  gap: 8px;
}

.register-page .alert.show {
  display: flex;
}

.register-page .alert svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.register-page .alert-error {
  background: #fdf0ee;
  border: 1px solid #f5c6c2;
  color: var(--danger);
}

.register-page .alert-success {
  background: #edf7f3;
  border: 1px solid #b8e4d2;
  color: var(--success);
}

.register-page .btn {
  width: 100%;
  height: 46px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.2s,
    transform 0.15s;
}

.register-page .btn:hover {
  background: var(--accent-dk);
}

.register-page .btn:active {
  transform: scale(0.98);
}

.register-page .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.register-page .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.register-page .btn.loading .spinner {
  display: block;
}

.register-page .btn.loading .btn-text {
  display: none;
}

.register-page .success-view {
  display: none;
  text-align: center;
  padding: 8px 0 4px;
}

.register-page .success-view.show {
  display: block;
}

.register-page .success-icon {
  width: 64px;
  height: 64px;
  background: #edf7f3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.register-page .success-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.register-page .success-view h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}

.register-page .success-view p {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.6;
  margin-bottom: 20px;
}

.register-page .uid-box {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: monospace;
  font-size: 12px;
  color: var(--ink-soft);
  word-break: break-all;
  text-align: left;
  margin-bottom: 20px;
}

.register-page .uid-box span {
  color: var(--ink-mute);
  font-size: 11px;
  display: block;
  margin-bottom: 3px;
}

.register-page .btn-goto {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 44px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.register-page .btn-goto:hover {
  background: var(--accent-dk);
}

.register-page .login-link {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

.register-page .login-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.register-page .login-link a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .register-page {
    padding: 16px 12px;
  }
  .register-page .card-header,
  .register-page .card-body {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Search Box */
.search-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  box-shadow: 0 8px 24px rgba(30, 30, 80, 0.05);
  gap: 8px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  background: transparent;
}

.search-box button {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 0 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.search-box button:hover {
  background: var(--accent-dk);
}

/* ──────────────────────────────────────────
   6. CATALOG / BOOK GRID
   ────────────────────────────────────────── */
.catalog {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 24px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--ink);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
}

.book-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.book-cover {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: #e2e2e2;
}

.book-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
  color: var(--ink);
}

.book-author {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.book-meta {
  margin-top: auto;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-mute);
}

.stock-badge {
  font-weight: 500;
  color: var(--success);
}

.stock-badge.empty {
  color: var(--danger);
}

/* ──────────────────────────────────────────
   7. INFO SECTION
   ────────────────────────────────────────── */
.info-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 60px 24px;
}

.info-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.info-block h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--ink);
}

.info-block p,
.info-block li {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.info-block ul {
  padding-left: 20px;
}

.info-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.info-item span:first-child {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-item i {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

/* ──────────────────────────────────────────
   8. MODAL
   ────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--white);
  max-width: 650px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  position: relative;
  animation: popUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes popUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: var(--cream);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--border-dk);
}

.modal-body {
  padding: 32px;
  display: flex;
  gap: 24px;
}

.modal-cover {
  width: 180px;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.modal-details {
  flex: 1;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--ink);
}

.modal-synopsis {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 12px 0;
  max-height: 120px;
  overflow-y: auto;
}

.btn-borrow-notice {
  display: inline-block;
  margin-top: 16px;
  background: var(--accent);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-borrow-notice:hover {
  background: var(--accent-dk);
}

.btn-fav {
  display: inline-block;
  margin-top: 16px;
  margin-left: 8px;
  background: var(--white);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-fav:hover {
  background: var(--cream);
}

.btn-fav.faved {
  background: #fdf0ee;
  color: #e74c3c;
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.08);
}

.btn-fav.faved:hover {
  background: #fbe5e1;
}

/* ──────────────────────────────────────────
   9. PROFILE PAGE
   ────────────────────────────────────────── */
#loadingScreen {
  position: fixed;
  inset: 0;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.4s;
}

#loadingScreen.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid var(--accent-lt);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.page-wrap {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.5s 0.2s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: fit-content;
  position: sticky;
  top: 88px;
}

.profile-banner {
  height: 90px;
  background: linear-gradient(135deg, var(--accent) 0%, #5a7fd4 100%);
  position: relative;
}

.profile-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-top: -36px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-dk);
  color: var(--white);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--white);
  box-shadow: 0 4px 12px rgba(30, 30, 80, 0.15);
  text-transform: uppercase;
}

.profile-info {
  padding: 0 20px 24px;
  text-align: center;
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 4px;
  color: var(--ink);
}

.profile-email {
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 16px;
}

.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-lt);
  color: var(--accent-dk);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.stat-box {
  background: var(--cream);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.stat-box .val {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.stat-box .lbl {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.sidebar-nav {
  border-top: 1px solid var(--border);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-soft);
  transition:
    background 0.15s,
    color 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: var(--cream);
  color: var(--accent);
}

.sidebar-nav a.active {
  background: var(--accent-lt);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.sidebar-nav a .s-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
}

.main-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-card-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-card-header h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
}

.section-card-body {
  padding: 24px;
}

/* ──────────────────────────────────────────
   10. FORMS
   ────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--cream);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 90, 153, 0.12);
  background: var(--white);
}

.form-group input:disabled {
  color: var(--ink-mute);
  cursor: not-allowed;
  background: var(--cream);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn-save {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-save:hover {
  background: var(--accent-dk);
}

.btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-cancel-edit {
  background: var(--cream);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cancel-edit:hover {
  background: #eee;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  z-index: 500;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

/* Password Section */
.password-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-eye {
  position: relative;
}

.input-eye input {
  width: 100%;
  padding-right: 44px;
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-mute);
}

.strength-bar {
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  margin-top: 6px;
}

.strength-fill {
  height: 100%;
  border-radius: 4px;
  transition:
    width 0.3s,
    background 0.3s;
  width: 0%;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.act-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.act-icon.borrow {
  background: #e8f4fd;
}

.act-icon.return {
  background: #e6f9f0;
}

.act-icon.fine {
  background: #fef3e2;
}

.act-icon.fav {
  background: #fdedf0;
}

.act-meta {
  flex: 1;
}

.act-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--ink);
}

.act-sub {
  font-size: 12px;
  color: var(--ink-mute);
}

.act-date {
  font-size: 12px;
  color: var(--ink-mute);
  white-space: nowrap;
  margin-top: 2px;
}

.act-empty {
  text-align: center;
  color: var(--ink-mute);
  font-size: 14px;
  padding: 24px 0;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge.aktif {
  background: #e6f9f0;
  color: var(--success);
}

.badge.terlambat {
  background: #fdedf0;
  color: var(--danger);
}

.badge.selesai {
  background: var(--accent-lt);
  color: var(--accent);
}

.badge.denda {
  background: #fef3e2;
  color: var(--warn);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #ececec 25%, #f5f5f5 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ──────────────────────────────────────────
   11. FOOTER
   ────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--ink-mute);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ──────────────────────────────────────────
   12. RESPONSIVE
   ────────────────────────────────────────── */
@media (max-width: 900px) {
  .page-wrap {
    grid-template-columns: 1fr;
  }

  .profile-card {
    position: static;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .info-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal-cover {
    width: 100%;
    height: 220px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 10px;
  }

  .nav-menu li.nav-link {
    display: none;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }

  .book-cover {
    height: 240px;
  }

  .profile-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .nav-container {
    padding: 12px 16px;
  }

  .logo {
    font-size: 20px;
  }

  .nav-menu {
    gap: 8px;
  }

  .hero {
    margin: 24px auto;
    padding: 40px 16px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .catalog {
    margin: 40px auto;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .modal-body {
    padding: 20px;
  }

  .page-wrap {
    margin: 20px auto;
    padding: 0 16px;
  }
}

/* ==================================================
   KATALOG PAGE (moved from views/katalog.php)
   Specific layout & components for the catalog page
   ================================================== */

/* PAGE HERO */
.page-hero {
  background: var(--ink);
  padding: 56px 28px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 80% at 50% 120%,
    rgba(61, 90, 153, 0.4) 0%,
    transparent 70%
  );
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  color: var(--white);
  margin-bottom: 10px;
}
.page-hero p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
}

/* TOOLBAR / SEARCH */
.toolbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 28px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--ink-mute);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input:focus {
  border-color: var(--accent);
}
.search-wrap input::placeholder {
  color: var(--ink-mute);
}

select.filter-select {
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239090b0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s;
}
select.filter-select:focus {
  border-color: var(--accent);
}

.sort-btns {
  display: flex;
  gap: 6px;
}
.sort-btn {
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.sort-btn:hover,
.sort-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lt);
}

/* STATS BAR */
.stats-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 28px 0;
  font-size: 13px;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.view-toggle {
  display: flex;
  gap: 4px;
}
.view-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.view-btn.active {
  border-color: var(--accent);
  background: var(--accent-lt);
}
.view-btn svg {
  width: 15px;
  height: 15px;
  stroke: var(--ink-soft);
  fill: none;
  stroke-width: 1.8;
}
.view-btn.active svg {
  stroke: var(--accent);
}

/* CATALOG GRID */
.catalog-wrap {
  max-width: 1280px;
  margin: 24px auto 60px;
  padding: 0 28px;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.book-grid.list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}
.book-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.book-grid.list-view .book-card {
  flex-direction: row;
}
.book-cover {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #e4e4ec;
  flex-shrink: 0;
}
.book-grid.list-view .book-cover {
  width: 80px;
  height: 110px;
  border-radius: 0;
}
.book-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.book-grid.list-view .book-info {
  padding: 14px 16px;
  justify-content: center;
  gap: 4px;
}
.book-cat-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lt);
  border-radius: 20px;
  padding: 2px 8px;
  display: inline-block;
  margin-bottom: 8px;
  width: fit-content;
}
.book-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}
.book-author {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: auto;
  padding-bottom: 12px;
}
.book-grid.list-view .book-author {
  margin-bottom: 0;
  padding-bottom: 0;
}
.book-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-mute);
}
.book-grid.list-view .book-footer {
  border: none;
  padding: 0;
  margin: 4px 0 0;
}
.stock-badge {
  font-weight: 600;
  color: var(--success);
}
.stock-badge.empty {
  color: var(--danger);
}

/* SKELETON */
.skel {
  background: linear-gradient(90deg, #e8e8f0 25%, #f2f2f8 50%, #e8e8f0 75%);
  background-size: 200% 100%;
  animation: shim 1.2s infinite;
  border-radius: 6px;
}
@keyframes shim {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.skel-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skel-img {
  height: 260px;
}
.skel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
}
.modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  overflow: hidden;
  position: relative;
  animation: popIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.08);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  transition: background 0.2s;
}
.modal-close:hover {
  background: rgba(0, 0, 0, 0.16);
}
.modal-inner {
  display: flex;
  gap: 0;
}
.modal-img {
  width: 220px;
  min-height: 300px;
  object-fit: cover;
  flex-shrink: 0;
}
.modal-content {
  padding: 32px 28px;
  flex: 1;
}
.modal-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 26px;
  margin-bottom: 6px;
  line-height: 1.2;
}
.modal-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
.modal-synopsis {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  max-height: 130px;
  overflow-y: auto;
}
.modal-stock {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}
.stock-item {
  text-align: center;
  background: var(--cream);
  border-radius: 10px;
  padding: 10px 18px;
}
.stock-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
.stock-label {
  font-size: 11px;
  color: var(--ink-mute);
}
.btn-borrow {
  display: block;
  margin-top: 20px;
  text-align: center;
  background: var(--accent);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s;
}
.btn-borrow:hover {
  background: var(--accent-dk);
}
.btn-ebook {
  display: block;
  margin-top: 8px;
  text-align: center;
  background: var(--accent-lt);
  color: var(--accent-dk);
  padding: 10px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--ink-mute);
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 15px;
}

footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 24px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .page-hero h1 {
    font-size: 28px;
  }
  .toolbar {
    padding: 20px 16px 0;
  }
  .catalog-wrap {
    padding: 0 16px;
    margin-top: 16px;
  }
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .modal-inner {
    flex-direction: column;
  }
  .modal-img {
    width: 100%;
    height: 240px;
  }
}
