/* -------------------------------------------------------------------------- */
/* BOOK CUB - DESIGN SYSTEM & THEMING                                         */
/* -------------------------------------------------------------------------- */

:root {
  /* Logo Derived Palette */
  --primary-cyan: #34C4F0;
  --cyan-hover: #1DB5E5;
  --cyan-light: #EBF8FD;
  
  --primary-gold: #FCD036;
  --gold-hover: #EAB91B;
  --gold-light: #FFF9E5;

  --dark-charcoal: #18181B;
  --charcoal-light: #27272A;

  --accent-pink: #F47B97;
  --pink-light: #FDF0F3;

  --status-available: #10B981;
  --status-available-bg: #D1FAE5;
  
  --status-borrowed: #F59E0B;
  --status-borrowed-bg: #FEF3C7;

  --status-reserved: #EC4899;
  --status-reserved-bg: #FCE7F3;

  --bg-sky: #F2FAFC;
  --card-bg: #FFFFFF;
  --border-color: #E2E8F0;

  --text-main: #18181B;
  --text-muted: #64748B;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(24, 24, 27, 0.04);
  --shadow-md: 0 8px 24px rgba(52, 196, 240, 0.12);
  --shadow-lg: 0 16px 40px rgba(24, 24, 27, 0.16);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------------------- */
/* GLOBAL RESET & BASE STYLES                                                 */
/* -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-sky);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* NAVBAR & HEADER                                                            */
/* -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(52, 196, 240, 0.2);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.logo-wrapper {
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.brand:hover .logo-wrapper {
  transform: rotate(-4deg) scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--dark-charcoal);
  line-height: 1;
}

.highlight-cub {
  color: var(--primary-cyan);
  background: var(--primary-gold);
  padding: 0 6px;
  border-radius: 4px;
  margin-left: 2px;
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* SEARCH BAR */
.search-box-wrapper {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--primary-cyan);
  font-size: 1.1rem;
}

#searchInput {
  width: 100%;
  padding: 12px 42px 12px 46px;
  border-radius: 30px;
  border: 2px solid #E0F2FE;
  background: #F8FAFC;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
}

#searchInput:focus {
  outline: none;
  border-color: var(--primary-cyan);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(52, 196, 240, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: none;
  padding: 4px;
}

.clear-search-btn:hover {
  color: var(--accent-pink);
}

/* NAV CONTROLS */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* USER AUTH BADGE & PROFILE */
.user-auth-widget {
  display: flex;
  align-items: center;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F1F5F9;
  padding: 4px 12px 4px 6px;
  border-radius: 24px;
  border: 1px solid #E2E8F0;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-gold);
  color: var(--dark-charcoal);
  font-family: var(--font-heading);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.user-info-text {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dark-charcoal);
  line-height: 1.1;
}

.user-role-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--primary-cyan);
  text-transform: uppercase;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 4px;
  transition: var(--transition);
}

.logout-btn:hover {
  color: var(--accent-pink);
}

/* MEMBER CARD BUTTON */
.btn-membership {
  position: relative;
  background: var(--dark-charcoal);
  color: var(--primary-gold);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.btn-membership:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(24, 24, 27, 0.25);
  background: var(--charcoal-light);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-pink);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

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


/* -------------------------------------------------------------------------- */
/* LIBRARIAN MODE BANNER                                                      */
/* -------------------------------------------------------------------------- */
.admin-banner {
  background: var(--dark-charcoal);
  color: #FFFFFF;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 3px solid var(--primary-gold);
}

.admin-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary-cyan);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0;
}

.btn-text:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* MAIN CONTENT & STATS DASHBOARD                                             */
/* -------------------------------------------------------------------------- */
.main-content {
  padding-top: 24px;
  padding-bottom: 60px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.card-total .stat-icon {
  background: var(--cyan-light);
  color: var(--primary-cyan);
}

.card-available .stat-icon {
  background: var(--status-available-bg);
  color: var(--status-available);
}

.card-borrowed .stat-icon {
  background: var(--status-borrowed-bg);
  color: var(--status-borrowed);
}

.card-reserved .stat-icon {
  background: var(--status-reserved-bg);
  color: var(--status-reserved);
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--dark-charcoal);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------- */
/* TOOLBAR & FILTERS                                                          */
/* -------------------------------------------------------------------------- */
.toolbar {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.genre-pills-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.genre-pills-container::-webkit-scrollbar {
  height: 4px;
}

.genre-pills-container::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.pill-btn {
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pill-btn:hover {
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  background: var(--cyan-light);
}

.pill-btn.active {
  background: var(--dark-charcoal);
  color: var(--primary-gold);
  border-color: var(--dark-charcoal);
  box-shadow: 0 4px 12px rgba(24, 24, 27, 0.15);
}

.filter-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.select-wrapper select {
  padding: 8px 32px 8px 34px;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22293.4%22%20height%3D%22293.4%22%3E%3Cpath%20fill%3D%22%2364748B%22%20d%3D%22M236.4%20129.3L146.7%20219l-89.7-89.7c-4.7-4.7-12.3-4.7-17%200s-4.7%2012.3%200%2017l98.2%2098.2c4.7%204.7%2012.3%204.7%2017%200l98.2-98.2c4.7-4.7%204.7-12.3%200-17-4.7-4.7-12.3-4.7-17%200z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--primary-cyan);
}

.view-switch {
  display: flex;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}

.view-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 7px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.view-btn.active {
  background: #FFFFFF;
  color: var(--primary-cyan);
  box-shadow: var(--shadow-sm);
}

/* ACTIVE FILTER SUMMARY */
.active-filter-summary {
  background: var(--cyan-light);
  border: 1px dashed var(--primary-cyan);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-reset-filters {
  background: none;
  border: none;
  color: var(--primary-cyan);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.82rem;
}

/* -------------------------------------------------------------------------- */
/* BOOKS GRID VIEW                                                            */
/* -------------------------------------------------------------------------- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.book-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-cyan);
}

.book-cover-wrap {
  height: 220px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #18181B 0%, #27272A 100%);
  padding: 8px;
}

/* DYNAMIC COVER STYLING (Real images and SVG fallback covers) */
.svg-cover,
.book-cover-img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 200 / 280;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
  transition: transform 0.2s ease;
}

.book-card:hover .book-cover-img,
.book-card:hover .svg-cover {
  transform: scale(1.02);
}

.fallback-svg-wrap {
  width: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fallback-svg-wrap svg {
  width: auto;
  height: 100%;
  aspect-ratio: 200 / 280;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
}

.status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.status-Available {
  background: var(--status-available-bg);
  color: var(--status-available);
  border: 1px solid var(--status-available);
}

.status-Borrowed {
  background: var(--status-borrowed-bg);
  color: var(--status-borrowed);
  border: 1px solid var(--status-borrowed);
}

.status-Reserved {
  background: var(--status-reserved-bg);
  color: var(--status-reserved);
  border: 1px solid var(--status-reserved);
}

.book-card-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.genre-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.book-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--dark-charcoal);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.book-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.isbn-code {
  font-family: monospace;
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------- */
/* COMPACT TABLE VIEW                                                         */
/* -------------------------------------------------------------------------- */
.table-container {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.books-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.books-table th {
  background: #F8FAFC;
  padding: 14px 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--dark-charcoal);
  border-bottom: 2px solid var(--border-color);
}

.books-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.books-table th.sortable:hover {
  color: var(--primary-cyan);
}

.books-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.books-table tbody tr:hover {
  background: #F8FAFC;
}

.tbl-cover-thumb {
  width: 36px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18181B;
}

.tbl-cover-thumb .svg-cover,
.tbl-cover-thumb .book-cover-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 200 / 280;
  object-fit: cover;
  display: block;
}

.tbl-cover-thumb .fallback-svg-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tbl-cover-thumb .fallback-svg-wrap svg {
  width: 100%;
  height: 100%;
  aspect-ratio: 200 / 280;
  display: block;
}

.tbl-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* -------------------------------------------------------------------------- */
/* BUTTONS & BADGES                                                           */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn-cyan {
  background: var(--primary-cyan);
  color: #FFFFFF;
}

.btn-cyan:hover {
  background: var(--cyan-hover);
  box-shadow: 0 4px 14px rgba(52, 196, 240, 0.35);
}

.btn-gold {
  background: var(--primary-gold);
  color: var(--dark-charcoal);
}

.btn-gold:hover {
  background: var(--gold-hover);
  box-shadow: 0 4px 14px rgba(252, 208, 54, 0.4);
}

.btn-secondary {
  background: #F1F5F9;
  color: var(--dark-charcoal);
  border: 1px solid #CBD5E1;
}

.btn-secondary:hover {
  background: #E2E8F0;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  background: #F1F5F9;
  border: none;
  color: var(--dark-charcoal);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--primary-cyan);
  color: white;
}

.btn-icon.btn-danger:hover {
  background: #EF4444;
  color: white;
}

/* -------------------------------------------------------------------------- */
/* PAGINATION                                                                 */
/* -------------------------------------------------------------------------- */
.pagination-wrapper {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 16px;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--dark-charcoal);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn:not(:disabled):hover {
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  background: var(--cyan-light);
}

.page-numbers {
  display: flex;
  gap: 4px;
}

.page-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.page-num.active {
  background: var(--primary-cyan);
  color: white;
  border-color: var(--primary-cyan);
}

.page-num:not(.active):hover {
  background: #F1F5F9;
}

.per-page-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.per-page-selector select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* MODALS                                                                     */
/* -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(18, 18, 27, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.modal-md {
  max-width: 580px;
}

.modal-card.modal-lg {
  max-width: 900px;
}

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

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #F1F5F9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--accent-pink);
  color: white;
}

.modal-header {
  margin-bottom: 20px;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark-charcoal);
}

.modal-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* BOOK DETAIL LAYOUT */
.book-detail-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
}

@media (max-width: 600px) {
  .book-detail-layout {
    grid-template-columns: 1fr;
  }
}

.detail-cover-wrapper {
  height: 250px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #18181B 0%, #27272A 100%);
  padding: 6px;
}

.detail-cover-wrapper .svg-cover,
.detail-cover-wrapper .book-cover-img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 200 / 280;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
}

.detail-cover-wrapper .fallback-svg-wrap {
  width: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-cover-wrapper .fallback-svg-wrap svg {
  width: auto;
  height: 100%;
  aspect-ratio: 200 / 280;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
}

.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark-charcoal);
  line-height: 1.2;
  margin-bottom: 6px;
}

.detail-author {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #F8FAFC;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.82rem;
}

.meta-item label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-item span {
  font-weight: 700;
  color: var(--dark-charcoal);
}

.detail-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

/* DIGITAL MEMBER PASS */
.digital-pass-card {
  background: linear-gradient(135deg, var(--dark-charcoal) 0%, #27272A 100%);
  color: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(24, 24, 27, 0.3);
  border: 2px solid var(--primary-gold);
}

.pass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.pass-cub-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.pass-cub-text strong {
  color: var(--primary-gold);
}

.pass-type {
  display: block;
  font-size: 0.65rem;
  color: var(--primary-cyan);
  letter-spacing: 1px;
  font-weight: 700;
}

.pass-chip {
  font-size: 1.4rem;
  color: var(--primary-gold);
}

.pass-member-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
}

.pass-id {
  font-family: monospace;
  color: var(--primary-cyan);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.pass-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94A3B8;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 10px;
}

.text-green { color: var(--status-available); }
.text-cyan { color: var(--primary-cyan); }
.text-gold { color: var(--primary-gold); }

/* EXCEL DROPZONE */
.excel-path-box {
  background: var(--gold-light);
  border: 1px solid var(--primary-gold);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.dropzone {
  border: 2px dashed var(--primary-cyan);
  background: var(--cyan-light);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover, .dropzone.dragover {
  background: #DDF3FA;
  border-color: var(--cyan-hover);
}

.dropzone-icon {
  font-size: 2.2rem;
  color: var(--primary-cyan);
  margin-bottom: 10px;
}

.dropzone h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.dropzone p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #E2E8F0;
}

.divider span {
  padding: 0 10px;
}

.export-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* FORM STYLES */
.book-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dark-charcoal);
}

.form-group input, .form-group select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary-cyan);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.empty-icon {
  font-size: 3rem;
  color: #CBD5E1;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--dark-charcoal);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--primary-cyan);
}

.toast.toast-success { border-left-color: var(--status-available); }
.toast.toast-warning { border-left-color: var(--primary-gold); }
.toast.toast-error { border-left-color: var(--accent-pink); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* -------------------------------------------------------------------------- */
/* RESPONSIVE MEDIA QUERIES                                                   */
/* -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .nav-container {
    flex-wrap: wrap;
  }
  .search-box-wrapper {
    order: 3;
    max-width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-row {
    flex-direction: column;
  }
}
