/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body { font-family: 'Segoe UI', Arial, sans-serif; background-color: #f4f6f9; color: #333333; min-height: 100vh; }

/* ===== LIGHT MODE (DEFAULT) ===== */
body.light-mode { background-color: #f4f6f9; color: #333333; }
body.dark-mode { background-color: #1a1a2e; color: #e0e0e0; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 1.8rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.2rem; }
a { text-decoration: none; color: #2c6fad; }
a:hover { color: #1a4f80; }

/* ===== LAYOUT ===== */
.wrapper { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: 250px; transition: margin-left 0.3s ease; }
.main-content.sidebar-collapsed { margin-left: 70px; }
.page-header { background: #ffffff; padding: 15px 25px; border-bottom: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
body.dark-mode .page-header { background: #16213e; border-bottom: 1px solid #2d3561; }
.page-content { padding: 25px; }

/* ===== SIDEBAR ===== */
.sidebar { width: 250px; background: #1e3a5f; color: #ffffff; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; transition: width 0.3s ease; z-index: 1000; }
.sidebar.collapsed { width: 70px; }
/* HIDE TEXT WHEN COLLAPSED */
.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-user-info {
    display: none;
}
.sidebar-brand { padding: 20px 15px; background: #132b4a; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #2d5080; }
.sidebar-brand img { width: 36px; height: 36px; }
.sidebar-brand-text { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; }
.sidebar-brand-text span { display: block; font-size: 0.7rem; opacity: 0.7; font-weight: 400; }
.sidebar-user { padding: 15px; background: #162f4e; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #2d5080; }
.sidebar-user-avatar { width: 38px; height: 38px; border-radius: 50%; background: #2c6fad; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; flex-shrink: 0; }
.sidebar-user-info { overflow: hidden; }
.sidebar-user-info .name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .role { font-size: 0.7rem; opacity: 0.7; }

.sidebar-nav { padding: 10px 0; }
.nav-section-title { padding: 8px 15px; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.5; white-space: nowrap; overflow: hidden; }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; padding: 10px 15px; color: #c8d6e5; font-size: 0.875rem; cursor: pointer; transition: background 0.2s, color 0.2s; white-space: nowrap; border: none; background: none; width: 100%; text-align: left; }
.nav-link:hover { background: #2c6fad; color: #ffffff; }
.nav-link.active { background: #2c6fad; color: #ffffff; }
.nav-link i { width: 20px; font-size: 1rem; flex-shrink: 0; margin-right: 10px; }
.nav-link .arrow { margin-left: auto; font-size: 0.7rem; transition: transform 0.2s; }
.nav-link.open .arrow { transform: rotate(90deg); }
.submenu { display: none; background: #132b4a; }
.submenu.open { display: block; }
.submenu .nav-link { padding-left: 45px; font-size: 0.82rem; }
.submenu .nav-link i { font-size: 0.8rem; }

/* ===== TOPBAR ===== */
.topbar { background: #ffffff; border-bottom: 1px solid #e0e0e0; padding: 0 25px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
body.dark-mode .topbar { background: #16213e; border-bottom: 1px solid #2d3561; }
.topbar-left { display: flex; align-items: center; gap: 15px; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.sidebar-toggle { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: #555; padding: 5px; }
body.dark-mode .sidebar-toggle { color: #aaa; }
.page-title { font-size: 1rem; font-weight: 600; color: #333; }
body.dark-mode .page-title { color: #e0e0e0; }
.theme-toggle { background: #f0f0f0; border: 1px solid #ddd; border-radius: 20px; padding: 5px 12px; cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; gap: 5px; color: #555; }
body.dark-mode .theme-toggle { background: #2d3561; border-color: #3d4a6b; color: #aaa; }
.topbar-user { display: flex; align-items: center; gap: 8px; cursor: pointer; position: relative; }
.topbar-user-avatar { width: 34px; height: 34px; border-radius: 50%; background: #2c6fad; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.85rem; }
.topbar-user-name { font-size: 0.85rem; font-weight: 600; }
.user-dropdown { position: absolute; top: 45px; right: 0; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; min-width: 160px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); z-index: 200; display: none; }
.user-dropdown.open { display: block; }
body.dark-mode .user-dropdown { background: #1e2d5f; border-color: #2d3561; }
.user-dropdown a { display: flex; align-items: center; gap: 8px; padding: 10px 15px; color: #333; font-size: 0.85rem; transition: background 0.2s; }
body.dark-mode .user-dropdown a { color: #e0e0e0; }
.user-dropdown a:hover { background: #f4f6f9; }
body.dark-mode .user-dropdown a:hover { background: #2d3561; }
.user-dropdown a i { width: 16px; font-size: 0.85rem; color: #888; }
.user-dropdown hr { border: none; border-top: 1px solid #e0e0e0; }
body.dark-mode .user-dropdown hr { border-color: #2d3561; }

/* ===== DASHBOARD CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: #ffffff; border-radius: 10px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-left: 4px solid #2c6fad; }
body.dark-mode .stat-card { background: #16213e; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.stat-card.green { border-left-color: #28a745; }
.stat-card.orange { border-left-color: #fd7e14; }
.stat-card.purple { border-left-color: #6f42c1; }
.stat-card.red { border-left-color: #dc3545; }
.stat-icon { width: 50px; height: 50px; border-radius: 10px; background: #e8f0fe; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #2c6fad; flex-shrink: 0; }
.stat-card.green .stat-icon { background: #d4edda; color: #28a745; }
.stat-card.orange .stat-icon { background: #fde8d0; color: #fd7e14; }
.stat-card.purple .stat-icon { background: #e8d5f5; color: #6f42c1; }
.stat-card.red .stat-icon { background: #fde0e0; color: #dc3545; }
body.dark-mode .stat-icon { background: #1e3060; }
.stat-info .label { font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-info .value { font-size: 1.6rem; font-weight: 700; color: #333; line-height: 1.2; }
body.dark-mode .stat-info .value { color: #e0e0e0; }
.stat-info .sub { font-size: 0.75rem; color: #888; }

/* ===== CARDS & PANELS ===== */
.card { background: #ffffff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; }
body.dark-mode .card { background: #16213e; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.card-header { padding: 15px 20px; border-bottom: 1px solid #e8e8e8; display: flex; align-items: center; justify-content: space-between; }
body.dark-mode .card-header { border-bottom-color: #2d3561; }
.card-header h3 { font-size: 0.95rem; font-weight: 600; color: #333; display: flex; align-items: center; gap: 8px; }
body.dark-mode .card-header h3 { color: #e0e0e0; }
.card-body { padding: 20px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: #555; margin-bottom: 5px; }
body.dark-mode .form-group label { color: #bbb; }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid #d0d7e0; border-radius: 6px; font-size: 0.875rem; background: #ffffff; color: #333; transition: border-color 0.2s, box-shadow 0.2s; outline: none; }
body.dark-mode .form-control { background: #1e2d5f; border-color: #2d3561; color: #e0e0e0; }
.form-control:focus { border-color: #2c6fad; box-shadow: 0 0 0 3px rgba(44,111,173,0.15); }
.form-control.error { border-color: #dc3545; }
.form-row { display: flex; gap: 15px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-text { font-size: 0.75rem; color: #888; margin-top: 3px; }
.error-msg { font-size: 0.75rem; color: #dc3545; margin-top: 3px; display: none; }
.error-msg.show { display: block; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 6px; font-size: 0.875rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all 0.2s; text-decoration: none; }
.btn i { font-size: 0.85rem; }
.btn-primary { background: #2c6fad; color: #ffffff; border-color: #2c6fad; }
.btn-primary:hover { background: #1e5490; border-color: #1e5490; }
.btn-success { background: #28a745; color: #ffffff; border-color: #28a745; }
.btn-success:hover { background: #1e7e34; border-color: #1e7e34; }
.btn-danger { background: #dc3545; color: #ffffff; border-color: #dc3545; }
.btn-danger:hover { background: #c82333; border-color: #c82333; }
.btn-warning { background: #fd7e14; color: #ffffff; border-color: #fd7e14; }
.btn-warning:hover { background: #e06900; border-color: #e06900; }
.btn-secondary { background: #6c757d; color: #ffffff; border-color: #6c757d; }
.btn-secondary:hover { background: #545b62; border-color: #545b62; }
.btn-outline { background: transparent; color: #2c6fad; border-color: #2c6fad; }
.btn-outline:hover { background: #2c6fad; color: #ffffff; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-icon { padding: 6px 8px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== TABLES ===== */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table thead th { background: #2c6fad; color: #ffffff; padding: 11px 14px; text-align: left; font-weight: 600; white-space: nowrap; }
.data-table tbody tr { border-bottom: 1px solid #eef0f5; transition: background 0.15s; }
body.dark-mode .data-table tbody tr { border-bottom-color: #2d3561; }
.data-table tbody tr:hover { background: #f0f5fb; }
body.dark-mode .data-table tbody tr:hover { background: #1e2d5f; }
.data-table tbody td { padding: 10px 14px; vertical-align: middle; color: #444; }
body.dark-mode .data-table tbody td { color: #ccc; }
.data-table tbody tr:last-child { border-bottom: none; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 0.72rem; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-secondary { background: #e2e3e5; color: #383d41; }
body.dark-mode .badge-success { background: #1a3a25; color: #75c28a; }
body.dark-mode .badge-danger { background: #3a1a1a; color: #e07070; }
body.dark-mode .badge-warning { background: #3a3010; color: #d4a520; }

/* ===== PROGRESS BAR ===== */
.progress { background: #e9ecef; border-radius: 10px; height: 8px; overflow: hidden; }
body.dark-mode .progress { background: #2d3561; }
.progress-bar { height: 100%; border-radius: 10px; background: #2c6fad; transition: width 0.4s ease; }
.progress-bar.green { background: #28a745; }
.progress-bar.orange { background: #fd7e14; }
.progress-bar.red { background: #dc3545; }

/* ===== SEARCH & FILTER BAR ===== */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 15px; }
.search-input { position: relative; flex: 1; min-width: 200px; }
.search-input i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #888; font-size: 0.85rem; }
.search-input input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid #d0d7e0; border-radius: 6px; font-size: 0.875rem; background: #fff; color: #333; }
body.dark-mode .search-input input { background: #1e2d5f; border-color: #2d3561; color: #e0e0e0; }
.search-input input:focus { outline: none; border-color: #2c6fad; }

/* ===== BOOK GRID (Student) ===== */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.book-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s; }
body.dark-mode .book-card { background: #16213e; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.book-cover { height: 160px; background: linear-gradient(135deg, #1e3a5f 0%, #2c6fad 100%); display: flex; align-items: center; justify-content: center; }
.book-cover i { font-size: 3rem; color: rgba(255,255,255,0.6); }
.book-info { padding: 15px; }
.book-info h4 { font-size: 0.9rem; font-weight: 600; color: #333; margin-bottom: 5px; line-height: 1.3; }
body.dark-mode .book-info h4 { color: #e0e0e0; }
.book-info .meta { font-size: 0.75rem; color: #888; margin-bottom: 10px; }
.book-info .expiry { font-size: 0.75rem; font-weight: 600; }
.book-info .expiry.near { color: #fd7e14; }
.book-info .expiry.ok { color: #28a745; }
.book-info .expiry.expired { color: #dc3545; }

/* ===== PDF VIEWER ===== */
.pdf-viewer-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.9); z-index: 9999; display: none; flex-direction: column; }
.pdf-viewer-container.open { display: flex; }
.pdf-toolbar { background: #1e3a5f; color: #fff; padding: 10px 20px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.pdf-toolbar h4 { flex: 1; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-toolbar button { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 5px 12px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.pdf-toolbar button:hover { background: rgba(255,255,255,0.25); }
.pdf-toolbar .page-info { font-size: 0.82rem; white-space: nowrap; }
.pdf-content { flex: 1; overflow: hidden; position: relative; background: #333; }
.pdf-content canvas { display: block; margin: auto; }
.pdf-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-30deg); font-size: 2.5rem; color: rgba(255,255,255,0.06); font-weight: 700; pointer-events: none; white-space: nowrap; z-index: 10; }
.pdf-progress { padding: 8px 20px; background: #1e3a5f; display: flex; align-items: center; gap: 12px; }
.pdf-progress .progress { flex: 1; }
.pdf-progress span { font-size: 0.75rem; color: #aaa; white-space: nowrap; }
/* Prevent copy/select in PDF viewer */
.pdf-content { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: 6px; font-size: 0.875rem; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
body.dark-mode .alert-success { background: #1a3a25; color: #75c28a; border-color: #2a5a35; }
body.dark-mode .alert-danger { background: #3a1a1a; color: #e07070; border-color: #5a2a2a; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
body.dark-mode .modal { background: #16213e; }
.modal-header { padding: 18px 20px; border-bottom: 1px solid #e0e0e0; display: flex; align-items: center; justify-content: space-between; }
body.dark-mode .modal-header { border-bottom-color: #2d3561; }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #888; padding: 4px; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #e0e0e0; display: flex; justify-content: flex-end; gap: 10px; }
body.dark-mode .modal-footer { border-top-color: #2d3561; }

/* ===== ORDER ENTRY - Multiple Items ===== */
.order-items-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-bottom: 10px; }
.order-items-table th { background: #f0f5fb; padding: 8px 10px; text-align: left; font-weight: 600; font-size: 0.78rem; color: #555; border-bottom: 2px solid #ddd; }
body.dark-mode .order-items-table th { background: #1e2d5f; color: #aaa; border-bottom-color: #2d3561; }
.order-items-table td { padding: 7px 10px; vertical-align: middle; border-bottom: 1px solid #eee; }
body.dark-mode .order-items-table td { border-bottom-color: #2d3561; }
.order-items-table .form-control { padding: 5px 8px; font-size: 0.82rem; }
.grand-total-row { background: #f8f9fa; font-weight: 700; }
body.dark-mode .grand-total-row { background: #1a2a50; }

/* ===== STATUS TOGGLE ===== */
.toggle-switch { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 44px; height: 22px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; border-radius: 22px; transition: background 0.3s; }
.toggle-slider:before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: transform 0.3s; }
.toggle input:checked + .toggle-slider { background: #28a745; }
.toggle input:checked + .toggle-slider:before { transform: translateX(22px); }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 5px; align-items: center; justify-content: flex-end; margin-top: 15px; }
.page-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid #ddd; border-radius: 5px; background: #fff; cursor: pointer; font-size: 0.82rem; color: #555; transition: all 0.2s; }
body.dark-mode .page-btn { background: #1e2d5f; border-color: #2d3561; color: #ccc; }
.page-btn:hover { background: #2c6fad; border-color: #2c6fad; color: #fff; }
.page-btn.active { background: #2c6fad; border-color: #2c6fad; color: #fff; }
.page-info { font-size: 0.78rem; color: #888; }

/* ===== LANDING PAGE ===== */
.landing-nav { background: #1e3a5f; padding: 0 30px; height: 70px; display: flex; align-items: center; justify-content: space-between; position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
.landing-nav-brand { color: #ffffff; font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.landing-nav-links { display: flex; gap: 25px; align-items: center; }
.landing-nav-links a { color: rgba(255,255,255,0.85); font-size: 0.875rem; transition: color 0.2s; }
.landing-nav-links a:hover { color: #ffffff; }
.landing-nav-links .btn-login { background: #2c6fad; color: #fff; padding: 7px 18px; border-radius: 5px; font-weight: 600; }
.hero { background: linear-gradient(135deg, #0d1f3c 0%, #1e3a5f 50%, #2c6fad 100%); color: #ffffff; padding: 140px 30px 80px; text-align: center; }
.hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 15px; line-height: 1.2; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 30px; }
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.hero-badge { background: rgba(255,255,255,0.15); padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; display: flex; align-items: center; gap: 5px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-btn-primary { background: #2c6fad; color: #fff; padding: 12px 28px; border-radius: 8px; font-size: 1rem; font-weight: 700; border: 2px solid #2c6fad; transition: all 0.2s; }
.hero-btn-primary:hover { background: #1e5490; border-color: #1e5490; }
.hero-btn-outline { background: transparent; color: #fff; padding: 12px 28px; border-radius: 8px; font-size: 1rem; font-weight: 700; border: 2px solid rgba(255,255,255,0.5); transition: all 0.2s; }
.hero-btn-outline:hover { background: rgba(255,255,255,0.1); }
.section { padding: 70px 30px; }
.section-alt { background: #f8fafc; }
body.dark-mode .section-alt { background: #1a1a2e; }
.container { max-width: 1100px; margin: 0 auto; }
.section-title { text-align: center; font-size: 1.8rem; font-weight: 700; color: #1e3a5f; margin-bottom: 10px; }
body.dark-mode .section-title { color: #c0d6f0; }
.section-subtitle { text-align: center; color: #666; font-size: 1rem; margin-bottom: 50px; max-width: 600px; margin-left: auto; margin-right: auto; }
body.dark-mode .section-subtitle { color: #888; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }
.feature-card { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 2px 15px rgba(0,0,0,0.06); text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
body.dark-mode .feature-card { background: #16213e; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.feature-icon { width: 60px; height: 60px; background: #e8f0fe; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #2c6fad; margin: 0 auto 15px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; color: #222; margin-bottom: 8px; }
body.dark-mode .feature-card h3 { color: #e0e0e0; }
.feature-card p { font-size: 0.875rem; color: #666; line-height: 1.6; }
body.dark-mode .feature-card p { color: #999; }
.dashboard-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.role-card { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 2px 15px rgba(0,0,0,0.06); border-top: 4px solid #2c6fad; }
body.dark-mode .role-card { background: #16213e; }
.role-card.green { border-top-color: #28a745; }
.role-card.orange { border-top-color: #fd7e14; }
.role-card.purple { border-top-color: #6f42c1; }
.role-card .role-icon { font-size: 1.8rem; margin-bottom: 12px; }
.role-card h3 { font-size: 1rem; font-weight: 700; color: #222; margin-bottom: 8px; }
body.dark-mode .role-card h3 { color: #e0e0e0; }
.role-card ul { list-style: none; font-size: 0.82rem; color: #666; }
body.dark-mode .role-card ul { color: #999; }
.role-card ul li { padding: 3px 0; display: flex; align-items: center; gap: 5px; }
.role-card ul li:before { content: '✓'; color: #28a745; font-size: 0.75rem; font-weight: 700; }
.footer { background: #1e3a5f; color: rgba(255,255,255,0.75); padding: 40px 30px 25px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer h4 { color: #fff; font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; }
.footer ul { list-style: none; }
.footer ul li { padding: 3px 0; font-size: 0.82rem; }
.footer ul li a { color: rgba(255,255,255,0.65); }
.footer ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; text-align: center; font-size: 0.8rem; }

/* ===== LOGIN PAGE ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0d1f3c 0%, #1e3a5f 50%, #2c6fad 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 40px; width: 90%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
body.dark-mode .login-card { background: #16213e; }
.login-logo { text-align: center; margin-bottom: 25px; }
.login-logo i { font-size: 2.5rem; color: #2c6fad; }
.login-logo h2 { font-size: 1.4rem; font-weight: 700; color: #1e3a5f; margin-top: 8px; }
body.dark-mode .login-logo h2 { color: #c0d6f0; }
.login-logo p { font-size: 0.8rem; color: #888; }
.login-form .form-group { margin-bottom: 18px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #888; font-size: 0.9rem; }
.input-icon .form-control { padding-left: 36px; }
.login-btn { width: 100%; padding: 11px; background: #2c6fad; color: #fff; border: none; border-radius: 6px; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.login-btn:hover { background: #1e5490; }
.login-footer { text-align: center; margin-top: 20px; font-size: 0.8rem; color: #888; }
.login-footer a { color: #2c6fad; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .sidebar { width: 60px; }
  .sidebar .nav-link .nav-text, .sidebar .nav-section-title, .sidebar-user-info, .sidebar-brand-text, .submenu { display: none; }
  .main-content { margin-left: 60px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 250px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar .nav-link .nav-text, .sidebar .nav-section-title, .sidebar-user-info, .sidebar-brand-text { display: block; }
  .submenu { display: none; }
  .submenu.open { display: block; }
  .main-content { margin-left: 0; }
  .topbar { padding: 0 15px; }
  .page-content { padding: 15px; }
  .hero h1 { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { flex-direction: column; }
  .form-row .form-group { min-width: auto; }
  .landing-nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.4rem; }
  .hero p { font-size: 0.9rem; }
}
