:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
}
* { font-family: 'Prompt', sans-serif; }
body { background: #f1f5f9; }

.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px; background: var(--sidebar-bg); color: #cbd5e1;
  position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto;
  transition: transform .3s; z-index: 1000;
}
.sidebar-brand {
  padding: 20px; font-size: 1.3rem; font-weight: 600;
  color: white; border-bottom: 1px solid #334155;
}
.sidebar-brand i { color: #818cf8; margin-right: 8px; }
.sidebar-menu { list-style: none; padding: 10px 0; margin: 0; }
.sidebar-menu li a {
  display: block; padding: 12px 20px; color: #cbd5e1; text-decoration: none;
  transition: all .2s; border-left: 3px solid transparent;
}
.sidebar-menu li a:hover { background: var(--sidebar-hover); color: white; }
.sidebar-menu li a.active {
  background: var(--sidebar-hover); color: white;
  border-left-color: #818cf8;
}
.sidebar-menu i { margin-right: 10px; width: 20px; }

.main-content { flex: 1; margin-left: 250px; min-width: 0; }
.topbar {
  background: white; padding: 12px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 100;
}
.content-area { padding: 24px; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
}

.stat-card {
  background: white; border-radius: 12px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); border: none;
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card .icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: white;
}
.stat-card .icon.bg-primary{background:linear-gradient(135deg,#4f46e5,#7c3aed);}
.stat-card .icon.bg-success{background:linear-gradient(135deg,#10b981,#059669);}
.stat-card .icon.bg-warning{background:linear-gradient(135deg,#f59e0b,#d97706);}
.stat-card .icon.bg-danger{background:linear-gradient(135deg,#ef4444,#dc2626);}
.stat-card .stat-value { font-size: 2rem; font-weight: 600; margin: 0; }
.stat-card .stat-label { color: #64748b; font-size: .9rem; }

.card { border: none; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.card-header { background: white; border-bottom: 1px solid #e2e8f0; border-radius: 12px 12px 0 0 !important; padding: 16px 20px; font-weight: 500; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.book-cover { width: 50px; height: 65px; object-fit: cover; border-radius: 4px; }
.book-cover-placeholder { width: 50px; height: 65px; background:#e2e8f0; display:flex; align-items:center; justify-content:center; border-radius: 4px; color:#94a3b8; }

/* Login */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: white; border-radius: 16px; padding: 40px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2); width: 100%; max-width: 420px;
}
.login-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 8px; color: var(--primary); }
.login-card .icon-circle {
  width: 70px; height: 70px; margin: 0 auto 20px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}

table.dataTable thead th { background: #f8fafc; }
.badge { padding: 6px 10px; font-weight: 500; }
