/* ============================================================
   PlotX CRM — Premium Admin UI
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 68px;
  --header-height: 60px;

  --primary:        #4f46e5;
  --primary-dark:   #3730a3;
  --primary-light:  #818cf8;
  --secondary:      #64748b;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #0ea5e9;

  --sidebar-bg:        #0f172a;
  --sidebar-text:      #94a3b8;
  --sidebar-hover-bg:  #1e293b;
  --sidebar-active-bg: #4f46e5;
  --sidebar-active:    #fff;
  --sidebar-border:    #1e293b;

  --body-bg:    #f1f5f9;
  --card-bg:    #ffffff;
  --border-color: #e2e8f0;
  --text-primary:   #0f172a;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-md:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-lg:  0 20px 25px -5px rgba(0,0,0,.1),  0 8px 10px -6px rgba(0,0,0,.05);

  --radius:    0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --transition: all 0.2s ease;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { 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;
  overflow-x: hidden;
}

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

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Sidebar ────────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
  overflow: hidden;
}

#sidebar.collapsed { width: var(--sidebar-collapsed-width); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: var(--header-height);
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-brand-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand-text {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.3px;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.2s;
}

#sidebar.collapsed .sidebar-brand-text { opacity: 0; width: 0; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
}

.nav-section-title {
  color: #475569;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 20px 6px;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.2s;
}
#sidebar.collapsed .nav-section-title { opacity: 0; }

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.nav-link:hover {
  color: #e2e8f0;
  background: var(--sidebar-hover-bg);
  text-decoration: none;
}

.nav-link.active {
  color: var(--sidebar-active);
  background: var(--sidebar-active-bg);
  font-weight: 600;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary-light);
  border-radius: 0 3px 3px 0;
}

.nav-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-link-text {
  opacity: 1;
  transition: opacity 0.2s;
}
#sidebar.collapsed .nav-link-text { opacity: 0; width: 0; }

.nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--danger);
  color: #fff;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}
#sidebar.collapsed .nav-badge { display: none; }

/* Sidebar tooltip in collapsed mode */
#sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 10px;
}
#sidebar.collapsed .nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(var(--sidebar-collapsed-width) + 8px);
  background: #1e293b;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 9999;
}
#sidebar.collapsed .nav-link:hover::after { opacity: 1; }

.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

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

.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-user-info {
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.2s;
}
#sidebar.collapsed .sidebar-user-info { opacity: 0; width: 0; }

.sidebar-user-name {
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  color: #64748b;
  font-size: 0.7rem;
  white-space: nowrap;
}

/* ── Main content area ──────────────────────────────────────── */
#main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
}
#main-wrapper.sidebar-collapsed { margin-left: var(--sidebar-collapsed-width); }

/* ── Topbar ─────────────────────────────────────────────────── */
#topbar {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 900;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.topbar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.topbar-toggle:hover { background: var(--body-bg); color: var(--text-primary); }

.topbar-search {
  flex: 1;
  max-width: 320px;
}

.topbar-search .form-control {
  background: var(--body-bg);
  border-color: transparent;
  border-radius: 20px;
  font-size: 0.8rem;
  padding: 7px 14px 7px 36px;
}
.topbar-search .form-control:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.topbar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.85rem;
  pointer-events: none;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.topbar-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.topbar-btn:hover { background: var(--body-bg); color: var(--text-primary); }

.topbar-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card-bg);
}

.topbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border-color);
  margin: 0 4px;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  border-radius: 24px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.topbar-profile:hover { background: var(--body-bg); }

.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.topbar-profile-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.topbar-profile-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Page content ───────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.page-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.breadcrumb {
  font-size: 0.78rem;
  margin: 0;
  padding: 0;
  background: none;
}
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-light); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body { padding: 20px; }
.card-footer {
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-info { flex: 1; min-width: 0; }
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.stat-change {
  font-size: 0.72rem;
  margin-top: 4px;
  font-weight: 500;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger);  }

.stat-bg-shape {
  position: absolute;
  right: -16px; top: -16px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.06;
}

/* Icon color variants */
.icon-primary   { background: rgba(79,70,229,.12); color: var(--primary);   }
.icon-success   { background: rgba(16,185,129,.12); color: var(--success);   }
.icon-warning   { background: rgba(245,158,11,.12); color: var(--warning);   }
.icon-danger    { background: rgba(239,68,68,.12);  color: var(--danger);    }
.icon-info      { background: rgba(14,165,233,.12); color: var(--info);      }
.icon-secondary { background: rgba(100,116,139,.12);color: var(--secondary); }

/* ── Tables ─────────────────────────────────────────────────── */
.table { margin: 0; font-size: 0.84rem; }
.table thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 16px;
  white-space: nowrap;
}
.table tbody td {
  padding: 11px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-primary);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f8fafc; }
.table-actions { white-space: nowrap; }
.table-actions .btn { padding: 4px 8px; font-size: 0.75rem; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 20px;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-control, .form-select {
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
  outline: none;
}
.form-control.is-invalid { border-color: var(--danger); }
.invalid-feedback { font-size: 0.78rem; color: var(--danger); }

.input-group-text {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 8px 16px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-lg { padding: 11px 22px; font-size: 0.95rem; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

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

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  border: 0;
  border-radius: var(--radius);
  font-size: 0.84rem;
  border-left: 4px solid transparent;
}
.alert-success { background: rgba(16,185,129,.1); border-left-color: var(--success); color: #065f46; }
.alert-danger  { background: rgba(239,68,68,.1);  border-left-color: var(--danger);  color: #991b1b; }
.alert-warning { background: rgba(245,158,11,.1); border-left-color: var(--warning); color: #92400e; }
.alert-info    { background: rgba(14,165,233,.1); border-left-color: var(--info);    color: #0c4a6e; }

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm  { width: 28px; height: 28px; font-size: 0.65rem; }
.avatar-md  { width: 36px; height: 36px; font-size: 0.78rem; }
.avatar-lg  { width: 48px; height: 48px; font-size: 0.95rem; }
.avatar-xl  { width: 72px; height: 72px; font-size: 1.3rem;  }

/* ── Dropdown ───────────────────────────────────────────────── */
.dropdown-menu {
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 6px;
  font-size: 0.84rem;
  min-width: 180px;
}
.dropdown-item {
  padding: 7px 12px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 0.84rem;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--body-bg); color: var(--primary); }
.dropdown-item.text-danger:hover { background: rgba(239,68,68,.08); color: var(--danger); }
.dropdown-divider { margin: 4px 0; border-color: var(--border-color); }
.dropdown-header { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-light); padding: 8px 12px 4px; }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Timeline ───────────────────────────────────────────────── */
.timeline { position: relative; padding: 0; list-style: none; }
.timeline::before {
  content: '';
  position: absolute;
  left: 17px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border-color);
}
.timeline-item { display: flex; gap: 14px; padding-bottom: 16px; position: relative; }
.timeline-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
}
.timeline-content { flex: 1; padding-top: 4px; }
.timeline-title { font-size: 0.82rem; font-weight: 600; margin-bottom: 2px; }
.timeline-meta  { font-size: 0.74rem; color: var(--text-muted); }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state-title { font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.empty-state-text  { font-size: 0.84rem; }

/* ── Login page ─────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,.3) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}
.auth-wrapper::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,.2) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  pointer-events: none;
}

.auth-card {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  justify-content: center;
}
.auth-logo-icon {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}
.auth-logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.auth-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ── Notification panel ─────────────────────────────────────── */
.notification-dropdown {
  width: 340px;
  max-height: 480px;
  overflow-y: auto;
}
.notification-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
}
.notification-item:hover { background: var(--body-bg); }
.notification-item.unread { background: rgba(79,70,229,.05); }
.notification-item-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.notification-item-title  { font-size: 0.82rem; font-weight: 600; line-height: 1.3; }
.notification-item-text   { font-size: 0.76rem; color: var(--text-muted); line-height: 1.3; margin-top: 2px; }
.notification-item-time   { font-size: 0.7rem; color: var(--text-light); margin-top: 3px; }

/* ── Reminder card ──────────────────────────────────────────── */
.reminder-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  background: #fff;
  transition: var(--transition);
}
.reminder-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.reminder-card.due { border-color: var(--danger); background: rgba(239,68,68,.03); }

/* ── Sidebar submenu ────────────────────────────────────────── */
.nav-submenu {
  display: none;
  padding-left: 20px;
}
.nav-submenu.show { display: block; }
.nav-submenu .nav-link { padding: 6px 20px 6px 14px; font-size: 0.8rem; }

/* ── Progress ───────────────────────────────────────────────── */
.progress { height: 6px; border-radius: 20px; background: #e2e8f0; }
.progress-bar { border-radius: 20px; }

/* ── Permission grid ────────────────────────────────────────── */
.permission-group {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.permission-group-header {
  background: #f8fafc;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: capitalize;
  display: flex;
  align-items: center;
  gap: 8px;
}
.permission-group-body { padding: 12px 14px; }
.form-check-label { font-size: 0.82rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991px) {
  #sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }
  #sidebar.mobile-open { transform: translateX(0); }
  #main-wrapper { margin-left: 0 !important; }
  .page-content { padding: 16px; }
  .auth-card { padding: 28px 24px; }
}

@media (max-width: 576px) {
  .page-header { flex-direction: column; align-items: stretch; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 1.4rem; }
}

/* ── Utility ────────────────────────────────────────────────── */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cursor-pointer { cursor: pointer; }
.border-dashed   { border-style: dashed !important; }
.fw-semibold     { font-weight: 600 !important; }
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem  !important; }
.gap-3 { gap: 1rem   !important; }
