/* ==========================================================================
   EffertyWork Enterprise Design System
   Corporate Modern / Tonal Minimalism - Compact High-Density UI
   Colors: Imperial Plum (#5A1559) & Polished Gold (#D4A338)
   ========================================================================== */

/* Zoom-out root base scale for high information density */
html {
  font-size: 13.5px;
}

:root {
  --primary: #5A1559;
  --primary-dark: #3E003E;
  --primary-hover: #6E1B6D;
  --primary-container: #5a1559;
  --primary-light: #F5EBF4;
  --primary-glow: rgba(90, 21, 89, 0.15);

  --secondary: #D4A338;
  --secondary-hover: #B88A28;
  --secondary-light: #FCF8EE;
  --secondary-border: #E5B84D;

  --tertiary: #842A7F;
  --surface-canvas: #FAF9FA;
  --surface-card: #FFFFFF;
  --surface-subtle: #F7EAF2;

  --text-main: #201A1F;
  --text-muted: #736B74;
  --text-light: #A39AA2;

  --border-light: #ECE6EB;
  --border-medium: #D8CED7;

  --success: #198754;
  --success-bg: #E8F5E9;
  --warning: #B38600;
  --warning-bg: #FFF8E1;
  --info: #0D6EFD;
  --info-bg: #E7F1FF;
  --danger: #DC3545;
  --danger-bg: #FDE8E8;

  --font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(42, 10, 41, 0.04);
  --shadow-md: 0 3px 8px rgba(42, 10, 41, 0.06);
  --shadow-lg: 0 8px 20px rgba(42, 10, 41, 0.08);
  --shadow-popover: 0 6px 16px -3px rgba(42, 10, 41, 0.10);

  --sidebar-width: 220px;
  --topbar-height: 48px;
  --radius-sm: 5px;
  --radius-md: 6px;
  --radius-lg: 10px;
}

body {
  font-family: var(--font-family);
  background-color: var(--surface-canvas);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Layout Architecture: Sidebar & Main Wrapper
   ========================================================================== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: #FFFFFF;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  transition: transform 0.2s ease;
}

.sidebar-brand {
  height: var(--topbar-height);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}

.sidebar-brand img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.sidebar-brand .brand-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.sidebar-brand .brand-badge {
  font-size: 0.6rem;
  background: var(--secondary-light);
  color: var(--secondary);
  border: 1px solid var(--secondary-border);
  padding: 1px 5px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-menu {
  padding: 0.75rem 0.6rem;
  flex: 1;
  overflow-y: auto;
  list-style: none;
  margin: 0;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.6rem 0.6rem 0.25rem 0.6rem;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 0.15rem;
  transition: all 0.12s ease-in-out;
}

.nav-item-link i {
  font-size: 1rem;
  transition: color 0.12s ease;
}

.nav-item-link:hover {
  background: var(--surface-subtle);
  color: var(--primary);
}

.nav-item-link.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 1px 5px var(--primary-glow);
}

.nav-item-link.active i {
  color: #FFFFFF;
}

.sidebar-footer {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--border-light);
  background: #FCFAFC;
}

.sidebar-footer .sidebar-user-name {
  color: var(--text-main);
}

.sidebar-footer .sidebar-user-meta {
  color: var(--text-muted);
}

.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  background-color: var(--surface-canvas);
  transition: margin-left 0.2s ease;
}

/* ==========================================================================
   Topbar Header
   ========================================================================== */
.app-topbar {
  height: var(--topbar-height);
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topbar-search {
  position: relative;
  width: 260px;
}

.topbar-search i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.topbar-search input {
  padding-left: 2.1rem;
  background: var(--surface-canvas);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  height: 32px;
}

.topbar-search input:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  font-size: 0.85rem;
  transition: all 0.12s ease;
}

.btn-icon:hover {
  background: var(--surface-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-icon .badge-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border: 1.5px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* ==========================================================================
   Modernized Notifications Dropdown
   ========================================================================== */
.notifications-dropdown-menu {
  width: 380px;
  max-width: 92vw;
  border-radius: var(--radius-lg, 12px) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem !important;
  z-index: 1050;
  background: #ffffff;
  padding: 0 !important;
}

.notifications-dropdown-header {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notifications-dropdown-header .header-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}

.notifications-dropdown-header .btn-mark-all-read {
  font-size: 0.72rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.notifications-dropdown-header .btn-mark-all-read:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.notifications-list {
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Custom Slim Modern Scrollbar */
.notifications-list::-webkit-scrollbar {
  width: 5px;
}
.notifications-list::-webkit-scrollbar-track {
  background: transparent;
}
.notifications-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.notifications-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.notification-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f8fafc;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
  position: relative;
}

.notification-dropdown-item:last-child {
  border-bottom: none;
}

.notification-dropdown-item:hover {
  background: #f8fafc;
  color: inherit;
}

.notification-dropdown-item.is-unread {
  background: #fbfcfe;
}

.notification-dropdown-item.is-unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: #3b82f6;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

.notification-dropdown-item .notif-icon-box {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-top: 2px;
  border: 1px solid transparent;
}

.notification-dropdown-item .notif-body {
  flex: 1;
  min-width: 0;
}

.notification-dropdown-item .notif-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.notification-dropdown-item .notif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.notification-dropdown-item.is-unread .notif-title {
  color: #0f172a;
}

.notification-dropdown-item .notif-unread-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  background: #3b82f6;
  border-radius: 50%;
  display: inline-block;
}

.notification-dropdown-item .notif-time {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
}

.notification-dropdown-item .notif-message {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

.notifications-dropdown-footer {
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.notifications-dropdown-footer a {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.notifications-dropdown-footer a:hover {
  color: #1d4ed8;
  transform: translateX(2px);
}


.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.82rem;
  transition: all 0.12s ease;
}

.user-profile-btn:hover {
  background: var(--surface-subtle);
  border-color: var(--border-light);
}

.avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  user-select: none;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-circle-xs {
  width: 18px;
  height: 18px;
  font-size: 0.55rem;
}

.avatar-circle-sm {
  width: 24px;
  height: 24px;
  font-size: 0.65rem;
}

.avatar-circle-md {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.avatar-circle-lg {
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
}

.avatar-circle-xl {
  width: 80px;
  height: 80px;
  font-size: 1.8rem;
  border: 3px solid #FFFFFF;
  box-shadow: var(--shadow-md);
}

.avatar-group {
  display: inline-flex;
  align-items: center;
}

.avatar-group .avatar-circle {
  border: 2px solid #FFFFFF;
  margin-left: -8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, z-index 0.15s ease;
}

.avatar-group .avatar-circle:first-child {
  margin-left: 0;
}

.avatar-group .avatar-circle:hover {
  transform: translateY(-2px) scale(1.1);
  z-index: 5;
}

.avatar-upload-wrapper {
  position: relative;
  display: inline-block;
}

.avatar-upload-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--primary);
  color: #FFFFFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  font-size: 0.75rem;
}

.avatar-upload-badge:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
  color: #FFFFFF;
}


/* ==========================================================================
   Content Container
   ========================================================================== */
.app-content {
  padding: 1.15rem 1.25rem;
  flex: 1;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.7rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--text-muted);
  font-size: 0.72rem;
}

@media (max-width: 575.98px) {
  .app-footer {
    flex-wrap: wrap;
    padding-inline: 1rem;
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.015em;
}

.page-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ==========================================================================
   Theme Buttons & Controls
   ========================================================================== */
.btn-efferty {
  background: var(--primary);
  color: #FFFFFF;
  border: 1px solid var(--primary);
  font-weight: 500;
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-efferty:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #FFFFFF;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.task-modal-action-btn {
  flex: 0 0 76px;
  width: 76px;
  height: 36px;
  padding: 0.2rem 0.3rem;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.05;
}

.btn-efferty-secondary {
  background: var(--secondary-light);
  color: var(--primary);
  border: 1px solid var(--secondary-border);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-efferty-secondary:hover {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary); 
}

.btn-efferty-blue {
  background: #EAF2FF;
  color: #0D6EFD;
  border-color: #B6D4FE;
}

.btn-efferty-blue:hover,
.btn-efferty-blue:focus-visible {
  background: #0D6EFD;
  color: #FFFFFF;
  border-color: #0D6EFD;
}

.btn-efferty-outline {
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  font-weight: 500;
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
}

.btn-efferty-outline:hover {
  background: var(--surface-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   Cards & Surfaces
   ========================================================================== */
.efferty-card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.12s ease;
}

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

.efferty-card-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.efferty-card-body {
  padding: 1rem;
}

/* ==========================================================================
   Project Cards & Workstream Components
   ========================================================================== */
.project-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -4px rgba(90, 21, 89, 0.10);
  border-color: rgba(90, 21, 89, 0.25);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card-header {
  padding: 1.15rem 1.25rem 0.5rem 1.25rem;
}

.project-card-body {
  padding: 0 1.25rem 1.15rem 1.25rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.project-card-footer {
  padding: 0.85rem 1.25rem;
  background: #FAF8FA;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.project-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  transition: color 0.15s ease;
}

.project-card-title:hover {
  color: var(--primary);
}

.project-card-desc {
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.project-filter-btn {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.project-filter-btn:hover {
  color: var(--text-main);
  background: var(--surface-subtle);
}

.project-filter-btn.active {
  background: #FFFFFF;
  color: var(--primary);
  border-color: var(--border-medium);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

#projectSearchToolbar .project-search-controls {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

#projectSearchToolbar .project-search-group {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 575.98px) {
  #projectSearchToolbar .project-search-controls {
    width: 100%;
    align-items: stretch !important;
  }

  #projectSearchToolbar .project-search-group {
    width: 100% !important;
    flex: 1 1 100%;
  }
}

/* KPI Summary Stat Cards */
.kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.my-kpi-summary-grid .kpi-card {
  height: 100%;
}

.kpi-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3.5px;
  background: var(--primary);
}

.kpi-card.kpi-gold::before {
  background: var(--secondary);
}

.kpi-card.kpi-success::before {
  background: var(--success);
}

.kpi-card.kpi-danger::before {
  background: var(--danger);
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-top: 0.25rem;
}

.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: var(--surface-subtle);
  color: var(--primary);
  flex-shrink: 0;
}

.kpi-gold .kpi-icon {
  background: var(--secondary-light);
  color: var(--secondary);
}

.kpi-success .kpi-icon {
  background: var(--success-bg);
  color: var(--success);
}

.kpi-danger .kpi-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

/* 5-Column Grid Utilities */
@media (min-width: 992px) {
  .row-cols-lg-5 > * {
    flex: 0 0 auto;
    width: 20%;
  }
}
@media (min-width: 1200px) {
  .row-cols-xl-5 > * {
    flex: 0 0 auto;
    width: 20%;
  }
}

/* ==========================================================================
   Pills & Badges
   ========================================================================== */
.badge-status {
  padding: 0.22rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
}

.badge-todo {
  background: #F0F2F5;
  color: #495057;
  border: 1px solid #CED4DA;
}

.badge-inprogress {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #d280c9;
}

.badge-review {
  background: var(--secondary-light);
  color: #8A6511;
  border: 1px solid var(--secondary-border);
}

.badge-completed {
  background: #E8F5E9;
  color: #1B5E20;
  border: 1px solid #A5D6A7;
}

.badge-pending-verification {
  background: #FFF8E1;
  color: #F57F17;
  border: 1px solid #FFD54F;
  animation: pulse-pending 2s ease-in-out infinite;
}

@keyframes pulse-pending {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.badge-priority {
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: capitalize;
  display: inline-flex;
  align-items: center;
}

.badge-urgent {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #FFCDD2;
}

.badge-high {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFE0B2;
}

.badge-medium {
  background: #E8EAF6;
  color: #283593;
  border: 1px solid #C5CAE9;
}

.badge-low {
  background: #F1F8E9;
  color: #33691E;
  border: 1px solid #DCEDC8;
}

/* Department Badge Styles */
.badge-dept {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 5px;
  display: inline-block;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.badge-dept-executive {
  background: linear-gradient(135deg, #5A1559 0%, #7A1F78 100%);
  color: #FFFFFF;
  border: 1px solid #4A0549;
  box-shadow: 0 2px 4px rgba(90, 21, 89, 0.15);
}

.badge-dept-marketing {
  background: #E8F5E9;
  color: #1B5E20;
  border: 1px solid #A5D6A7;
}

.badge-dept-hr {
  background: #E3F2FD;
  color: #0D47A1;
  border: 1px solid #90CAF9;
}

.badge-dept-sales {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFB74D;
}

.badge-dept-procurement {
  background: #F3E5F5;
  color: #6A1B9A;
  border: 1px solid #BA68C8;
}

.badge-dept-customer {
  background: #FCE4EC;
  color: #AD1457;
  border: 1px solid #F48FB1;
}

.badge-dept-operation {
  background: #FFF8E1;
  color: #F57F17;
  border: 1px solid #FFD54F;
}

.badge-dept-general {
  background: #F5F5F5;
  color: #616161;
  border: 1px solid #E0E0E0;
}

/* Progress bar styling */
.progress-efferty {
  height: 6px;
  border-radius: 999px;
  background-color: var(--border-light);
  overflow: hidden;
}

.progress-efferty .progress-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--tertiary) 100%);
  border-radius: 999px;
}

/* Standardized progress bar colors based on completion percentage */
.progress-efferty .progress-bar.progress-low {
  background: #f56565 !important; /* Red for 0-49% */
  background-image: none !important;
}

.progress-efferty .progress-bar.progress-medium {
  background: #ed8936 !important; /* Orange for 50-99% */
  background-image: none !important;
}

.progress-efferty .progress-bar.progress-complete {
  background: #48bb78 !important; /* Green for 100% */
  background-image: none !important;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.efferty-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.efferty-table th {
  background: #FAF8FA;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.efferty-table td {
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  background: #FFFFFF;
}

.efferty-table tr:hover td {
  background: #FCFAFC;
}

/* Form Controls Compact */
.form-control,
.form-select {
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
  border-color: var(--border-medium);
  border-radius: var(--radius-md);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Input Group Password Controls */
.input-group > .form-control:not(:last-child) {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.input-group > .input-group-text:not(:first-child) {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* ==========================================================================
   Authentication Screens (Login)
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FAF7FA 0%, #F5EBF4 100%);
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.auth-logo {
  height: 46px;
  max-width: 180px;
  margin-bottom: 0.5rem;
  object-fit: contain;
}

/* ==========================================================================
   Task Attachments Component
   ========================================================================== */
.attachment-dropzone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  background: var(--surface-canvas);
  cursor: pointer;
  transition: all 0.2s ease;
}

.attachment-dropzone:hover,
.attachment-dropzone.dragover {
  border-color: var(--primary);
  background: var(--surface-subtle);
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  margin-bottom: 0.45rem;
  transition: all 0.15s ease;
}

.attachment-item:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.attachment-item.link-item {
  border-left: 3px solid var(--primary);
  background: linear-gradient(90deg, var(--primary-light) 0%, #FFFFFF 15%);
}

.attachment-item.link-item:hover {
  border-left-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.attachment-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.attachment-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  display: block;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-name:hover {
  color: var(--primary);
  text-decoration: underline;
}

.attachment-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Overrides
   ========================================================================== */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.show {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .app-main {
    margin-left: 0;
  }

  .app-sidebar.show ~ .app-main .app-footer {
    display: none;
  }

  .topbar-search {
    width: 180px;
  }
}


/* ==========================================================================
   KPI Dashboard Styles
   ========================================================================== */

.chart-bars {
  display: flex;
  gap: 15px;
  justify-content: space-around;
  padding: 10px 0;
}

/* ==========================================================================
   Print Media Queries for KPI Dashboard
   ========================================================================== */

@media print {
  /* Hide navigation elements */
  .app-sidebar,
  .app-topbar,
  .page-header .d-flex,
  .btn,
  .no-print {
    display: none !important;
  }
  
  /* Adjust main content */
  .app-main {
    margin-left: 0 !important;
    padding-top: 0 !important;
  }
  
  .page-header {
    margin-bottom: 20px;
    page-break-after: avoid;
  }
  
  .page-title {
    font-size: 24px;
    margin-bottom: 5px;
  }
  
  .page-subtitle {
    font-size: 12px;
  }
  
  /* Optimize card printing */
  .efferty-card,
  .kpi-card {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
  }
  
  /* Adjust colors for print */
  body {
    background: white !important;
  }
  
  .bg-light {
    background: #f8f9fa !important;
  }
  
  /* Table adjustments */
  .efferty-table {
    font-size: 10px;
  }
  
  .efferty-table th,
  .efferty-table td {
    padding: 6px 8px !important;
  }
  
  /* Ensure charts are visible */
  .chart-bars {
    page-break-inside: avoid;
  }
  
  /* Row breaks */
  .row {
    page-break-inside: avoid;
  }
  
  /* Badge adjustments */
  .badge {
    border: 1px solid #000 !important;
  }
  
  /* Add print header */
  @page {
    margin: 1cm;
  }
  
  /* Ensure proper spacing */
  .mb-4 {
    margin-bottom: 1rem !important;
  }
}

/* ==============================
   ARCHIVED PROJECT STYLES
   ============================== */

.project-card-archived {
  position: relative;
  opacity: 0.75;
  filter: grayscale(30%);
}

.project-card-archived:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.archived-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  pointer-events: none;
}

.archived-overlay .badge {
  font-size: 0.7rem;
  padding: 0.35rem 0.65rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Badge styling for warning (archived) */
.badge.bg-warning-subtle {
  background-color: #FFF3CD !important;
  color: #997404 !important;
  border: 1px solid #FFE69C !important;
}

/* Archived project card adjustments */
.project-card-archived .project-card-title {
  color: #6c757d;
}

.project-card-archived .project-card-body {
  color: #6c757d;
}

/* ==========================================================================
   Team Member Selection Table - Checkbox Alignment Fix
   ========================================================================== */

/* Remove default margin from checkboxes/radios in table cells */
.table td .form-check-input {
  margin: 0;
  vertical-align: middle;
}

/* Ensure centered alignment for checkbox columns */
.table td.text-center .form-check-input {
  display: inline-block;
}

/* Additional specificity for create and edit task modals */
.create-task-member-check,
.create-task-primary-radio,
.edit-task-member-check,
.edit-task-primary-radio,
.admin-task-member-check,
.admin-task-primary-radio {
  margin: 0 !important;
  vertical-align: middle;
}


/* Searchable Project Dropdown Styles */
#adminTaskProjectDropdown {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#adminTaskProjectDropdown .list-group-item {
  transition: all 0.2s ease;
  cursor: pointer;
}

#adminTaskProjectDropdown .list-group-item:hover {
  background-color: #f8f9fa;
  border-left: 3px solid var(--primary);
  padding-left: calc(1rem - 3px);
}

#adminTaskProjectDropdown .list-group-item:active {
  background-color: var(--primary);
  color: white;
}

#adminTaskProjectDropdown .list-group-item:active i {
  color: white;
}

#adminTaskProjectSearch:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(90, 21, 89, 0.15);
}

#adminTaskProjectSelected {
  background-color: #f8f9fa;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#adminTaskProjectSelected .text-success {
  color: #198754 !important;
}

#adminTaskProjectSelected strong {
  color: #212529;
  font-weight: 600;
}

#adminTaskProjectClear {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  text-decoration: none;
}

#adminTaskProjectClear:hover {
  background-color: #fff3cd;
  border-radius: 4px;
}

/* Verification System Enhancements */
.rejection-preset-btn {
  font-size: 0.775rem !important;
  border-radius: 50rem !important;
  padding: 0.3rem 0.65rem !important;
  transition: all 0.15s ease-in-out;
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
}

.rejection-preset-btn:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
  transform: translateY(-1px);
}

.bulk-task-select {
  width: 1.15rem;
  height: 1.15rem;
  cursor: pointer;
  accent-color: var(--primary);
}

#bulkActionBar {
  background: rgba(90, 21, 89, 0.06);
  border: 1px solid rgba(90, 21, 89, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 24-Hour Deadline Pulse Indicator Badges */
.badge-due-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: #FFF1F2;
  color: #BE123C;
  border: 1px solid #FECDD3;
  line-height: 1.2;
}

.badge-due-pulse.pulse-amber {
  background: #FFFBEB;
  color: #B45309;
  border-color: #FDE68A;
}

.pulse-beacon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #E11D48;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.pulse-beacon::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(225, 29, 72, 0.45);
  animation: beaconPulse 1.6s infinite ease-out;
}

.pulse-amber .pulse-beacon {
  background-color: #D97706;
}

.pulse-amber .pulse-beacon::after {
  background-color: rgba(217, 119, 6, 0.45);
}

@keyframes beaconPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Subtasks Checklist Progress Indicators */
.badge-subtasks {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.42rem;
  border-radius: var(--radius-sm);
  background: #F3F4F6;
  color: #4B5563;
  border: 1px solid #E5E7EB;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.badge-subtasks i {
  font-size: 0.78rem;
}

.badge-subtasks.is-complete {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}

.badge-subtasks.in-progress {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
}
