/* ===================================
   TaskPro — Dashboard Styles
   =================================== */

@import url('design-system.css');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--qb-font-sans);
  background: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 65px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--qubenix-primary, #3C32A3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(60, 50, 163, 0.35);
  flex-shrink: 0;
}

.sidebar-brand-text-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.2;
}

.sidebar-logo-text {
  font-family: var(--qb-font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  letter-spacing: -0.015em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.sidebar-logo-subtitle {
  font-size: 0.62rem;
  color: var(--text-muted, #64748b);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-brand-text-group {
  opacity: 0;
  width: 0;
  display: none;
}

.sidebar-toggle {
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 12px 6px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.sidebar.collapsed .nav-section-label {
  opacity: 0;
  height: 10px;
  padding: 0;
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  margin-bottom: 2px;
}

.nav-item svg {
  min-width: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(60, 50, 163, 0.08);
  color: var(--qubenix-primary, #3C32A3);
  font-weight: 600;
}

.nav-item.active svg {
  color: var(--qubenix-primary, #3C32A3);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--qubenix-primary, #3C32A3);
  border-radius: 0 3px 3px 0;
}

/* ========== EXPANDABLE PARENT NAVIGATION & CHILD LISTS ========== */
.nav-item-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}

.nav-parent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 8px 8px 8px 12px;
  position: relative;
}

.nav-parent-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.nav-chevron-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.nav-chevron-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-primary);
}

.nav-chevron {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
}

.nav-item-group.expanded .nav-chevron {
  transform: rotate(90deg);
  color: var(--qubenix-primary, #3C32A3);
}

.nav-parent-item.parent-active {
  color: var(--qubenix-primary, #3C32A3);
  font-weight: 600;
}

.nav-parent-item.parent-active svg:not(.nav-chevron) {
  color: var(--qubenix-primary, #3C32A3);
}

.nav-parent-item.parent-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--qubenix-primary, #3C32A3);
  border-radius: 0 3px 3px 0;
}

.nav-child-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 28px;
  padding-right: 4px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.2s ease;
  margin: 0;
}

.nav-item-group.expanded .nav-child-list {
  max-height: 500px;
  opacity: 1;
  margin-top: 2px;
  margin-bottom: 6px;
}

.nav-child-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
}

.nav-child-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.45;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.nav-child-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-child-item:hover .nav-child-dot {
  opacity: 0.8;
  background: var(--qubenix-primary, #3C32A3);
}

.nav-child-item.active {
  background: rgba(60, 50, 163, 0.08);
  color: var(--qubenix-primary, #3C32A3);
  font-weight: 600;
}

.nav-child-item.active .nav-child-dot {
  background: var(--qubenix-primary, #3C32A3);
  opacity: 1;
  transform: scale(1.4);
  box-shadow: 0 0 6px rgba(60, 50, 163, 0.4);
}

/* Collapsed sidebar overrides */
.sidebar.collapsed .nav-chevron-btn,
.sidebar.collapsed .nav-chevron {
  display: none !important;
}

.sidebar.collapsed .nav-child-list {
  display: none !important;
}

.sidebar.collapsed .nav-item-group {
  margin-bottom: 0;
}

.sidebar.collapsed .nav-parent-item {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.collapsed .nav-parent-main {
  justify-content: center;
  gap: 0;
}

.sidebar.collapsed .nav-label {
  opacity: 0;
  width: 0;
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
}

/* Sidebar Tooltip for collapsed state */
.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-parent-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  pointer-events: none;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.sidebar.collapsed .sidebar-user {
  justify-content: center;
  padding: 6px 0;
  background: transparent;
  border: none;
}

.sidebar-user:hover {
  background: #f1f5f9;
  border-color: var(--border-hover);
}

.sidebar.collapsed .sidebar-user:hover {
  background: transparent;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--qubenix-primary, #3C32A3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-user-info {
  opacity: 0;
  width: 0;
  display: none;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout {
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logout:hover {
  color: var(--neon-red, #ef4444);
  background: rgba(239, 68, 68, 0.1);
}

.sidebar.collapsed .sidebar-logout {
  display: none;
}

/* ========== MAIN CONTENT ========== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  box-sizing: border-box;
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed);
  width: calc(100% - var(--sidebar-collapsed));
  max-width: calc(100% - var(--sidebar-collapsed));
}

/* ========== TOP BAR ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  background: var(--bg-topbar);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu-btn {
  display: none;
  color: var(--text-secondary);
  padding: 4px;
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.topbar-search:focus-within {
  background: #ffffff;
  border-color: var(--qubenix-primary);
  box-shadow: 0 0 0 3px var(--qubenix-primary-subtle);
}

.topbar-search svg {
  color: var(--text-muted);
  min-width: 16px;
}

.topbar-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
}

.topbar-search input::placeholder {
  color: var(--text-muted);
}

.topbar-search kbd {
  background: #f1f5f9;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-family: inherit;
  border: 1px solid var(--border-subtle);
}

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

.topbar-btn {
  position: relative;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.topbar-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.notif-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: var(--neon-red, #EF4444);
  color: white;
  border-radius: 9px;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
  pointer-events: none;
  line-height: 1;
}

/* ========== NOTIFICATION POPOVER ========== */
.qubenix-notif-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 400px;
  max-width: calc(100vw - 32px);
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: 12px;
  box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.qubenix-notif-popover.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.notif-popover-header {
  padding: 14px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
}

.notif-popover-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-popover-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0F172A;
}

.notif-unread-count-pill {
  background: rgba(60, 50, 163, 0.08);
  color: #3C32A3;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.btn-notif-mark-all {
  background: transparent;
  border: none;
  color: #3C32A3;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-notif-mark-all:hover {
  background: rgba(60, 50, 163, 0.06);
}

.btn-notif-mark-all:disabled {
  color: #94A3B8;
  cursor: not-allowed;
  opacity: 0.6;
}

.notif-popover-body {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #F8FAFC;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.notif-item:hover {
  background: #F8FAFC;
}

.notif-item.unread {
  background: #F8FAFC;
}

.notif-item.unread:hover {
  background: #F1F5F9;
}

.notif-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-item-icon.blue { background: #E8F1F8; color: #1F77B4; }
.notif-item-icon.green { background: #EAF7ED; color: #28A745; }
.notif-item-icon.purple { background: #F5F4FB; color: #3C32A3; }
.notif-item-icon.amber { background: #FFF9E6; color: #856404; }
.notif-item-icon.red { background: #FBEBEB; color: #DC3545; }
.notif-item-icon.indigo { background: #F5F4FB; color: #3C32A3; }

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.notif-item-title {
  font-weight: 700;
  font-size: 0.84rem;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item.unread .notif-item-title {
  color: #3C32A3;
}

.notif-item-time {
  font-size: 0.72rem;
  color: #94A3B8;
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-item-desc {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3C32A3;
  flex-shrink: 0;
  margin-top: 7px;
}

/* Empty State */
.notif-empty-state {
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.notif-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F1F5F9;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.notif-empty-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.notif-empty-desc {
  font-size: 0.8rem;
  color: #64748B;
  margin: 0;
}

/* Skeleton Loading State */
.notif-skeleton-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #F8FAFC;
}

.notif-skeleton-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #E2E8F0;
  animation: notifPulse 1.4s infinite ease-in-out;
  flex-shrink: 0;
}

.notif-skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: #E2E8F0;
  animation: notifPulse 1.4s infinite ease-in-out;
}

@keyframes notifPulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.notif-popover-footer {
  padding: 10px 18px;
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  text-align: center;
}

.notif-footer-text {
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 600;
}

.user-avatar-badge,
.topbar .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--qubenix-primary, #3C32A3);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(60, 50, 163, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.user-avatar-badge:hover,
.topbar .user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(60, 50, 163, 0.35);
}

/* Sidebar Mobile Backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ========== DASHBOARD CONTENT & PAGE CONTAINERS ========== */
.qubenix-page-container,
.content-body,
.dashboard-content {
  flex: 1;
  padding: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* Welcome Section */
.welcome-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.welcome-text h1 {
  font-family: var(--qb-font-sans);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.welcome-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btn-new-project {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--qubenix-primary);
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  box-shadow: var(--qubenix-glow);
  white-space: nowrap;
}

.btn-new-project:hover {
  background: var(--qubenix-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(60, 50, 163, 0.45), 0 8px 24px rgba(60, 50, 163, 0.25);
}

.btn-new-project:active {
  background: var(--qubenix-primary-active);
  transform: translateY(0);
}

/* ========== STAT CARDS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  box-sizing: border-box;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.purple { background: var(--qubenix-primary-subtle); color: var(--qubenix-primary); }
.stat-icon.cyan { background: rgba(2, 132, 199, 0.1); color: var(--neon-cyan); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--neon-green); }
.stat-icon.red { background: rgba(239, 68, 68, 0.1); color: var(--neon-red); }

.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.stat-trend.up {
  color: #059669;
  background: #ecfdf5;
}

.stat-trend.down {
  color: #dc2626;
  background: #fef2f2;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--qb-font-sans);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.stat-bar {
  height: 4px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-bar-fill.purple { background: var(--qubenix-primary); }
.stat-bar-fill.cyan { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.stat-bar-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-bar-fill.red { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ========== SECTION TITLE ========== */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.section-title h2 {
  font-family: var(--qb-font-sans);
  font-size: 1.2rem;
  font-weight: 700;
}

.section-actions {
  display: flex;
  gap: 6px;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.filter-btn.active {
  color: white;
  background: var(--neon-purple);
  border-color: var(--neon-purple);
}

/* ========== KANBAN BOARD ========== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.kanban-col {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 300px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.col-dot.purple { background: var(--qubenix-primary); }
.col-dot.cyan { background: var(--neon-cyan); }
.col-dot.green { background: var(--neon-green); }

.kanban-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 10px;
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.kanban-card:hover {
  background: #ffffff;
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.kanban-card.highlight {
  border-color: var(--qubenix-primary-border);
  background: #fafafa;
}

.kanban-card.done {
  opacity: 0.65;
}

.kanban-card.done:hover {
  opacity: 0.9;
}

.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kanban-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kanban-tag.purple { background: var(--qubenix-primary-subtle); color: var(--qubenix-primary); }
.kanban-tag.cyan { background: rgba(2, 132, 199, 0.1); color: var(--neon-cyan); }
.kanban-tag.pink { background: rgba(219, 39, 119, 0.1); color: var(--neon-pink); }
.kanban-tag.green { background: rgba(52, 211, 153, 0.15); color: var(--neon-green); }

.kanban-priority {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.kanban-priority.high { color: var(--neon-red); }
.kanban-priority.medium { color: var(--neon-amber); }
.kanban-priority.low { color: var(--neon-green); }

.kanban-ai-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(60, 50, 163, 0.12);
  color: var(--neon-purple);
  animation: aiPulse 2s ease-in-out infinite;
}

@keyframes aiPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(60, 50, 163, 0.3); }
}

.kanban-done-check {
  color: var(--neon-green);
  font-weight: 700;
  font-size: 0.9rem;
}

.kanban-card h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.kanban-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.kanban-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
}

.kanban-progress-bar {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 4px;
  transition: width 1s ease;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-avatars {
  display: flex;
}

.kanban-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  border: 2px solid var(--bg-app);
  margin-right: -6px;
}

.kanban-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ========== BOTTOM GRID ========== */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  box-sizing: border-box;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-header h3 {
  font-family: var(--qb-font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--qubenix-primary);
  transition: color var(--transition-fast);
}

.panel-link:hover {
  color: var(--qubenix-primary-hover);
  text-decoration: underline;
}

/* Activity Timeline */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.activity-item:hover {
  background: #f8fafc;
}

.activity-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.activity-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.activity-body strong {
  color: var(--text-primary);
}

.activity-highlight {
  color: var(--neon-purple);
  font-weight: 500;
}

.activity-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

/* Team Members */
.team-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.team-member:hover {
  background: #f8fafc;
}

.team-avatar-wrap {
  position: relative;
}

.team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.team-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.team-status.online { background: var(--neon-green); }
.team-status.away { background: var(--neon-amber); }
.team-status.offline { background: var(--text-muted); }

.team-info {
  flex: 1;
  min-width: 0;
}

.team-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-role {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.team-tasks {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ========== ANIMATIONS ========== */
.anim-fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: animFadeUp 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes animFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    width: var(--sidebar-width);
  }

  .main-content {
    margin-left: 0 !important;
  }

  .mobile-menu-btn {
    display: block;
  }

  .dashboard-content {
    padding: 16px;
  }

  .welcome-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-actions {
    flex-wrap: wrap;
  }

  .topbar-search kbd {
    display: none;
  }
}

@media (max-width: 500px) {
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ========== SKELETON LOADERS ========== */
.skeleton-card {
    height: 120px;
    background: linear-gradient(90deg, 
        #f1f5f9 25%, 
        #e2e8f0 50%, 
        #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========== SEARCH RESULTS DROPDOWN ========== */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 400px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-subtle);
}

.search-result-item:hover {
    background: var(--qubenix-primary-subtle);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--qubenix-primary);
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.search-result-type {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ========== PREMIUM KANBAN CARDS ========== */
.kanban-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    padding: 18px;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.kanban-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--tag-color, var(--qubenix-primary));
    opacity: 0.8;
}

.kanban-card:hover {
    background: #ffffff;
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.kanban-cards.drag-over {
    background: var(--qubenix-primary-subtle);
    border: 1px dashed var(--qubenix-primary-border);
    border-radius: var(--radius-lg);
}

/* Glass Panel utility */
.glass-panel {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  box-sizing: border-box;
}

.hidden { display: none !important; }

/* ===================================
   COMMAND CENTER COMPONENT STYLES
   =================================== */

/* Top Welcome & Health Pill */
.command-welcome-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.command-welcome-text h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.command-subtitle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.health-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 100px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 0.75rem;
    font-weight: 600;
}

.health-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Quick Actions Bar */
.quick-actions-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-command {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-command-primary {
    background: var(--qubenix-primary);
    color: #ffffff;
    border: 1px solid var(--qubenix-primary);
    box-shadow: var(--qubenix-glow);
}

.btn-command-primary:hover {
    background: var(--qubenix-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(60, 50, 163, 0.3);
}

.btn-command-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-command-secondary:hover {
    background: #f8fafc;
    border-color: var(--qubenix-primary);
    color: var(--qubenix-primary);
    transform: translateY(-1px);
}

/* ===================================
   BUSINESS SNAPSHOT (6-CARD GRID)
   =================================== */
.snapshot-section {
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.section-label-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-label-bar h3 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.snap-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-card);
  box-sizing: border-box;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.snap-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.snap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.snap-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.snap-icon.indigo { background: rgba(60, 50, 163, 0.08); color: var(--qubenix-primary); }
.snap-icon.cyan   { background: rgba(2, 132, 199, 0.08); color: #0284c7; }
.snap-icon.emerald{ background: rgba(16, 185, 129, 0.08); color: #059669; }
.snap-icon.amber  { background: rgba(217, 119, 6, 0.08); color: #d97706; }
.snap-icon.slate  { background: #f1f5f9; color: #475569; }

.snap-val {
    font-size: 1.6rem;
    font-weight: 600;
    font-family: var(--qb-font-sans);
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.snap-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.snap-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}

.snap-badge.active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.snap-badge.ready {
    background: rgba(60, 50, 163, 0.06);
    color: var(--qubenix-primary);
    border: 1px solid rgba(60, 50, 163, 0.15);
}

.snap-badge.empty-pill {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* ===================================
   ATTENTION REQUIRED SECTION
   =================================== */
.attention-section {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
  box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.attention-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.attention-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attention-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attention-title-group h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.attention-count-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 100px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.attention-count-badge.nominal {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.attention-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#attentionTasksContainer,
.system-health-stack {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.attention-task-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    margin-bottom: 8px;
    gap: 12px;
    transition: all 0.2s;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.attention-task-card:hover {
    background: #f1f5f9;
    border-color: var(--border-hover);
}

.attention-task-card.overdue {
    border-left: 3px solid #dc2626;
}

.attention-task-card.upcoming {
    border-left: 3px solid #d97706;
}

.att-info {
    flex: 1;
    min-width: 0;
}

.att-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.att-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.att-pill-overdue {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: #fee2e2;
    color: #b91c1c;
}

.att-pill-upcoming {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: #fef3c7;
    color: #b45309;
}

.att-action-btn {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.att-action-btn:hover {
    background: var(--qubenix-primary);
    border-color: var(--qubenix-primary);
    color: white;
}

.system-health-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.health-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.health-status-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.health-icon-small {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.health-item-text strong {
    display: block;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.health-item-text span {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* ===================================
   COMMAND GRID (2-COLUMN OPERATIONAL LAYOUT)
   =================================== */
.command-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 24px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.command-col-left {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.command-col-right {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* My Work Section */
.work-tabs-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
    overflow-x: auto;
}

.work-tab-btn {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.work-tab-btn:hover {
    color: var(--text-primary);
    background: #f1f5f9;
}

.work-tab-btn.active {
    color: var(--qubenix-primary);
    background: rgba(60, 50, 163, 0.08);
}

.work-tab-count {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 100px;
    background: #e2e8f0;
    color: var(--text-secondary);
}

.work-tab-btn.active .work-tab-count {
    background: var(--qubenix-primary);
    color: #ffffff;
}

.work-task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.work-task-row:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.work-task-row.done {
    opacity: 0.65;
    background: #f8fafc;
}

.work-task-row.done .work-task-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-check-circle {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.task-check-circle:hover {
    border-color: var(--qubenix-primary);
}

.task-check-circle.checked {
    background: var(--qubenix-primary);
    border-color: var(--qubenix-primary);
    color: white;
}

.work-task-body {
    flex: 1;
    min-width: 0;
}

.work-task-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-task-meta {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-dot-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.dot-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.work-task-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.assignee-avatar-mini {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--qubenix-primary);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Projects Deliverable Card */
.proj-deliverable-item {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.proj-deliverable-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.proj-deliv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.proj-deliv-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.proj-deliv-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.proj-progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.proj-progress-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.proj-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.proj-deliv-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* Team Workload */
.team-workload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.team-workload-row:hover {
    background: #f8fafc;
}

.team-member-avatar-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--qubenix-primary);
    color: white;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.team-workload-info {
    flex: 1;
    min-width: 0;
}

.team-workload-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.team-workload-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.team-workload-stats {
    text-align: right;
}

.team-load-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.team-perf-bar {
    width: 60px;
    height: 5px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 4px;
}

.team-perf-fill {
    height: 100%;
    background: #10b981;
    border-radius: 10px;
}

/* Live Activity Stream */
.live-pulse {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 100px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.activity-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.activity-feed-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--qubenix-primary);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content-text {
    flex: 1;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.activity-content-text strong {
    color: var(--text-primary);
}

.activity-timestamp {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Empty State Styling */
.command-empty-box {
    text-align: center;
    padding: 36px 20px;
    background: #f8fafc;
    border: 1px dashed var(--border-subtle);
    border-radius: 12px;
}

.command-empty-box svg {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.command-empty-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.command-empty-box p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    max-width: 320px;
    margin: 0 auto;
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */
@media (max-width: 1380px) {
    .snapshot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .command-main-grid {
        grid-template-columns: 1fr;
    }
    .attention-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .snapshot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .command-welcome-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
    .quick-actions-bar {
        width: 100%;
    }
    .btn-command {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .snapshot-grid {
        grid-template-columns: 1fr;
    }
    .work-tabs-bar {
        gap: 4px;
    }
    .work-tab-btn {
        padding: 6px 10px;
        font-size: 0.76rem;
    }
    .btn-command {
        width: 100%;
    }
}

/* ========================================================
   QUBENIX OS — STANDARDIZED WORKSPACE, EMPTY STATE & BOTTOM ACTION
   ======================================================== */

.qubenix-workspace,
.qubenix-empty-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 400px;
  width: 100%;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-card, 14px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.qubenix-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px 36px 24px;
  min-height: 300px;
}

.qubenix-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.qubenix-empty-state:hover .qubenix-empty-icon {
  transform: translateY(-2px);
  background: rgba(60, 50, 163, 0.08);
  color: var(--qubenix-primary, #3C32A3);
}

.qubenix-empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin: 0 0 6px 0;
  letter-spacing: -0.015em;
}

.qubenix-empty-desc {
  font-size: 0.85rem;
  color: var(--text-secondary, #475569);
  max-width: 360px;
  line-height: 1.5;
  margin: 0 0 22px 0;
}

/* Primary Plus Action Button (Legacy fallback) */
.qubenix-empty-action-btn,
.qubenix-plus-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--qubenix-primary, #3C32A3);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(60, 50, 163, 0.28), 0 1px 3px rgba(60, 50, 163, 0.15);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, background-color 0.18s ease;
  position: relative;
  text-decoration: none;
}

.qubenix-empty-action-btn svg,
.qubenix-plus-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.qubenix-empty-action-btn:hover,
.qubenix-plus-btn:hover {
  transform: scale(1.05);
  background: var(--qubenix-primary-hover, #312885);
  box-shadow: 0 6px 18px rgba(60, 50, 163, 0.38);
}

.qubenix-empty-action-btn:active,
.qubenix-plus-btn:active {
  transform: scale(0.97);
}

/* Standardized Bottom Action Area (Subtle Qubenix Purple Strip) */
.qubenix-bottom-action {
  flex-shrink: 0;
  background: rgba(60, 50, 163, 0.04);
  border-top: 1px solid rgba(60, 50, 163, 0.12);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* Standardized Contextual Bottom Button */
.qubenix-bottom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  background: var(--qubenix-primary, #3C32A3);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(60, 50, 163, 0.2);
  transition: background-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.qubenix-bottom-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.qubenix-bottom-btn:hover {
  background: var(--qubenix-primary-hover, #312885);
  box-shadow: 0 4px 14px rgba(60, 50, 163, 0.3);
  transform: translateY(-1px);
}

.qubenix-bottom-btn:active {
  transform: translateY(0);
}

.qubenix-bottom-btn:focus-visible {
  outline: 2px solid var(--qubenix-primary, #3C32A3);
  outline-offset: 2px;
}

.qubenix-bottom-action-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary, #475569);
}

.qubenix-hint-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--qubenix-primary, #3C32A3);
  opacity: 0.8;
}

.qubenix-bottom-action-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
}

.qubenix-bottom-action-shortcut kbd {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

/* Standardized Compact Inline Error */
.qubenix-inline-error {
  min-height: 48px;
  height: auto;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.qubenix-inline-error-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
  color: #991b1b;
  font-weight: 500;
  min-width: 0;
  flex: 1;
}

.qubenix-inline-error-icon {
  color: #ef4444;
  flex-shrink: 0;
}

.btn-inline-retry {
  font-size: 0.76rem;
  padding: 5px 12px;
  border: 1px solid #fca5a5;
  background: #ffffff;
  color: #991b1b;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-inline-retry:hover {
  background: #fee2e2;
}
