/* ============================================================
   LibraTrack — Global Stylesheet
   Blue theme · Glassmorphism · Geometric background
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Syne:wght@600;700;800&display=swap');

/* ── Variables ── */
:root {
  --blue-950: #020b1a;
  --blue-900: #041529;
  --blue-800: #082445;
  --blue-700: #0a3260;
  --blue-600: #0d4280;
  --blue-500: #1059a8;
  --blue-400: #1a74d4;
  --blue-300: #3b9eff;
  --blue-200: #7dc3ff;
  --blue-100: #c2e4ff;
  --blue-50:  #eaf4ff;

  --accent:   #00c6ff;
  --accent2:  #38bdf8;
  --gold:     #f0c040;
  --success:  #22c55e;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --danger-soft: #fef2f2;

  --glass-bg:      rgba(8, 36, 69, 0.55);
  --glass-border:  rgba(59, 158, 255, 0.18);
  --glass-hover:   rgba(8, 36, 69, 0.75);

  --sidebar-w: 260px;
  --topbar-h:  64px;

  --font-head: 'Syne', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-blue: 0 4px 24px rgba(16, 89, 168, 0.3);
  --shadow-card: 0 2px 16px rgba(2, 11, 26, 0.4);
  --shadow-glow: 0 0 20px rgba(0, 198, 255, 0.25);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--blue-950);
  color: #e2eeff;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--blue-200); }
img { max-width: 100%; }
input, select, textarea, button { font-family: var(--font-body); }

/* ── Animated background ── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(13, 66, 128, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(10, 50, 96, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(2, 11, 26, 1) 40%, transparent 100%);
  overflow: hidden;
}
.bg-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,158,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,158,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 20s linear infinite;
}
.bg-scene::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,198,255,0.07) 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: floatOrb 12s ease-in-out infinite alternate;
}
.bg-orb2 {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,89,168,0.12) 0%, transparent 70%);
  bottom: -80px; left: -80px;
  animation: floatOrb 16s ease-in-out infinite alternate-reverse;
}
@keyframes gridDrift { to { background-position: 48px 48px; } }
@keyframes floatOrb {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 40px) scale(1.15); }
}

/* ── Auth layout ── */
.auth-wrapper {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2.8rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: cardIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.auth-logo { text-align: center; margin-bottom: 1.8rem; }
.auth-logo .logo-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-size: 1.7rem; font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.auth-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--blue-400), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 16px rgba(0,198,255,0.4);
}
.auth-logo p { font-size: 0.82rem; color: var(--blue-200); margin-top: 4px; }
.auth-title { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; color: #fff; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 1.2rem 0; }
.auth-divider span { font-size: 0.78rem; color: var(--blue-200); white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--glass-border); }

/* ── Dashboard layout ── */
.app-layout { position: relative; z-index: 1; display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: rgba(4, 21, 41, 0.8);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 1.4rem 1.4rem 1rem;
  border-bottom: 1px solid var(--glass-border);
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 800;
  color: #fff; letter-spacing: -0.02em;
}
.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue-400), var(--accent));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 0 12px rgba(0,198,255,0.35);
  flex-shrink: 0;
}
.sidebar-version { font-size: 0.7rem; color: var(--blue-300); margin-top: 2px; }
.sidebar-role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 20px;
  margin-top: 10px;
}
.role-student  { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.role-librarian{ background: rgba(59,158,255,0.15); color: var(--accent2); border: 1px solid rgba(59,158,255,0.25); }
.role-admin    { background: rgba(240,192,64,0.15); color: var(--gold); border: 1px solid rgba(240,192,64,0.25); }

.sidebar-nav { flex: 1; padding: 1rem 0.8rem; overflow-y: auto; }
.nav-group-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--blue-300); text-transform: uppercase;
  padding: 0.6rem 0.6rem 0.3rem;
  margin-top: 0.5rem;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.62rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--blue-100); font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: all 0.18s ease;
  position: relative; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(59,158,255,0.1); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(26,116,212,0.3), rgba(0,198,255,0.1));
  color: #fff;
  border-left: 2.5px solid var(--accent);
}
.nav-item .nav-icon { width: 18px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-item .badge {
  margin-left: auto; font-size: 0.68rem; font-weight: 700;
  background: var(--blue-400); color: #fff;
  padding: 1px 7px; border-radius: 20px;
}
.nav-item .badge.danger { background: var(--danger); }

.sidebar-footer {
  padding: 0.8rem;
  border-top: 1px solid var(--glass-border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.18s;
}
.sidebar-user:hover { background: rgba(59,158,255,0.1); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: #fff; flex-shrink: 0;
}
.user-info .user-name { font-size: 0.85rem; font-weight: 600; color: #fff; }
.user-info .user-role { font-size: 0.72rem; color: var(--blue-200); }

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: rgba(4, 21, 41, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 50;
  gap: 1rem;
}
.topbar-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: #fff; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(59,158,255,0.1); border: 1px solid var(--glass-border);
  color: var(--blue-200); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.18s; font-size: 1rem; position: relative;
}
.topbar-btn:hover { background: rgba(59,158,255,0.2); color: #fff; }
.topbar-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); border: 1.5px solid var(--blue-950);
}

/* Main content area */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.page-content { padding: 1.8rem 2rem; flex: 1; }

/* ── Cards ── */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(59,158,255,0.3); }
.card-title {
  font-family: var(--font-head); font-size: 1rem; font-weight: 700;
  color: #fff; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 8px;
}
.card-title .icon { font-size: 1.1rem; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; }
.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-blue); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(59,158,255,0.12), transparent 70%);
}
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 0.8rem;
}
.stat-icon.blue   { background: rgba(26,116,212,0.2); }
.stat-icon.green  { background: rgba(34,197,94,0.2); }
.stat-icon.amber  { background: rgba(245,158,11,0.2); }
.stat-icon.red    { background: rgba(239,68,68,0.2); }
.stat-icon.cyan   { background: rgba(0,198,255,0.15); }
.stat-value { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--blue-200); margin-top: 4px; }
.stat-change { font-size: 0.75rem; margin-top: 6px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--blue-100); margin-bottom: 6px; }
.form-label span { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 0.7rem 1rem;
  background: rgba(4, 21, 41, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: #e2eeff; font-size: 0.88rem;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}
.form-control:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(26,116,212,0.2);
}
.form-control::placeholder { color: var(--blue-300); opacity: 0.6; }
.form-control option { background: var(--blue-900); }
.input-group { position: relative; }
.input-group .form-control { padding-left: 2.6rem; }
.input-group .input-icon {
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  color: var(--blue-300); font-size: 1rem; pointer-events: none;
}
.input-group .input-suffix {
  position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: var(--blue-300);
}
.form-hint { font-size: 0.75rem; color: var(--blue-200); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; }

/* Select */
select.form-control { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%237dc3ff' d='M8 10.5L3 5.5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 14px;
  padding-right: 2.2rem;
}

/* Textarea */
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0.62rem 1.3rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.87rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all 0.18s ease; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  color: #fff;
  box-shadow: 0 3px 12px rgba(16,89,168,0.4);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--blue-400), var(--accent2)); box-shadow: var(--shadow-glow); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--blue-300));
  color: var(--blue-950);
  box-shadow: 0 3px 12px rgba(0,198,255,0.35);
}
.btn-accent:hover { box-shadow: 0 0 20px rgba(0,198,255,0.5); }
.btn-glass {
  background: rgba(59,158,255,0.1); border: 1px solid var(--glass-border);
  color: var(--blue-100);
}
.btn-glass:hover { background: rgba(59,158,255,0.2); color: #fff; }
.btn-success { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; }
.btn-danger  { background: linear-gradient(135deg, #b91c1c, #ef4444); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #b45309, #f59e0b); color: #fff; }
.btn-sm { padding: 0.42rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.8rem; font-size: 0.95rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn .spinner {
  width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table thead th {
  padding: 0.75rem 1rem;
  text-align: left; font-size: 0.73rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--blue-200);
  background: rgba(4,21,41,0.6);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid rgba(59,158,255,0.07);
  transition: background 0.15s;
}
.data-table tbody tr:hover { background: rgba(59,158,255,0.05); }
.data-table tbody td { padding: 0.75rem 1rem; color: var(--blue-100); vertical-align: middle; }
.data-table tbody tr:last-child { border-bottom: none; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 20px;
}
.badge-active    { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.badge-pending   { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.badge-overdue   { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-due-soon  { background: rgba(249,115,22,0.15); color: #fb923c; border: 1px solid rgba(249,115,22,0.25); }
.badge-returned  { background: rgba(59,158,255,0.15); color: var(--accent2); border: 1px solid rgba(59,158,255,0.25); }
.badge-suspended { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-paid      { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.badge-unpaid    { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-good      { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.badge-damaged   { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.badge-lost      { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── Alerts ── */
.alert {
  padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-success { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.25);  color: #4ade80; }
.alert-danger  { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.25);  color: #f87171; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); color: #fbbf24; }
.alert-info    { background: rgba(59,158,255,0.1); border: 1px solid rgba(59,158,255,0.25); color: var(--accent2); }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 1.2rem; flex-wrap: wrap; }
.page-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 600;
  background: rgba(59,158,255,0.08); border: 1px solid var(--glass-border);
  color: var(--blue-200); cursor: pointer; transition: all 0.15s;
}
.page-btn:hover { background: rgba(59,158,255,0.2); color: #fff; }
.page-btn.active { background: var(--blue-400); color: #fff; border-color: var(--blue-400); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2,11,26,0.8);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: rgba(8,36,69,0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.8rem 2rem;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: modalIn 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
.modal-lg { max-width: 640px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.modal-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; color: #fff; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(59,158,255,0.1); border: none; color: var(--blue-200);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem; transition: all 0.15s;
}
.modal-close:hover { background: rgba(239,68,68,0.2); color: #f87171; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1.4rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Search bar ── */
.search-bar {
  display: flex; gap: 10px; align-items: center;
  background: rgba(4,21,41,0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  flex: 1;
}
.search-bar input {
  background: none; border: none; outline: none;
  color: #e2eeff; font-size: 0.88rem; flex: 1;
}
.search-bar input::placeholder { color: var(--blue-300); opacity: 0.7; }
.search-bar .search-icon { color: var(--blue-300); }

/* ── Misc ── */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: #fff; }
.page-header p { font-size: 0.85rem; color: var(--blue-200); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.flex-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--blue-200); font-size: 0.82rem; }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.fw-bold { font-weight: 700; }
.divider { height: 1px; background: var(--glass-border); margin: 1rem 0; }

/* Book cover placeholder */
.book-cover {
  width: 50px; height: 66px; border-radius: 4px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}

/* Toast notifications */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: rgba(8,36,69,0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.1rem;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: #e2eeff;
  box-shadow: var(--shadow-card);
  min-width: 280px; max-width: 360px;
  animation: toastIn 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Progress bar */
.progress { height: 6px; background: rgba(59,158,255,0.15); border-radius: 3px; overflow: hidden; }
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--accent));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); width: 260px; }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 1rem; }
  .auth-card { padding: 1.8rem 1.4rem; }
}
