/* ==========================================================================
   HR ERP Admin Panel — Professional Design System
   ========================================================================== */

:root {
  --primary: #1E3A5F;
  --primary-lt: #2B5EA7;
  --primary-xlt: #EBF2FA;
  --accent: #E8A838;
  --accent-lt: #FFF8EB;
  --success: #0D9B56;
  --success-lt: #E6F7EF;
  --danger: #D63031;
  --danger-lt: #FDE8E8;
  --warning: #E67E22;
  --warning-lt: #FFF4E5;
  --info: #2E86C1;
  --info-lt: #E8F4FD;

  --sidebar-w: 260px;
  --topbar-h: 64px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --bg-body: #F0F2F5;
  --bg-sidebar: #111827;
  --bg-sidebar-hover: #1F2937;
  --bg-sidebar-active: rgba(46, 134, 193, 0.15);
  --text-sidebar: rgba(255, 255, 255, 0.7);
  --text-primary: #1A1D21;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --border-color: #E5E7EB;
  --border-light: #F3F4F6;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Base Reset & Layout
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body.admin-body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary-lt); text-decoration: none; }
a:hover { color: var(--primary); }

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.admin-body .sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar .logo {
  padding: 0 1.25rem;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar .logo .logo-icon {
  width: 32px; height: 32px;
  background: var(--primary-lt);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 800; color: #fff;
}

.sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.sidebar .nav-section {
  padding: 1rem 1.25rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.25rem;
  margin: 1px 0.5rem;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 450;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.sidebar .nav-link svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.sidebar .nav-link:hover {
  background: var(--bg-sidebar-hover);
  color: #fff;
}
.sidebar .nav-link:hover svg { opacity: 0.9; }

.sidebar .nav-link.active {
  background: var(--bg-sidebar-active);
  color: #fff;
  font-weight: 500;
}
.sidebar .nav-link.active svg { opacity: 1; color: var(--primary-lt); }

.sidebar .sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 0.75rem 1.25rem;
  flex-shrink: 0;
}

.sidebar .sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
}

.sidebar .sidebar-user .user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-lt);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600;
  flex-shrink: 0;
}

.sidebar .sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar .sidebar-user .user-name {
  font-weight: 500; color: rgba(255,255,255,0.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar .sidebar-user .user-role { font-size: 0.6875rem; color: rgba(255,255,255,0.45); }

.sidebar .logout-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: transparent; border: none; color: rgba(255,255,255,0.5);
  cursor: pointer; transition: all var(--transition);
}
.sidebar .logout-btn:hover { background: rgba(214,48,49,0.2); color: var(--danger); }

/* --------------------------------------------------------------------------
   Main Content & Top Bar
   -------------------------------------------------------------------------- */
.admin-body .main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-body .top-bar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
}

.admin-body .top-bar h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.top-bar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-body .content-body {
  flex: 1;
  padding: 1.5rem 1.75rem 2rem;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 1rem 1.5rem;
  background: #FAFBFC;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header h3 { margin: 0; font-size: inherit; font-weight: inherit; }
.card-body { padding: 1.5rem; }

/* Stat cards */
.stat-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

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

.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.stat-card .stat-icon.icon-primary { background: var(--primary-xlt); color: var(--primary-lt); }
.stat-card .stat-icon.icon-success { background: var(--success-lt); color: var(--success); }
.stat-card .stat-icon.icon-warning { background: var(--warning-lt); color: var(--warning); }
.stat-card .stat-icon.icon-danger  { background: var(--danger-lt);  color: var(--danger); }
.stat-card .stat-icon.icon-info    { background: var(--info-lt);    color: var(--info); }

.stat-card .stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

.stat-card .stat-sub {
  font-size: 0.75rem;
  margin-top: 0.35rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Data Tables
   -------------------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: #FAFBFC;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover td { background: #F9FAFB; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .empty-row td {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-success { background: var(--success-lt); color: var(--success); }
.badge-warning { background: var(--warning-lt); color: #B45309; }
.badge-danger  { background: var(--danger-lt);  color: var(--danger); }
.badge-info    { background: var(--info-lt);    color: var(--info); }
.badge-primary { background: var(--primary-xlt); color: var(--primary-lt); }
.badge-secondary { background: #F3F4F6; color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 1.125rem; }

.form-group label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--primary-lt);
  box-shadow: 0 0 0 3px rgba(43,94,167,0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group .error {
  display: block;
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 0.3rem;
  font-weight: 500;
}

.form-group .is-invalid,
.form-group input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(214,48,49,0.1);
}

.form-group input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--primary-lt);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-family: var(--font);
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
  line-height: 1.5;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary-lt);
  color: #fff;
  box-shadow: 0 1px 2px rgba(30,58,95,0.15);
}
.btn-primary:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(30,58,95,0.2);
}

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #0B8A4B; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B71C1C; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #D35400; color: #fff; }

.btn-outline {
  background: #fff;
  border-color: var(--border-color);
  color: var(--text-secondary);
}
.btn-outline:hover {
  background: #F9FAFB;
  border-color: var(--primary-lt);
  color: var(--primary-lt);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.375rem 0.625rem;
}
.btn-ghost:hover { background: #F3F4F6; color: var(--text-primary); }

.btn-sm {
  padding: 0.3rem 0.625rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
}

.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 450;
  border-left: 3px solid transparent;
}

.alert-success { background: var(--success-lt); color: #065F38; border-left-color: var(--success); }
.alert-error   { background: var(--danger-lt);  color: #9B1C1C; border-left-color: var(--danger); }
.alert-warning { background: var(--warning-lt); color: #92400E; border-left-color: var(--warning); }
.alert-info    { background: var(--info-lt);    color: #1E4D6E; border-left-color: var(--info); }

.alert .alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1;
  opacity: 0.5;
  transition: opacity var(--transition);
  padding: 0.25rem;
}
.alert .alert-close:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.25rem;
  align-items: center;
}

.pagination li a,
.pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  background: #fff;
}

.pagination li a:hover {
  background: var(--primary-xlt);
  border-color: var(--primary-lt);
  color: var(--primary-lt);
}

.pagination li.active span {
  background: var(--primary-lt);
  color: #fff;
  border-color: var(--primary-lt);
  font-weight: 600;
}

.pagination li.disabled span {
  color: var(--text-muted);
  background: #FAFBFC;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Progress Bar
   -------------------------------------------------------------------------- */
.progress-bar {
  height: 8px;
  background: #E5E7EB;
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-lt), var(--info));
  border-radius: 100px;
  transition: width 0.4s ease;
}

.progress-bar.progress-success .progress-fill {
  background: linear-gradient(90deg, #0D9B56, #10B981);
}

/* --------------------------------------------------------------------------
   Filter Row
   -------------------------------------------------------------------------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.filter-row .form-group { margin-bottom: 0; min-width: 0; }

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.tabs {
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0;
}

.tabs .tab-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1.125rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tabs .tab-link:hover { color: var(--primary-lt); }

.tabs .tab-link.active {
  color: var(--primary-lt);
  font-weight: 600;
  border-bottom-color: var(--primary-lt);
}

.tab-content { padding-top: 0.5rem; }
.tab-content [data-tab-panel] { display: none; }
.tab-content [data-tab-panel].active { display: block; }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}

.modal .modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 1.0625rem;
}

.modal .modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }

.modal .modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background: #FAFBFC;
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary-lt); }
.font-semibold { font-weight: 600; }
.font-mono { font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace; }

.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; }
.p-0 { padding: 0; }
.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 0.75rem; }
.gap-3 { gap: 1rem; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.4; }
.empty-state p { font-size: 0.875rem; margin: 0; }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border-color); margin: 1.5rem 0; }

/* Avatar / initials */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 600; color: #fff;
  background: var(--primary-lt);
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.125rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Section header within content */
.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Auth Layout
   -------------------------------------------------------------------------- */
body.auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
}

.auth-container { width: 100%; max-width: 420px; padding: 1rem; }

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
}

.auth-brand { text-align: center; margin-bottom: 2rem; }

.auth-brand .auth-logo-mark {
  width: 52px; height: 52px;
  margin: 0 auto 0.75rem;
  background: var(--primary-lt);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.25rem; font-weight: 800;
}

.auth-logo {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Notification Bell
   -------------------------------------------------------------------------- */
.notification-bell {
  position: relative;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

.notification-bell:hover { background: #F3F4F6; }

.notification-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  pointer-events: none;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 360px;
  max-height: 440px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  z-index: 200;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.notification-dropdown.open { display: flex; }

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 600;
}

.notification-dropdown-header .btn-link {
  background: none; border: none;
  color: var(--primary-lt);
  cursor: pointer; font-size: 0.75rem; font-weight: 500; padding: 0;
}
.notification-dropdown-header .btn-link:hover { text-decoration: underline; }

.notification-list { overflow-y: auto; max-height: 360px; }

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: #F9FAFB; }

.notification-item.unread {
  background: var(--primary-xlt);
  border-left: 3px solid var(--primary-lt);
}
.notification-item.unread:hover { background: #DDE9F6; }

.notification-item-msg { font-size: 0.8125rem; color: var(--text-primary); line-height: 1.45; }
.notification-item-time { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.25rem; }

.notification-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
.hamburger {
  display: none;
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: var(--text-secondary);
  padding: 0.25rem; margin-right: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.hamburger:hover { background: #F3F4F6; }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  z-index: 999;
}

@media (max-width: 768px) {
  .admin-body .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  .sidebar-open .sidebar { transform: translateX(0); }
  .admin-body .main-content { margin-left: 0 !important; }
  .hamburger { display: flex; }
  .sidebar-open .sidebar-overlay { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .filter-row { flex-wrap: wrap; }
  .data-table { display: block; overflow-x: auto; }
  .top-bar h1 { font-size: 1rem; }
  .content-body { padding: 1rem !important; }
}

/* --------------------------------------------------------------------------
   Button Loading State
   -------------------------------------------------------------------------- */
.btn.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: 0.5rem;
  animation: btn-spin 0.6s linear infinite;
}

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

/* --------------------------------------------------------------------------
   Scrollbar (webkit)
   -------------------------------------------------------------------------- */
.sidebar nav::-webkit-scrollbar { width: 4px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.notification-list::-webkit-scrollbar { width: 4px; }
.notification-list::-webkit-scrollbar-track { background: transparent; }
.notification-list::-webkit-scrollbar-thumb { background: #DDD; border-radius: 4px; }

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  .sidebar, .top-bar, .hamburger, .sidebar-overlay { display: none !important; }
  .admin-body .main-content { margin-left: 0 !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
