@import url('../../../../css/core.css');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #bfdbfe;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  --accent: #f59e0b;
  --bg-body: #f0f4f8;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --clay-highlight: rgba(255,255,255,.6);
  --clay-shadow: rgba(37,99,235,.1);
  --clay-deep: rgba(37,99,235,.18);
  --shadow-sm: 0 4px 8px -2px var(--clay-shadow), inset 0 1px 2px var(--clay-highlight);
  --shadow-md: 0 8px 16px -4px var(--clay-shadow), inset 0 -4px 6px rgba(37,99,235,.04), inset 0 2px 4px var(--clay-highlight);
  --shadow-lg: 0 16px 30px -8px var(--clay-deep), inset 0 -6px 10px rgba(37,99,235,.06), inset 0 3px 6px var(--clay-highlight);
  --shadow-xl: 0 24px 50px -12px rgba(37,99,235,.2), inset 0 -8px 14px rgba(37,99,235,.08), inset 0 4px 8px var(--clay-highlight);
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

body {
  background-color: var(--bg-body);
  background-image: 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='%2394a3b8' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
}

.bg-card { background: var(--bg-card) !important; }
.bg-body { background: var(--bg-body) !important; }

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(165deg, #1e3a8a 0%, #2563eb 30%, #3b82f6 55%, #60a5fa 80%, #bfdbfe 100%);
  padding: 60px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,255,255,.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0,0,0,.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-body) 100%);
  pointer-events: none;
}

.hero-logo {
  height: 90px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  max-width: 600px;
  margin: 0 auto;
}

/* Hero Search */
.hero-search .simple-search-box {
  background: rgba(255,255,255,.95);
  border: 2px solid transparent;
  border-radius: 60px;
  padding: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  transition: all .3s;
}

.hero-search .simple-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  transform: translateY(-2px);
}

.hero-search .simple-search-input { color: var(--text-main,#1e293b); font-size: 1rem; }
.hero-search .simple-search-input::placeholder { color: var(--text-light); }
.hero-search .simple-search-input:focus { box-shadow: none; outline: none; }

.hero-search .btn-search {
  background: var(--primary-gradient);
  border: none;
  border-radius: 50px;
  padding: 10px 32px;
  font-weight: 600;
  color: #fff;
  transition: all .3s;
}

.hero-search .btn-search:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(200,103,59,.4);
}

/* ===== SEARCH BOX (default) ===== */
.simple-search-box {
  border: 1px solid var(--border);
  border-radius: 60px;
  padding: 5px;
  background: #fff;
  transition: all .3s;
}

.simple-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(164,77,46,.15);
}

.simple-search-input:focus { box-shadow: none; outline: none; }

/* ===== STATS SECTION ===== */
.stats-section {
  margin-top: -40px;
  position: relative;
  z-index: 10;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: all .3s;
  border: 1px solid rgba(255,255,255,.5);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ===== GMD CHART VIEW ===== */
#gmdChartView .card {
  transition: all .3s;
  max-height: 400px;
}
#gmdChartView canvas {
  max-height: 320px;
  width: 100% !important;
}
.gmd-view-btn {
  cursor: pointer;
  transition: all .2s;
}
.gmd-view-btn:hover:not(.active) {
  background: var(--bg-body) !important;
}

/* ===== GMD COLLECTION CARDS ===== */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-gradient);
  border-radius: 4px;
}

.clay-section-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}
.clay-section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--border), transparent);
  margin-left: 4px;
}

.gmd-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  transition: all .3s;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 14px -4px rgba(120,80,50,.12), inset 0 1px 2px rgba(255,255,255,.4);
}

.gmd-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  pointer-events: none;
}

.gmd-card:hover {
  border-color: rgba(255,255,255,.5);
  box-shadow: 0 12px 28px -6px rgba(120,80,50,.2), inset 0 1px 2px rgba(255,255,255,.4);
  transform: translateY(-4px);
  text-decoration: none;
}

.gmd-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.1), inset 0 1px 2px rgba(255,255,255,.5);
}

.gmd-card-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.gmd-card-count {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.gmd-card-label {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Icon colors for GMD */
.gmd-icon-book { background: linear-gradient(135deg, #ffffff, #f0f4f8); color: #2563eb; }
.gmd-icon-thesis { background: linear-gradient(135deg, #ffffff, #f0f4f8); color: #3b82f6; }
.gmd-icon-journal { background: linear-gradient(135deg, #ffffff, #f0f4f8); color: #6366f1; }
.gmd-icon-research { background: linear-gradient(135deg, #ffffff, #f0f4f8); color: #f59e0b; }
.gmd-icon-ebook { background: linear-gradient(135deg, #ffffff, #f0f4f8); color: #1d4ed8; }
.gmd-icon-multimedia { background: linear-gradient(135deg, #ffffff, #f0f4f8); color: #2563eb; }
.gmd-icon-default { background: linear-gradient(135deg, #f0f4f8, #ffffff); color: var(--text-muted); }

/* ===== COLLECTION CARDS (Top Collections) ===== */
.collection-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all .3s;
  height: 100%;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.collection-card .cover-wrap,
.latest-card .cover-wrap {
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  overflow: hidden;
}

.collection-card .cover-wrap img,
.latest-card .cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8, #1e40af);
  color: #fff;
  border-radius: 0;
}

.collection-fallback i {
  font-size: 2.5rem;
  opacity: .6;
}

/* Latest scroll */
.latest-scroll {
  overflow: hidden;
  width: 100%;
}

.latest-track {
  display: flex;
  gap: 16px;
  animation: scrollLatest 30s linear infinite;
  width: max-content;
}

.latest-track:hover {
  animation-play-state: paused;
}

@keyframes scrollLatest {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.latest-card {
  flex: 0 0 160px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all .3s;
}

.latest-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.latest-card .card-body {
  padding: 8px 10px;
}

.latest-card .card-body h6 {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
}

.latest-card .card-body h6 a {
  color: var(--text-main,#1e293b);
  text-decoration: none;
  display: inline-block;
}

.latest-card .card-body h6.running-text a {
  animation: marquee 6s linear infinite;
}

.latest-card .card-body h6.running-text:hover a {
  animation-play-state: paused;
}

.latest-card .card-body small {
  font-size: .72rem;
}

@keyframes marquee {
  0%, 20% { transform: translateX(0); }
  80% { transform: translateX(calc(-100% + 140px)); }
  100% { transform: translateX(calc(-100% + 140px)); }
}

.collection-card .card-body {
  padding: 12px;
}

.collection-card .card-body h6 {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== INNER PAGE HEADER ===== */
.inner-page-header {
  background: linear-gradient(165deg, #7a4d30 0%, #1d4ed8 30%, #2563eb 60%, #3b82f6 100%);
  padding: 60px 0 90px;
  margin-bottom: -50px;
  position: relative;
  overflow: hidden;
}

.inner-page-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-body) 100%);
  pointer-events: none;
}

/* ===== CARDS ===== */
.card-custom {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all .3s;
}

.card-custom:hover {
  box-shadow: var(--shadow-md);
}

/* ===== PAGINATION ===== */
.paging {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 30px;
}

.paging a, .paging .prev, .paging .next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 60px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: var(--shadow-sm);
  transition: all .2s;
}

.paging a:hover, .paging .prev:hover, .paging .next:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(200,103,59,.3);
}

.paging .paging-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 60px;
  font-weight: 700;
  cursor: default;
  box-shadow: 0 4px 12px rgba(200,103,59,.3);
  transform: scale(1.05);
}

.paging .first_link,
.paging .prev_link,
.paging .next_link,
.paging .last_link {
  font-size: .8rem;
  padding: 0 12px;
}

.paging b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 60px;
  font-weight: 700;
  cursor: default;
  box-shadow: 0 4px 12px rgba(200,103,59,.3);
  transform: scale(1.05);
}

/* ===== MACOS DOCK ===== */
/* ===== MODAL ===== */
.modal-backdrop.show {
  opacity: .6;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,.5);
}

.modal-content-custom {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* ===== DETAIL PAGE ===== */
.detail-cover-wrapper {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
  margin-bottom: 20px;
}

.detail-cover-wrapper img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transition: transform .3s;
}

.detail-cover-wrapper img:hover { transform: scale(1.03); }

.action-btn {
  border-radius: 60px;
  padding: 8px 20px;
  font-weight: 600;
  font-size: .85rem;
  transition: all .2s;
  width: 100%;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.action-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.availability-wrapper table {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.availability-table {
  font-size: .85rem;
  margin-bottom: 0;
}

.availability-table th {
  font-size: .72rem;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-body);
  font-weight: 600;
  padding: .65rem .75rem;
  border-bottom: 2px solid var(--border);
}

.availability-table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.availability-table tbody tr {
  transition: background .2s;
}

.availability-table tbody tr:hover {
  background: var(--bg-body);
}

.avail-location {
  font-weight: 500;
  color: var(--text-main);
}

.avail-callnum {
  color: var(--text-muted);
  font-size: .82rem;
}

.avail-code {
  background: var(--bg-body);
  border-radius: 4px;
  padding: .15rem .5rem;
  font-size: .82rem;
  color: var(--text-muted);
}

.avail-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.avail-badge.item-available {
  background: #dcfce7;
  color: #166534;
}

.avail-badge.item-onloan {
  background: #fee2e2;
  color: #991b1b;
}

.avail-badge.item-notforloan {
  background: #fef9c3;
  color: #854d0e;
}

.meta-row { border-bottom: 1px dashed var(--border); padding-bottom: 8px; margin-bottom: 8px; }
.meta-label { color: var(--text-muted); font-weight: 600; font-size: .85rem; display: flex; align-items: center; }
.meta-label i { width: 18px; color: var(--primary); margin-right: 6px; }
.meta-value { color: var(--text-main); font-weight: 500; }

/* ===== SEARCH FILTER ===== */
.filter-box {
  background: var(--bg-body);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.filter-box ul { list-style: none; padding-left: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.filter-box li a {
  display: inline-block; padding: 6px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 20px; color: var(--text-muted);
  font-size: .8rem; text-decoration: none; transition: .2s;
}
.filter-box li a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-1px); }

/* ===== BIBLIO LIST ===== */
.iti-list-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px var(--clay-shadow);
  overflow: hidden;
  min-height: 130px;
  transition: all .3s;
}

.iti-list-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 8px 24px var(--clay-deep);
  transform: translateY(-2px);
}

.iti-list-img {
  width: 110px;
  min-width: 110px;
  background: var(--bg-body);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.iti-list-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.iti-list-card:hover .iti-list-img img {
  transform: scale(1.05);
}

.iti-list-fallback-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.iti-list-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

.iti-list-fallback i {
  font-size: 1.6rem;
  opacity: .5;
}

.iti-list-info { padding: 14px 16px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }

.iti-list-title { font-size: .95rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; text-decoration: none; line-height: 1.4; transition: color .2s; }
.iti-list-title:hover { color: var(--primary); }

.iti-list-author { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }

.iti-list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.iti-list-actions a, .iti-list-actions span {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 16px;
  font-size: .75rem; font-weight: 600; text-decoration: none; transition: all .2s;
}

.iti-btn-detail { background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border); padding: 4px 14px; border-radius: 16px; font-size: .75rem; font-weight: 600; text-decoration: none; transition: all .2s; }
.iti-btn-detail:hover { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); }
.iti-btn-stock-ok { background: #d1fae5; color: #065f46; padding: 4px 12px; border-radius: 16px; font-size: .75rem; font-weight: 600; cursor: default; }
.iti-btn-stock-empty { background: #fee2e2; color: #991b1b; padding: 4px 12px; border-radius: 16px; font-size: .75rem; font-weight: 600; cursor: default; }

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(135deg, #1e293b, #1e3a8a, #4a3d32);
  padding: 32px 0 60px;
  color: rgba(255,255,255,.6);
}

.site-footer h5 {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}

.site-footer a { color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--primary-light); }

.site-footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(164,77,46,0.15);
  color: rgba(255,255,255,.6);
  transition: all .2s;
  margin-right: 8px;
}

.site-footer .social-link:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 20px;
  margin-top: 32px;
  font-size: .85rem;
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 1060;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37,211,102,.5);
  color: #fff;
}

.whatsapp-float .wa-tooltip {
  position: absolute;
  right: 66px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: var(--text-main,#1e293b);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  transition: all .2s;
}

.whatsapp-float:hover .wa-tooltip {
  opacity: 1;
  right: 72px;
}

.whatsapp-float .wa-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* Pulse animation */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37,211,102,.3);
  animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .6; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* ===== SEARCH PILLS ===== */
.search-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 60px;
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .25s;
  backdrop-filter: blur(4px);
}

.search-pill:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

.search-pill i { font-size: .7rem; opacity: .7; }

/* ===== GLOBAL SEARCH MODAL ===== */
.search-modal-trigger {
  cursor: pointer;
}

.search-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(61,50,41,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-modal-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.search-modal-box {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 40px 80px rgba(0,0,0,.3);
  animation: modalSlideDown .3s ease;
}

@keyframes modalSlideDown {
  from { opacity: 0; transform: translateY(-20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal-box .modal-search-input {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: 60px;
  outline: none;
  transition: all .3s;
  background: var(--bg-body);
}

.search-modal-box .modal-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(164,77,46,.15);
  background: #fff;
}

.search-modal-box .modal-search-hint {
  font-size: .8rem;
  color: var(--text-light);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-modal-box .modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-body);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}

.search-modal-box .modal-close-btn:hover {
  background: var(--border);
  color: var(--text-main);
}

/* ===== MEGA MENU (Desktop Header Nav) ===== */
.mega-header {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
  border-bottom: 2px solid rgba(255,255,255,.12);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: box-shadow .3s;
}

.mega-header.scrolled {
  box-shadow: 0 4px 20px rgba(120,80,50,.25);
}

.mega-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.mega-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.mega-header-logo img { height: 32px; width: auto; }
.mega-header-logo span { font-weight: 700; font-size: .9rem; }

.mega-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px -22px rgba(15,23,42,.8);
}

.mega-nav-item {
  position: relative;
}

.mega-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all .2s ease;
}

.mega-nav-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.18);
  transform: translateY(-1px);
}

.mega-nav-btn.active {
  color: #fff;
  background: rgba(255,255,255,.24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

.mega-nav-btn i { font-size: .75rem; opacity: .9; }

.mega-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 12px;
}

.mega-nav-item:hover .mega-dropdown {
  display: block;
}

.mega-dropdown-inner {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 20px;
  min-width: 200px;
  animation: megaFade .2s ease;
  border: 1px solid rgba(255,255,255,.5);
}

@keyframes megaFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mega-dropdown-inner a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: all .15s;
}

.mega-dropdown-inner a:hover {
  background: var(--bg-body);
  color: var(--primary);
}

.mega-dropdown-inner a i {
  width: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
}

.mega-dropdown-inner a:hover i { color: var(--primary); }

.mega-dropdown-wide {
  min-width: 700px;
}

.mega-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

.mega-dropdown-section-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-light);
  padding: 4px 12px 8px;
}

.menu-logo-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 2px;
}

.mega-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all .2s;
}

.mega-header-action:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.mega-header-action.login-link {
  width: auto;
  padding: 0 16px;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
}

/* Hamburger for mobile */
.mega-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}

.mega-hamburger:hover { background: rgba(255,255,255,.16); }

/* ===== SEARCH TYPE TABS ===== */
.search-type-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 8px 12px;
}

.search-type-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 60px;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
}

.search-type-tab:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--bg-body);
  text-decoration: none;
}

.search-type-tab.active {
  background: var(--gmd-gradient, var(--primary-gradient));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(200,103,59,.25);
}

.search-type-tab .tab-count {
  font-size: .7rem;
  opacity: .7;
}

/* ===== GRID RESULT CARDS ===== */
.biblio-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .biblio-result-grid { grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
}

@media (min-width: 1024px) {
  .biblio-result-grid { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 20px; }
}

@media (min-width: 1280px) {
  .biblio-result-grid { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; gap: 20px; }
}

.iti-card {
  display: block;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--clay-shadow);
  transition: all .3s;
}

.iti-card:hover {
  box-shadow: 0 8px 24px var(--clay-deep);
  transform: translateY(-3px);
  border-color: var(--primary-light);
  text-decoration: none;
}

.iti-card-inner {
  display: flex;
  flex-direction: column;
}

.iti-card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-body);
}

.iti-card-cover.no-cover {
  display: flex;
  align-items: center;
  justify-content: center;
}

.iti-card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

.iti-card-fallback i {
  font-size: 2rem;
  opacity: .5;
}

.iti-card-cover img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform .4s;
}

.iti-card:hover .iti-card-cover img {
  transform: scale(1.05);
}

.iti-year-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  line-height: 1.5;
}

.iti-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.iti-card-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3rem;
  transition: color .2s;
}

.iti-card:hover .iti-card-title {
  color: var(--primary);
}

.iti-card-title mark {
  background: #fef3c7;
  color: #92400e;
  padding: 0 2px;
  border-radius: 2px;
}

.iti-card-author {
  font-size: .72rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.iti-card-author i { display: none; }

.iti-card-detail {
  margin-top: auto;
  font-size: .7rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: all .25s;
}

.iti-card:hover .iti-card-detail {
  opacity: 1;
  transform: translateY(0);
}

/* detail page meta */
.iti-info-row {
  color: var(--text-light);
}

/* ===== SEARCH SIDEBAR ===== */
.search-sidebar {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow:
    0 8px 24px var(--clay-shadow),
    inset 0 1px 0 rgba(255,255,255,.6);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  font-weight: 700;
  font-size: .82rem;
  color: var(--text-main);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow:
    inset 0 -2px 6px rgba(120,80,50,.06),
    0 1px 0 rgba(255,255,255,.5);
}

.sidebar-header i {
  color: var(--primary);
  font-size: .85rem;
}

.sidebar-toggle {
  margin-left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .68rem;
  transition: all .2s;
  box-shadow:
    0 2px 4px var(--clay-shadow),
    inset 0 1px 0 rgba(255,255,255,.5);
}

.sidebar-toggle:hover {
  background: var(--bg-body);
  color: var(--text-main);
  box-shadow:
    0 4px 8px var(--clay-shadow),
    inset 0 1px 0 rgba(255,255,255,.5);
  transform: translateY(-1px);
}

#sidebarFilterBody {
  transition: max-height .35s ease, opacity .25s ease;
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
}

#sidebarFilterBody.sidebar-filter-collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

/* --- List group flush --- */
#search-filter .list-group {
  border-radius: 0;
}

#search-filter .list-group-item {
  border-left: none;
  border-right: none;
  padding: 0;
  border-color: var(--border);
}

#search-filter .list-group-item:first-child {
  border-top: none;
}

/* --- Section header (clickable row) --- */
#search-filter .cursor-pointer[data-toggle="collapse"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  cursor: pointer;
  background: transparent;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

#search-filter .cursor-pointer[data-toggle="collapse"]:hover {
  background: var(--bg-body);
}

#search-filter .cursor-pointer strong {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-main);
}

/* --- Collapse arrow --- */
#search-filter .dropdown-toggle {
  font-size: .65rem;
  color: var(--text-light);
  transition: transform .25s ease;
}

#search-filter .dropdown-toggle::after {
  display: none;
}

#search-filter .cursor-pointer[data-toggle="collapse"]:not(.collapsed) .dropdown-toggle {
  transform: rotate(180deg);
}

/* --- Collapsible content area --- */
#search-filter .collapse {
  padding: 6px 18px 6px;
}

/* --- Checkbox / Radio items --- */
#search-filter .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .15s;
}

#search-filter .form-check:hover {
  background: var(--bg-body);
}

#search-filter .form-check-input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

#search-filter .form-check-label {
  font-size: .76rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.45;
}

#search-filter .form-check-label:hover {
  color: var(--text-main);
}

/* --- "See More" link --- */
#search-filter a[data-toggle="collapse"][href^="#seeMore"] {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 8px;
  margin-top: 2px;
  text-decoration: none;
  transition: all .15s;
}

#search-filter a[data-toggle="collapse"][href^="#seeMore"]:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* --- Range slider container --- */
#search-filter .row.d-flex.justify-content-between.align-items-center.mb-4 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#search-filter .row [class*="flex-"] {
  flex: 1;
}

#search-filter .row .px-3 {
  padding: 0;
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

#search-filter .form-control {
  font-size: .72rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--bg-body);
  transition: border-color .2s;
}

#search-filter .form-control:focus {
  border-color: var(--primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(200,103,59,.1);
}

/* --- Range slider (noUiSlider) --- */
#search-filter .input-slider {
  width: 100%;
  margin: 6px 0 4px;
}

/* --- "text-sm" inside filter content --- */
#search-filter .collapse.text-sm {
  font-size: .75rem;
  color: var(--text-muted);
  padding: 8px 18px;
}

/* --- Apply Filter button --- */
#search-filter .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 600;
  padding: 10px 20px;
  transition: all .2s;
  box-shadow:
    0 4px 10px var(--clay-shadow),
    inset 0 1px 0 rgba(255,255,255,.2);
}

#search-filter .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow:
    0 6px 16px rgba(200,103,59,.3),
    inset 0 1px 0 rgba(255,255,255,.15);
  transform: translateY(-1px);
}

#search-filter .my-4 {
  margin: 12px 18px;
}

/* ===== SEARCH SUMMARY PANEL ===== */
.search-summary-panel {
  background: linear-gradient(135deg, #ffffff, #f0f4f8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.search-summary-panel.collapsed .summary-body {
  display: none;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.summary-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 700;
  color: #1d4ed8;
}

.summary-header > div i {
  color: var(--primary);
}

.summary-toggle {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 4px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.summary-toggle:hover {
  background: rgba(200,103,59,.1);
}

.search-summary-panel.collapsed .summary-toggle i {
  transform: rotate(180deg);
}

.summary-body {
  padding: 0 16px 14px;
}

.summary-body p {
  font-size: .82rem;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.5;
}

.summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.summary-tips {
  flex: 1;
  min-width: 200px;
}

.summary-tips h4 {
  font-size: .78rem;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-tips h4 i {
  color: #f59e0b;
}

.summary-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-tips li {
  font-size: .75rem;
  color: #4b5563;
  padding: 3px 0;
  position: relative;
  padding-left: 14px;
}

.summary-tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

/* ===== RESULTS HEADER ===== */
.results-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.results-count {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sort-buttons select {
  font-size: .8rem;
  cursor: pointer;
}

.view-toggle {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== STATS ROW (Enhanced) ===== */
.stat-grid-6 .stat-card { padding: 1.2rem; }
.stat-grid-6 .stat-icon { width: 48px; height: 48px; font-size: 1.2rem; }
.stat-grid-6 .stat-number { font-size: 1.4rem; }

/* ===== ANIMATIONS ===== */
.fade-in-up {
  animation: fadeUp .5s ease-out both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
  .hero-section { padding: 80px 0 100px; }
  .hero-title { font-size: 2rem; }
  .mega-nav, .mega-header-actions { display: none; }
  .mega-hamburger { display: flex; }
  .search-modal-box { margin: 0 16px; padding: 24px; }
  .search-modal-box .modal-search-input { height: 48px; font-size: 1rem; }
  .search-modal-overlay.active { padding-top: 10vh; }
  .mega-dropdown-wide { min-width: auto; }
}

@media (max-width: 767.98px) {
  .hero-section { padding: 60px 0 90px; }
  .hero-title { font-size: 1.5rem; }
  .hero-subtitle { font-size: .95rem; }
  .hero-logo { height: 65px; }
  .stats-section { margin-top: -40px; }
  .stat-card { padding: 1rem; }
  .stat-number { font-size: 1.3rem; }
  .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; }

  .inner-page-header { padding: 40px 0 60px; margin-bottom: -30px; }

  .collection-card .cover-wrap, .latest-card .cover-wrap { aspect-ratio: 2/3; }
  .iti-list-card { flex-direction: column; }
  .iti-list-img { width: 100%; min-width: 100%; height: 160px; }
  .site-footer { padding: 24px 0 60px; }

  .whatsapp-float { bottom: 85px; right: 14px; width: 48px; height: 48px; font-size: 1.25rem; }
  .whatsapp-float .wa-tooltip { display: none; }
  .search-pills { gap: 6px; }
  .search-pill { padding: 4px 12px; font-size: .75rem; }
  .stat-grid-6 .stat-card { padding: .8rem; }
  .stat-grid-6 .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
  .stat-grid-6 .stat-number { font-size: 1.1rem; }
  .search-type-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 12px; }
  .search-type-tab { white-space: nowrap; padding: 6px 14px; font-size: .78rem; }
  .mega-header-inner { height: 48px; padding: 0 12px; }
  .mega-header-logo span { display: none; }

  /* Mobile sidebar */
  .search-sidebar { margin-top: 16px; }
  .results-heading { font-size: 1rem; }
  .search-summary-panel { margin-bottom: 12px; }
}

@media (max-width: 575.98px) {
  .hero-title { font-size: 1.25rem; }
  .hero-logo { height: 50px; }
  .iti-list-img { width: 80px; min-width: 80px; }
  .iti-list-info { padding: 10px 12px; }
  .iti-list-title { font-size: .85rem; }
  .biblio-result-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .iti-card-body { padding: 10px; }
  .iti-card-title { font-size: .75rem; min-height: 2rem; }
}

/* ===== Advanced Search Modal (UNIDA Style) ===== */
/* Utility styles for modal form elements */
.adv-modal-card-inner { position: relative; }

.adv-modal-deco-1 {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  background: rgba(200,103,59,0.15);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.adv-modal-deco-2 {
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 160px;
  height: 160px;
  background: rgba(251,146,60,0.12);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.adv-modal-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 28px 16px;
}

.adv-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1.3;
}
.adv-modal-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 4px 0 0;
}

.adv-modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.adv-modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.adv-modal-body {
  position: relative;
  padding: 0 28px 28px;
}

.adv-field-group { margin-bottom: 16px; }

.adv-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.adv-label-sm {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
}

.adv-input-wrap { position: relative; }

.adv-input {
  width: 100%;
  padding: 11px 16px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  font-size: 0.88rem;
  color: #374151;
  transition: all 0.2s;
  outline: none;
}
.adv-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(200,103,59,0.15);
  background: #fff;
}
.adv-input::placeholder { color: #9ca3af; }

.adv-input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.adv-select {
  width: 100%;
  padding: 10px 12px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.82rem;
  color: #374151;
  transition: all 0.2s;
  outline: none;
  cursor: pointer;
}
.adv-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(200,103,59,0.15);
  background: #fff;
}

.adv-filter-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-body) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.adv-filter-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.adv-modal-actions {
  display: flex;
  gap: 10px;
}

.adv-btn-outline {
  flex: 1;
  padding: 13px 16px;
  border: 2px solid #e5e7eb;
  background: transparent;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.adv-btn-outline:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.adv-btn-primary {
  flex: 1;
  padding: 13px 16px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 20px rgba(200,103,59,0.3);
}
.adv-btn-primary:hover {
  box-shadow: 0 10px 28px rgba(200,103,59,0.45);
  transform: translateY(-1px);
}
.adv-btn-primary:hover {
  box-shadow: 0 10px 28px rgba(37,99,235,0.45);
  transform: translateY(-1px);
}

/* RTL */
[dir="rtl"] .adv-input-icon { right: auto; left: 14px; }
[dir="rtl"] .adv-modal-deco-1 { right: auto; left: -80px; }
[dir="rtl"] .adv-modal-deco-2 { left: auto; right: -80px; }

/* ===== VISITOR SLIDESHOW ===== */
.visitor-slideshow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.visitor-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, rgba(30,41,59,.7) 0%, rgba(37,99,235,.5) 50%, rgba(245,158,11,.3) 100%);
}

.visitor-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.visitor-slide-bg.active {
  opacity: 1;
}

/* ===== VISITOR / GUEST BOOK ===== */
.visitor-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
}

.visitor-card {
  background: rgba(255,255,255,.97);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
  position: relative;
  z-index: 2;
  animation: visitorFade .5s ease;
}

@keyframes visitorFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.visitor-icon-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  overflow: hidden;
}

.visitor-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.visitor-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main,#1e293b);
  margin-bottom: 4px;
}

.visitor-subtitle {
  font-size: .85rem;
  color: #94a3b8;
  margin: 0;
}

.visitor-field {
  margin-bottom: 18px;
}

.visitor-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #64748b;
  margin-bottom: 6px;
}

.visitor-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: .9rem;
  color: var(--text-main,#1e293b);
  transition: all .2s;
  background: var(--bg-body);
  outline: none;
}

.visitor-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(200,103,59,.12);
  background: #fff;
}

.visitor-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: .78rem;
  color: #94a3b8;
}

.visitor-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 6px 20px rgba(200,103,59,.3);
}

.visitor-btn:hover {
  box-shadow: 0 10px 28px rgba(200,103,59,.45);
  transform: translateY(-1px);
}

.visitor-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: .78rem;
  color: #94a3b8;
}

.visitor-brand {
  color: var(--primary);
  font-weight: 700;
}

.visitor-success {
  text-align: center;
  padding: 20px 0;
  animation: visitorFade .4s ease;
}

.visitor-success-icon {
  font-size: 2.8rem;
  color: #22c55e;
  margin-bottom: 12px;
}

.visitor-avatar-sm {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.visitor-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visitor-success-text {
  font-size: .92rem;
  color: var(--text-main,#1e293b);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

.visitor-quote {
  display: none;
  align-items: flex-end;
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 10;
  max-width: 380px;
  text-align: right;
}

.visitor-quote blockquote {
  margin: 0;
}

.visitor-quote p {
  color: rgba(255,255,255,.85);
  margin-bottom: 6px;
  font-size: 1rem;
  font-style: italic;
  text-shadow: 0 2px 4px rgba(0,0,0,.3);
}

.visitor-quote footer {
  color: rgba(255,255,255,.5);
  font-size: .82rem;
}

@media (min-width: 768px) {
  .visitor-quote { display: flex; }
}

@media (max-width: 767px) {
  .visitor-card { padding: 28px 20px; max-width: 360px; }
}

/* ===== Panduan Page ===== */
.panduan-page {
  max-width: 820px;
  margin: 0 auto;
}

.panduan-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #ffffff, #bfdbfe);
  border-radius: 16px;
  margin-bottom: 32px;
}

.panduan-hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 6px 20px rgba(34,197,94,.3);
}

.panduan-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main,#1e293b);
  margin-bottom: 10px;
}

.panduan-hero p {
  color: #475569;
  font-size: .92rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.panduan-alur,
.panduan-contact,
.panduan-terms {
  margin-bottom: 32px;
}

.panduan-alur h2,
.panduan-contact h2,
.panduan-terms h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main,#1e293b);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panduan-step-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panduan-step {
  display: flex;
  gap: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow .2s;
}

.panduan-step:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.panduan-step-num {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panduan-step-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main,#1e293b);
  margin-bottom: 6px;
}

.panduan-step-body p {
  color: #475569;
  font-size: .88rem;
  margin-bottom: 4px;
  line-height: 1.6;
}

.panduan-step-body ul {
  margin: 6px 0 6px 18px;
  color: #475569;
  font-size: .88rem;
  line-height: 1.7;
}

.panduan-note {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: .85rem;
  color: #92400e;
}

.panduan-timer {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: .85rem;
  color: var(--primary);
}

.panduan-price {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 1rem;
  color: #166534;
}

.panduan-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panduan-contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.panduan-contact-item i {
  font-size: 1.4rem;
  color: #2563eb;
}

.panduan-contact-item strong {
  display: block;
  font-size: .82rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.panduan-contact-item a {
  font-size: .92rem;
  color: #2563eb;
  text-decoration: none;
}

.panduan-contact-item a:hover {
  text-decoration: underline;
}

.panduan-terms ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.panduan-terms li {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
  font-size: .88rem;
  color: #475569;
  line-height: 1.5;
}

.panduan-terms li::before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #22c55e;
  margin-right: 10px;
}

.panduan-cta {
  text-align: center;
  margin: 36px 0 20px;
}

.panduan-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(34,197,94,.3);
  transition: transform .2s, box-shadow .2s;
}

.panduan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(34,197,94,.4);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 600px) {
  .panduan-hero { padding: 28px 16px; }
  .panduan-hero h1 { font-size: 1.2rem; }
  .panduan-contact-grid { grid-template-columns: 1fr; }
  .panduan-step { padding: 16px; }
}

/* ===== SKPTA / Panduan Shared ===== */
.panduan-section {
  margin-bottom: 32px;
}

.panduan-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main,#1e293b);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panduan-subsection {
  margin-bottom: 24px;
}

.panduan-subsection h3 {
  font-size: 1.02rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

.panduan-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
}

.panduan-card h4 {
  font-size: .95rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

.panduan-card p {
  font-size: .9rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 8px;
}

.panduan-card p:last-child {
  margin-bottom: 0;
}

.panduan-checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.panduan-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.panduan-checklist li:last-child {
  border-bottom: none;
}

.panduan-checklist li i {
  color: #22c55e;
  font-size: 1rem;
  margin-top: 2px;
  min-width: 18px;
}

.panduan-label-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.panduan-label-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-body);
  border-radius: 8px;
  font-size: .88rem;
  color: #334155;
}

.panduan-label-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
}

.panduan-numlist {
  padding-left: 20px;
  margin: 8px 0 0;
}

.panduan-numlist li {
  font-size: .9rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 6px;
}

.panduan-file-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.panduan-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-body);
  border-radius: 8px;
  font-size: .88rem;
  color: #334155;
  font-weight: 500;
}

.panduan-file-item i {
  font-size: 1.2rem;
  min-width: 20px;
  text-align: center;
}

@media (max-width: 600px) {
  .panduan-label-list { grid-template-columns: 1fr; }
  .panduan-file-grid { grid-template-columns: 1fr; }
  .panduan-card { padding: 16px; }
}

/* ===== Member Login ===== */
/* ── Member Login (unused, kept for fallback) ── */

.member-dash-tabs a:hover {
  color: var(--text-main,#1e293b);
}

.member-dash-tabs a.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.member-dash-content {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: 24px;
}

@media (max-width: 768px) {
  .member-dash { flex-direction: column; }
  .member-dash-sidebar { width: 100%; min-width: unset; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; text-align: left; }
  .member-dash-avatar { width: 64px; height: 64px; margin: 0; }
  .member-dash-sidebar .btn { width: auto; margin: 0; }
  .member-dash-tabs a { padding: 10px 14px; font-size: .8rem; }
  .member-dash-content { padding: 16px; }
}

/* ===== Librarian Login ===== */
.librarian-login-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.librarian-login-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.librarian-login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.librarian-login-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.librarian-login-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main,#1e293b);
  margin-bottom: 6px;
}

.librarian-login-desc {
  font-size: .85rem;
  color: #94a3b8;
  margin-bottom: 24px;
  line-height: 1.5;
}

.librarian-login-form {
  text-align: left;
}

.librarian-login-field {
  margin-bottom: 18px;
}

.librarian-login-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.librarian-login-label i {
  color: #64748b;
  width: 18px;
}

.librarian-login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: .9rem;
  color: var(--text-main,#1e293b);
  background: #fff;
  transition: border .2s, box-shadow .2s;
  outline: none;
  box-sizing: border-box;
}

.librarian-login-input:focus {
  border-color: #334155;
  box-shadow: 0 0 0 3px rgba(30,41,59,.12);
}

.librarian-login-input::placeholder {
  color: #cbd5e1;
}

.librarian-login-captcha {
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
}

.librarian-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #1e293b, #1e3a8a);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.librarian-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,41,59,.3);
}

.librarian-login-home {
  font-size: .82rem;
  color: #94a3b8;
  text-decoration: none;
}

.librarian-login-home:hover {
  color: #64748b;
  text-decoration: underline;
}

.librarian-login-remember {
  font-size: .85rem;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.librarian-login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #334155;
}

/* ===== Top Members Leaderboard ===== */
.top-members-leaderboard {
  max-width: 800px;
  margin: 0 auto;
}

.top-members-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.podium-item {
  text-align: center;
  position: relative;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 20px 20px;
  flex: 1;
  max-width: 200px;
  transition: transform .2s, box-shadow .2s;
}

.podium-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}

.podium-1 {
  transform: scale(1.08);
  border-color: #fbbf24;
  box-shadow: 0 8px 24px rgba(251,191,36,.15);
  padding-top: 40px;
}

.podium-1:hover {
  transform: scale(1.08) translateY(-4px);
}

.podium-2 { padding-top: 24px; }
.podium-3 { padding-top: 24px; }

.podium-badge-img {
  display: block;
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  object-fit: contain;
}

.podium-1 .podium-badge-img { width: 64px; height: 64px; }

.podium-avatar-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.podium-1 .podium-avatar-wrap {
  width: 76px;
  height: 76px;
  border-color: #fbbf24;
  box-shadow: 0 4px 16px rgba(251,191,36,.2);
}

.podium-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-main,#1e293b);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-count {
  font-size: .75rem;
  color: #94a3b8;
}

.top-members-list {
  max-width: 500px;
  margin: 0 auto;
}

.top-members-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: box-shadow .2s;
}

.top-members-row:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}

.top-members-rank {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--bg-body),var(--border));
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1;
  border: 2px solid var(--border);
}

.top-members-rank i {
  font-size: .55rem;
  margin-top: -1px;
}

.top-members-rank.rank-4 {
  background: linear-gradient(135deg,#dbeafe,#bfdbfe);
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.top-members-rank.rank-5 {
  background: linear-gradient(135deg,#fef3c7,#fde68a);
  color: #92400e;
  border-color: #fcd34d;
}

.top-members-row-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

.top-members-row-name {
  flex: 1;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-main,#1e293b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-members-row-count {
  font-size: .78rem;
  color: #94a3b8;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .top-members-podium { gap: 8px; }
  .podium-item { padding: 14px 10px 12px; max-width: 120px; }
  .podium-1 { transform: scale(1.05); padding-top: 32px; }
  .podium-1:hover { transform: scale(1.05) translateY(-3px); }
  .podium-avatar-wrap, .podium-1 .podium-avatar-wrap { width: 44px; height: 44px; }
  .podium-badge-img { width: 38px; height: 38px; }
  .podium-1 .podium-badge-img { width: 44px; height: 44px; }
  .podium-name { font-size: .72rem; }
  .podium-count { font-size: .65rem; }
}

/* ===== REVIEWS SECTION ===== */
.review-summary-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}

.review-summary-rating {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.review-summary-stars {
  font-size: 1.2rem;
  color: #f59e0b;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.review-summary-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-main,#1e293b);
  margin-bottom: 4px;
}

.review-summary-count {
  font-size: .75rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

.review-summary-google {
  font-size: 1.8rem;
  opacity: .3;
}

.review-track {
  display: flex;
  gap: 14px;
  animation: scrollReviews 40s linear infinite;
  width: max-content;
}

.review-track:hover {
  animation-play-state: paused;
}

.review-track-inner {
  display: flex;
  gap: 14px;
}

@keyframes scrollReviews {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.review-card-stars-inline {
  font-size: .65rem;
  color: #f59e0b;
  margin-left: 6px;
  letter-spacing: 1px;
}

.review-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  transition: all .25s;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
  width: 400px;
  min-width: 400px;
  flex-shrink: 0;
}

.review-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  transform: translateY(-1px);
}

.review-card-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.review-card-body {
  flex: 1;
  min-width: 0;
}

.review-card-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-main,#1e293b);
  margin-bottom: 2px;
}

.review-card-stars {
  font-size: .7rem;
  color: #f59e0b;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.review-card-text {
  font-size: .78rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 6px;
}

.review-card-date {
  font-size: .68rem;
  color: #94a3b8;
}

/* ── Member Login ── */
.member-login-wrapper {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}
.member-login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}
.member-login-card .login-card-header {
  background: var(--primary-gradient);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  color: #fff;
}
.member-login-card .login-card-header .login-icon {
  font-size: 3.5rem;
  margin-bottom: .75rem;
  opacity: .9;
}
.member-login-card .login-card-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 .35rem;
  color: #fff;
}
.member-login-card .login-card-header p {
  font-size: .82rem;
  opacity: .85;
  margin: 0;
  line-height: 1.5;
}
.member-login-card .login-card-body {
  padding: 2rem;
}
.member-login-card .input-group {
  display: flex;
  align-items: stretch;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
  background: var(--bg-body);
}
.member-login-card .input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200,103,59,.15);
  background: #fff;
}
.member-login-card .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  color: var(--text-muted);
  background: transparent;
  font-size: 1rem;
  flex-shrink: 0;
}
.member-login-card .input-group .form-control {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: .7rem .75rem .7rem 0;
  font-size: .9rem;
  height: auto;
}
.member-login-card .input-group .form-control:focus {
  box-shadow: none;
  background: transparent;
}
.member-login-card .btn-login {
  display: block;
  width: 100%;
  padding: .75rem;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  letter-spacing: .3px;
}
.member-login-card .btn-login:hover {
  opacity: .92;
  transform: translateY(-1px);
}
.member-login-card .btn-login:active {
  transform: translateY(0);
}
.member-login-card .captcha-area {
  margin-bottom: 1rem;
  padding: .75rem;
  background: var(--bg-body);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.member-login-card .login-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -.25rem 0 1rem;
  font-size: .8rem;
}
.member-login-card .login-checkbox {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--text-muted);
  cursor: pointer;
}
.member-login-card .login-checkbox input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  margin: 0;
}
.member-login-card .login-forgot {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.member-login-card .login-forgot:hover {
  text-decoration: underline;
}
.member-login-card .login-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}
.member-login-card .login-footer i {
  opacity: .6;
}
.member-login-card .alert {
  margin: 0 2rem 1rem;
  font-size: .82rem;
  border-radius: var(--radius);
  padding: .6rem 1rem;
}

/* ── Member Area (logged-in) ── */
.member-area {
  max-width: 960px;
  margin: -2rem auto 0;
  padding: 1.5rem 1rem;
  position: relative;
  z-index: 30;
}
.member-profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  animation: fadeSlideUp .5s ease both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.member-profile .member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
  flex-shrink: 0;
}
.member-profile .member-profile-body {
  flex: 1;
  min-width: 160px;
}
.member-profile .member-profile-body h3 {
  margin: 0 0 .15rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.member-profile .member-profile-body .member-badge {
  display: inline-block;
  padding: .15rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.member-profile .member-profile-body .member-badge.active { background: #dcfce7; color: #166534; }
.member-profile .member-profile-body .member-badge.pending { background: #fef9c3; color: #854d0e; }
.member-profile .member-profile-body .member-badge.expired { background: #fee2e2; color: #991b1b; }
.member-profile .member-profile-actions {
  display: flex;
  gap: .5rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.member-profile .member-profile-actions .btn {
  padding: .4rem .85rem;
  font-size: .8rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

/* member card (tab container) */
.member-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fadeSlideUp .5s ease .15s both;
}
.member-card .nav-tabs {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 2px solid var(--border);
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
}
.member-card .nav-tabs::-webkit-scrollbar { display: none; }
.member-card .nav-tabs .nav-item {
  margin-bottom: -2px;
  flex-shrink: 0;
}
.member-card .nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  padding: .85rem 1.25rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .2s, border-color .2s;
  background: transparent;
}
.member-card .nav-tabs .nav-link:hover { color: var(--primary); }
.member-card .nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
  font-weight: 600;
}
.member-card .tab-content {
  padding: 1.5rem;
}

/* member tables overrides */
.member-card .table-responsive {
  margin: 0 -0.25rem;
}
.member-card .table {
  margin-bottom: 0;
  font-size: .85rem;
}
.member-card .table th,
.member-card .dataListHeader th {
  background: var(--bg-body);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding: .65rem .75rem;
}
.member-card .table td {
  padding: .6rem .75rem;
  vertical-align: middle;
  border-color: var(--border);
}
.member-card .table tbody tr {
  transition: background .2s;
}
.member-card .table tbody tr:hover {
  background: var(--bg-body);
}
.member-card .table tbody tr:active {
  background: var(--border);
}
.member-card .memberDetail td {
  border: none;
  padding: .7rem .75rem;
}
.member-card .memberDetail td.key {
  font-weight: 600;
  color: var(--text-main);
  width: 22%;
  background: transparent;
}
.member-card .memberDetail td.value {
  color: var(--text-muted);
}
.member-card .tagline {
  margin-bottom: 1rem;
}
.member-card .tagline .memberInfoHead {
  font-size: 1rem;
  font-weight: 700;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.member-card .memberLoanListInfo,
.member-card .memberLoanHistInfo,
.member-card .memberBasketInfo {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.member-card .memberLoanListInfo .btn,
.member-card .memberLoanHistInfo .btn,
.member-card .memberBasketInfo .btn {
  font-size: .78rem;
  padding: .3rem .65rem;
}
.member-card .memberBasketAction {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

/* surat cards */
.surat-card {
  flex: 1 1 240px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all .3s;
}

.surat-card:hover {
  background: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.surat-card .surat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  border-radius: var(--radius);
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.surat-card h6 {
  font-size: .9rem;
  font-weight: 700;
  margin: 0 0 .35rem;
}

.surat-card p {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* password form */
.member-card #memberChangePassword .table td {
  border: none;
  padding: .5rem .75rem;
}
.member-card #memberChangePassword .table td.key {
  width: 28%;
  font-weight: 600;
  color: var(--text-main);
}
.member-card #memberChangePassword .form-control {
  border-radius: var(--radius);
  border-color: var(--border);
  font-size: .85rem;
  padding: .5rem .75rem;
}

/* responsive tweaks */
@media (max-width: 640px) {
  .member-login-card .login-card-header { padding: 2rem 1.5rem 1.5rem; }
  .member-login-card .login-card-header .login-icon { font-size: 2.8rem; }
  .member-login-card .login-card-header h2 { font-size: 1.15rem; }
  .member-login-card .login-card-body { padding: 1.5rem; }
  .member-profile { padding: 1.25rem; gap: 1rem; }
  .member-profile .member-avatar { width: 56px; height: 56px; }
  .member-profile .member-profile-body h3 { font-size: 1rem; }
  .member-profile .member-profile-actions { margin-left: 0; width: 100%; }
  .member-profile .member-profile-actions .btn { flex: 1; text-align: center; }
  .member-card .tab-content { padding: 1rem; }
  .member-card .nav-tabs .nav-link { padding: .7rem .85rem; font-size: .78rem; }
}

/* ===== CLAYMORPHISM UTILITIES ===== */
.clay-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: var(--shadow-lg);
  transition: all .3s ease;
}
.clay-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}
.clay-card-static {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: var(--shadow-lg);
}
.clay-card-static:hover {
  box-shadow: var(--shadow-xl);
}

/* Bootstrap card override for claymorphism */
.card.shadow-lg.border-0.rounded-lg {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.4) !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: var(--radius-lg) !important;
  transition: all .3s ease;
}
.card.shadow-lg.border-0.rounded-lg:hover {
  box-shadow: var(--shadow-xl) !important;
}

.clay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 60px;
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: 0 6px 14px -4px rgba(200,103,59,.3), inset 0 1px 2px rgba(255,255,255,.4), inset 0 -3px 6px rgba(120,80,50,.1);
  transition: all .2s;
  text-decoration: none;
}
.clay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(200,103,59,.4), inset 0 1px 2px rgba(255,255,255,.4), inset 0 -3px 6px rgba(120,80,50,.1);
  color: #fff;
}
.clay-btn:active {
  transform: translateY(0);
  box-shadow: inset 0 3px 8px rgba(120,80,50,.2), 0 2px 4px rgba(120,80,50,.1);
}
.clay-input {
  background: var(--bg-body);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: .9rem;
  color: var(--text-main);
  outline: none;
  transition: all .2s;
  box-shadow: inset 0 2px 6px rgba(120,80,50,.08);
}
.clay-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: inset 0 2px 6px rgba(120,80,50,.06), 0 0 0 3px rgba(200,103,59,.15);
}
.clay-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 60px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.clay-alert {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 16px 20px;
}

.clay-alert-danger {
  border-color: #dc3545;
  color: #842029;
  background: #fce8ea;
}

.clay-btn-secondary {
  background: var(--bg-body);
  color: var(--text-main);
  box-shadow: 0 4px 10px -3px var(--clay-shadow), inset 0 1px 2px var(--clay-highlight), inset 0 -2px 4px rgba(120,80,50,.06);
}
.clay-btn-secondary:hover {
  color: var(--text-main);
  box-shadow: 0 8px 18px -5px var(--clay-deep), inset 0 1px 2px var(--clay-highlight), inset 0 -2px 4px rgba(120,80,50,.06);
}

.clay-shadow-sm {
  box-shadow: var(--shadow-sm);
}
.clay-shadow-md {
  box-shadow: var(--shadow-md);
}

.clay-inset-box {
  background: var(--bg-body);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 6px rgba(120,80,50,.08), 0 1px 2px var(--clay-highlight);
}

/* ===== CLAY INFO ROWS (detail page) ===== */
.clay-info-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.clay-info-row:last-child {
  border-bottom: none;
}
.clay-info-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-light);
  margin-bottom: 2px;
}
.clay-info-label i {
  width: 16px;
  margin-right: 4px;
  color: var(--primary);
}
.clay-info-value {
  font-size: .92rem;
  color: var(--text-main);
  font-weight: 500;
}

/* ===== CLAY TABS (detail page) ===== */
.clay-tabs {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 4px;
  background: var(--bg-body);
  border-radius: 60px;
}
.clay-tab-item {
  flex: 1;
}
.clay-tab-link {
  display: block;
  text-align: center;
  padding: 10px 16px;
  border-radius: 60px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
}
.clay-tab-link:hover {
  color: var(--text-main);
  text-decoration: none;
}
.clay-tab-link.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* ===== ITI-LIST CARD ACTIONS ===== */
.iti-list-card .iti-list-actions a,
.iti-list-card .iti-list-actions span {
  margin-right: 8px;
  font-size: .78rem;
  padding: 4px 12px;
  border-radius: 60px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.iti-btn-detail {
  background: var(--primary-gradient);
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(200,103,59,.25);
  transition: all .2s;
}
.iti-btn-detail:hover {
  box-shadow: 0 6px 14px rgba(200,103,59,.35);
  transform: translateY(-1px);
}
.iti-btn-stock-ok {
  background: var(--bg-body);
  color: var(--text-muted) !important;
  border: 1px solid var(--border);
  font-weight: 600;
}
.iti-btn-stock-empty {
  background: #fce8ea;
  color: #842029 !important;
  font-weight: 600;
}
.iti-btn-cart {
  width: 32px;
  height: 32px;
  border-radius: 50% !important;
  background: var(--primary-gradient) !important;
  color: #fff !important;
  justify-content: center !important;
  padding: 0 !important;
  box-shadow: 0 2px 6px rgba(200,103,59,.3);
  transition: all .2s;
}
.iti-btn-cart:hover {
  box-shadow: 0 4px 12px rgba(200,103,59,.4);
  transform: translateY(-1px);
}
