:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #EEF2FF;
  --secondary: #8B5CF6;
  --success: #10B981;
  --success-light: #D1FAE5;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info: #0EA5E9;
  --info-light: #E0F2FE;
  
  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --surface-hover: #F8FAFC;
  --border: #CBD5E1;
  --border-hover: #94A3B8;
  --text: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  
  --sidebar-w: 280px;
  --nav-h: 70px;
  --radius: 12px;
  --radius-lg: 20px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);
  
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
svg { vertical-align: middle; }

/* Auth */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at top right, #EEF2FF, #E0E7FF); padding: 20px; }
.auth-container { width: 100%; max-width: 440px; }
.auth-card { background: var(--surface); border-radius: var(--radius-lg); padding: 48px 40px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.8); }
.auth-logo { text-align: center; margin-bottom: 24px; color: var(--primary); }
.auth-card h1 { font-size: 1.75rem; font-weight: 800; text-align: center; color: var(--text); margin-bottom: 8px; letter-spacing: -0.025em; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 32px; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(226, 232, 240, 0.8); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; z-index: 100; }
.nav-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.1rem; color: var(--text); letter-spacing: -0.02em; }
.nav-brand svg { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); padding: 8px; }
.nav-user { display: flex; align-items: center; gap: 16px; font-size: 0.9rem; font-weight: 500; color: var(--text); }

/* Sidebar */
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 99; padding-top: var(--nav-h); transition: transform var(--transition); box-shadow: var(--shadow-sm); }
.sidebar-user { display: flex; align-items: center; gap: 14px; padding: 24px 20px; border-bottom: 1px solid var(--border); }
.user-avatar { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; box-shadow: var(--shadow-glow); }
.user-name { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.user-role { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.sidebar-nav { flex: 1; padding: 20px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); color: var(--text-muted); font-size: 0.9rem; font-weight: 600; transition: all var(--transition); }
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: var(--bg); color: var(--text); transform: translateX(4px); }
.nav-item.active { background: var(--primary-light); color: var(--primary); }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); }
.btn-logout { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border-radius: var(--radius); color: var(--danger); font-size: 0.9rem; font-weight: 600; background: var(--danger-light); transition: all var(--transition); }
.btn-logout svg { width: 18px; height: 18px; }
.btn-logout:hover { background: var(--danger); color: white; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); z-index: 98; opacity: 0; transition: opacity var(--transition); }

/* Main Content */
.main-content { margin-left: var(--sidebar-w); padding: calc(var(--nav-h) + 40px) 40px 60px; min-height: 100vh; max-width: 1400px; margin-right: auto; }
.reader-main { margin-left: 0; padding: calc(var(--nav-h) + 20px) 20px 40px; }

/* Page Header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.page-header h2 { font-size: 1.8rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.8); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08); margin-bottom: 24px; overflow: hidden; transition: box-shadow var(--transition), transform var(--transition); }
.card:hover { box-shadow: 0 20px 40px -10px rgba(0,0,0,0.12); transform: translateY(-2px); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.card-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.card-body { padding: 24px; }
.card-body.p-0 { padding: 0; }
.form-card { max-width: 768px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; align-items: center; gap: 20px; box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition); }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 28px; height: 28px; }
.stat-blue { background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%); color: white; box-shadow: 0 8px 16px rgba(2, 132, 199, 0.2); }
.stat-green { background: linear-gradient(135deg, #34D399 0%, #059669 100%); color: white; box-shadow: 0 8px 16px rgba(5, 150, 105, 0.2); }
.stat-purple { background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%); color: white; box-shadow: 0 8px 16px rgba(124, 58, 237, 0.2); }
.stat-red { background: linear-gradient(135deg, #F87171 0%, #DC2626 100%); color: white; box-shadow: 0 8px 16px rgba(220, 38, 38, 0.2); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -0.03em; margin-bottom: 4px; }
.stat-label { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 24px; }
.mb-4 { margin-bottom: 24px; }
.mt-2 { margin-top: 12px; }
.mt-1 { margin-top: 8px; }

/* Table */
.table-responsive { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); border: 1px solid rgba(255,255,255,0.8); width: 100%; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; min-width: 800px; }
.table th { padding: 18px 24px; text-align: left; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); background: #F8FAFC; border-bottom: 1px solid var(--border); }
.table td { padding: 20px 24px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table-hover tbody tr { transition: background var(--transition); }
.table-hover tbody tr:hover { background: var(--surface-hover); }
.table td:last-child, .table th:last-child { text-align: right; }
.table .ebook-title, .table .reader-name { font-weight: 700; color: var(--text); }
.text-nowrap { white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; line-height: 1; letter-spacing: 0.02em; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25); position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%); transform: skewX(-25deg); transition: 0.5s; }
.btn-primary:hover::after { left: 150%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4); color: white; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface-hover); border-color: var(--text-muted); color: var(--text); }
.btn-danger { background: var(--danger); color: white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25); }
.btn-danger:hover { background: #B91C1C; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35); }
.btn-success { background: var(--success); color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25); }
.btn-success:hover { background: #047857; transform: translateY(-2px); }
.btn-warning { background: var(--warning); color: white; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 8px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-group { display: flex; gap: 8px; justify-content: flex-end; }

/* Forms */
.form-group { margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
label { display: block; font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 10px; }
.form-control { width: 100%; padding: 14px 18px; border: 2px solid var(--border); border-radius: 12px; font-size: 0.95rem; font-family: var(--font); color: var(--text); background: var(--surface); transition: all var(--transition); outline: none; box-shadow: inset 0 1px 2px rgba(0,0,0,0.02); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light), inset 0 1px 2px rgba(0,0,0,0.02); background: var(--surface); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; line-height: 1.5; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; display: block; }
.required { color: var(--danger); margin-left: 4px; }
.form-actions { display: flex; gap: 12px; padding-top: 12px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: 10px 0 0 10px; flex: 1; }
.input-addon { background: var(--bg); border: 1px solid var(--border); border-left: none; border-radius: 0 10px 10px 0; padding: 0 16px; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; transition: all var(--transition); }
.input-addon:hover { background: var(--border); color: var(--text); }

/* Alerts */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; border-radius: 10px; font-size: 0.95rem; margin-bottom: 24px; line-height: 1.5; font-weight: 500; }
.alert svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-light); color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background: var(--danger-light); color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: var(--warning-light); color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: var(--info-light); color: #0C4A6E; border: 1px solid #BAE6FD; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--info-light); color: var(--info); }

/* File Upload */
.file-upload-area { border: 2px dashed #CBD5E1; border-radius: var(--radius-lg); padding: 64px 24px; text-align: center; cursor: pointer; transition: all var(--transition); position: relative; background: #F8FAFC; overflow: hidden; }
.file-upload-area::before { content:''; position:absolute; inset:0; background: linear-gradient(135deg, rgba(79,70,229,0.05) 0%, rgba(139,92,246,0.05) 100%); opacity: 0; transition: var(--transition); }
.file-upload-area:hover::before { opacity: 1; }
.file-upload-area:hover, .file-upload-area.drag-over { border-color: var(--primary); transform: scale(1.02); box-shadow: 0 10px 30px -10px rgba(79,70,229,0.2); }
.file-upload-area svg { width: 48px; height: 48px; color: var(--primary); margin-bottom: 16px; opacity: 0.8; }
.file-upload-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-upload-area p { color: var(--text); font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.file-upload-area .form-hint { color: var(--text-muted); font-size: 0.9rem; }
.file-info { margin-top: 16px; padding: 12px 16px; background: var(--primary-light); border-radius: 10px; font-size: 0.9rem; color: var(--primary-dark); font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* Activity */
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; align-items: flex-start; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.activity-item:hover { background: var(--surface-hover); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; box-shadow: 0 0 0 4px var(--primary-light); }
.activity-content { flex: 1; font-size: 0.95rem; }
.activity-user { font-weight: 700; color: var(--text); }
.activity-action { color: var(--text-muted); }
.activity-detail { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; background: var(--bg); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); }
.activity-time { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; font-weight: 500; }

/* Empty State */
.empty-state { text-align: center; padding: 32px 24px; color: var(--text-muted); font-size: 0.95rem; }
.empty-state.large { padding: 64px 24px; }
.empty-state.large svg { width: 64px; height: 64px; color: var(--border-hover); margin-bottom: 20px; display: block; margin-left: auto; margin-right: auto; }
.empty-state.large p { font-size: 1.05rem; max-width: 400px; margin: 0 auto; line-height: 1.6; }

/* Book Grid */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px; margin-bottom: 40px; }
.book-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); display: flex; flex-direction: column; }
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.book-cover { height: 240px; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.book-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 24px; background: linear-gradient(to right, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%); }
.book-front { padding: 24px; text-align: center; flex: 1; position: relative; z-index: 1; }
.book-icon svg { width: 64px; height: 64px; color: rgba(255,255,255,0.8); margin-bottom: 16px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); }
.book-title-cover { color: white; font-weight: 800; font-size: 1.1rem; line-height: 1.3; font-family: 'Merriweather', serif; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.book-author-cover { color: rgba(255,255,255,0.8); font-size: 0.85rem; margin-top: 8px; font-weight: 500; }
.book-info { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.book-title { font-weight: 800; font-size: 1.1rem; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.book-author { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.book-meta { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.book-progress { margin-bottom: 16px; margin-top: auto; }
.progress-bar { height: 6px; background: var(--bg); border-radius: 3px; margin-bottom: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(to right, var(--primary), var(--secondary)); border-radius: 3px; transition: width 0.5s ease; }
.book-card .btn { margin-top: auto; }

.expired-cover { filter: grayscale(100%); }
.expired-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.7); color: white; display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: 0.1em; font-size: 1rem; backdrop-filter: blur(2px); z-index: 2; }
.book-card.book-expired { opacity: 0.85; }
.book-card.book-expired:hover { transform: none; box-shadow: var(--shadow); }

.section-divider { display: flex; align-items: center; gap: 16px; margin: 32px 0 24px; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.section-divider::before, .section-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Link Muted */
.link-muted { font-size: 0.9rem; font-weight: 600; color: var(--primary); transition: var(--transition); }
.link-muted:hover { color: var(--primary-dark); }

/* Log */
.log-icon { font-size: 0.9rem; margin-right: 6px; }
code { background: var(--bg); padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-family: monospace; color: var(--danger); border: 1px solid var(--border); }

/* Text Helpers */
.text-sm { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
.ml-2 { margin-left: 12px; }

/* Pagination */
.pagination { display: flex; gap: 6px; padding: 24px 0; justify-content: center; }
.page-link { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: var(--text); background: var(--surface); transition: all var(--transition); }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2); }
.page-link:hover:not(.active) { background: var(--surface-hover); transform: translateY(-1px); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-card { background: var(--surface); border-radius: var(--radius-lg); padding: 32px; max-width: 460px; width: 100%; box-shadow: var(--shadow-lg); transform: translateY(20px); transition: transform var(--transition); border: 1px solid rgba(255,255,255,0.2); }
.modal-overlay.open .modal-card { transform: translateY(0); }
.modal-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; color: var(--text); }

/* Checkbox Grid */
.ebook-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 10px; }
.checkbox-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; transition: all var(--transition); }
.checkbox-card:hover { border-color: var(--primary); background: var(--primary-light); }
.checkbox-card input[type="checkbox"] { margin-top: 4px; transform: scale(1.1); accent-color: var(--primary); }
.checkbox-content { display: flex; flex-direction: column; gap: 4px; }
.checkbox-title { font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.checkbox-badge { font-size: 0.7rem; color: var(--success); background: var(--success-light); padding: 2px 6px; border-radius: 4px; display: inline-block; font-weight: 700; text-transform: uppercase; align-self: flex-start; }

/* Choices.js Custom Theme */
.choices[data-type*="select-multiple"] .choices__inner,
.choices[data-type*="text"] .choices__inner { border: 2px solid var(--border); border-radius: 12px; background-color: var(--surface); padding: 7px 8px; min-height: 52px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.02); }
.choices.is-focused .choices__inner { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light), inset 0 1px 2px rgba(0,0,0,0.02); background-color: var(--surface); }
.choices__list--multiple .choices__item { background-color: var(--primary); border: 1px solid var(--primary-dark); border-radius: 8px; font-family: var(--font); font-weight: 500; padding: 5px 10px; font-size: 0.9rem; }
.choices__list--multiple .choices__item.is-highlighted { background-color: var(--primary-dark); border: 1px solid var(--primary-dark); }
.choices[data-type*="select-multiple"] .choices__button { border-left: 1px solid rgba(255,255,255,0.2); margin-left: 8px; }
.choices__list--dropdown { border-radius: 0 0 12px 12px; border-color: var(--primary); box-shadow: var(--shadow-md); }
.choices__list--dropdown .choices__item--selectable.is-highlighted { background-color: var(--primary-light); color: var(--primary-dark); }

/* Section Title */
.section-title { margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.section-title h3 { margin: 0; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.section-title p { margin-top: 4px; font-size: 0.9rem; }

/* Toggle Switch */
.toggle-group { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; background: #F8FAFC; padding: 16px 20px; border-radius: 12px; border: 1px solid var(--border); }
.toggle-switch { position: relative; display: inline-block !important; width: 50px; height: 28px; flex-shrink: 0; margin-bottom: 0 !important; }
.toggle-switch input { opacity: 0; width: 0; height: 0; margin: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #CBD5E1; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
input:checked + .slider { background-color: #10B981; }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }
.toggle-label strong { display: block; margin-bottom: 2px; color: var(--text); font-weight: 600; font-size: 0.95rem; }

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .main-content { padding: calc(var(--nav-h) + 24px) 24px 40px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .navbar { padding: 0 16px; }
  .sidebar { transform: translateX(-100%); box-shadow: none; border-right: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay.open { display: block; opacity: 1; }
  .main-content { margin-left: 0; padding: calc(var(--nav-h) + 20px) 16px 32px; }
  .stats-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-row { grid-template-columns: 1fr; gap: 16px; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .page-header h2 { font-size: 1.5rem; }
  .table-responsive { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 600px; }
  .auth-card { padding: 32px 24px; }
  .reader-main { padding: calc(var(--nav-h) + 16px) 16px 32px; }
  .card-header, .card-body { padding: 16px; }
}

@media (max-width: 480px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-cover { height: 200px; }
  .nav-brand span { display: none; }
  .stat-card { padding: 20px 16px; }
  .stat-icon { width: 48px; height: 48px; }
}
