*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

:root {
  --navy:        #0f1923;
  --navy-mid:    #1a2a3a;
  --navy-light:  #243447;
  --blue:        #1a56db;
  --blue-lt:     #e8f0fe;
  --blue-mid:    #b3c8f7;
  --gold:        #f1c40f;
  --gold-lt:     #fef9e7;
  --green:       #16a34a;
  --green-lt:    #dcfce7;
  --red:         #dc2626;
  --red-lt:      #fee2e2;
  --amber:       #d97706;
  --amber-lt:    #fef3c7;
  --teal:        #0d9488;
  --teal-lt:     #ccfbf1;
  --purple:      #7c3aed;
  --purple-lt:   #ede9fe;
  --bg:          #f0f2f5;
  --surface:     #ffffff;
  --border:      #e2e8f0;
  --text:        #111827;
  --text-sub:    #6b7280;
  --text-hint:   #9ca3af;
  --sidebar-w:   280px;
}

html, body { 
  height: 100%; 
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
 DASHBOARD WRAPPER
 ============================================ */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ============================================
 SIDEBAR (sidebar_admin.php)
 ============================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

/* Sidebar Brand */
.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--gold);
  stroke-width: 1.5;
  fill: none;
}

.brand-text strong {
  display: block;
  font-size: 18px;
  font-family: 'Playfair Display', serif;
  color: white;
}

.brand-text span {
  font-size: 11px;
  color: var(--gold);
  opacity: 0.8;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.nav-section-label {
  padding: 12px 20px 6px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 0;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.nav-item.active {
  background: rgba(26,86,219,0.3);
  color: white;
  border-left: 3px solid var(--blue);
}

.nav-item.logout {
  margin-top: 20px;
  color: #f87171;
}

.nav-item.logout:hover {
  background: #dc2626;
  color: white;
}

/* Sidebar User Info */
.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: white;
}

.user-meta {
  flex: 1;
}

.user-meta strong {
  display: block;
  font-size: 13px;
  color: white;
}

.user-meta span {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

/* ============================================
 MAIN CONTENT (topbar_admin.php)
 ============================================ */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
 TOPBAR (topbar_admin.php)
 ============================================ */
.topbar {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.topbar-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-time {
  font-size: 13px;
  color: var(--text-sub);
  font-family: 'DM Mono', monospace;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 20px;
}

.badge-login {
  background: var(--green-lt);
  color: var(--green);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.user-profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 30px;
  transition: background 0.2s;
}

.user-profile-link:hover {
  background: #f1f5f9;
}

.user-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
 CONTENT AREA
 ============================================ */
.content {
  flex: 1;
  padding: 0;
}

/* ============================================
 HERO SECTION
 ============================================ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 32px;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 12px;
  font-family: 'Playfair Display', serif;
}

.hero p {
  opacity: 0.9;
  font-size: 14px;
  max-width: 500px;
}

/* ============================================
 SECTION LABEL
 ============================================ */
.section-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  margin-top: 20px;
  padding-left: 4px;
}

/* ============================================
 STAT CARDS
 ============================================ */
.cards-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stat-card-icon {
  font-size: 40px;
}

.stat-card-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--text-sub);
  font-weight: 500;
}

.stat-card-num {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-sub);
}

.stat-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: gap 0.2s;
}

.stat-card-link:hover {
  gap: 10px;
}

/* Card Color Variants */
.c-blue .stat-card-num { color: var(--blue); }
.c-green .stat-card-num { color: var(--green); }
.c-red .stat-card-num { color: var(--red); }
.c-amber .stat-card-num { color: var(--amber); }

/* ============================================
 MINI CARDS
 ============================================ */
.cards-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.mini-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mini-card-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--blue);
}

.mini-card-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 6px;
}

/* ============================================
 BOTTOM GRID
 ============================================ */
.bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.panel {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.panel-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.panel-body {
  padding: 20px 24px;
}

/* Quick Links */
.quick-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-link {
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.quick-link:hover {
  background: var(--blue);
  color: white;
  transform: translateX(6px);
}

/* Activity Items */
.activity-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-item:first-child {
  padding-top: 0;
}

.activity-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.activity-text strong {
  color: var(--blue);
}

/* ============================================
 FORM STYLES (akun.php)
 ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.form-group input:read-only {
  background: #f8fafc;
  cursor: not-allowed;
}

.info-text {
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 6px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: #0e4bc0;
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--amber);
  color: white;
}

.btn-warning:hover {
  background: #b85d00;
}

.btn-danger {
  background: var(--red);
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.alert-success {
  background: var(--green-lt);
  color: var(--green);
  border-left: 4px solid var(--green);
}

.alert-danger {
  background: var(--red-lt);
  color: var(--red);
  border-left: 4px solid var(--red);
}

.alert-info {
  background: var(--blue-lt);
  color: var(--blue);
  border-left: 4px solid var(--blue);
}

/* ============================================
 TABLE STYLES
 ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.action-edit {
  background: var(--amber-lt);
  color: var(--amber);
}

.action-edit:hover {
  background: var(--amber);
  color: white;
}

.action-delete {
  background: var(--red-lt);
  color: var(--red);
}

.action-delete:hover {
  background: var(--red);
  color: white;
}

.action-view {
  background: var(--blue-lt);
  color: var(--blue);
}

.action-view:hover {
  background: var(--blue);
  color: white;
}

/* ============================================
 SEARCH & FILTER
 ============================================ */
.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-box input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
}

.search-box button {
  padding: 10px 20px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

/* ============================================
 PAGINATION
 ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
}

.pagination a {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.pagination a:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.pagination .active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

/* ============================================
 FOOTER (footer.php)
 ============================================ */
footer {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
}

footer span:first-child {
  font-family: 'DM Mono', monospace;
}

footer span:last-child {
  font-weight: 500;
}

/* ============================================
 RESPONSIVE DESIGN
 ============================================ */
@media (max-width: 1024px) {
  .cards-main {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .cards-mini {
      grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
      transform: translateX(-100%);
      position: fixed;
      z-index: 1000;
  }
  
  .sidebar.open {
      transform: translateX(0);
  }
  
  .main {
      margin-left: 0;
  }
  
  .topbar {
      flex-direction: column;
      gap: 12px;
      text-align: center;
  }
  
  .topbar-right {
      flex-wrap: wrap;
      justify-content: center;
  }
  
  .cards-main {
      grid-template-columns: 1fr;
  }
  
  .cards-mini {
      grid-template-columns: repeat(3, 1fr);
  }
  
  .bottom-grid {
      grid-template-columns: 1fr;
  }
  
  .hero h1 {
      font-size: 22px;
  }
  
  .hero p {
      font-size: 13px;
  }
  
  .stat-card-num {
      font-size: 32px;
  }
  
  footer {
      flex-direction: column;
      text-align: center;
  }
}

@media (max-width: 480px) {
  .cards-mini {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .user-profile-link .user-name {
      display: none;
  }
  
  .topbar-time {
      font-size: 11px;
      padding: 4px 8px;
  }
  
  .panel-header,
  .panel-body {
      padding: 16px;
  }
  
  .stat-card {
      padding: 16px;
  }
  
  .hero {
      padding: 24px;
  }
}

/* ============================================
 ANIMATIONS
 ============================================ */
@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.stat-card, .mini-card, .panel, .hero {
  animation: fadeInUp 0.4s ease forwards;
}

/* Stagger animation delays */
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* ============================================
 SCROLLBAR STYLING
 ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

/* ============================================
 UTILITY CLASSES
 ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }

/* ============================================
 ANGGOTA PAGE SPECIFIC STYLES
 ============================================ */

/* Badge styles untuk status akun */
.badge-aktif {
  background: #d5f4e6;
  color: #27ae60;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.badge-nonaktif {
  background: #fee2e2;
  color: #e74c3c;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.badge-pinjam {
  background: #fee2e2;
  color: #e74c3c;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.badge-kembali {
  background: #d5f4e6;
  color: #27ae60;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

/* Detail Section */
.detail-section {
  margin-bottom: 30px;
}

.detail-section h4 {
  color: #333;
  border-bottom: 2px solid #1a56db;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-top: 3px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.detail-table th {
  background: #f0f2f5;
  padding: 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border: 1px solid #ddd;
}

.detail-table td {
  padding: 8px 10px;
  border: 1px solid #ddd;
}

.empty-data {
  text-align: center;
  padding: 30px;
  color: #999;
}

.book-count {
  font-size: 13px;
  color: #e74c3c;
  font-weight: bold;
}

.loading {
  text-align: center;
  padding: 20px;
}

.loading::after {
  content: "...";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: "."; }
  40% { content: ".."; }
  60%, 100% { content: "..."; }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-large {
  max-width: 900px;
  width: 90%;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #fafbfc;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
}

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .form-row {
      grid-template-columns: 1fr;
      gap: 12px;
  }
}

/* Content Header */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 640px) {
  .content-header {
      flex-direction: column;
      align-items: stretch;
  }
  
  .content-header .search-box {
      width: 100%;
  }
}

/* ============================================
 BUKU PAGE SPECIFIC STYLES
 ============================================ */

/* Book Cover */
.book-cover {
  width: 50px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f2f5;
}

.book-cover.no-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: #e2e8f0;
}

.cover-preview {
  max-width: 100px;
  max-height: 120px;
  margin-top: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Badge Status Buku */
.badge-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.badge-tersedia { 
  background: #dcfce7; 
  color: #16a34a; 
}

.badge-dipinjam { 
  background: #fef3c7; 
  color: #d97706; 
}

.badge-rusak { 
  background: #fee2e2; 
  color: #dc2626; 
}

.badge-hilang { 
  background: #f3f4f6; 
  color: #6b7280; 
}

.badge-menunggu {
  background: #ede9fe;
  color: #7c3aed;
}

/* Stok Detail */
.stok-detail {
  font-size: 12px;
  line-height: 1.6;
}

.stok-tersedia {
  color: #16a34a;
  font-weight: 600;
}

.stok-dipinjam {
  color: #d97706;
}

.stok-rusak {
  color: #dc2626;
}

.stok-hilang {
  color: #6b7280;
}

.stok-menunggu {
  color: #8b5cf6;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: #16a34a;
  border-radius: 3px;
}

/* Modal Large */
.modal-large {
  max-width: 700px;
  width: 90%;
}

/* Responsive untuk tabel buku */
@media (max-width: 1024px) {
  .data-table {
      font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
      padding: 10px 12px;
  }
  
  .book-cover {
      width: 40px;
      height: 48px;
  }
}

@media (max-width: 768px) {
  .stok-detail {
      font-size: 10px;
  }
  
  .badge-status {
      font-size: 9px;
      padding: 3px 8px;
  }
}

.tab-container {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 8px 8px 0 0;
}
.tab-btn:hover {
  color: var(--blue);
  background: var(--blue-lt);
}
.tab-btn.active {
  color: var(--blue);
  border-bottom: 3px solid var(--blue);
  background: var(--blue-lt);
}
.badge-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.badge-menunggu { background: #fef3c7; color: #d97706; }
.badge-dipinjam { background: #dbeafe; color: #1d4ed8; }
.badge-kembali { background: #dcfce7; color: #16a34a; }
.badge-ditolak { background: #fee2e2; color: #dc2626; }
.detail-buku {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}
.info-member {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
  font-size: 12px;
}
.btn-approve {
  background: var(--green);
  color: white;
}
.btn-approve:hover {
  background: #15803d;
}
.btn-reject {
  background: var(--red);
  color: white;
}
.btn-reject:hover {
  background: #b91c1c;
}
.badge-denda {
  background: #fee2e2;
  color: #dc2626;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  margin-left: 5px;
}
.info-denda {
  background: #fef3c7;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 10px;
}
.text-red {
  color: #dc2626;
  font-weight: bold;
}

/* ============================================
 PENGEMBALIAN PAGE SPECIFIC STYLES
 ============================================ */

/* Stats Grid for Pengembalian */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-mini-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.stat-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-mini-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-mini-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 6px;
}

/* Badge untuk Pengembalian */
.badge-menunggu { 
  background: #fef3c7; 
  color: #d97706; 
}

.badge-diterima { 
  background: #dcfce7; 
  color: #16a34a; 
}

.badge-ditolak { 
  background: #fee2e2; 
  color: #dc2626; 
}

.badge-baik { 
  background: #dcfce7; 
  color: #16a34a; 
}

.badge-rusak { 
  background: #fef3c7; 
  color: #d97706; 
}

.badge-hilang { 
  background: #fee2e2; 
  color: #dc2626; 
}

.badge-tepat {
  background: #dcfce7;
  color: #16a34a;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  display: inline-block;
}

/* Filter Box */
.filter-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.filter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-form input,
.filter-form select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: white;
}

.filter-form input:focus,
.filter-form select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26,86,219,0.1);
}

/* Detail Section */
.detail-section {
  margin-bottom: 24px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Button Danger */
.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
  .stats-grid {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .filter-form {
      width: 100%;
  }
  
  .filter-form input,
  .filter-form select {
      flex: 1;
      min-width: 120px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
      grid-template-columns: 1fr;
  }
  
  .filter-form {
      flex-direction: column;
  }
  
  .filter-form input,
  .filter-form select,
  .filter-form button,
  .filter-form a {
      width: 100%;
  }
}

/* ============================================
 LAPORAN PAGE SPECIFIC STYLES
 ============================================ */

/* Filter Card */
.filter-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.filter-group {
  flex: 1;
  min-width: 150px;
}

.filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 5px;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26,86,219,0.1);
}

.btn-filter {
  background: var(--blue);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
}

.btn-filter:hover {
  background: #0e4bc0;
  transform: translateY(-1px);
}

/* Action Buttons in Laporan */
.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-print {
  background: #6b7280;
  color: white;
  text-decoration: none;
}

.btn-print:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.btn-excel {
  background: #10b981;
  color: white;
  text-decoration: none;
}

.btn-excel:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Laporan Header */
.laporan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  gap: 12px;
}

.laporan-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* Badge Status untuk Laporan */
.badge-tersedia { background: #dcfce7; color: #16a34a; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-dipinjam { background: #fef3c7; color: #d97706; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-rusak { background: #fee2e2; color: #dc2626; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-hilang { background: #f3f4f6; color: #6b7280; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-menunggu { background: #fef3c7; color: #d97706; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-diterima { background: #dcfce7; color: #16a34a; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-ditolak { background: #fee2e2; color: #dc2626; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-kembali { background: #dcfce7; color: #16a34a; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-baik { background: #dcfce7; color: #16a34a; display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }

/* Text Danger */
.text-danger {
  color: #dc2626;
  font-weight: bold;
}

/* Print CSS untuk Cetak PDF */
@media print {
  .sidebar, .top-bar, .filter-card, .action-buttons, .pagination, .btn-add, .search-box, .btn-filter, .user-info {
      display: none !important;
  }
  
  .main-content {
      margin-left: 0 !important;
      padding: 0 !important;
  }
  
  .dashboard-wrapper {
      display: block !important;
  }
  
  .panel {
      box-shadow: none !important;
      margin: 0 !important;
      border: 1px solid #ddd !important;
  }
  
  .content {
      padding: 0 !important;
  }
  
  .laporan-header {
      margin-bottom: 10px;
  }
  
  .data-table th, 
  .data-table td {
      padding: 6px;
      font-size: 10px;
  }
  
  body {
      margin: 0;
      padding: 10px;
  }
  
  .badge-status, .badge-aktif, .badge-nonaktif, .badge-warning {
      border: 1px solid #ccc;
      background: #f5f5f5 !important;
      color: #333 !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .filter-form {
      flex-direction: column;
  }
  
  .filter-group {
      width: 100%;
  }
  
  .laporan-header {
      flex-direction: column;
      align-items: flex-start;
  }
  
  .action-buttons {
      flex-direction: column;
  }
  
  .action-buttons .btn,
  .action-buttons a {
      width: 100%;
      text-align: center;
  }
}

/* ============================================
   DASHBOARD USER PAGE STYLES
   ============================================ */

/* Hero Section untuk User Dashboard */
.dashboard-user .hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 32px;
  color: white;
  position: relative;
  overflow: hidden;
}

.dashboard-user .hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.dashboard-user .hero-inner {
  position: relative;
  z-index: 1;
}

.dashboard-user .hero h1 {
  font-size: 28px;
  margin-bottom: 12px;
  font-family: 'Playfair Display', serif;
}

.dashboard-user .hero p {
  opacity: 0.9;
  font-size: 14px;
  max-width: 500px;
}

/* Section Label */
.dashboard-user .section-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  margin-top: 20px;
  padding-left: 4px;
}

/* Stat Cards */
.dashboard-user .cards-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.dashboard-user .stat-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-user .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

.dashboard-user .stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dashboard-user .stat-card-icon {
  font-size: 40px;
}

.dashboard-user .stat-card-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--text-sub);
  font-weight: 500;
}

.dashboard-user .stat-card-num {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1;
}

.dashboard-user .stat-card-label {
  font-size: 13px;
  color: var(--text-sub);
}

.dashboard-user .stat-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: gap 0.2s;
}

.dashboard-user .stat-card-link:hover {
  gap: 10px;
}

/* Card Color Variants */
.dashboard-user .c-blue .stat-card-num { color: var(--blue); }
.dashboard-user .c-green .stat-card-num { color: var(--green); }
.dashboard-user .c-red .stat-card-num { color: var(--red); }
.dashboard-user .c-amber .stat-card-num { color: var(--amber); }

/* Mini Cards */
.dashboard-user .cards-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.dashboard-user .mini-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.dashboard-user .mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dashboard-user .mini-card-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--blue);
}

.dashboard-user .mini-card-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 6px;
}

/* Bottom Grid */
.dashboard-user .bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-user .panel {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.dashboard-user .panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.dashboard-user .panel-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.dashboard-user .panel-body {
  padding: 20px 24px;
}

/* Quick Links */
.dashboard-user .quick-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-user .quick-link {
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.dashboard-user .quick-link:hover {
  background: var(--blue);
  color: white;
  transform: translateX(6px);
}

/* Activity Items */
.dashboard-user .activity-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.dashboard-user .activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dashboard-user .activity-item:first-child {
  padding-top: 0;
}

.dashboard-user .activity-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.dashboard-user .activity-text strong {
  color: var(--blue);
}

/* Animations */
@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.dashboard-user .stat-card,
.dashboard-user .mini-card,
.dashboard-user .panel,
.dashboard-user .hero {
  animation: fadeInUp 0.4s ease forwards;
}

/* Stagger animation delays */
.dashboard-user .stat-card:nth-child(1) { animation-delay: 0.05s; }
.dashboard-user .stat-card:nth-child(2) { animation-delay: 0.1s; }
.dashboard-user .stat-card:nth-child(3) { animation-delay: 0.15s; }
.dashboard-user .stat-card:nth-child(4) { animation-delay: 0.2s; }

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-user .cards-main {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-user .cards-mini {
      grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-user .hero h1 {
      font-size: 22px;
  }
  
  .dashboard-user .hero p {
      font-size: 13px;
  }
  
  .dashboard-user .cards-main {
      grid-template-columns: 1fr;
  }
  
  .dashboard-user .cards-mini {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-user .bottom-grid {
      grid-template-columns: 1fr;
  }
  
  .dashboard-user .stat-card-num {
      font-size: 32px;
  }
  
  .dashboard-user .stat-card-icon {
      font-size: 32px;
  }
}

@media (max-width: 480px) {
  .dashboard-user .cards-mini {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-user .panel-header,
  .dashboard-user .panel-body {
      padding: 16px;
  }
  
  .dashboard-user .stat-card {
      padding: 16px;
  }
  
  .dashboard-user .hero {
      padding: 24px;
  }
  
  .dashboard-user .hero h1 {
      font-size: 18px;
  }
  
  .dashboard-user .hero p {
      font-size: 12px;
  }
}

/* ============================================
   PERBAIKAN LAYOUT UNTUK SEMUA HALAMAN USER
   ============================================ */

/* Pastikan body dan html memiliki height yang benar */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Sidebar harus fixed */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--navy);
  color: white;
  overflow-y: auto;
  z-index: 1000;
}

/* Main content harus memiliki margin kiri sesuai sidebar */
.main {
  margin-left: var(--sidebar-w);
  padding: 20px;
  min-height: 100vh;
  width: calc(100% - var(--sidebar-w));
  background: var(--bg);
}

/* Content wrapper */
.content {
  padding: 0;
  width: 100%;
}

/* Profile Grid - 2 columns */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

/* Profile Card */
.profile-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.card-header-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-lt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: 24px;
}

/* Form styling */
.profile-form .form-group {
  margin-bottom: 20px;
}

.profile-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.profile-form input,
.profile-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.profile-form input:focus,
.profile-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-hint {
  display: block;
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 6px;
}

/* Username Display */
.username-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.username-value {
  font-size: 14px;
  font-weight: 500;
}

.username-badge {
  font-size: 11px;
  color: var(--text-hint);
  background: #eef2f6;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Password Field */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  flex: 1;
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  border-radius: 8px;
  transition: all 0.2s;
  color: var(--text-hint);
}

.toggle-password:hover {
  background: #f1f5f9;
}

/* Password Strength */
.password-strength {
  font-size: 11px;
  margin-top: 6px;
}

.password-strength.weak { color: #dc2626; }
.password-strength.medium { color: #f59e0b; }
.password-strength.strong { color: #10b981; }

/* Tips Box */
.tips-box {
  background: var(--amber-lt);
  border-left: 4px solid var(--amber);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
}

.tips-icon { font-size: 18px; }
.tips-content { font-size: 12px; color: #92400e; flex: 1; }
.tips-content strong { display: block; margin-bottom: 8px; color: #78350f; }
.tips-content ul { margin: 0; padding-left: 20px; }
.tips-content li { margin: 4px 0; }

/* Info Box */
.info-box {
  background: var(--blue-lt);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
}

.info-box-icon { font-size: 18px; }
.info-box-content { font-size: 13px; color: var(--blue); flex: 1; }
.info-box-content strong { color: #1e40af; }

/* Info Card Full Width */
.info-card-full {
  background: white;
  border-radius: 20px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.info-card-full-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.info-card-full-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-lt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.info-card-full-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.info-card-full-body {
  padding: 24px;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
}

.info-item.full-width {
  grid-column: span 2;
}

.info-label {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

/* Anggota Section */
.anggota-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.anggota-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Stats Card */
.stats-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stats-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.stats-card-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-lt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stats-card-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.stats-card-body {
  padding: 24px;
}

/* Stats Mini Grid */
.stats-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-mini {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 16px;
}

.stat-mini-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.stat-mini-value.text-warning { color: var(--amber); }
.stat-mini-value.text-danger { color: var(--red); }

.stat-mini-label {
  font-size: 12px;
  color: var(--text-sub);
}

/* Stats Actions */
.stats-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: #0e4bc0;
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--amber);
  color: white;
}

.btn-warning:hover {
  background: #b85d00;
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: var(--green-lt);
  color: var(--green);
  border-left: 4px solid var(--green);
}

.alert-danger {
  background: var(--red-lt);
  color: var(--red);
  border-left: 4px solid var(--red);
}

/* Role Badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--blue-lt);
  color: var(--blue);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-active {
  background: var(--green-lt);
  color: var(--green);
}

/* ============================================
 RESPONSIVE UNTUK PROFIL PAGE
 ============================================ */

@media (max-width: 768px) {
  .sidebar {
      transform: translateX(-100%);
      position: fixed;
      z-index: 1000;
  }
  
  .sidebar.open {
      transform: translateX(0);
  }
  
  .main {
      margin-left: 0;
      width: 100%;
      padding: 16px;
  }
  
  .profile-grid {
      grid-template-columns: 1fr;
      gap: 16px;
  }
  
  .info-grid {
      grid-template-columns: 1fr;
  }
  
  .info-item.full-width {
      grid-column: span 1;
  }
  
  .stats-mini-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-mini-grid {
      grid-template-columns: 1fr;
  }
  
  .username-display {
      flex-direction: column;
      gap: 8px;
      text-align: center;
  }
  
  .tips-box {
      flex-direction: column;
      text-align: center;
  }
  
  .tips-content ul {
      text-align: left;
  }
  
  .info-box {
      flex-direction: column;
      text-align: center;
  }
  
  .stats-actions {
      flex-direction: column;
  }
  
  .stats-actions .btn {
      width: 100%;
      justify-content: center;
  }
}

/* ============================================
   KATALOG PAGE STYLES
   ============================================ */

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  color: white;
}

.page-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
}

.page-header p {
  opacity: 0.9;
  font-size: 14px;
}

/* Filter Section */
.filter-section {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.filter-group {
  flex: 1;
  min-width: 150px;
}

.search-group {
  flex: 2;
  min-width: 200px;
}

.search-input-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-hint);
}

.filter-group input,
.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}

.search-input-wrapper input {
  padding-left: 35px;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26,86,219,0.1);
}

.btn-filter {
  background: var(--blue);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
  transition: all 0.2s;
}

.btn-filter:hover {
  background: #0e4bc0;
}

.btn-reset {
  display: inline-block;
  background: #e2e8f0;
  color: var(--text);
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  margin-top: 5px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-reset:hover {
  background: #cbd5e1;
}

/* Result Info */
.result-info {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-sub);
}

/* Buku Grid */
.buku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.buku-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.buku-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.buku-card-cover {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-emoji {
  font-size: 64px;
  opacity: 0.7;
}

.buku-status {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-tersedia {
  background: #dcfce7;
  color: #16a34a;
}

.badge-dipinjam {
  background: #fef3c7;
  color: #d97706;
}

.badge-rusak {
  background: #fee2e2;
  color: #dc2626;
}

.buku-card-info {
  padding: 16px;
  flex: 1;
}

.buku-judul {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.buku-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 12px;
  color: var(--text-sub);
}

.buku-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.detail-item {
  font-size: 11px;
  color: var(--text-hint);
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
}

.buku-sinopsis {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.buku-card-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.btn-detail,
.btn-pinjam {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-detail {
  background: #f1f5f9;
  color: var(--text);
  border: none;
}

.btn-detail:hover {
  background: #e2e8f0;
}

.btn-pinjam {
  background: var(--blue);
  color: white;
  border: none;
}

.btn-pinjam:hover {
  background: #0e4bc0;
  transform: translateY(-1px);
}

.btn-pinjam.disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.btn-pinjam.disabled:hover {
  transform: none;
}

.btn-pinjam.in-cart {
  background: #10b981;
  cursor: default;
}

.btn-pinjam.in-cart:hover {
  transform: none;
}

/* Floating Cart Button */
.cart-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 999;
}

.cart-floating-btn:hover {
  transform: scale(1.1);
  background: #0e4bc0;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #dc2626;
  color: white;
  font-size: 12px;
  font-weight: bold;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.alert-success {
  background: #dcfce7;
  color: #16a34a;
  border-left: 4px solid #16a34a;
}

.alert-danger {
  background: #fee2e2;
  color: #dc2626;
  border-left: 4px solid #dc2626;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 20px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-large {
  max-width: 700px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-sub);
}

/* Detail Buku Modal */
.detail-buku-modal .detail-cover {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.detail-cover-placeholder {
  width: 150px;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-cover-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.detail-cover-placeholder span {
  font-size: 64px;
}

.detail-info h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--text);
}

.detail-info p {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.detail-info p strong {
  color: var(--text-sub);
  min-width: 100px;
  display: inline-block;
}

.badge-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* Cart Item */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
}

.cart-item-id {
  font-size: 11px;
  color: var(--text-hint);
}

.remove-item {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.remove-item:hover {
  background: #dc2626;
  color: white;
}

.cart-summary {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 2px solid var(--border);
  text-align: center;
}

.cart-summary p {
  margin-bottom: 15px;
  color: var(--text-sub);
  font-size: 13px;
}

.btn-checkout {
  background: #10b981;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.btn-checkout:hover {
  background: #059669;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.page-link {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.page-link:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.page-link.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.page-dots {
  padding: 8px 14px;
  color: var(--text-sub);
}

/* Responsive */
@media (max-width: 768px) {
  .filter-form {
      flex-direction: column;
  }
  
  .filter-group {
      width: 100%;
  }
  
  .buku-grid {
      grid-template-columns: 1fr;
  }
  
  .page-header {
      padding: 24px;
  }
  
  .page-header h2 {
      font-size: 20px;
  }
  
  .cart-floating-btn {
      bottom: 20px;
      right: 20px;
      width: 50px;
      height: 50px;
      font-size: 20px;
  }
  
  .modal-content {
      width: 95%;
  }
}

@media (max-width: 480px) {
  .detail-info p strong {
      min-width: 80px;
  }
  
  .buku-card-actions {
      flex-direction: column;
  }
  
  .btn-detail,
  .btn-pinjam {
      width: 100%;
  }
}

/* ============================================
   RIWAYAT PAGE STYLES (user/riwayat.php)
   ============================================ */

/* Header Riwayat */
.riwayat-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  color: white;
}

.riwayat-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
}

.riwayat-header p {
  opacity: 0.9;
  font-size: 14px;
}

/* Statistik Cards */
.riwayat-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card-mini {
  background: white;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.stat-card-mini:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
  font-size: 36px;
}

.stat-info {
  flex: 1;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-number.text-warning {
  color: var(--amber);
}

.stat-number.text-primary {
  color: var(--blue);
}

.stat-number.text-success {
  color: var(--green);
}

.stat-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* Filter Section */
.riwayat-filter {
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-form-simple {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-form-simple select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: white;
  min-width: 200px;
}

.filter-form-simple select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26,86,219,0.1);
}

.btn-reset-small {
  display: inline-block;
  background: #e2e8f0;
  color: var(--text);
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-reset-small:hover {
  background: #cbd5e1;
}

/* Result Info */
.result-info {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-sub);
}

/* Riwayat List */
.riwayat-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.riwayat-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.riwayat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.riwayat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
}

.riwayat-id .label {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.riwayat-id strong {
  font-size: 16px;
  color: var(--text);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
}

.status-menunggu {
  background: #fef3c7;
  color: #d97706;
}

.status-dipinjam {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-kembali {
  background: #dcfce7;
  color: #16a34a;
}

.status-ditolak {
  background: #fee2e2;
  color: #dc2626;
}

.riwayat-card-body {
  padding: 20px 24px;
}

.riwayat-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.info-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.info-value.text-danger {
  color: #dc2626;
}

.overdue-badge {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 8px;
}

.riwayat-buku {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
}

.buku-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.buku-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.buku-item {
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text);
  border: 1px solid var(--border);
}

.riwayat-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.btn-detail {
  background: #f1f5f9;
  color: var(--text);
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-detail:hover {
  background: #e2e8f0;
}

.btn-pinjam-lagi {
  background: var(--blue);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-pinjam-lagi:hover {
  background: #0e4bc0;
  transform: translateY(-1px);
}

/* Modal Medium */
.modal-medium {
  max-width: 550px;
}

/* Detail Modal Content */
.detail-section {
  margin-bottom: 24px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-info-label {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.status-badge-small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.detail-buku-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-buku-item {
  background: #f8fafc;
  padding: 12px;
  border-radius: 12px;
}

.detail-buku-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.detail-buku-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-hint);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.btn-primary {
  background: var(--blue);
  color: white;
  padding: 10px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #0e4bc0;
  transform: translateY(-1px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.page-link {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.page-link:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.page-link.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.page-dots {
  padding: 8px 14px;
  color: var(--text-sub);
}

/* Responsive */
@media (max-width: 1024px) {
  .riwayat-stats {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .riwayat-header {
      padding: 24px;
  }
  
  .riwayat-header h2 {
      font-size: 20px;
  }
  
  .riwayat-stats {
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
  }
  
  .stat-card-mini {
      padding: 14px;
  }
  
  .stat-icon {
      font-size: 28px;
  }
  
  .stat-number {
      font-size: 22px;
  }
  
  .riwayat-card-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
  }
  
  .riwayat-info {
      grid-template-columns: 1fr;
  }
  
  .detail-info-grid {
      grid-template-columns: 1fr;
  }
  
  .riwayat-card-footer {
      flex-direction: column;
  }
  
  .btn-detail,
  .btn-pinjam-lagi {
      width: 100%;
      text-align: center;
  }
}

@media (max-width: 480px) {
  .riwayat-stats {
      grid-template-columns: 1fr;
  }
  
  .filter-form-simple {
      flex-direction: column;
  }
  
  .filter-form-simple select {
      width: 100%;
  }
  
  .btn-reset-small {
      width: 100%;
      text-align: center;
  }
  
  .buku-list {
      flex-direction: column;
  }
  
  .buku-item {
      width: fit-content;
  }
}

/* ============================================
   DENDA PAGE STYLES (user/denda.php)
   ============================================ */

/* Header Denda */
.denda-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  color: white;
}

.denda-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
}

.denda-header p {
  opacity: 0.9;
  font-size: 14px;
}

/* Statistik Cards Denda */
.denda-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card-denda {
  background: white;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.stat-card-denda:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card-denda .stat-icon {
  font-size: 36px;
}

.stat-card-denda .stat-info {
  flex: 1;
}

.stat-card-denda .stat-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card-denda .stat-number.text-danger {
  color: #dc2626;
}

.stat-card-denda .stat-number.text-warning {
  color: var(--amber);
}

.stat-card-denda .stat-number.text-success {
  color: var(--green);
}

.stat-card-denda .stat-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* Info Denda Card */
.info-denda-card {
  background: #fef3c7;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  border-left: 4px solid var(--amber);
}

.info-denda-icon {
  font-size: 28px;
}

.info-denda-content {
  flex: 1;
  font-size: 13px;
  color: #92400e;
}

.info-denda-content strong {
  display: block;
  margin-bottom: 8px;
  color: #78350f;
}

.info-denda-content ul {
  margin: 0;
  padding-left: 20px;
}

.info-denda-content li {
  margin: 4px 0;
}

/* Filter Section */
.denda-filter {
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-form-simple {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-form-simple select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: white;
  min-width: 200px;
}

.filter-form-simple select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26,86,219,0.1);
}

.btn-reset-small {
  display: inline-block;
  background: #e2e8f0;
  color: var(--text);
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-reset-small:hover {
  background: #cbd5e1;
}

/* Result Info */
.result-info {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-sub);
}

/* Denda List */
.denda-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.denda-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.denda-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.denda-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
}

.denda-id .label {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.denda-id strong {
  font-size: 16px;
  color: var(--text);
}

.status-badge-denda {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
}

.status-lunas {
  background: #dcfce7;
  color: #16a34a;
}

.status-belum-lunas {
  background: #fee2e2;
  color: #dc2626;
}

.denda-card-body {
  padding: 20px 24px;
}

.denda-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.info-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.info-value.text-warning {
  color: var(--amber);
}

.info-value.text-danger {
  color: #dc2626;
}

.denda-buku {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.buku-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.buku-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.buku-item {
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text);
  border: 1px solid var(--border);
}

.denda-keterangan {
  background: #fef3c7;
  border-radius: 12px;
  padding: 12px 16px;
}

.keterangan-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 6px;
}

.denda-keterangan p {
  font-size: 13px;
  color: #78350f;
  margin: 0;
}

.denda-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-detail {
  background: #f1f5f9;
  color: var(--text);
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-detail:hover {
  background: #e2e8f0;
}

.info-payment {
  background: #dbeafe;
  padding: 8px 16px;
  border-radius: 10px;
}

.payment-hint {
  font-size: 12px;
  color: #1e40af;
}

/* Modal Medium */
.modal-medium {
  max-width: 550px;
}

/* Detail Modal Content for Denda */
.detail-section {
  margin-bottom: 24px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-info-label {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.status-badge-small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.detail-buku-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-buku-item {
  background: #f8fafc;
  padding: 12px;
  border-radius: 12px;
}

.detail-buku-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.detail-buku-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-hint);
}

.detail-keterangan {
  background: #fef3c7;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: #92400e;
}

.alert-info-payment {
  background: #dbeafe;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: #1e40af;
}

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.alert-danger {
  background: #fee2e2;
  color: #dc2626;
  border-left: 4px solid #dc2626;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.page-link {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.page-link:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.page-link.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.page-dots {
  padding: 8px 14px;
  color: var(--text-sub);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.btn-primary {
  background: var(--blue);
  color: white;
  padding: 10px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #0e4bc0;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 1024px) {
  .denda-stats {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .detail-info-grid {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .denda-header {
      padding: 24px;
  }
  
  .denda-header h2 {
      font-size: 20px;
  }
  
  .denda-stats {
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
  }
  
  .stat-card-denda {
      padding: 14px;
  }
  
  .stat-card-denda .stat-icon {
      font-size: 28px;
  }
  
  .stat-card-denda .stat-number {
      font-size: 22px;
  }
  
  .denda-card-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
  }
  
  .denda-info {
      grid-template-columns: 1fr;
  }
  
  .denda-card-footer {
      flex-direction: column;
  }
  
  .btn-detail {
      width: 100%;
      text-align: center;
  }
  
  .info-payment {
      width: 100%;
      text-align: center;
  }
}

@media (max-width: 480px) {
  .denda-stats {
      grid-template-columns: 1fr;
  }
  
  .filter-form-simple {
      flex-direction: column;
  }
  
  .filter-form-simple select {
      width: 100%;
  }
  
  .btn-reset-small {
      width: 100%;
      text-align: center;
  }
  
  .buku-list {
      flex-direction: column;
  }
  
  .buku-item {
      width: fit-content;
  }
  
  .info-denda-card {
      flex-direction: column;
  }
  
  .info-denda-icon {
      text-align: center;
  }
}

/* ============================================
   ICON DENDA UNTUK SIDEBAR
   ============================================ */

/* Icon clock untuk denda */
.nav-item svg circle,
.nav-item svg path {
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
}

/* Hover effect untuk menu denda */
.nav-item[href="denda_admin.php"]:hover svg {
    animation: pulse 1s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Badge untuk menu denda (opsional - menampilkan jumlah denda) */
.nav-item.denda-with-badge {
    position: relative;
}

.nav-item.denda-with-badge::after {
    content: attr(data-count);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc2626;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Badge Status untuk Peminjaman */
.badge-menunggu { background: #fef3c7; color: #92400e; }
.badge-dipinjam { background: #dbeafe; color: #1e40af; }
.badge-kembali { background: #d1fae5; color: #065f46; }
.badge-ditolak { background: #fee2e2; color: #991b1b; }

/* Badge Status untuk Pengembalian */
.badge-diterima { background: #d1fae5; color: #065f46; }
.badge-ditolak { background: #fee2e2; color: #991b1b; }

/* Badge Kondisi Buku */
.badge-baik { background: #d1fae5; color: #065f46; }
.badge-rusak { background: #fed7aa; color: #9a3412; }
.badge-hilang { background: #fee2e2; color: #991b1b; }

.badge-status {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ============================================
   TOMBOL AJUKAN PENGEMBALIAN
   ============================================ */

   .btn-kembalikan {
    display: inline-block;
    padding: 6px 16px;
    background: #dbeafe;
    color: #1d4ed8;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-kembalikan:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.btn-kembalikan:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Card footer styling */
.riwayat-card-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    margin-top: 12px;
}

/* Badge status untuk riwayat */
.riwayat-card-footer .badge-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Badge Status untuk Peminjaman */
.badge-menunggu { background: #fef3c7; color: #92400e; }
.badge-dipinjam { background: #dbeafe; color: #1e40af; }
.badge-kembali { background: #d1fae5; color: #065f46; }
.badge-ditolak { background: #fee2e2; color: #991b1b; }

/* Modal close button fix */
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}