/* ============================================================
   SiPEKA-SMK — Global CSS
   ============================================================ */

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

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:         #1e3a5f;
  --primary-light:   #2d5a8e;
  --primary-dark:    #0f2440;
  --secondary:       #27ae60;
  --secondary-light: #2ecc71;
  --accent:          #f39c12;
  --accent-light:    #f5b942;
  --danger:          #e74c3c;
  --info:            #2980b9;
  --warning:         #f39c12;
  --success:         #27ae60;

  --sidebar-bg:      #0f1f35;
  --sidebar-width:   260px;
  --sidebar-collapsed: 70px;
  --header-height:   64px;
  --bg-light:        #f0f4f8;
  --bg-card:         #ffffff;

  --text-primary:    #1a2332;
  --text-secondary:  #4a5568;
  --text-muted:      #718096;

  --border-color:    #e2e8f0;
  --card-shadow:     0 2px 15px rgba(0, 0, 0, 0.07);
  --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

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

/* ─── Base Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #bdc3d0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9aa3b2; }

/* ─── Layout ────────────────────────────────────────────────── */
.wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
  box-shadow: 2px 0 20px rgba(0,0,0,0.2);
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .nav-badge { display: none !important; }
.sidebar.collapsed .sidebar-brand { justify-content: center; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 12px; }
.sidebar.collapsed .nav-link .nav-icon { margin: 0; }

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  min-height: 100vh;
}

.main-content.expanded { margin-left: var(--sidebar-collapsed); }

/* ─── Header / Top Bar ──────────────────────────────────────── */
.topbar {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 10px rgba(0,0,0,0.05);
  gap: 1rem;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.topbar-right { display: flex; align-items: center; gap: 0.75rem; }

.btn-toggle-sidebar {
  width: 38px; height: 38px;
  border: none;
  background: var(--bg-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 1rem;
}
.btn-toggle-sidebar:hover { background: var(--primary); color: white; }

/* ─── Sidebar Brand ─────────────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: var(--header-height);
}

.sidebar-brand-logo {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-brand-text { 
  flex: 1; 
  overflow: hidden;
}
.sidebar-brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  white-space: nowrap;
}
.sidebar-brand-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

/* ─── Sidebar User ──────────────────────────────────────────── */
.sidebar-user {
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }
.sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 500;
}

/* ─── Sidebar Navigation ────────────────────────────────────── */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  padding: 1rem 1rem 0.35rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 1rem;
  color: rgba(255,255,255,0.65);
  border-radius: 0;
  font-size: 0.855rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
  white-space: nowrap;
  margin: 1px 0.5rem;
  border-radius: var(--radius-sm);
}

.sidebar .nav-link:hover {
  color: white;
  background: rgba(255,255,255,0.08);
}

.sidebar .nav-link.active {
  color: white;
  background: var(--primary-light);
  box-shadow: 0 2px 8px rgba(45,90,142,0.4);
}

.sidebar .nav-link .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar .nav-label { flex: 1; }

.sidebar .nav-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--danger);
  color: white;
  font-weight: 700;
  line-height: 1.4;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ─── Page Content ──────────────────────────────────────────── */
.page-content {
  padding: 1.75rem;
  flex: 1;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  border: none;
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.stat-card-primary::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card-success::before { background: linear-gradient(90deg, var(--secondary), var(--secondary-light)); }
.stat-card-info::before    { background: linear-gradient(90deg, var(--info), #3498db); }
.stat-card-danger::before  { background: linear-gradient(90deg, var(--danger), #e84857); }

.stat-card-body {
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-card-primary .stat-icon { background: rgba(30,58,95,0.1); color: var(--primary); }
.stat-card-success .stat-icon { background: rgba(39,174,96,0.1); color: var(--secondary); }
.stat-card-info .stat-icon    { background: rgba(41,128,185,0.1); color: var(--info); }
.stat-card-danger .stat-icon  { background: rgba(231,76,60,0.1);  color: var(--danger); }

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}
.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.stat-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.4rem;
  background: rgba(0,0,0,0.03);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  border-top: 1px solid var(--border-color);
  transition: var(--transition-fast);
}
.stat-card-link:hover { background: rgba(0,0,0,0.06); color: var(--primary); }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  background: white;
  transition: var(--transition);
}

.card-header {
  padding: 1rem 1.25rem;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body { padding: 1.25rem; }
.card-footer { padding: 0.75rem 1.25rem; background: transparent; border-top: 1px solid var(--border-color); }

/* ─── Info Cards ─────────────────────────────────────────────── */
.info-card {
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
  transition: var(--transition);
}
.info-card:hover { transform: translateY(-2px); }
.info-value { font-size: 1.1rem; font-weight: 700; line-height: 1.2; margin: 4px 0; }
.info-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

.bg-primary-soft { background: rgba(30,58,95,0.08); }
.bg-success-soft { background: rgba(39,174,96,0.08); }
.bg-danger-soft  { background: rgba(231,76,60,0.08); }
.bg-warning-soft { background: rgba(243,156,18,0.08); }
.bg-info-soft    { background: rgba(41,128,185,0.08); }

/* ─── Tables ─────────────────────────────────────────────────── */
.table {
  font-size: 0.855rem;
  color: var(--text-primary);
}
.table th {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
  padding: 0.75rem 1rem;
  white-space: nowrap;
  background: #fafbfc;
}
.table td { padding: 0.75rem 1rem; vertical-align: middle; border-bottom: 1px solid var(--border-color); }
.table-hover tbody tr:hover { background: rgba(30,58,95,0.03); }
.table-responsive { border-radius: var(--radius-lg); overflow: hidden; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  font-size: 0.835rem;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 0.45rem 1rem;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); }
.btn-success { background: var(--secondary); border-color: var(--secondary); }
.btn-success:hover { background: var(--secondary-light); border-color: var(--secondary-light); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.785rem; border-radius: var(--radius-sm); }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-control, .form-select {
  font-size: 0.855rem;
  border-color: var(--border-color);
  border-radius: var(--radius);
  padding: 0.5rem 0.85rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.35rem; }
.input-group-text {
  background: var(--bg-light);
  border-color: var(--border-color);
  color: var(--text-muted);
  font-size: 0.855rem;
}

/* ─── Modals ─────────────────────────────────────────────────── */
.modal-content { border: none; border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.1rem 1.5rem;
}
.modal-header .btn-close { filter: invert(1); opacity: 0.8; }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; background: #fafbfc; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert {
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  border-left: 4px solid;
}
.alert-success { background: rgba(39,174,96,0.1); border-color: var(--secondary); color: #1a6b3a; }
.alert-danger  { background: rgba(231,76,60,0.1);  border-color: var(--danger);   color: #8b1a12; }
.alert-warning { background: rgba(243,156,18,0.1); border-color: var(--accent);   color: #7a5c00; }
.alert-info    { background: rgba(41,128,185,0.1); border-color: var(--info);     color: #1a4d7a; }

/* ─── Book Card ──────────────────────────────────────────────── */
.book-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  background: white;
  height: 100%;
}
.book-card:hover { transform: translateY(-5px); box-shadow: var(--card-shadow-hover); }

.book-cover-wrapper {
  position: relative;
  padding-top: 140%;
  overflow: hidden;
  background: var(--bg-light);
}
.book-cover-wrapper img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.book-card:hover .book-cover-wrapper img { transform: scale(1.05); }

.book-card-body { padding: 1rem; }
.book-card-title { font-size: 0.85rem; font-weight: 700; line-height: 1.4; color: var(--text-primary); margin-bottom: 4px; }
.book-card-author { font-size: 0.75rem; color: var(--text-muted); }
.book-card-footer { padding: 0.75rem 1rem; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }

/* ─── Library Card ──────────────────────────────────────────── */
.library-card {
  background: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(135deg, #0b1a30 0%, #1e3a5f 55%, #2a5c8f 100%);
  border-radius: var(--radius-lg);
  color: white !important;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  max-width: 420px;
  box-shadow: 0 15px 35px rgba(15,31,53,0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
}

.library-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.library-card::after {
  content: '';
  position: absolute;
  bottom: -90px; left: -40px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.library-card-avatar {
  width: 70px; height: 70px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.35);
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.library-card-name { 
  font-size: 1.15rem; 
  font-weight: 700; 
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.library-card-id { 
  font-size: 0.8rem; 
  color: var(--accent) !important; 
  font-family: 'Courier New', monospace;
  font-weight: 600;
}
.library-card-number { 
  font-family: 'Courier New', monospace; 
  font-size: 0.95rem; 
  letter-spacing: 0.15em; 
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ─── Rank Badges ────────────────────────────────────────────── */
.rank-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-1 { background: #FFD700; color: #7a5c00; }
.rank-2 { background: #C0C0C0; color: #4a4a4a; }
.rank-3 { background: #CD7F32; color: white; }
.rank-4, .rank-5 { background: var(--bg-light); color: var(--text-muted); }

/* ─── Book Thumbnail ─────────────────────────────────────────── */
.book-thumb {
  width: 36px; height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ─── Notifications ──────────────────────────────────────────── */
.notif-item {
  padding: 0.85rem 1rem;
  border-left: 3px solid transparent;
  transition: var(--transition-fast);
  cursor: pointer;
}
.notif-item:hover { background: var(--bg-light); }
.notif-item.unread { background: rgba(30,58,95,0.04); border-left-color: var(--primary); }
.notif-item.type-success { border-left-color: var(--secondary); }
.notif-item.type-danger  { border-left-color: var(--danger); }
.notif-item.type-warning { border-left-color: var(--accent); }
.notif-item.type-info    { border-left-color: var(--info); }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }

/* ─── Status Timeline ────────────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--border-color); }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-dot { position: absolute; left: -2rem; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; color: white; top: 2px; }
.timeline-content { background: var(--bg-light); border-radius: var(--radius); padding: 0.85rem; }

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fadein  { animation: fadeInUp 0.4s ease both; }
.animate-slidein { animation: slideInLeft 0.35s ease both; }
.pulse-animation { animation: pulse 2s infinite; }

/* ─── Loading Spinner ────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ─── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb { font-size: 0.8rem; margin-bottom: 0; }
.breadcrumb-item.active { color: var(--text-muted); }

/* ─── Pagination ─────────────────────────────────────────────── */
.page-link { color: var(--primary); border-color: var(--border-color); font-size: 0.835rem; }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.page-link:focus { box-shadow: 0 0 0 3px rgba(30,58,95,0.15); }

/* ─── DataTables ─────────────────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input { border-radius: var(--radius); border: 1px solid var(--border-color); padding: 0.35rem 0.75rem; font-size: 0.835rem; }
.dataTables_wrapper .dataTables_length select { border-radius: var(--radius); border: 1px solid var(--border-color); padding: 0.35rem 0.5rem; font-size: 0.835rem; }
.dataTables_info { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Notification Bell ──────────────────────────────────────── */
.notif-bell-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--bg-light);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-fast);
}
.notif-bell-btn:hover { background: var(--primary); color: white; }
.notif-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
  line-height: 1;
}

/* ─── Avatar Dropdown ────────────────────────────────────────── */
.avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 8px 4px 4px;
  border-radius: 40px;
  background: var(--bg-light);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}
.avatar-btn:hover { background: #e2e8f0; }
.avatar-btn img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-btn-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Search Bar ─────────────────────────────────────────────── */
.search-bar {
  position: relative;
  max-width: 280px;
}
.search-bar .form-control { padding-left: 2.4rem; border-radius: 40px; }
.search-bar-icon {
  position: absolute;
  left: 0.9rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── Print Styles ───────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .btn, .no-print, .alert { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  body { background: white; font-size: 11pt; }
  .card { border: 1px solid #ddd; box-shadow: none; }
  .table th { background: #1e3a5f !important; color: white !important; -webkit-print-color-adjust: exact; }
  .badge { border: 1px solid #999; }
  .library-card, .library-card * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1050;
  }
  .sidebar.mobile-show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0 !important;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1049;
  }
  .sidebar-overlay.show { display: block; }
  .page-content { padding: 1rem; }
}

@media (max-width: 575.98px) {
  .stat-value { font-size: 1.5rem; }
  .page-title { font-size: 1.1rem; }
}
