.header {
  background: #fff !important;
  background-color: #fff !important;
  border-bottom: 1px solid #dee2e6;
}
.header .logo span,
.header .toggle-sidebar-btn,
.header-nav .nav-profile,
.header-nav .nav-profile span {
  color: #000 !important;
}
.sidebar { background: #fff; }
.sidebar .nav-heading { display: none; }

.sidebar .lib-nav-dashboard > .nav-link,
.sidebar .lib-nav-dashboard > .nav-link:hover,
.sidebar .lib-nav-dashboard > .nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.sidebar .lib-nav-dashboard > .nav-link i,
.sidebar .lib-nav-dashboard > .nav-link span {
  color: #fff !important;
}
.lib-badge { background: #22c55e; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }
.opac-hero { background: linear-gradient(135deg, #15803d, #22c55e); color: #fff; padding: 40px 0; }
.book-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; height: 100%; }
.book-card h6 { font-size: 0.95rem; margin-bottom: 6px; }
.status-available { color: #059669; font-weight: 600; }
.status-issued { color: #dc2626; font-weight: 600; }

/* Dashboard */
.lib-main-dashboard {
  background: #f4f7f5;
}

.lib-dashboard-section {
  padding-top: 0;
}

.lib-dashboard {
  font-family: 'Poppins', 'Nunito', sans-serif;
}

.lib-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 22px;
  padding: 32px 34px;
  color: #fff;
  overflow: hidden;
  min-height: 210px;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.25);
}

.lib-hero-content {
  max-width: 420px;
  position: relative;
  z-index: 2;
}

.lib-hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.92;
  margin-bottom: 10px;
}

.lib-hero-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
  color: #fff;
}

.lib-hero-content p {
  font-size: 0.92rem;
  opacity: 0.92;
  margin-bottom: 18px;
}

.lib-hero-btn {
  display: inline-block;
  background: #ff6b4a;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 999px;
  transition: transform 0.2s, background 0.2s;
}

.lib-hero-btn:hover {
  background: #f45a38;
  color: #fff;
  transform: translateY(-1px);
}

.lib-hero-art {
  position: relative;
  width: 180px;
  height: 150px;
  flex-shrink: 0;
}

.lib-hero-books {
  position: relative;
  width: 100%;
  height: 100%;
}

.lib-float-book {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  backdrop-filter: blur(4px);
}

.lib-float-book.b1 { top: 10px; right: 20px; animation: libFloat 4s ease-in-out infinite; }
.lib-float-book.b2 { top: 55px; right: 70px; animation: libFloat 4.5s ease-in-out infinite 0.5s; }
.lib-float-book.b3 { top: 85px; right: 10px; animation: libFloat 5s ease-in-out infinite 1s; }

@keyframes libFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.lib-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 16px;
}

.lib-section-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

.lib-section-head a {
  color: #22c55e;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.lib-section-head a:hover {
  color: #16a34a;
}

.lib-popular-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.lib-book-tile {
  flex: 0 0 130px;
  text-decoration: none;
  color: inherit;
}

.lib-book-cover,
.lib-now-cover,
.lib-next-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 14px;
  overflow: hidden;
  background: #e8f5ec;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lib-book-cover img,
.lib-now-cover img,
.lib-next-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-book-cover-placeholder,
.lib-next-thumb.lib-book-cover-placeholder,
.lib-now-cover.lib-book-cover-placeholder {
  background: linear-gradient(145deg, #dcfce7, #bbf7d0);
  color: #16a34a;
  font-size: 2rem;
}

.lib-book-tile h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 10px 0 4px;
  line-height: 1.3;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lib-book-tile p {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-authors-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.lib-author-card {
  flex: 0 0 88px;
  text-align: center;
}

.lib-author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #22c55e;
  background: #ecfdf3;
  color: #16a34a;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.lib-author-card span {
  font-size: 0.72rem;
  color: #374151;
  display: block;
  line-height: 1.25;
}

.lib-mini-stats {
  margin-top: 28px;
}

.lib-stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  height: 100%;
}

.lib-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ecfdf3;
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.lib-stat-card strong {
  display: block;
  font-size: 1.35rem;
  color: #111827;
  line-height: 1.1;
}

.lib-stat-card span {
  font-size: 0.82rem;
  color: #6b7280;
}

.lib-side-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  margin-bottom: 18px;
}

.lib-side-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #111827;
}

.lib-now-card {
  background: linear-gradient(180deg, #ecfdf3 0%, #ffffff 45%);
}

.lib-now-cover {
  width: 110px;
  margin: 0 auto 12px;
}

.lib-now-card h4 {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lib-now-card > p {
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.lib-member-name {
  text-align: center;
  font-size: 0.8rem !important;
  color: #16a34a !important;
}

.lib-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 34px;
  margin: 16px 0;
}

.lib-wave span {
  width: 4px;
  background: #22c55e;
  border-radius: 4px;
  animation: libWave 1.2s ease-in-out infinite;
}

.lib-wave span:nth-child(1) { height: 12px; animation-delay: 0s; }
.lib-wave span:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.lib-wave span:nth-child(3) { height: 28px; animation-delay: 0.2s; }
.lib-wave span:nth-child(4) { height: 18px; animation-delay: 0.3s; }
.lib-wave span:nth-child(5) { height: 30px; animation-delay: 0.4s; }
.lib-wave span:nth-child(6) { height: 16px; animation-delay: 0.5s; }
.lib-wave span:nth-child(7) { height: 24px; animation-delay: 0.6s; }
.lib-wave span:nth-child(8) { height: 14px; animation-delay: 0.7s; }

@keyframes libWave {
  0%, 100% { transform: scaleY(0.6); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

.lib-player-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.lib-player-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d1fae5;
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
}

.lib-player-btn:hover {
  background: #ecfdf3;
  color: #15803d;
}

.lib-player-btn-main {
  width: 48px;
  height: 48px;
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
  font-size: 1.2rem;
}

.lib-player-btn-main:hover {
  background: #16a34a;
  color: #fff;
}

.lib-next-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lib-next-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fafb;
  border-radius: 14px;
  padding: 10px;
}

.lib-next-thumb {
  width: 46px;
  flex-shrink: 0;
  aspect-ratio: 3/4;
  font-size: 1rem;
}

.lib-next-meta {
  flex: 1;
  min-width: 0;
}

.lib-next-meta strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-next-meta span {
  font-size: 0.72rem;
  color: #6b7280;
}

.lib-next-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
  white-space: nowrap;
}

.lib-progress-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lib-progress-label {
  display: block;
  color: #22c55e;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.lib-progress-book {
  font-size: 2.5rem;
  color: #bbf7d0;
}

.lib-progress-ring {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.lib-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.lib-ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 3;
}

.lib-ring-fill {
  fill: none;
  stroke: #22c55e;
  stroke-width: 3;
  stroke-linecap: round;
}

.lib-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #16a34a;
}

.lib-quick-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.lib-quick-card a {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  text-decoration: none;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}

.lib-quick-card a i {
  display: block;
  font-size: 1.2rem;
  color: #22c55e;
  margin-bottom: 6px;
}

.lib-quick-card a:hover {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #16a34a;
}

.lib-side-empty {
  text-align: center;
  padding: 20px 10px;
  color: #6b7280;
}

.lib-side-empty i {
  font-size: 2rem;
  color: #bbf7d0;
  display: block;
  margin-bottom: 8px;
}

.lib-side-empty.small {
  padding: 10px 0;
}

.lib-empty-note {
  color: #6b7280;
  font-size: 0.9rem;
  padding: 12px 0;
}

/* All inner pages */
.lib-app-main {
  background: #f4f7f5;
  min-height: calc(100vh - 60px);
}

.lib-page-section {
  padding-top: 0;
}

.lib-page-content {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.lib-pagetitle {
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.lib-pagetitle h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
}

.lib-pagetitle .breadcrumb {
  margin-bottom: 0;
  font-size: 0.85rem;
}

.lib-page-content > .card,
.lib-page-content .lib-report-card,
.lib-page-content .lib-form-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 18px;
}

.lib-card-title,
.lib-report-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
}

.lib-page-content .card-body {
  padding: 22px;
}

.lib-page-content .form-label {
  font-weight: 500;
  color: #374151;
}

.lib-page-content .form-control,
.lib-page-content .form-select {
  border-radius: 10px;
  border-color: #e5e7eb;
}

.lib-page-content .form-control:focus,
.lib-page-content .form-select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.15);
}

.lib-page-content .btn-primary {
  background: #22c55e;
  border-color: #22c55e;
}

.lib-page-content .btn-primary:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.lib-page-content .btn-success {
  background: #22c55e;
  border-color: #22c55e;
}

.lib-page-content .btn-success:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.lib-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lib-data-table {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.lib-data-table thead th {
  background: #f0fdf4;
  color: #166534;
  white-space: nowrap;
  font-weight: 600;
}

.lib-data-table td {
  vertical-align: middle;
  word-break: break-word;
}

.lib-page-content .alert {
  border-radius: 12px;
}

.lib-page-content .row.g-3 > .col-md-6 > .card,
.lib-page-content .row.g-3 > .col-md-4 > .card,
.lib-page-content .row.g-3 > [class*="col-"] > .card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  height: 100%;
}

.lib-page-content .row.g-3 h2,
.lib-page-content .row.g-3 h6 {
  color: #111827;
}

.lib-footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.sidebar .nav-content a.active {
  color: #16a34a;
}

@media (max-width: 1199px) {
  .sidebar { left: -300px; }
  .toggle-sidebar .sidebar { left: 0; }
}

@media (max-width: 991px) {
  .lib-hero-card {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }

  .lib-hero-content {
    max-width: none;
  }

  .lib-hero-art {
    width: 140px;
    height: 100px;
  }
}

@media (max-width: 575px) {
  .lib-hero-content h2 {
    font-size: 1.25rem;
  }

  .lib-book-tile {
    flex-basis: 110px;
  }
}

@media print {
  .header, .sidebar, .back-to-top, .no-print { display: none !important; }
  #main { margin: 0 !important; }
}
