/* ============================================
   EcomPearls - Modern Management System CSS
   Premium Responsive Design v2.0
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-subtle: rgba(99, 102, 241, 0.08);
  --secondary: #0ea5e9;
  --success: #10b981;
  --success-subtle: rgba(16, 185, 129, 0.08);
  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.08);
  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.08);
  --info: #06b6d4;
  --info-subtle: rgba(6, 182, 212, 0.08);
  --dark: #1e293b;
  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --sidebar-width: 260px;
  --sidebar-collapsed: 0px;
  --topbar-height: 64px;
  --body-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============= Sidebar ============= */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1050;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: var(--topbar-height);
}

.sidebar-brand {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  letter-spacing: -0.02em;
}
.sidebar-brand:hover {
  color: var(--primary-light);
}
.sidebar-brand i {
  font-size: 1.5rem;
  color: var(--primary-light);
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.4));
}

.sidebar-toggle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.25rem;
  padding: 0.25rem;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition);
}
.sidebar-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.user-avatar i {
  font-size: 2.25rem;
  color: var(--primary-light);
  opacity: 0.9;
}
.user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
}
.user-role {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.sidebar-nav {
  list-style: none;
  padding: 0.5rem 0;
  flex: 1;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 220px);
  scroll-behavior: auto;
}

.sidebar-nav .nav-item {
  margin: 1px 0.5rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5625rem 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: var(--transition);
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.sidebar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.sidebar-nav .nav-link.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
  font-weight: 600;
}
.sidebar-nav .nav-link i {
  font-size: 1.0625rem;
  width: 1.375rem;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}
.sidebar-nav .nav-link.active i {
  opacity: 1;
}

/* Scroll active menu item into view on load */
.sidebar-nav .nav-item .nav-link.active {
  scroll-margin-top: 20px;
}

/* Sidebar divider */
.sidebar-nav .nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 10px 15px;
  list-style: none;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}
.sidebar-footer .btn {
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 0.5rem;
}

/* ============= Page Content ============= */
#page-content-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  transition:
    margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* ============= Topbar ============= */
.topbar {
  height: var(--topbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1020;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.95);
}

.topbar .sidebar-toggle {
  color: var(--text-secondary);
  font-size: 1.375rem;
}

.topbar-user {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topbar-user i {
  font-size: 1.25rem;
}

/* Notification Bell */
.notification-bell {
  position: relative;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.375rem;
  border-radius: var(--radius);
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.notification-bell:hover {
  color: var(--primary);
  background: var(--primary-subtle);
}
.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--card-bg);
  line-height: 1;
}

/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  max-height: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 2000;
  display: none;
  overflow: hidden;
}
.notification-dropdown.show {
  display: block;
}
.notification-dropdown-header {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.875rem;
}
.notification-dropdown-body {
  max-height: 340px;
  overflow-y: auto;
}
.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 0.75rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.notification-item:hover {
  background: var(--body-bg);
}
.notification-item.unread {
  background: rgba(99, 102, 241, 0.03);
}
.notification-item .noti-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.notification-item .noti-content {
  flex: 1;
  min-width: 0;
}
.notification-item .noti-title {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}
.notification-item .noti-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============= Content Area ============= */
.content-area {
  padding: 1.5rem;
  flex: 1;
}

/* ============= Stat Cards ============= */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.05;
  transform: translate(20px, -20px);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.875rem;
}
.stat-card .stat-icon.blue {
  background: var(--primary-subtle);
  color: var(--primary);
}
.stat-card .stat-icon.green {
  background: var(--success-subtle);
  color: var(--success);
}
.stat-card .stat-icon.orange {
  background: var(--warning-subtle);
  color: var(--warning);
}
.stat-card .stat-icon.red {
  background: var(--danger-subtle);
  color: var(--danger);
}
.stat-card .stat-icon.cyan {
  background: var(--info-subtle);
  color: var(--info);
}
.stat-card .stat-icon.sky {
  background: rgba(14, 165, 233, 0.08);
  color: var(--secondary);
}
.stat-card .stat-value {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-card .stat-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 20px;
  margin-top: 0.375rem;
}
.stat-change.up {
  background: var(--success-subtle);
  color: var(--success);
}
.stat-change.down {
  background: var(--danger-subtle);
  color: var(--danger);
}

/* ============= Cards ============= */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-body {
  padding: 1.25rem;
}
.card-footer {
  background: var(--body-bg);
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
}

/* ============= Tables ============= */
.table {
  margin-bottom: 0;
}
.table thead th {
  background: var(--body-bg);
  border-bottom: 2px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tbody td {
  padding: 0.6875rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8125rem;
}
.table-hover tbody tr:hover {
  background: var(--primary-subtle);
}
.table-responsive {
  border-radius: var(--radius-lg);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============= Badges ============= */
.badge-active {
  background: var(--success-subtle);
  color: var(--success);
  font-weight: 600;
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
}
.badge-inactive {
  background: var(--danger-subtle);
  color: var(--danger);
  font-weight: 600;
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
}
.badge-completed {
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
}
.badge-delayed {
  background: var(--warning-subtle);
  color: var(--warning);
  font-weight: 600;
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
}

/* ============= Buttons ============= */
.btn {
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  font-size: 0.8125rem;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}
.btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
}
.btn-action {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: var(--transition);
}
.btn-action:hover {
  transform: scale(1.1);
}

/* Quick Action Buttons */
.quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.quick-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.quick-action-btn i {
  font-size: 0.875rem;
}

/* ============= Forms ============= */
.form-control,
.form-select {
  border-color: var(--border-color);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  transition: var(--transition);
  background: var(--card-bg);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}
.form-label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.8125rem;
  margin-bottom: 0.375rem;
}
.input-group-text {
  background: var(--body-bg);
  border-color: var(--border-color);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ============= Page Header ============= */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-top: 0.125rem;
}

/* ============= Filters ============= */
.filter-group {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.filter-group .btn {
  font-size: 0.75rem;
  padding: 0.3rem 0.875rem;
  border-radius: 20px;
  font-weight: 500;
}
.filter-group .btn-outline-primary {
  border-color: var(--border-color);
  color: var(--text-secondary);
}
.filter-group .btn-outline-primary:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-light);
  color: var(--primary);
}
.filter-group .btn-outline-primary.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============= Timeline ============= */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--primary-light),
    var(--border-color)
  );
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  padding-bottom: 1.25rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-light);
}
.timeline-date {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.timeline-content {
  background: var(--body-bg);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border-light);
}

/* ============= Insight Cards ============= */
.insight-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}
.insight-card .insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.insight-card .insight-text {
  font-size: 0.8125rem;
  line-height: 1.5;
}
.insight-card .insight-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.125rem;
}
.insight-card .insight-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============= Reminder/Alert Cards ============= */
.reminder-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--warning);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}
.reminder-card:hover {
  box-shadow: var(--shadow);
}
.reminder-card.urgent {
  border-left-color: var(--danger);
}
.reminder-card.completed {
  border-left-color: var(--success);
  opacity: 0.7;
}
.reminder-card .reminder-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.reminder-card .reminder-text {
  flex: 1;
  min-width: 0;
}
.reminder-card .reminder-title {
  font-size: 0.8125rem;
  font-weight: 500;
}
.reminder-card .reminder-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ============= Login Page ============= */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6366f1 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  padding: 1rem;
}
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.login-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}
.login-card .logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-card .logo i {
  font-size: 3rem;
  color: var(--primary);
  filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
}
.login-card .logo h2 {
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.75rem;
  letter-spacing: -0.02em;
}
.login-attempts-warning {
  background: var(--warning-subtle);
  color: #92400e;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============= Alerts ============= */
.alert {
  border: none;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============= Modal ============= */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-xl);
}
.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}
.modal-title {
  font-weight: 600;
  font-size: 1.0625rem;
}
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 0.875rem 1.5rem;
}
.modal-backdrop.show {
  opacity: 0.4;
}

/* ============= Empty State ============= */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.35;
  color: var(--text-muted);
}
.empty-state p {
  font-size: 0.9375rem;
  max-width: 300px;
  margin: 0 auto;
}

/* ============= Search Bar ============= */
.search-box {
  position: relative;
  max-width: 320px;
}
.search-box .form-control {
  padding-left: 2.25rem;
  border-radius: 20px;
  background: var(--body-bg);
  border-color: transparent;
  font-size: 0.8125rem;
}
.search-box .form-control:focus {
  background: var(--card-bg);
  border-color: var(--primary-light);
}
.search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

/* ============= Progress Bar ============= */
.progress-thin {
  height: 6px;
  border-radius: 3px;
  background: var(--border-light);
  overflow: hidden;
}
.progress-thin .progress-bar {
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ============= Responsive ============= */
@media (max-width: 1200px) {
  .content-area {
    padding: 1.25rem;
  }
}

@media (max-width: 992px) {
  .stat-card .stat-value {
    font-size: 1.375rem;
  }
  .content-area {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.show {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  #page-content-wrapper {
    margin-left: 0;
    width: 100%;
  }
  .topbar {
    padding: 0 1rem;
  }
  .content-area {
    padding: 0.875rem;
  }
  .stat-card {
    padding: 1rem 1.25rem;
  }
  .stat-card .stat-value {
    font-size: 1.25rem;
  }
  .stat-card .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-title {
    font-size: 1.25rem;
  }
  .card-header {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }
  .card-body {
    padding: 1rem;
  }
  .table thead th {
    padding: 0.625rem 0.75rem;
    font-size: 0.6875rem;
  }
  .table tbody td {
    padding: 0.5625rem 0.75rem;
    font-size: 0.75rem;
  }
  .modal-dialog {
    margin: 0.5rem;
  }
  .modal-body {
    padding: 1rem;
  }
  .notification-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
  }
  .filter-group .btn {
    font-size: 0.6875rem;
    padding: 0.25rem 0.625rem;
  }
  .quick-action-btn {
    font-size: 0.6875rem;
    padding: 0.375rem 0.625rem;
  }
  .login-card {
    padding: 1.75rem;
  }
  .timeline {
    padding-left: 1.5rem;
  }
}

@media (max-width: 576px) {
  .content-area {
    padding: 0.75rem;
  }
  .stat-card {
    padding: 0.875rem 1rem;
  }
  .stat-card .stat-value {
    font-size: 1.125rem;
  }
  .stat-card .stat-label {
    font-size: 0.6875rem;
  }
  .page-title {
    font-size: 1.125rem;
  }
  .btn-sm {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }
  .topbar {
    height: 56px;
    padding: 0 0.75rem;
  }
  .topbar-user span:not(.bi) {
    display: none;
  }
  .search-box {
    max-width: 100%;
  }
}

/* ============= Overlay for mobile sidebar ============= */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1040;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show {
  display: block;
}

/* ============= Scrollbar ============= */
.sidebar::-webkit-scrollbar {
  width: 3px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============= Animations ============= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.fade-in {
  animation: fadeIn 0.4s ease-out;
}
.slide-in {
  animation: slideInRight 0.3s ease-out;
}

/* ============= Utilities ============= */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.min-w-0 {
  min-width: 0;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.fw-600 {
  font-weight: 600;
}
.fs-sm {
  font-size: 0.8125rem;
}
.fs-xs {
  font-size: 0.75rem;
}
.text-muted-more {
  color: var(--text-muted);
}
.border-dashed {
  border-style: dashed !important;
}
.hover-shadow:hover {
  box-shadow: var(--shadow-md);
}

/* ============= Print Styles ============= */
@media print {
  .sidebar,
  .topbar,
  .sidebar-overlay,
  .btn,
  .filter-group,
  .quick-actions {
    display: none !important;
  }
  #page-content-wrapper {
    margin-left: 0 !important;
  }
  .content-area {
    padding: 0 !important;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
  body {
    background: #fff;
    font-size: 12px;
  }
}
