:root {
  --sidebar-width: 240px;
  --sidebar-collapsed: 60px;
  --primary: #0d6efd;
  --dark: #1a1d23;
  --card-shadow: 0 2px 10px rgba(0,0,0,.08);
}

body { font-family: 'Inter', sans-serif; font-size: 14px; background: #f5f6fa; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-height: calc(100vh - 56px);
  background: #1a1d23 !important;
  transition: width .25s ease;
  overflow-x: hidden;
  flex-shrink: 0;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .sidebar-heading,
.sidebar.collapsed .badge { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; padding: .5rem; }
.sidebar .nav-link { color: #adb5bd; padding: .45rem 1rem; border-radius: 6px; margin: 1px 6px; font-size: .875rem; display: flex; align-items: center; transition: all .2s; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.sidebar .nav-link.active { background: var(--primary) !important; color: #fff !important; }
.sidebar .sidebar-heading { font-size: .7rem; letter-spacing: .08em; padding: 0 1rem; }
.sidebar .nav-link i { width: 20px; font-size: 1rem; }

.main-content { min-width: 0; }

/* Cards */
.card { border: none; box-shadow: var(--card-shadow); border-radius: 12px; }
.card-header { border-bottom: 1px solid rgba(0,0,0,.06); background: #fff; font-weight: 600; border-radius: 12px 12px 0 0 !important; }
.stat-card { border-radius: 12px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.stat-card .icon-box { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* Tables */
.table-responsive { border-radius: 12px; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: #6c757d; border-top: none; }
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: rgba(13,110,253,.04); }

/* Forms */
.form-control, .form-select { border-radius: 8px; border-color: #dee2e6; font-size: .875rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(13,110,253,.15); }
.form-label { font-weight: 500; color: #495057; font-size: .875rem; }
.btn { border-radius: 8px; font-size: .875rem; font-weight: 500; }
.btn-primary { background: var(--primary); }

/* Badges */
.badge { font-size: .75rem; padding: .35em .65em; border-radius: 6px; }

/* Login/Register pages */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0d6efd22 0%, #6610f222 100%); }
.auth-card { width: 100%; max-width: 460px; border-radius: 16px !important; }
.auth-logo { font-size: 1.6rem; font-weight: 700; color: var(--primary); }

/* Upload area */
.upload-zone { border: 2px dashed #dee2e6; border-radius: 12px; padding: 2.5rem; text-align: center; transition: border-color .2s, background .2s; cursor: pointer; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: rgba(13,110,253,.04); }
.upload-zone i { font-size: 2.5rem; color: #6c757d; }

/* Progress bar */
.upload-progress { display: none; }
.upload-progress.show { display: block; }

/* Star Rating */
.star-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-rating input { display: none; }
.star-rating label { font-size: 1.2rem; color: #ddd; cursor: pointer; transition: color .15s; }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: #ffc107; }

/* Notice bar */
.notice-bar { font-size: .85rem; }

/* File type icons */
.file-icon { font-size: 1.8rem; }

/* Pagination */
.pagination .page-link { border-radius: 6px !important; margin: 0 2px; border: none; color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); }

/* Search highlight */
mark { background: #fff3cd; padding: 0 2px; border-radius: 3px; }

/* Responsive */
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: -var(--sidebar-width); z-index: 999; height: 100%; }
  .sidebar.mobile-open { left: 0; }
  .main-content { width: 100%; }
}

/* Dark mode toggle */
body.dark-mode { background: #121212; color: #e0e0e0; }
body.dark-mode .card { background: #1e1e1e; color: #e0e0e0; }
body.dark-mode .table { color: #e0e0e0; }
body.dark-mode .form-control { background: #2a2a2a; color: #e0e0e0; border-color: #444; }

/* Tooltips */
[data-bs-toggle="tooltip"] { cursor: pointer; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i { font-size: 3rem; color: #dee2e6; }

/* Activity dot */
.activity-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
