/* WinTQA Theme - Color System */
:root {
  /* Primary Colors */
  --primary-color: rgb(14 75 141 / 1);
  --primary-color-rgb: 14 75 141;
  --primary-color-light: rgb(14 75 141 / 0.8);
  --primary-color-lighter: rgb(14 75 141 / 0.6);
  --primary-color-lightest: rgb(14 75 141 / 0.1);
  
  /* Secondary/Accent Colors */
  --secondary-color: rgb(208 70 39 / 1);
  --secondary-color-rgb: 208 70 39;
  --secondary-color-light: rgb(208 70 39 / 0.8);
  --secondary-color-lighter: rgb(208 70 39 / 0.6);
  --secondary-color-lightest: rgb(208 70 39 / 0.1);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, rgb(14 75 141 / 1) 0%, rgb(14 75 141 / 0.8) 100%);
  --gradient-secondary: linear-gradient(135deg, rgb(208 70 39 / 1) 0%, rgb(208 70 39 / 0.8) 100%);
  --gradient-hero: linear-gradient(135deg, rgb(14 75 141 / 1) 0%, rgb(208 70 39 / 0.9) 50%, rgb(14 75 141 / 0.8) 100%);
  --gradient-subtle: linear-gradient(135deg, rgb(14 75 141 / 0.05) 0%, rgb(208 70 39 / 0.05) 100%);
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --gradient-button: linear-gradient(135deg, rgb(14 75 141 / 1) 0%, rgb(14 75 141 / 0.9) 100%);
  --gradient-button-hover: linear-gradient(135deg, rgb(14 75 141 / 0.9) 0%, rgb(14 75 141 / 0.8) 100%);
  --gradient-secondary-button: linear-gradient(135deg, rgb(14 75 141 / 1) 0%, rgb(14 75 141 / 0.9) 100%);
  --gradient-secondary-button-hover: linear-gradient(135deg, rgb(14 75 141 / 0.9) 0%, rgb(14 75 141 / 0.8) 100%);
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  
  /* Border Colors */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-dark: #94a3b8;
  
  /* Status Colors */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --info-color: #3b82f6;
  
  /* Shadow Colors */
  --shadow-sm: 0 1px 2px 0 rgba(14, 75, 141, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(14, 75, 141, 0.1), 0 2px 4px -1px rgba(14, 75, 141, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(14, 75, 141, 0.1), 0 4px 6px -2px rgba(14, 75, 141, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(14, 75, 141, 0.1), 0 10px 10px -5px rgba(14, 75, 141, 0.04);
  
  /* Spacing Scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* Theme Classes */
.gradient-primary {
  background: linear-gradient(135deg, rgb(14 75 141 / 1) 0%, rgb(14 75 141 / 0.8) 100%);
  background: var(--gradient-primary);
}

.gradient-secondary {
  background: linear-gradient(135deg, rgb(208 70 39 / 1) 0%, rgb(208 70 39 / 0.8) 100%);
  background: var(--gradient-secondary);
}

.gradient-hero {
  background: linear-gradient(135deg, rgb(14 75 141 / 1) 0%, rgb(208 70 39 / 0.9) 50%, rgb(14 75 141 / 0.8) 100%);
  background: var(--gradient-hero);
}

.gradient-subtle {
  background: linear-gradient(135deg, rgb(14 75 141 / 0.05) 0%, rgb(208 70 39 / 0.05) 100%);
  background: var(--gradient-subtle);
}

.gradient-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  background: var(--gradient-card);
}

.text-primary {
  color: rgb(14 75 141 / 1);
  color: var(--primary-color);
}

.text-secondary {
  color: rgb(208 70 39 / 1);
  color: var(--secondary-color);
}

.bg-primary {
  background-color: rgb(14 75 141 / 1);
  background-color: var(--primary-color);
}

.bg-secondary {
  background-color: rgb(208 70 39 / 1);
  background-color: var(--secondary-color);
}

.border-primary {
  border-color: rgb(14 75 141 / 1);
  border-color: var(--primary-color);
}

.border-secondary {
  border-color: rgb(208 70 39 / 1);
  border-color: var(--secondary-color);
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, rgb(14 75 141 / 1) 0%, rgb(14 75 141 / 0.9) 100%);
  background: var(--gradient-button);
  color: #ffffff;
  color: var(--text-inverse);
  border: none;
  padding: 0.5rem 1.5rem;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 0.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: 250ms ease-in-out;
  transition: var(--transition-normal);
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgb(14 75 141 / 0.9) 0%, rgb(14 75 141 / 0.8) 100%);
  background: var(--gradient-button-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(14, 75, 141, 0.1), 0 2px 4px -1px rgba(14, 75, 141, 0.06);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: linear-gradient(135deg, rgb(14 75 141 / 1) 0%, rgb(14 75 141 / 0.9) 100%);
  background: var(--gradient-secondary-button);
  color: #ffffff;
  color: var(--text-inverse);
  border: none;
  padding: 0.5rem 1.5rem;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 0.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: 250ms ease-in-out;
  transition: var(--transition-normal);
  cursor: pointer;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, rgb(14 75 141 / 0.9) 0%, rgb(14 75 141 / 0.8) 100%);
  background: var(--gradient-secondary-button-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(14, 75, 141, 0.1), 0 2px 4px -1px rgba(14, 75, 141, 0.06);
  box-shadow: var(--shadow-md);
}

/* Card Styles */
.card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  background: var(--gradient-card);
  border: 1px solid #e2e8f0;
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px 0 rgba(14, 75, 141, 0.05);
  box-shadow: var(--shadow-sm);
  transition: 250ms ease-in-out;
  transition: var(--transition-normal);
}

.card:hover {
  box-shadow: 0 4px 6px -1px rgba(14, 75, 141, 0.1), 0 2px 4px -1px rgba(14, 75, 141, 0.06);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Utility Classes */
.shadow-primary {
  box-shadow: 0 4px 14px 0 rgba(14, 75, 141, 0.15);
}

.shadow-secondary {
  box-shadow: 0 4px 14px 0 rgba(208, 70, 39, 0.15);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.loading-spinner--small {
  padding: 1rem;
}

.loading-spinner--large {
  padding: 3rem;
}

.loading-spinner__container {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.loading-spinner__circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #0078d4;
  animation: loading-spinner-bounce 1.4s infinite ease-in-out both;
}

.loading-spinner--small .loading-spinner__circle {
  width: 8px;
  height: 8px;
}

.loading-spinner--large .loading-spinner__circle {
  width: 16px;
  height: 16px;
}

.loading-spinner__circle:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-spinner__circle:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-spinner__message {
  color: #666;
  font-size: 0.875rem;
  margin: 0;
  text-align: center;
}

@keyframes loading-spinner-bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.header {
  display: flex;
  align-items: center;
  background: var(--gradient-card);
  padding: 12px 40px;
  border-bottom: 1px solid var(--border-light);
  height: 70px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header__left {
  display: flex;
  align-items: center;
}

/* Logo wrapper */
.wintqa-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  margin-left: -20px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* Shield container */
.logo-icon {
  position: relative;
  width: 48px;
  height: 48px;
  clip-path: polygon(
    50% 0%,
    92% 12%,
    92% 60%,
    50% 100%,
    8% 60%,
    8% 12%
  );
  background: var(--gradient-primary);
  box-shadow: var(--shadow-primary);
  transition: var(--transition-normal);
}

.logo-icon:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* Left half */
.logo-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--primary-color);
  clip-path: polygon(
    0% 0%,
    50% 0%,
    50% 100%,
    0% 100%
  );
}

/* Right half */
.logo-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--secondary-color);
  clip-path: polygon(
    50% 0%,
    100% 0%,
    100% 100%,
    50% 100%
  );
}

/* Checkmark */
.logo-icon .check {
  position: absolute;
  z-index: 1;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--text-inverse);
  border-bottom: 3px solid var(--text-inverse);
  transform: rotate(-45deg);
  top: 18px;
  left: 17px;
}

/* Text */
.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text .brand {
  font-size: 24px;
  font-weight: 800;
}

.logo-text .brand span {
  font-weight: 800;
}

/* Win text color */
.logo-text .brand .win-text {
  color: rgb(14 75 141);
}

/* TQA text color */
.logo-text .brand .tqa-text {
  color: rgb(208 70 39);
}

.logo-text .brand sup {
  font-size: 10px;
  margin-left: 2px;
  position: relative;
  top: -6px;
}

.logo-text .tagline {
  font-size: 12px;
  font-weight: 500;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.header__subtitle {
  font-size: 12px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-top: -2px;
}

.header__right {
  display: flex;
  align-items: center;
}

.header__user-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header__user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.header__user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.header__user-email {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.header__profile-menu {
  position: relative;
}

.header__profile-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.header__profile-button:hover {
  border-color: var(--primary-color);
}

.header__profile-picture {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.header__profile-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.header__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  z-index: 1000;
  min-width: 280px;
  overflow: hidden;
}

.header__dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.header__dropdown-picture {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.header__dropdown-initials {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.header__dropdown-info {
  flex: 1 1;
}

.header__dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2px 0;
}

.header__dropdown-email {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 2px 0;
}

.header__dropdown-title {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

.header__dropdown-divider {
  height: 1px;
  background: var(--border-light);
}

.header__dropdown-actions {
  padding: 8px;
}

.header__dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.header__dropdown-item:hover {
  background-color: var(--bg-secondary);
}

.header__dropdown-item--logout {
  color: var(--error-color);
}

.header__dropdown-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.header__dropdown-icon svg {
  display: block;
}

.header__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: transparent;
}

/* Keep existing styles for backward compatibility */
.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.company-logo {
  display: flex;
  align-items: center;
  font-family: Arial, sans-serif;
  margin: 0 auto;
}

.company-logo h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.company-logo p {
  font-size: 14px;
  opacity: 0.8;
  margin: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.company-name {
  display: flex;
  align-items: center;
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}

.win-text {
  color: #1e40af;
}

.wire-text {
  color: #dc2626;
}

.header-title {
  font-size: 16px;
  color: #1f2937;
  font-weight: 500;
  padding-left: 20px;
  border-left: 1px solid #e5e7eb;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0 auto
}

.nav-link {
  text-decoration: none;
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-link:hover {
  color: #1f2937;
}

.nav-link.active {
  color: #1f2937;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #1e40af;
}

.header-profile {
  display: flex;
  align-items: center;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #1e40af;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.profile-avatar:hover {
  background-color: #1e3a8a;
}

.profile-dropdown {
  position: absolute;
  top: 60px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  z-index: 1000;
  min-width: 180px;
}

.profile-option {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: background-color 0.2s;
}

.profile-option:hover {
  background-color: #f8f9fa;
}

.profile-option.logout {
  color: #dc3545;
  border-top: 1px solid #e9ecef;
  margin-top: 8px;
}

.profile-option.logout:hover {
  background-color: #f1f2f2;
}

/* ===== SIDEBAR SHELL ===== */
.sidebar {
  width: 260px;
  height: calc(100vh - 60px);
  background: #ffffff;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid rgba(15,23,42,0.04);
  box-shadow: 0 2px 8px rgba(16,24,40,0.03);
  padding: 8px 0;
}

.sidebar.collapsed {
  width: 72px;
}

/* ===== TOP BAR ===== */
.sidebar-menu-bar {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(15,23,42,0.04);
}
.sidebar:not(.collapsed) .sidebar-menu-bar {
  justify-content: flex-end;
}
.sidebar.collapsed .sidebar-menu-bar {
  justify-content: center;
}

.sidebar-toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eef2ff;
  border: 1px solid rgba(99,102,241,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  cursor: pointer;
}

.menu-bar-icon svg {
  width: 18px;
  height: 18px;
  color: #0f172a;
}

.menu-bar-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #0f172a;
}


/* ===== MAIN NAV ===== */
.sidebar-nav {
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

/* Card-style menu items */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  background: transparent;
  transition: all 0.18s ease;
  position: relative;
}

.sidebar-item:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

.sidebar-item.active {
  background: #eff6ff;
  color: #0f172a;
  font-weight: 700;
}

.sidebar-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sidebar-item.disabled:hover {
  background: transparent;
  transform: none;
}

.sidebar-item.disabled .sidebar-icon {
  opacity: 0.5;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 4px;
  background: #3b82f6;
}

/* Icon badge */
.sidebar-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  font-size: 18px;
  color: #0f172a;
  border: 1px solid rgba(15,23,42,0.04);
}

.sidebar-item.active .sidebar-icon {
  background: #eef2ff;
}

.sidebar-text {
  display: flex;
  flex-direction: column;
}

.sidebar-label {
  white-space: nowrap;
  font-size: 15px;
}

.sidebar-subtext {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin-top: 2px;
}


/* ===== FILTER SECTION ===== */
.sidebar-tabs {
  padding: 16px 14px 20px;
  border-top: 1px solid rgba(15,23,42,0.04);
}

.sidebar-tabs::before {
  content: 'Project Status';
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #374151;
  text-transform: uppercase;
}

.sidebar-tab {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
}

.sidebar-tab:hover {
  background: #f8fafc;
  color: #374151;
}

.sidebar-tab.active {
  background: #eef2ff; 
  color: #0e4b8d;
  font-weight: 600;
}

/* ===== COLLAPSED MODE ===== */
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .sidebar-tabs,
.sidebar.collapsed .sidebar-subtext,
.sidebar.collapsed .menu-bar-text {
  display: none;
}

.sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 14px;
}

/* small responsiveness */
@media (max-width: 900px) {
  .sidebar { display: none; }
}

.main-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.layout-content {
  display: flex;
  flex: 1 1;
  overflow: hidden;
  transition: all 0.3s ease;
}

.main-content {
  flex: 1 1;
  overflow-y: auto;
  background-color: #f5f5f5;
  padding: 8px;
  transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.App {
  height: 100vh;
  overflow: hidden;
  background: var(--gradient-subtle);
}

.project-table-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* === ROW (FLAT, NOT CARD) === */
.project-card {
  background-color: #ffffff;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  box-shadow: none;
  margin-bottom: 10px;
}

.project-card:hover {
  background-color: #f9fafb;
  padding: 12px;
  border-radius: 10px;
}

/* === LOGO === */
.project-logo {
  width: 8%;
  height: 70px;
  background-color: #f3f4f6;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 14px;
  color: #6b7280;
}

/* === MAIN CONTENT === */
.project-main {
  flex: 1 1;
  min-width: 0;
}

/* === HEADER === */
.project-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

/* === PROJECT TITLE (SDLC COLOR) === */
.project-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #124b88; /* SDLC dark blue */
  margin: 0;
}

/* === BADGE === */
.project-badge {
  background-color: #e1ecf8;
  color: #124b88;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

/* === DETAILS === */
.project-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
}

.project-detail-row {
  display: flex;
  gap: 6px;
}

.project-detail-label {
  font-weight: 500;
  color: #374151;
}

/* === ACTIONS === */
.project-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* === BUTTON BASE === */
.project-btn {
  height: 2rem;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* === PRIMARY (WORKBENCH) === */
.workbench-btn {
  background-color: #124b88;
  color: #ffffff;
  border: none;
}

.workbench-btn:hover {
  background-color: #15508a;
}

.workbench-btn.disabled {
  background-color: #9ca3af;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 0.6;
}

.workbench-btn.disabled:hover {
  background-color: #9ca3af;
}

/* === SECONDARY (AGENT MODE) === */
.agent-btn {
  background-color: #ffffff;
  color: #124b88;
  border: 1px solid #124b88;
}

.agent-btn:hover {
  background-color: #f1f5f9;
}

/* === ICON === */
.btn-icon {
  font-size: 14px;
  margin-top: -4px;
}

/* Scrollbar width */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 8px;
}

/* Thumb */
::-webkit-scrollbar-thumb {
  background-color: #0f3c68; /* SDLC dark blue */
  border-radius: 8px;
}

/* Hover */
::-webkit-scrollbar-thumb:hover {
  background-color: #15508a;
}

.attendee-avatars {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar:hover {
  transform: scale(1.1);
  z-index: 10;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-initials {
  -webkit-user-select: none;
          user-select: none;
}

.more-count {
  background-color: #95a5a6;
  font-size: 12px;
}

.no-attendees {
  color: #999;
  font-size: 13px;
  font-style: italic;
}

.phase-icon-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phase-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.phase-label {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* Back Button - Matching Project Table Style */
.root-vars {
  display: none;
}
:root {
  /* Use WinWire primary color from global theme */
  --primary: var(--primary-color);
  --primary-2: rgba(var(--primary-color-rgb), 0.9);
  --primary-3: rgba(var(--primary-color-rgb), 0.85);
  --primary-rgb: var(--primary-color-rgb);
}
.project-btn {
  height: 2rem;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-btn {
  background-color: #ffffff;
  color: rgba(var(--primary-color-rgb), 0.85);
  color: var(--primary-3);
  border: 1px solid #124b88;
}

.agent-btn:hover {
  background-color: #f1f5f9;
}

.export-btn {
  background-color: var(--text-inverse);
  color: var(--primary-color);
  border: 1px solid rgba(var(--primary-color-rgb), 0.12);
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.export-btn:hover {
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border-color: var(--primary-color);
}

.btn-icon {
  font-size: 0.8rem;
  line-height: 1;
}

/* Readonly TQA Report Styles */

.tqa-session-page.readonly {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tqa-session-page.readonly .tqa-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(var(--primary-color-rgb), 0.9) 100%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  padding: 24px 36px;
  box-shadow: 0 8px 32px rgba(var(--primary-color-rgb), 0.15);
  box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.15);
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.tqa-session-page .tqa-header > * {
  position: relative;
  z-index: 1;
}

.tqa-session-page.readonly .tqa-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.tqa-session-page.readonly .tqa-header > * {
  position: relative;
  z-index: 1;
}

/* Ensure button is clickable and has hover effects */
.tqa-session-page .project-btn {
  position: relative !important;
  z-index: 100 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.tqa-session-page .project-btn:hover {
  background-color: #f1f5f9 !important;
}

/* Fix any overlay issues */
.tqa-session-page .tqa-header::before {
  pointer-events: none !important;
}

.tqa-session-page .tqa-header {
  position: relative !important;
  z-index: 1 !important;
}

.tqa-session-page .tqa-header > * {
  position: relative !important;
  z-index: 10 !important;
  pointer-events: auto !important;
}

.tqa-session-page.readonly .tqa-title {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  flex: 1 1 auto;
  text-align: center;
}

.header-left-controls {
  display: flex;
  gap: 10px;
}

.tqa-session-page.readonly .report-date {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-left: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 18px;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
}

.tqa-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}

.tqa-content {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: -webkit-fill-available;
  margin: 0;
  padding: 0 20px;
}

/* Left/main column: holds project details, questionnaires and other long content. Only this column scrolls. */
.tqa-main {
  flex: 1 1 auto;
  width: 100%;
}

/* Questionnaire card should control the scrollable viewport so page doesn't get double scrollbars */
.questionnaire-card {
  max-height: calc(100vh - 220px);
  overflow: auto;
  display: block;
}

/* Sticky sidebar on the right */
.tqa-sidebar {
  width: 100%;
  flex: 0 0 100%;
  position: sticky;
  top: 120px; /* account for header height */
  align-self: flex-start;
  height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Make panels inside the sidebar visually compact and avoid independent scrolling where possible */
.sticky-panel {
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
}

.sticky-panel .dashboard-table-scrollable {
  max-height: none; /* let table grow, but overall sidebar is constrained by viewport */
  overflow: visible;
}

/* Make sidebar stack and stretch on narrower layouts */
@media (max-width: 1180px) {
  .tqa-content {
    flex-direction: column;
    align-items: stretch;
  }

  .tqa-sidebar {
    position: relative;
    top: auto;
    width: 100%;
    flex: none;
    height: auto;
    align-self: stretch;
  }

  .tqa-sidebar .sticky-panel,
  .tqa-sidebar .dashboard-card {
    width: 100%;
    box-sizing: border-box;
  }

  .dashboard-table {
    width: 100% !important;
  }
}

.tqa-info-section {
  margin-bottom: 20px;
}

.info-notice {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border: 1px solid #90caf9;
  border-radius: 12px;
  padding: 20px 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(144, 202, 249, 0.15);
}

.info-notice p {
  margin: 0 0 8px 0;
  color: #0d47a1;
  font-weight: 500;
}

.info-notice p:last-child {
  margin-bottom: 0;
  color: #1565c0;
}

.tqa-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.metadata-field {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metadata-field:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.metadata-field label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metadata-value.readonly {
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #1f2937;
  font-size: 15px;
  font-weight: 500;
  min-height: 20px;
  display: flex;
  align-items: center;
}

.tqa-questions-container {
  background: white;
  /* border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb; */
  margin-bottom: 10px;
}

.question-block.readonly {
  display: flex;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.3s ease;
}

.question-block.readonly:hover {
  background-color: #fafbfc;
}

.question-block.readonly:last-child {
  border-bottom: none;
}

.question-block.readonly.even {
  background-color: #f9fafb;
  border-radius: 8px;
  padding: 24px;
  margin: 0 -30px;
}

.question-number {
  font-size: 45px;
  font-weight: 700;
  color: var(--primary-color);
  color: var(--primary);
  line-height: 1;
  margin-right: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
}

.question-content {
  flex: 1 1;
}

.question-text {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
  line-height: 1.5;
}

.answer-container {
  margin-top: 12px;
}

.no-questions {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
  font-size: 16px;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px dashed #d1d5db;
}

.assessment-items-section {
  margin-bottom: 40px;
}

.assessment-items-section h3 {
  color: #1f2937;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.assessment-items-section h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(var(--primary-color-rgb), 0.9) 100%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  border-radius: 2px;
}

/* Readonly Items Grid Styles */
.readonly-items-grid {
  margin-top: 15px;
}

.items-table.readonly {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.items-table.readonly th {
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(var(--primary-color-rgb), 0.9) 100%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: white;
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary);
}

.items-table.readonly td {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #374151;
  transition: background-color 0.2s ease;
}

/* Project details table styles */
.project-details-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
}
.project-details-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  color: #374151;
  width: 180px;
  vertical-align: middle;
  background: transparent;
}
.project-details-table td {
  padding: 12px 16px;
  vertical-align: middle;
  color: #374151;
}
.project-logo-cell {
  width: 140px;
  text-align: center;
  padding: 12px 16px;
}
.dashboard-account-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
}
.dashboard-account-initials {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(var(--primary-color-rgb), 0.9) 100%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: white;
  border-radius: 8px;
  font-weight: 700;
}

.items-table.readonly tr:hover td {
  background-color: #f8fafc;
}

.items-table.readonly tr:last-child td {
  border-bottom: none;
}

/* Severity Indicators */
.severity-indicator.readonly {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.severity-indicator.readonly.low {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border: 1px solid #86efac;
}

.severity-indicator.readonly.medium {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #facc15;
}

.severity-indicator.readonly.high {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.severity-indicator.readonly.critical {
  background: linear-gradient(135deg, #fecaca 0%, #f87171 100%);
  color: #7f1d1d;
  border: 1px solid #ef4444;
}

/* Priority Indicators */
.priority-indicator.readonly {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.priority-indicator.readonly.low {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border: 1px solid #86efac;
}

.priority-indicator.readonly.medium {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #facc15;
}

.priority-indicator.readonly.high {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.priority-indicator.readonly.critical {
  background: linear-gradient(135deg, #fecaca 0%, #f87171 100%);
  color: #7f1d1d;
  border: 1px solid #ef4444;
}

/* Empty Grid */
.empty-grid {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 2px dashed #d1d5db;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.empty-grid p {
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

/* Attendees row and tags */
.attendees-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dashboard-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendees-row .dashboard-tag:first-child {
  margin-left: 0;
}

/* Readonly Question Styles */
.question-options.readonly {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.radio-option.readonly {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #e5e7eb;
  cursor: not-allowed;
  transition: all 0.3s ease;
  position: relative;
}

.radio-option.readonly:hover {
  border-color: var(--primary-color);
  border-color: var(--primary);
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.radio-option.readonly input[type="radio"] {
  margin: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
  accent-color: var(--primary);
}

.radio-option.readonly span {
  color: #374151;
  font-size: 15px;
  font-weight: 500;
}

.radio-option.readonly input[type="radio"]:checked + span {
  color: var(--primary-color);
  color: var(--primary);
  font-weight: 600;
}

/* Rating Styles */
.rating-container.readonly {
  margin-top: 16px;
}

.rating-container.readonly .rating-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.rating-container.readonly .rating-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.rating-button.readonly {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  background: white;
  color: #6b7280;
  font-weight: 600;
  font-size: 16px;
  cursor: not-allowed;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rating-button.readonly.selected {
  border-color: #0e4b8d;
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(var(--primary-color-rgb), 0.9) 100%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(var(--primary-color-rgb), 0.3);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
  transform: scale(1.05);
}

/* Textarea Styles */
.question-textarea.readonly {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  cursor: not-allowed;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Date Input Styles */
.question-date.readonly {
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #374151;
  font-size: 15px;
  cursor: not-allowed;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.question-date.readonly::-webkit-calendar-picker-indicator {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Answer Value Styles */
.answer-value.readonly {
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* RAG Status Indicators */
.tqa-session-page.readonly .rag-indicator.readonly {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tqa-session-page.readonly .rag-indicator.readonly.green {
  background: linear-gradient(135deg, #d4edda 0%, #a7f3d0 100%);
  color: #155724;
  border: 1px solid #86efac;
}

.tqa-session-page.readonly .rag-indicator.readonly.amber {
  background: linear-gradient(135deg, #fff3cd 0%, #fed7aa 100%);
  color: #92400e;
  border: 1px solid #fbbf24;
}

.tqa-session-page.readonly .rag-indicator.readonly.red {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
  color: #991b1b;
  border: 1px solid #f87171;
}

/* Loading State */
.tqa-session-page.readonly .loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
}

.tqa-session-page.readonly .loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid var(--primary-color);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.tqa-session-page.readonly .loading-text {
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
}

.radio-option.readonly span {
  color: #374151;
  font-size: 14px;
}

.radio-option.readonly input[type="radio"]:checked + span {
  color: #124b88;
  font-weight: 500;
}

/* Rating Styles */
.rating-container.readonly {
  margin-top: 10px;
}

.rating-container.readonly .rating-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: #6b7280;
}

.rating-container.readonly .rating-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.rating-button.readonly {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  background: white;
  color: #6b7280;
  font-weight: 500;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

.rating-button.readonly.selected {
  border-color: rgba(var(--primary-color-rgb), 0.85);
  border-color: var(--primary-3);
  background: rgba(var(--primary-color-rgb), 0.85);
  background: var(--primary-3);
  color: white;
}

/* Textarea Styles */
.question-textarea.readonly {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f8f9fa;
  color: #374151;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  cursor: not-allowed;
}

/* Date Input Styles */
.question-date.readonly {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f8f9fa;
  color: #374151;
  font-size: 14px;
  cursor: not-allowed;
}

.question-date.readonly::-webkit-calendar-picker-indicator {
  cursor: not-allowed;
}

/* Answer Value Styles */
.answer-value.readonly {
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #374151;
  font-size: 14px;
}

.tqa-session-page.readonly .rag-indicator.readonly {
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
}

.tqa-session-page.readonly .rag-indicator.readonly.green {
  background: #d4edda;
  color: #155724;
}

.tqa-session-page.readonly .rag-indicator.readonly.amber {
  background: #fff3cd;
  color: #856404;
}

.tqa-session-page.readonly .rag-indicator.readonly.red {
  background: #f8d7da;
  color: #721c24;
}

.tqa-session-page.readonly .question-block.readonly {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tqa-session-page.readonly .question-block.readonly .question-number {
  color: #124b88;
  font-size: 18px;
  font-weight: bold;
  margin-right: 12px;
}

.tqa-session-page.readonly .question-block.readonly .question-text {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  font-size: 14px;
}

.tqa-session-page.readonly .answer-container {
  margin-top: 8px;
}

.tqa-session-page.readonly .readonly-answer {
  display: block;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 13px;
  color: #374151;
}

.tqa-session-page.readonly .readonly-answer.empty {
  color: #6b7280;
  font-style: italic;
}

.tqa-session-page.readonly .readonly-answer.radio {
  background: #e3f2fd;
  border-color: #bbdefb;
  color: #1565c0;
}

.tqa-session-page.readonly .readonly-answer.textarea {
  white-space: pre-wrap;
  line-height: 1.5;
}

.tqa-session-page.readonly .readonly-answer.rating {
  background: #fff3e0;
  border-color: #ffcc02;
  color: #e65100;
  font-weight: 500;
}

.tqa-session-page.readonly .readonly-answer.date {
  background: #f3e5f5;
  border-color: #e1bee7;
  color: #6a1b9a;
}

.tqa-session-page.readonly .assessment-items-section {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 20px;
  margin-top: 24px;
}

.tqa-session-page.readonly .assessment-items-section h3 {
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  border-bottom: 2px solid #124b88;
  padding-bottom: 8px;
}

.tqa-session-page.readonly .no-session-message {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  margin: 20px;
}

.tqa-session-page.readonly .no-session-message p {
  color: #6b7280;
  font-size: 16px;
  margin: 0;
}

.tqa-session-page.readonly .no-questions {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  margin: 20px 0;
}

.tqa-session-page.readonly .no-questions p {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

/* Disable interactive elements in readonly mode */
.tqa-session-page.readonly input,
.tqa-session-page.readonly textarea,
.tqa-session-page.readonly select,
.tqa-session-page.readonly button {
  pointer-events: none;
}

.tqa-session-page.readonly .back-button {
  background: #1e40af;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.tqa-session-page.readonly .back-button:hover {
  background: #1e3a8a;
}

/* Project Details specific styles (moved from inline styles) */
.dashboard-project-details .project-details-grid {
  /* Use single-column layout so the details table can span full width */
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 12px;
  gap: 12px;
  align-items: start;
}

/* Ensure the details table spans the full width of the grid */
.dashboard-project-details .project-details-table {
  grid-column: 1 / -1;
  width: 100%;
}

.dashboard-project-details .project-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-account-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.dashboard-account-initials {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgb(14, 75, 141) 0%, rgb(208, 70, 39) 100%);
  color: #ffffff;
  font-weight: 700;
  border-radius: 50%;
  font-size: 16px;
}

.project-owners-header {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 12px;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

.project-owners-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
}

/* Highlight owners row based on overall RAG */
.project-owners-row.rag-green {
  background: linear-gradient(90deg, #f6fff7 0%, #f0fff4 100%);
  border-left: 4px solid #34d399;
  padding: 8px;
  border-radius: 8px;
}
.project-owners-row.rag-amber {
  background: linear-gradient(90deg, #fff7ed 0%, #fffbeb 100%);
  border-left: 4px solid #f59e0b;
  padding: 8px;
  border-radius: 8px;
}
.project-owners-row.rag-red {
  background: linear-gradient(90deg, #fff1f2 0%, #fff1f2 100%);
  border-left: 4px solid #dc2626;
  padding: 8px;
  border-radius: 8px;
}
.project-owners-row.rag-unknown {
  background: linear-gradient(90deg, #f3f4f6 0%, #f8fafc 100%);
  border-left: 4px solid #6b7280;
  padding: 8px;
  border-radius: 8px;
}

.project-owners-header div {
  text-transform: capitalize;
  font-weight: 600;
  font-size: 12px;
  color: #6b7280;
}

.owner-name {
  font-weight: 300;
  color: #0f172a;
  font-size: 14px;
}

/* Project tiles (Phase, Next TQA, Action count, Observations) */
.project-tiles {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}

.project-tile {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  flex: 1 1 120px;
  min-width: 100px;
}

.project-tile .tile-label {
  font-size: 12px;
  color: #6b7280;
}

.project-tile .tile-value {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

@media(min-width: 900px) {
  .project-tiles { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

.rag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.last5-rag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 20px;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.rag-green { background: #01cf4d !important; }
.rag-amber { background: #f59e0b !important; }
.rag-red { background: #dc2626 !important; }
.rag-unknown { background: #374151 !important; }

/* Last5 sessions list */
.last5-list {
  display: flex;
  gap: 8px;
  align-items: center;
}

.last5-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 8px;
  min-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.last5-date {
  font-size: 12px;
  color: #374151;
  margin-bottom: 4px;
}

.last5-sessionid {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 6px;
}

.last5-rag-text {
  font-size: 12px;
  color: #374151;
  margin-bottom: 6px;
  text-transform: capitalize;
}

/* Overall RAG square block */
.overall-rag-block {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.overall-rag-block.rag-green { background: #16a34a; }
.overall-rag-block.rag-amber { background: #f59e0b; }
.overall-rag-block.rag-red { background: #dc2626; }
.overall-rag-block.rag-unknown { background: #6b7280; }

/* Standard downloadable report layout */
.tqa-session-page.readonly {
  --report-ink: #172033;
  --report-muted: #64748b;
  --report-line: #d8e0ea;
  --report-soft: #f6f8fb;
  --report-band: #eef4fb;
  min-height: 100vh;
  color: var(--report-ink);
  background: #edf2f7;
  font-size: 13px;
  line-height: 1.45;
}

.tqa-session-page.readonly .tqa-header {
  background: #ffffff;
  border-bottom: 4px solid var(--primary-color);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  padding: 18px 28px;
}

.tqa-session-page.readonly .tqa-header::before {
  display: none;
}

.tqa-header-inner {
  max-width: 1240px;
  padding: 0;
  gap: 16px;
}

.header-left-controls {
  flex: 0 0 auto;
}

.tqa-session-page.readonly .tqa-title {
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: none;
  text-align: left;
}

.tqa-session-page.readonly .report-date {
  color: #334155;
  background: var(--report-band);
  border: 1px solid #c9d8ea;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.project-btn.export-btn,
.tqa-session-page.readonly .project-btn.export-btn {
  min-height: 34px;
  height: auto;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--primary-color);
  background: #ffffff;
  border: 1px solid #b8c7d9;
  font-size: 12px;
  font-weight: 700;
  pointer-events: auto !important;
}

.project-btn.export-btn:hover,
.tqa-session-page.readonly .project-btn.export-btn:hover {
  color: #ffffff !important;
  background: var(--primary-color) !important;
  border-color: var(--primary-color);
}

.download-btn {
  color: #ffffff !important;
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.download-btn:hover {
  background: #0b3768 !important;
}

.tqa-content {
  max-width: 100%;
  gap: 18px;
  margin: 14px auto 36px;
  padding: 0 20px;
}

.tqa-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.tqa-sidebar {
  gap: 16px;
  top: 24px;
}

.dashboard-card,
.sticky-panel {
  background: #ffffff;
  border: 1px solid var(--report-line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  padding: 16px;
  margin: 0;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0 0 12px;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--report-line);
}

.dashboard-section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--secondary-color);
  border-radius: 2px;
  flex: 0 0 auto;
}

.sidebar-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-panel-heading .dashboard-section-title {
  flex: 1 1;
}

.project-details-table {
  border: 1px solid var(--report-line);
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
}

.project-details-table th,
.project-details-table td {
  border-bottom: 1px solid #edf1f5;
  padding: 10px 14px;
  font-size: 13px;
}

.project-details-table th {
  width: 170px;
  color: #475569;
  background: #f8fafc;
  font-weight: 700;
}

.project-details-table td {
  color: #172033;
  font-weight: 500;
}

.project-logo-cell {
  width: 118px;
  background: #ffffff !important;
}

.dashboard-account-logo,
.dashboard-account-initials {
  width: 58px;
  height: 58px;
  border-radius: 8px;
}

.rag-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.rag-chip {
  width: 30px;
  height: 22px;
  border-radius: 5px;
  font-size: 11px;
  box-shadow: none;
  margin-right:6px;
}

.dashboard-table-container,
.dashboard-table-scrollable {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--report-line);
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12.5px;
}

.dashboard-table thead {
  background: #edf4fb;
}

.dashboard-table th {
  padding: 10px 12px;
  text-align: left;
  color: #243b5a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--report-line);
  vertical-align: top;
}

.dashboard-table td {
  padding: 10px 12px;
  color: #253247;
  border-bottom: 1px solid #edf1f5;
  vertical-align: top;
  word-break: break-word;
}

.dashboard-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.questionnaire-card {
  max-height: none;
  overflow: visible;
}

.questionnaire-card .dashboard-table th:first-child,
.questionnaire-card .dashboard-table td:first-child {
  width: 20%;
}

.attendees-row {
  gap: 7px;
}

.dashboard-tag {
  border-radius: 6px;
  background: #f8fafc;
  border-color: #cfd8e5;
  box-shadow: none;
  color: #243b5a;
  font-size: 12px;
}

.empty-grid {
  padding: 18px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  box-shadow: none;
  color: var(--report-muted);
}

.dashboard-action-row-alert td {
  background: #fff7ed !important;
}

@media (max-width: 1180px) {
  .tqa-content {
    gap: 16px;
  }

  .tqa-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .tqa-session-page.readonly .tqa-header {
    padding: 16px;
  }

  .tqa-header-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .header-left-controls {
    order: 3;
    flex-wrap: wrap;
  }

  .tqa-session-page.readonly .tqa-title {
    font-size: 19px;
  }

  .tqa-session-page.readonly .report-date {
    width: fit-content;
    white-space: normal;
  }

  .tqa-content {
    margin-top: 16px;
    padding: 0 12px 24px;
  }

  .dashboard-card,
  .sticky-panel {
    padding: 12px;
  }

  .project-details-table,
  .project-details-table tbody,
  .project-details-table tr,
  .project-details-table th,
  .project-details-table td {
    display: block;
    width: 100%;
  }

  .project-logo-cell {
    text-align: left;
  }

  .project-details-table th {
    border-bottom: 0;
    padding-bottom: 3px;
  }

  .project-details-table td {
    padding-top: 3px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .header-left-controls {
    display: none !important;
  }

  .tqa-session-page.readonly {
    background: #ffffff;
  }

  .tqa-session-page.readonly .tqa-header,
  .dashboard-card,
  .sticky-panel {
    box-shadow: none;
  }

  .tqa-content {
    display: block;
    margin: 16px auto;
  }

  .tqa-sidebar {
    position: static;
    width: auto;
    height: auto;
  }

  .dashboard-card,
  .sticky-panel {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 14px;
  }
}

.preview-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-modal-content {
  width: 98%;
  height: 95%;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.preview-modal-header {
  height: 60px;
  padding: 15px 25px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-close-btn {
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
}

.preview-modal-body .tqa-session-page {
  background: #f8fafc;
  min-height: auto;
}

.preview-modal-body {
  height: calc(100% - 60px);
  overflow: auto;
  background: #f8fafc;
}

.preview-modal-body .tqa-content {
  padding: 20px;
}

.preview-modal-body .tqa-sidebar {
  position: relative;
  top: 0;
  height: auto;
}

.preview-modal-body table {
  width: 100%;
}
.tqa-session-list {
  width: 100%;
}

/* Enhanced Header Section */
.sessions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgb(14 75 141);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.sessions-header h2 {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.sessions-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* Project Info Section */
.project-info-section {
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.project-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Enhanced Button */
.tqa-assessment-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-normal);
}

.tqa-assessment-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.tqa-assessment-btn.primary {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
}

.tqa-assessment-btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Enhanced Table Container */
.sessions-table-container {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--gradient-card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.sessions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.sessions-table thead {
  background: rgb(14 75 141);
  border-bottom: 2px solid var(--secondary-color);
}

.sessions-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-inverse);
  font-size: 13px;
  white-space: nowrap;
}

.sessions-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-normal);
}

.sessions-table tbody tr:last-child {
  border-bottom: none;
}

.sessions-table tbody tr:hover {
  background-color: var(--bg-secondary);
}

.sessions-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* Enhanced Cell Styling */
.session-date {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.session-phase {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.session-phase span {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.session-description {
  max-width: 300px;
  color: var(--text-primary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.session-attendees {
  padding: 4px 0;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.session-rag {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.rag-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.rag-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.session-next-date {
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.session-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition-normal);
}

.view-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

.edit-btn {
  background: var(--warning-bg);
  color: var(--warning-color);
  border-color: var(--warning-border);
}

.edit-btn:hover {
  background: var(--warning-color);
  color: white;
}

/* Enhanced No Sessions State */
.no-sessions-container {
  text-align: center;
  padding: 60px 40px;
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.no-sessions-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.no-sessions-container h3 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.no-sessions-container p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 8px 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.no-sessions-container .tqa-assessment-btn {
  margin-top: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sessions-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .project-info-grid {
    grid-template-columns: 1fr;
  }
  
  .sessions-table {
    font-size: 12px;
  }
  
  .sessions-table th,
  .sessions-table td {
    padding: 8px 12px;
  }
  
  .session-description {
    max-width: 200px;
  }
  
  .session-actions {
    flex-direction: column;
    gap: 4px;
  }
}

.last-tqa-comments-cell {
  vertical-align: top;
}

.last-tqa-comment {
  width: 100%;
  height: 48px;
  box-sizing: border-box;

  padding: 10px 12px;

  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;

  color: #64748b;

  white-space: pre-wrap;
  word-break: break-word;

  line-height: 1.4;

  overflow-y: auto;
  overflow-x: hidden;

  font-family: inherit;
  font-size: 14px;

  cursor: default;
}

.project-documents {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.documents-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

.documents-table-container {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.documents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.documents-table thead {
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.documents-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid #ccc;
}

.documents-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s;
}

.documents-table tbody tr:last-child {
  border-bottom: none;
}

.documents-table tbody tr:hover {
  background-color: #f9fafb;
}

.documents-table td {
  padding: 14px 16px;
  border: 1px solid #ccc;
}

.doc-icon {
  text-align: center;
  font-size: 24px;
}

.doc-name {
  font-weight: 500;
  color: #1f2937;
}

.doc-status {
  text-align: left;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-available {
  background-color: #d1fae5;
  color: #065f46;
}

.status-not-uploaded {
  background-color: #fee2e2;
  color: #991b1b;
}

.doc-actions {
  text-align: center;
}

.btn-view,
.btn-upload {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: transform 0.2s;
}

.btn-view:hover,
.btn-upload:hover {
  transform: scale(1.2);
}
.doc-icon svg {
  color: #0f3c68;
}

.doc-actions svg {
  color: #0f3c68;
}

.btn-upload:hover svg,
.btn-view:hover svg {
  color: #15508a;
}


.kpis-container {
  padding: 24px;
  background-color: #f9fafb;
  min-height: 400px;
}

.kpis-header {
  margin-bottom: 32px;
}

.kpis-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.kpis-subtitle {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

/* Summary Tiles */
.kpi-summary-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 200px));
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 40px;
  justify-content: start;
}

.kpi-tile {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-top: 4px solid transparent;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  max-height: 200px;
  width: 200px;
}

.kpi-tile:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.kpi-tile.trend-up {
  border-top-color: #10b981;
  background: linear-gradient(to bottom, rgba(16, 185, 129, 0.05) 0%, white 100%);
}

.kpi-tile.trend-down {
  border-top-color: #ef4444;
  background: linear-gradient(to bottom, rgba(239, 68, 68, 0.05) 0%, white 100%);
}

.kpi-tile.trend-neutral {
  border-top-color: #6b7280;
  background: linear-gradient(to bottom, rgba(107, 114, 128, 0.05) 0%, white 100%);
}

.kpi-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  min-height: 40px;
}

.kpi-tile-name {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
  flex: 1 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-tile-trend-icon {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  margin-left: 8px;
  flex-shrink: 0;
}

.kpi-tile-trend-icon.trend-up {
  color: #10b981;
}

.kpi-tile-trend-icon.trend-down {
  color: #ef4444;
}

.kpi-tile-trend-icon.trend-neutral {
  color: #6b7280;
}

.kpi-tile-value {
  font-size: 36px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
  line-height: 1;
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-tile-change {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  text-align: center;
}

.kpi-tile-change.positive {
  color: #10b981;
}

.kpi-tile-change.negative {
  color: #ef4444;
}

.kpi-tile-sessions {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  font-weight: 500;
}

/* Section Title */
.kpis-section-title {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.kpis-section-title h3 {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.loading-message,
.error-message,
.no-data-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: #6b7280;
}

.error-message {
  color: #dc2626;
}

.error-message p {
  margin: 0 0 16px 0;
}

.retry-button {
  padding: 8px 16px;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.retry-button:hover {
  background-color: #2563eb;
}

.no-data-message p {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.no-data-hint {
  font-size: 14px;
  color: #9ca3af;
}

.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  grid-gap: 24px;
  gap: 24px;
}

.kpi-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 24px;
  transition: box-shadow 0.2s;
}

.kpi-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.kpi-title-section {
  flex: 1 1;
}

.kpi-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.kpi-description {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.kpi-trend-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  min-width: 80px;
}

.kpi-trend-badge.trend-up {
  background-color: #d1fae5;
  color: #065f46;
}

.kpi-trend-badge.trend-down {
  background-color: #fee2e2;
  color: #991b1b;
}

.kpi-trend-badge.trend-neutral {
  background-color: #e5e7eb;
  color: #374151;
}

.trend-icon {
  font-size: 24px;
  font-weight: bold;
}

.trend-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}

.kpi-trend-chart {
  margin-bottom: 20px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
}

.chart-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.chart-count {
  font-size: 12px;
  color: #6b7280;
}

.trend-table {
  overflow-x: auto;
}

.trend-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.trend-table thead {
  background-color: #f9fafb;
}

.trend-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

.trend-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.trend-table tbody tr:hover {
  background-color: #f9fafb;
}

.trend-table tbody tr:last-child {
  border-bottom: none;
}

.trend-table td {
  padding: 12px;
  color: #374151;
}

.date-cell {
  color: #6b7280;
  font-size: 13px;
}

.session-cell {
  font-weight: 500;
}

.value-cell strong {
  color: #111827;
  font-size: 15px;
}

.change-cell {
  min-width: 100px;
}

.change-positive {
  color: #059669;
  font-weight: 500;
}

.change-negative {
  color: #dc2626;
  font-weight: 500;
}

.change-neutral {
  color: #9ca3af;
}

.kpi-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background-color: #f9fafb;
  border-radius: 8px;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .kpis-grid {
    grid-template-columns: 1fr;
  }

  .kpi-summary-tiles {
    grid-template-columns: repeat(auto-fill, minmax(180px, 180px));
  }

  .kpi-tile {
    width: 180px;
    min-height: 180px;
    max-height: 180px;
    padding: 20px;
  }

  .kpi-tile-value {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .kpi-summary-tiles {
    grid-template-columns: repeat(auto-fill, minmax(160px, 160px));
    gap: 16px;
  }

  .kpi-tile {
    width: 160px;
    min-height: 160px;
    max-height: 160px;
    padding: 16px;
  }

  .kpi-tile-value {
    font-size: 28px;
  }

  .kpi-tile-name {
    font-size: 12px;
  }

  .kpi-tile-trend-icon {
    font-size: 24px;
  }

  .kpi-tile-change {
    font-size: 12px;
  }

  .kpi-tile-sessions {
    font-size: 10px;
  }

  .kpi-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-trend-badge {
    flex-direction: row;
    justify-content: space-between;
  }

  .kpi-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .trend-table {
    font-size: 12px;
  }

  .trend-table th,
  .trend-table td {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .kpi-summary-tiles {
    grid-template-columns: repeat(auto-fill, minmax(140px, 140px));
    justify-content: center;
  }

  .kpi-tile {
    width: 140px;
    min-height: 140px;
    max-height: 140px;
    padding: 14px;
  }

  .kpi-tile-value {
    font-size: 24px;
  }

  .kpi-tile-name {
    font-size: 11px;
  }

  .kpi-tile-header {
    min-height: 32px;
  }
}

.tqa-report-page {
  height: 100%;
}

.tqa-report-page .report-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.tqa-report-page .export-kpis-button {
  margin-left: auto;
}

.tqa-report-page .export-kpis-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.page-header {
  background: var(--gradient-card);
  padding: 16px 24px;
  border-radius: 0;
  box-shadow: var(--shadow-sm);
  border-bottom: 2px solid var(--secondary-color);
  margin-bottom: 20px;
}

.page-header h1 {
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 600;
  /* margin-top: 10px; */
}

.back-button {
  background: var(--gradient-button);
  color: var(--text-inverse);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.back-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  transition: all 0.3s ease;
}

.back-button:hover {
  background: var(--gradient-button-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.back-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.back-button:focus {
  outline: 2px solid var(--primary-color-light);
  outline-offset: 2px;
}

/* KPI Tiles Section */
.kpi-tiles-section {
  margin: 0 24px 24px 24px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(18, 75, 136, 0.02) 0%, rgba(208, 70, 39, 0.02) 100%);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.kpi-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.kpi-tile {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  min-width: 0;
  overflow: visible;
}

.kpi-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #124b88 0%, #1e40af 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kpi-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(18, 75, 136, 0.15);
  border-color: #124b88;
}

.kpi-tile:hover::before {
  opacity: 1;
}

.kpi-tile-primary {
  background: linear-gradient(135deg, #124b88 0%, #1e40af 100%);
  border: none;
  color: white;
}

.kpi-tile-primary.kpi-tile-green {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.kpi-tile-primary.kpi-tile-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.kpi-tile-primary.kpi-tile-red {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.kpi-tile-primary.kpi-tile-gray {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
}

.kpi-tile-primary .kpi-tile-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.kpi-tile-primary .kpi-tile-label,
.kpi-tile-primary .kpi-tile-value,
.kpi-tile-primary .kpi-tile-meta {
  color: white;
}

.kpi-tile-primary::before {
  background: rgba(255, 255, 255, 0.3);
  width: 100%;
  height: 4px;
  top: auto;
  bottom: 0;
}

.kpi-tile-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(18, 75, 136, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
  border-radius: 12px;
  flex-shrink: 0;
}

.kpi-tile-content {
  flex: 1 1;
  min-width: 0;
}

.kpi-tile-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-tile-value {
  font-size: 28px;
  font-weight: 700;
  color: #124b88;
  line-height: 1.2;
  margin-bottom: 6px;
  white-space: nowrap;
}

.kpi-tile-meta {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  line-height: 1.3;
  white-space: normal;
}

.no-kpis-tile {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #6b7280;
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
}

.no-kpis-tile p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.kpi-tiles-section .loading-message {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 14px;
}

/* ========== Phase Scores Section ========== */
.phase-scores-section {
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(18, 75, 136, 0.02) 0%, rgba(208, 70, 39, 0.02) 100%);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.phase-scores-section .section-header {
  margin-bottom: 24px;
  text-align: left;
}

.phase-scores-section .section-header h2 {
  color: #124b88;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phase-scores-section .section-description {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
  font-weight: 400;
}

.phase-scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.phase-score-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.phase-score-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.phase-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(18, 75, 136, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
  border-radius: 10px;
}

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

.phase-name {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-transform: capitalize;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phase-score {
  font-size: 26px;
  font-weight: 700;
  color: #124b88;
  line-height: 1;
  margin-bottom: 4px;
}

.phase-meta {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.phase-status-indicator {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  transition: width 0.3s ease;
}

.phase-score-card:hover .phase-status-indicator {
  width: 8px;
}

/* Phase Score RAG Status Colors */
.phase-score-green {
  border-color: #10b981;
}

.phase-score-green .phase-score {
  color: #059669;
}

.phase-status-green {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.phase-score-amber {
  border-color: #f59e0b;
}

.phase-score-amber .phase-score {
  color: #d97706;
}

.phase-status-amber {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.phase-score-red {
  border-color: #ef4444;
}

.phase-score-red .phase-score {
  color: #dc2626;
}

.phase-status-red {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.phase-score-gray {
  border-color: #d1d5db;
}

.phase-score-gray .phase-score {
  color: #6b7280;
}

.phase-status-gray {
  background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 100%);
}

.tabs-container {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  background: var(--gradient-subtle);
}

.tab-button {
  flex: 1 1;
  padding: 16px 18px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-normal);
  border-bottom: 3px solid transparent;
}

.tab-button:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  background: var(--bg-secondary);
  font-weight: 600;
}

.tabs-body {
  padding: 24px;
  min-height: 400px;
}

.tab-content {
  animation: fadeIn 0.3s;
}

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

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 13px;
}

.detail-item span {
  font-size: 14px;
  color: var(--text-primary);
  padding: 10px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.no-project-message {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.observations-actions-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.document-review-sessions-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.document-review-session {
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-light);
}

.document-review-session:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.document-review-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.document-review-session-header h2 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 20px;
}

.document-review-session-header p {
  margin: 6px 0;
  color: var(--text-secondary);
}

.document-review-session-header a {
  color: var(--primary-color);
  font-weight: 500;
}

.document-review-session-header-text {
  display: flex;
  gap: 30px;
}

.document-review-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--bg-primary);
  color: var(--primary-color);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.document-review-toggle:hover,
.document-review-toggle:focus-visible {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
}

.findings-section {
  background-color: white;
}

.findings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* margin-bottom: 16px;
  padding-bottom: 12px; */
  border-bottom: 2px solid #e5e7eb;
}

.findings-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.findings-count {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.findings-table-container {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--gradient-card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.findings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.findings-table thead {
  background: rgb(14 75 141);
  border-bottom: 2px solid var(--secondary-color);
}

.findings-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-inverse);
  font-size: 13px;
  white-space: nowrap;
}

.findings-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-normal);
}

.findings-table tbody tr:last-child {
  border-bottom: none;
}

.findings-table tbody tr:hover {
  background-color: var(--bg-secondary);
}

.findings-table td {
  padding: 14px 16px;
  vertical-align: top;
}

.finding-id {
  font-weight: 600;
  color: var(--primary-color);
  white-space: nowrap;
}

.finding-category {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.finding-category:hover {
  background: transparent;
}

.finding-title {
  font-weight: 500;
  color: var(--text-primary);
  min-width: 200px;
}

.finding-description {
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.finding-description:hover {
  background: transparent;
}

.findings-table td:nth-child(5) {
  /* Owner column */
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.findings-table td:nth-child(5) {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: static;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-select {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #d1d5db;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.status-select:hover {
  border-color: #9ca3af;
}

.status-select:focus {
  border-color: #4a7c8c;
  box-shadow: 0 0 0 2px rgba(74, 124, 140, 0.1);
}

.status-open,
.status-new {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-in-progress {
  background-color: #fef3c7;
  color: #92400e;
}

.status-in-review {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-completed,
.status-closed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-resolved {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-cancelled {
  background-color: #f3f4f6;
  color: #6b7280;
}

.no-findings {
  text-align: center;
  padding: 12px;
  color: #6b7280;
  font-style: italic;
}

.observations-actions-container .section {
  background: var(--gradient-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.observations-actions-container .section h2 {
  color: var(--primary-color);
  font-size: 20px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--secondary-color);
}

/* Project Team Section */
.project-team-section {
  margin-top: 32px;
  padding: 24px;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.project-team-section h2 {
  color: #124b88;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #124b88;
}

.team-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.team-input {
  flex: 1 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.team-input:focus {
  border-color: #4a7c8c;
  box-shadow: 0 0 0 3px rgba(74, 124, 140, 0.1);
}

.team-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.team-table thead {
  background-color: #f3f4f6;
}

.team-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-table td {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  color: #4b5563;
}

.team-table tbody tr:hover {
  background-color: #f9fafb;
}

/* Tech Stack Section */
.tech-stack-section {
  margin-top: 32px;
  padding: 24px;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.tech-stack-section h2 {
  color: #124b88;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #124b88;
}

.tech-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.tech-input {
  flex: 1 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.tech-input:focus {
  border-color: #4a7c8c;
  box-shadow: 0 0 0 3px rgba(74, 124, 140, 0.1);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: #e0f2fe;
  color: #075985;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.tech-remove {
  background: none;
  border: none;
  color: #075985;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.tech-remove:hover {
  background-color: rgba(7, 89, 133, 0.1);
}

.add-btn {
  padding: 10px 20px;
  background: var(--gradient-button);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
}

.add-btn:hover {
  background: var(--gradient-button-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.tech-stack-error {
  color: #dc2626;
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 10px;
}

.tech-input-error {
  border: 1px solid #dc2626;
}

.save-btn {
  padding: 10px 20px;
  background-color: #ffffff;
  color: #059669;
  border: 1px solid #059669;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.save-btn:hover {
  background-color: #047857;
  color: #ffffff;
}

.remove-btn {
  padding: 6px 12px;
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.remove-btn:hover {
  background-color: #dc2626;
}

.no-data {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-style: italic;
  background-color: white;
  border-radius: 6px;
  border: 1px dashed #d1d5db;
}
/* === Project Details Section (match Team / Tech Stack style) === */
.project-details-section {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f2a44;
  margin-bottom: 14px;
}
/* ===== Project Details Grid Layout Fix ===== */

.project-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  grid-gap: 16px 24px;
  gap: 16px 24px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 14px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  background: #e5e7eb3b;
  border: 0px solid #e5e7eb59;
  border-radius: 6px;
  padding: 10px 14px;
}

.detail-item label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.detail-item span {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

/* Mobile responsive fallback */
@media (max-width: 768px) {
  .project-details-grid {
    grid-template-columns: 1fr;
  }
  
  .phase-scores-grid {
    grid-template-columns: 1fr;
  }
  
  .phase-score-card {
    padding: 16px;
  }
}

/* ===== Recommended Resources Section ===== */
.recommended-resources-container {
  padding: 24px;
}

.resources-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.resources-header h2 {
  color: #124b88;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.resources-description {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.resource-type-section {
  margin-bottom: 32px;
}

.resource-type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(18, 75, 136, 0.05) 0%, rgba(208, 70, 39, 0.05) 100%);
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  -webkit-user-select: none;
          user-select: none;
}

.resource-type-header:hover {
  background: linear-gradient(135deg, rgba(18, 75, 136, 0.08) 0%, rgba(208, 70, 39, 0.08) 100%);
  border-color: #124b88;
  transform: translateX(4px);
}

.resource-type-title {
  color: #124b88;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-count {
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  margin-left: 8px;
}

.collapse-icon {
  font-size: 14px;
  color: #124b88;
  transition: transform 0.3s ease;
  display: inline-block;
}

.collapse-icon.expanded {
  transform: rotate(180deg);
}

/* Resource Table Styling */
.resources-table-container {
  margin-top: 15px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
}

.resources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.resources-table thead {
  background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
  border-bottom: 2px solid #d0d0d0;
}

.resources-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.resources-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.resources-table tbody tr {
  transition: background-color 0.2s ease;
}

.resources-table tbody tr:hover {
  background-color: #f8f9fa;
}

.resources-table tbody tr:last-child td {
  border-bottom: none;
}

/* Column widths */
.icon-col {
  width: 50px;
}

.title-col {
  width: 20%;
  min-width: 150px;
}

.category-col {
  width: 12%;
  min-width: 100px;
}

.description-col {
  width: 35%;
  min-width: 200px;
}

.tags-col {
  width: 20%;
  min-width: 150px;
}

.link-col {
  width: 60px;
  text-align: center;
}

/* Cell content styling */
.icon-cell {
  text-align: center;
}

.resource-icon-sm {
  font-size: 24px;
}

.title-cell strong {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 14px;
}

.resource-category-badge {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(18, 75, 136, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
  color: #124b88;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.description-cell {
  color: #555;
  line-height: 1.5;
}

.resource-tags-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.resource-tag-sm {
  padding: 3px 8px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid #e5e7eb;
}

.resource-tag-sm.more {
  background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
  color: #555;
  border: none;
}

.resource-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #124b88 0%, #1e40af 100%);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(18, 75, 136, 0.2);
}

.resource-link-btn:hover {
  background: linear-gradient(135deg, #0f3a66 0%, #1e3a8a 100%);
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(18, 75, 136, 0.3);
}

.no-link {
  color: #ccc;
  font-size: 16px;
}

.no-resources-message {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, rgba(18, 75, 136, 0.02) 0%, rgba(208, 70, 39, 0.02) 100%);
  border-radius: 12px;
  border: 2px dashed #d1d5db;
}

.no-resources-message p {
  color: #6b7280;
  font-size: 16px;
  margin: 0 0 8px 0;
  font-weight: 500;
}

.no-resources-message .subtitle {
  color: #9ca3af;
  font-size: 14px;
  margin: 0;
  font-weight: 400;
}

@media (max-width: 768px) {
  .resources-table-container {
    overflow-x: scroll;
  }
  
  .resources-table {
    min-width: 800px;
  }
}

/* TQA Observations and Actions Styling */

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
}

.section-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 600;
}

/* Add Row Button */
.btn-add-row {
  background: var(--gradient-button);
  color: var(--text-inverse);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn-add-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Table Section */
.tqa-table-section {
  width: 100%;
  max-width: 100%;
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  /* box-shadow: var(--shadow-md); */
}

.table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 16px;
}

.assessment-items-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-sizing: border-box;
}

.assessment-items-table th,
.assessment-items-table td {
  white-space: normal;
  word-break: break-word;
}

.assessment-items-table thead tr {
  background: var(--gradient-hero);
}

.assessment-items-table th {
  color: var(--text-inverse);
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  border: none;
  white-space: nowrap;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.assessment-items-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.assessment-items-table tbody tr:hover {
  background-color: rgba(208, 70, 39, 0.05);
}

.assessment-items-table tbody tr:last-child {
  border-bottom: none;
}

.assessment-items-table td {
  padding: 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}

/* Table Input Fields */
.type-select,
.category-select,
.priority-select {
  width: 100%;
  min-width: 170px;
  /* extra right padding so the native dropdown arrow doesn't crowd the text */
  padding: 8px 32px 8px 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.type-select,
.category-select,
.priority-select {
  white-space: normal;
}

.type-select:focus,
.category-select:focus,
.priority-select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(208, 70, 39, 0.1);
}

.description-input {
  width: 100%;
  min-width: 300px;
  padding: 8px 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  resize: vertical;
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  line-height: 1.4;
  transition: var(--transition-fast);
}

.description-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(208, 70, 39, 0.1);
}

.assignee-input,
.date-input {
  width: 100%;
  min-width: 250px;
  padding: 8px 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.assignee-input:focus,
.date-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(208, 70, 39, 0.1);
}

.date-input:disabled {
  background-color: var(--bg-disabled);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Delete Row Button */
.btn-delete-row {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  font-size: 18px;
}

.btn-delete-row:hover {
  background-color: var(--error-color);
  transform: scale(1.1);
}

/* Empty State */
.empty-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-style: italic;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .assessment-items-table {
    font-size: 12px;
  }
  
  .assessment-items-table th,
  .assessment-items-table td {
    padding: 10px 8px;
  }
}

@media (max-width: 768px) {
  .table-container {
    overflow-x: scroll;
  }
  
  .assessment-items-table {
    min-width: 800px;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.assessment-items-table tbody tr {
  animation: slideIn 0.3s ease-out;
}

/* Priority Colors for Select Options */
.priority-select option[value="Low"] {
  color: var(--success-color);
  font-weight: 600;
}

.priority-select option[value="Medium"] {
  color: var(--warning-color);
  font-weight: 600;
}

.priority-select option[value="High"] {
  color: var(--error-color);
  font-weight: 600;
}

.priority-select option[value="Critical"] {
  color: #dc2626;
  font-weight: 700;
}

.module-input {
  width: 100%;
  min-width: 180px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font: inherit;
}
.attendee-selector {
  position: relative;
  width: 100%;
}

.attendee-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  border-radius: var(--radius-md, 6px);
  background: white;
  min-height: auto;
  cursor: text;
  transition: border-color 0.2s ease;
}

.attendee-chips:focus-within {
  border-color: #007bff;
  border-color: var(--primary-color, #007bff);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.attendee-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  border-radius: var(--radius-sm, 4px);
  font-size: 12px;
  color: #6c757d;
  animation: chipFadeIn 0.2s ease;
  flex-shrink: 0;
}

@keyframes chipFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.attendee-name {
  font-weight: 500;
  white-space: nowrap;
}

.remove-attendee {
  background: none;
  border: none;
  color: #adb5bd;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.remove-attendee:hover {
  background: #e9ecef;
  color: #495057;
}

.attendee-input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1 1 auto;
  min-width: 20px;
  max-width: 700px;
  font-size: 13px;
  color: #374151;
  font-family: inherit;
  caret-color: #374151;
  line-height: 1.4;
  align-self: center;
}

.attendee-input::placeholder {
  color: #9ca3af;
}

.attendee-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 6px 6px;
  border-radius: 0 0 var(--radius-md, 6px) var(--radius-md, 6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-md, 0 2px 8px rgba(0, 0, 0, 0.1));
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.attendee-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f3f4f6;
}

.attendee-option:last-child {
  border-bottom: none;
}

.attendee-option:hover {
  background: #f9fafb;
}

.attendee-option-name {
  font-size: 14px;
  color: #374151;
}

.attendee-option-add {
  font-size: 12px;
  color: #1e40af;
  font-weight: 500;
}

.attendee-option-new .attendee-option-name {
  color: #1e40af;
  font-weight: 500;
}

.attendee-option-new .attendee-option-add {
  color: #059669;
}

.attendee-option-selected {
  background: #f9fafb;
  opacity: 0.7;
  cursor: default;
}

.attendee-option-selected .attendee-option-name {
  color: #6b7280;
  font-weight: 500;
}

.attendee-option-selected-indicator {
  font-size: 12px;
  color: #059669;
  font-weight: 600;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .attendee-chips {
    border-color: #4a5568;
    border-color: var(--border-dark, #4a5568);
  }
  
  .attendee-chip {
    background: #4a5568;
    background: var(--bg-secondary-dark, #4a5568);
    border-color: #718096;
    border-color: var(--border-dark, #718096);
    color: #f7fafc;
    color: var(--text-primary-dark, #f7fafc);
  }
  
  .attendee-input {
    color: #f7fafc;
    color: var(--text-primary-dark, #f7fafc);
  }
  
  .attendee-dropdown {
    background: #2d3748;
    background: var(--bg-primary-dark, #2d3748);
    border-color: #4a5568;
    border-color: var(--border-dark, #4a5568);
  }
  
  .attendee-option {
    border-bottom-color: #4a5568;
    border-bottom-color: var(--border-dark, #4a5568);
  }
  
  .attendee-option:hover {
    background: #4a5568;
    background: var(--bg-secondary-dark, #4a5568);
  }
  
  .attendee-option-name {
    color: #f7fafc;
    color: var(--text-primary-dark, #f7fafc);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .attendee-chips {
    padding: 6px;
    gap: 6px;
  }
  
  .attendee-chip {
    padding: 3px 6px;
    font-size: 12px;
  }
  
  .attendee-input {
    min-width: 20px;
    font-size: 13px;
  }
  
  .attendee-option {
    padding: 8px 10px;
  }
  
  .attendee-option-name {
    font-size: 13px;
  }
}

:root {
  --primary-color: #124b88;
  --accent-bg: #e1ecf8;
  --muted: #6b7280;
  --panel-border: #eef3fb;
}

.tqa-session-page {
  /* height: 100%;
  background-color: #f8fafc; */
  overflow-y: auto;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial;
}

.tqa-header {
  background: white;
  padding: 16px 28px;
  border-bottom: 1px solid #e6eef9;
}

.tqa-title {
  color: #124b88;
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  text-align: left;
}

.tqa-info-section {
  padding: 10px 20px;
  margin-bottom: 20px;
}

.info-notice {
  margin-bottom: 10px;
}

.info-notice p {
  margin: 6px 0;
  font-size: 13px;
  color: #6b7280;
  color: var(--muted);
  line-height: 1.4;
}

.tqa-metadata {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  align-items: flex-start;
  background-color: white;
  padding: 5px;
  border-radius: 8px;
  /* border: 1px solid var(--panel-border);
  box-shadow: 0 1px 4px rgba(18, 75, 136, 0.03); */
  overflow-x: auto;
}

.metadata-field {
  flex: 1 1 220px;
  min-width: 220px;
}

.metadata-field label {
  display: block;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
  font-size: 13px;
}

.phase-dropdown,
.attendees-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e6eef9;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 6px;
  background: #fff;
}

.phase-dropdown:focus,
.attendees-input:focus {
  outline: none;
  border-color: #124b88;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(18, 75, 136, 0.06);
}

.metadata-value {
  font-size: 13px;
  color: #6b7280;
  color: var(--muted);
  margin-top: 4px;
}

.tqa-summary {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 18px;
  margin: 12px 28px 16px 28px;
  border: 1px solid #eef3fb;
  border: 1px solid var(--panel-border);
  box-shadow: 0 1px 3px rgba(18, 75, 136, 0.04);
}

.tqa-summary h3 {
  color: #124b88;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: left;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.summary-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 0;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 4px;
}

.summary-stats::-webkit-scrollbar {
  height: 6px;
}

.summary-stats::-webkit-scrollbar-thumb {
  background: rgba(18, 75, 136, 0.16);
  border-radius: 999px;
}

.stat-card {
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #f1f5f9;
  transition: all 0.18s ease;
  flex: 0 0 140px;
  min-width: 110px;
  max-width: 180px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(14, 75, 141, 0.06);
}

.stat-number {
  font-size: 18px;
  font-weight: 700;
  color: #124b88;
  color: var(--primary-color);
  margin-bottom: 4px;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.2px;
}

.tqa-content-split {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-gap: 20px;
  gap: 20px;
  padding: 18px 0;
  background-color: transparent;
  min-height: 420px;
}

.tqa-tab-bar {
  display: flex;
  gap: 24px;
  padding: 0 0 8px 0;
  background: transparent;
}

.tqa-tab-button {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 0;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tqa-tab-button:hover,
.tqa-tab-button:focus {
  color: #1f2937;
  outline: none;
}

.tqa-tab-button.active {
  color: #0f172a;
  border-bottom-width: 3px;
  border-color: #1e40af;
}

.tqa-tab-panel {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.tqa-section {
  width: 100%;
  max-width: 100%;
  background-color: white;
  border-radius: 16px;
  border: 1px solid #eef3fb;
  border: 1px solid var(--panel-border);
  box-shadow: 0 2px 20px rgba(18, 75, 136, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: none;
}

.tqa-section .section-title {
  background: transparent;
  color: #124b88;
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #eff6ff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tqa-questionnaires,
.tqa-assessment,
.tqa-kpis {
  /* Allow content to expand and avoid internal scrollbars; page will scroll instead */
  overflow: visible;
  max-height: none;
}

.tqa-questionnaires .tqa-questions-container {
  padding: 0;
  margin: 0;
  max-width: none;
}

.tqa-questionnaires.full-width {
  flex: 1 1 100%;
}

.tqa-questionnaires.full-width .tqa-questions-container {
  padding: 24px 20px;
  width: 100%;
  max-width: 100%;
}

.tqa-assessment .tqa-observations-actions {
  width: 100%;
  max-width: 100%;
  padding: 18px;
  margin-top: 24px; /* gap after questionnaire */
}

.tqa-assessment-full {
  padding: 0 28px 24px 28px;
  margin-top: 28px; /* add buffer before observations/action items */
  background-color: transparent;
}

.tqa-assessment-full .tqa-section {
  max-height: none;
  min-height: 320px;
}

.tqa-assessment-full .tqa-assessment {
  overflow-y: visible;
}

.kpis-container {
  padding: 16px;
}

.kpis-loading,
.no-kpis-message {
  text-align: center;
  padding: 32px;
  color: #6b7280;
  color: var(--muted);
  font-size: 14px;
}

.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #eef3fb;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px;
  transition: all 0.18s ease;
  position: relative;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(18, 75, 136, 0.06);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.kpi-name {
  font-size: 15px;
  font-weight: 700;
  color: #124b88;
  color: var(--primary-color);
  flex: 1 1;
}

.kpi-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #e1ecf8;
  background: var(--accent-bg);
  color: #124b88;
  color: var(--primary-color);
}

.kpi-description {
  font-size: 13px;
  color: #374151;
  margin-bottom: 12px;
  line-height: 1.45;
}

.kpi-input-section {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f7fb;
}

.kpi-input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.kpi-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e6eef9;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s ease;
  background-color: #ffffff;
}

.kpi-input:focus {
  outline: none;
  border-color: #124b88;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(18, 75, 136, 0.06);
}

.kpi-input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.kpi-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f3f7fb;
}

.kpi-meta-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.kpi-meta-label {
  color: #6b7280;
  color: var(--muted);
  font-weight: 500;
}

..kpi-meta-value {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.tqa-tabbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.tqa-tabbar .tab-btn {
  background: transparent;
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
  color: #6b7280;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 3px solid transparent;
}
.tqa-tabbar .tab-btn.active {
  color: #124b88;
  color: var(--primary-color);
  border-bottom-color: #124b88;
  border-bottom-color: var(--primary-color);
}

/* Project info layout inside tab */
.tqa-projectinfo .tqa-metadata {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 16px;
  gap: 16px;
  padding: 0px;
}
.tqa-projectinfo .metadata-field label { font-size: 13px; margin-bottom: 6px; display:block; }
.tqa-projectinfo .phase-dropdown { max-width: 100%; }


.tqa-questions-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 16px 24px;
  padding-bottom: 160px; /* ensure last question isn't hidden under sticky actions */
}

.question-block {
  display: flex;
  gap: 12px;
  padding: 14px;
  margin-bottom: 8px;
  background-color: #ffffff;
  border-left: 4px solid transparent;
  border-radius: 6px;
  align-items: flex-start;
}

.question-block.even {
  background-color: #fbfdff;
}

.question-block:hover {
  border-left-color: #124b88;
  border-left-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(18, 75, 136, 0.04);
}

.question-number {
  font-size: 28px;
  font-weight: 800;
  color: #124b88;
  color: var(--primary-color);
  min-width: 36px;
  display: flex;
  align-items: flex-start;
  margin-top: 0;
  line-height: 1;
}

.question-content {
  flex: 1 1;
}

.question-text {
  font-size: 15px;
  color: #1f2937;
  margin-bottom: 16px;
  font-weight: 500;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-option span {
  -webkit-user-select: none;
          user-select: none;
}

.rating-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
  color: var(--muted);
  font-weight: 500;
}

.rating-label.poor {
  color: #ef4444;
}

.rating-label.excellent {
  color: #059669;
}

.rating-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}

.rating-button {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 2px solid #d1d5db;
  border-radius: 12px;
  width: 48px;
  height: 48px;
  font-size: 16px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rating-button:hover {
  background: linear-gradient(135deg, #124b88 0%, #1e40af 100%);
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  border-color: #124b88;
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 75, 141, 0.3);
}

.rating-button.selected {
  background: linear-gradient(135deg, #124b88 0%, #1e40af 100%);
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  border-color: #124b88;
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(14, 75, 141, 0.4);
}

.rating-button.selected::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #124b88;
  background: var(--primary-color);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.question-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.question-textarea:focus {
  outline: none;
  border-color: #124b88;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(18, 75, 136, 0.06);
}

.question-date {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  min-width: 200px;
}

.question-date:focus {
  outline: none;
  border-color: #124b88;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(18, 75, 136, 0.06);
}

/* .tqa-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 32px 40px;
  background-color: white;
  border-top: 1px solid #e5e7eb;
  position: static;
  bottom: auto;
  box-shadow: none;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
} */

.btn-back::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(18, 75, 148, 0.1) 0%,
    transparent 100%
  );
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: linear-gradient(135deg, #f8fafb 0%, #f1f5f9 100%);
  color: #0f4c81;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-back:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-back:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.btn-submit {
  background: linear-gradient(
    135deg,
    #124b88 0%,
    #124b88 100%
  );
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-color) 100%
  );
  color: white;
  box-shadow: 0 4px 12px rgba(18, 75, 148, 0.15);
}

.btn-submit:hover {
  background: linear-gradient(135deg, #0f4c81 0%, #124b88 100%);
  background: linear-gradient(135deg, #0f4c81 0%, var(--primary-color) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(18, 75, 148, 0.25);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(18, 75, 148, 0.2);
}

.btn-submit:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.btn-submit:active::before {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 100%
  );
}

.btn-submit:disabled {
  background: linear-gradient(135deg, #94a3b8 0%, #94a3b8 100%);
  color: white;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loading-message {
  text-align: center;
  padding: 48px;
  font-size: 16px;
  color: #6b7280;
  color: var(--muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .summary-stats {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .stat-card {
    flex: 0 0 120px;
    padding: 8px 10px;
  }

  .tqa-summary {
    padding: 24px 20px;
    margin: 0 20px;
    margin-top: 16px;
  }

  .tqa-tabs {
    padding: 0 20px;
    margin-top: 16px;
  }

  .tab-button {
    padding: 12px 20px;
    font-size: 14px;
  }

  .tqa-metadata {
    flex-direction: column;
    gap: 20px;
  }

  .tqa-content-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .summary-stats {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .stat-card {
    flex: 0 0 110px;
    padding: 12px 10px;
  }

  .stat-number {
    font-size: 22px;
  }
}
/* Question grid (excel-like) */
.question-grid {
  padding: 6px 8px 12px 8px;
  overflow-x: auto;
}
.question-grid table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid #eef3fb;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
  table-layout: fixed; /* allow comments column to expand */
}
.question-grid th,
.question-grid td {
  padding: 10px 12px;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
}
.question-grid thead th {
  background: #fbfdff;
  color: #124b88;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}
.question-grid thead th.comments-header {
  text-align: left;
}

/* Last TQA Selection header and cell styling */
.question-grid thead th.selected-header {
  background: #ecfdf5; /* pale green */
  color: #065f46; /* dark green */
}
.question-grid td.selected-cell {
  text-align: center;
  color: #065f46;
  font-weight: 600;
  background: #f0fdf4;
}

/* Layout for vertical stacking: questionnaire takes most of viewport */
.tqa-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 0;
}


.tqa-questionnaires.full-screen,
.tqa-assessment.full-screen {
  width: 100%;
  max-width: 100%;
}

.tqa-questionnaires.full-screen .tqa-questions-container,
.tqa-assessment.full-screen .tqa-questions-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.tqa-questionnaires.full-screen {
  /* try to occupy the visible area while leaving room for header/metadata/actions */
  /* min-height: calc(100vh - 300px); */
  /* overflow: visible; */
}

.tqa-kpis.below-kpis {
  margin-top: 4px;
}
.question-grid tbody tr:nth-child(even) td {
  background: #ffffff;
}
.question-cell .question-text {
  font-weight: 600;
  color: #0f172a;
}

/* Column widths for the 5-column questionnaire layout */
.question-grid .col-question {
  width: 26%;
}

.question-grid .col-response {
  width: 34%;
}

.question-grid .col-selected {
  width: 10%;
}

.question-grid .col-last-tqa-comments {
  width: 15%;
}

.question-grid .col-comments {
  width: 15%;
}

.question-grid thead th.question-header {
  text-align: left;
}

/* Response cell: all options for a question laid out inline */
.response-cell {
  vertical-align: middle;
}
.response-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.response-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e6eef9;
  border-radius: 6px;
  font-size: 13px;
  resize: vertical;
}
.grid-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 2px 0;
}
.grid-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0;
}
.option-label {
  font-size: 13px;
  line-height: 1.3;
  color: #374151;
}
.comments-cell textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e6eef9;
  border-radius: 6px;
  font-size: 13px;
  resize: vertical;
}
.comments-cell {
  /* let comments column take remaining space */
  width: auto;
}
.question-grid .rating-button {
  width: 44px;
  height: 36px;
  font-size: 14px;
}
.question-grid .rating-button.selected {
  background: linear-gradient(135deg, #124b88 0%, #1e40af 100%);
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  color: white;
}
:root {
  padding: 0;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tqa-questionnaires,
.tqa-assessment,
.tqa-kpis {
  overflow-y: auto;
}

.tqa-questionnaires .tqa-questions-container {
  padding: 0;
  margin: 0;
  max-width: none;
}

.tqa-questionnaires.full-width {
  flex: 1 1 100%;
}

.tqa-questionnaires.full-width .tqa-questions-container {
  padding: 24px 20px;
  width: 100%;
  max-width: 100%;
}

.tqa-assessment .tqa-observations-actions {
  padding: 0px;
  margin-top: 0px; /* gap after questionnaire */
}

.tqa-assessment-full {
  padding: 0 28px 24px 28px;
  background-color: transparent;
}

.tqa-assessment-full .tqa-section {
  max-height: none;
  min-height: 320px;
}

.tqa-assessment-full .tqa-assessment {
  overflow-y: visible;
}

/* KPIs styles (used in side-by-side layout) */
.tqa-kpis {
  background-color: white;
  overflow-y: auto;
}

.kpis-container {
  padding: 16px;
}

.kpis-loading,
.no-kpis-message {
  text-align: center;
  padding: 32px;
  color: #6b7280;
  color: var(--muted);
  font-size: 14px;
}

.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #eef3fb;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px;
  transition: all 0.18s ease;
  position: relative;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(18, 75, 136, 0.06);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.kpi-name {
  font-size: 15px;
  font-weight: 700;
  color: #124b88;
  color: var(--primary-color);
  flex: 1 1;
}

.kpi-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #e1ecf8;
  background: var(--accent-bg);
  color: #124b88;
  color: var(--primary-color);
}

.kpi-description {
  font-size: 13px;
  color: #374151;
  margin-bottom: 12px;
  line-height: 1.45;
}

.kpi-input-section {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f7fb;
}

.kpi-input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.kpi-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e6eef9;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s ease;
  background-color: #ffffff;
}

.kpi-input:focus {
  outline: none;
  border-color: #124b88;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(18, 75, 136, 0.06);
}

.kpi-input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.kpi-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f3f7fb;
}

.kpi-meta-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.kpi-meta-label {
  color: #6b7280;
  color: var(--muted);
  font-weight: 500;
}

.kpi-meta-value {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.tqa-questions-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 16px 24px;
}

.question-block {
  display: flex;
  gap: 12px;
  padding: 14px;
  margin-bottom: 8px;
  background-color: #ffffff;
  border-left: 4px solid transparent;
  border-radius: 6px;
  align-items: flex-start;
}

.question-block.even {
  background-color: #fbfdff;
}

.question-block:hover {
  border-left-color: #124b88;
  border-left-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(18, 75, 136, 0.04);
}

.question-number {
  font-size: 28px;
  font-weight: 800;
  color: #124b88;
  color: var(--primary-color);
  min-width: 36px;
  display: flex;
  align-items: flex-start;
  margin-top: 0;
  line-height: 1;
}

.question-content {
  flex: 1 1;
}

.question-text {
  font-size: 15px;
  color: #1f2937;
  margin-bottom: 16px;
  font-weight: 500;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-option span {
  -webkit-user-select: none;
          user-select: none;
}

.rating-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
  color: var(--muted);
  font-weight: 500;
}

.rating-label.poor {
  color: #ef4444;
}

.rating-label.excellent {
  color: #059669;
}

.rating-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}

.rating-button {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 2px solid #d1d5db;
  border-radius: 12px;
  width: 48px;
  height: 48px;
  font-size: 16px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rating-button:hover {
  background: linear-gradient(135deg, #124b88 0%, #1e40af 100%);
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  border-color: #124b88;
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 75, 141, 0.3);
}

.rating-button.selected {
  background: linear-gradient(135deg, #124b88 0%, #1e40af 100%);
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  border-color: #124b88;
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(14, 75, 141, 0.4);
}

.rating-button.selected::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #124b88;
  background: var(--primary-color);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.question-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.question-textarea:focus {
  outline: none;
  border-color: #124b88;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(18, 75, 136, 0.06);
}

.question-date {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  min-width: 200px;
}

.question-date:focus {
  outline: none;
  border-color: #124b88;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(18, 75, 136, 0.06);
}

.tqa-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 15px;
  /* background-color: white;
  border-top: 1px solid #e5e7eb;
  position: sticky;
  bottom: 0;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05); */
}

.btn-back,
.btn-submit {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-back {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  color: #124b88;
  color: var(--primary-color);
  border: 2px solid #124b88;
  border: 2px solid var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-back::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(18, 75, 148, 0.1) 0%,
    transparent 100%
  );
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: linear-gradient(135deg, #f8fafb 0%, #f1f5f9 100%);
  color: #0f4c81;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-back:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-back:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.btn-submit {
  background: linear-gradient(
    135deg,
    #124b88 0%,
    #124b88 100%
  );
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-color) 100%
  );
  color: white;
  box-shadow: 0 4px 12px rgba(18, 75, 148, 0.15);
}

.btn-submit:hover {
  background: linear-gradient(135deg, #0f4c81 0%, #124b88 100%);
  background: linear-gradient(135deg, #0f4c81 0%, var(--primary-color) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(18, 75, 148, 0.25);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(18, 75, 148, 0.2);
}

.btn-submit:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.btn-submit:disabled {
  background: linear-gradient(135deg, #94a3b8 0%, #94a3b8 100%);
  color: white;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loading-message {
  text-align: center;
  padding: 48px;
  font-size: 16px;
  color: #6b7280;
  color: var(--muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .summary-stats {
    grid-template-columns: 1fr 1fr;
  }

  .tqa-summary {
    padding: 24px 20px;
    margin: 0 20px;
    margin-top: 16px;
  }

  .tqa-tabs {
    padding: 0 20px;
    margin-top: 16px;
  }

  .tab-button {
    padding: 12px 20px;
    font-size: 14px;
  }

  .tqa-metadata {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .summary-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-number {
    font-size: 28px;
  }
}

/* =====================================================================
   PROFESSIONAL POLISH — Clean corporate (New TQA Session page).
   Appended last and scoped to .tqa-session-page so these win over the
   duplicated rule blocks earlier in this file.
   ===================================================================== */

/* --- Header band --- */
.tqa-session-page .tqa-header {
  background: #ffffff;
  padding: 6px 18px;
  border-bottom: 1px solid #e5e9f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.tqa-session-page .tqa-header-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tqa-session-page .tqa-title {
  color: #0f172a;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.tqa-session-page .tqa-subtitle {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  color: var(--muted);
}

/* --- Content spacing --- */
.tqa-session-page .tqa-content {
  gap: 16px;
  padding: 0px 16px;
}

/* --- Tab bar: clean underline tabs on a divider --- */
.tqa-session-page .tqa-tabbar {
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 1px solid #e5e9f0;
}
.tqa-session-page .tqa-tabbar .tab-btn {
  background: transparent;
  border: none;
  padding: 12px 18px;
  margin-bottom: -1px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #64748b;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.tqa-session-page .tqa-tabbar .tab-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}
.tqa-session-page .tqa-tabbar .tab-btn.active {
  color: #124b88;
  color: var(--primary-color);
  border-bottom-color: #124b88;
  border-bottom-color: var(--primary-color);
  background: transparent;
}

/* --- Section cards --- */
.tqa-session-page .tqa-section {
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.tqa-session-page .tqa-section .section-title {
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f7;
}

/* --- Project Info form --- */
.tqa-session-page .metadata-field label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 6px;
}
.tqa-session-page .phase-dropdown,
.tqa-session-page .attendees-input {
  padding: 9px 12px;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  font-size: 13px;
}

/* --- Questionnaire grid --- */
.tqa-session-page .question-grid table {
  border: 1px solid #e5e9f0;
  border-radius: 10px;
}
.tqa-session-page .question-grid thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px;
  border-bottom: 1px solid #e5e9f0;
}
.tqa-session-page .question-grid th,
.tqa-session-page .question-grid td {
  padding: 12px 14px;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
}
.tqa-session-page .question-grid tbody tr {
  border-bottom: 1px solid #f1f5f9;
}
.tqa-session-page .question-cell .question-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}
.tqa-session-page .response-options {
  gap: 8px 20px;
}
.tqa-session-page .grid-radio {
  gap: 8px;
}
.tqa-session-page .option-label {
  font-size: 13px;
  line-height: 1.3;
  color: #475569;
}

/* --- Action bar: flat, solid, right-aligned --- */
.tqa-session-page .tqa-actions {
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px;
  border-top: 1px solid #e5e9f0;
  box-shadow: 0 -1px 2px rgba(15, 23, 42, 0.03);
}
.tqa-session-page .btn-back,
.tqa-session-page .btn-submit {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}
.tqa-session-page .btn-back {
  background: #ffffff;
  color: #334155;
  border: 1px solid #d8e0ec;
}
.tqa-session-page .btn-back:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: none;
  box-shadow: none;
}
.tqa-session-page .btn-submit {
  background: #124b88;
  background: var(--primary-color);
  color: #ffffff;
  border: 1px solid #124b88;
  border: 1px solid var(--primary-color);
}
.tqa-session-page .btn-submit:hover {
  background: #0f4c81;
  transform: none;
  box-shadow: 0 2px 8px rgba(18, 75, 136, 0.2);
}
.tqa-session-page .btn-submit:disabled {
  background: #94a3b8;
  border-color: #94a3b8;
}
/**/
.preview-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
}

.preview-modal {
  background: white;
  width: 95%;
  height: 95%;
  margin: 20px auto;
  overflow-y: auto;
  border-radius: 8px;
}

.preview-modal-header {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #ddd;
}

.preview-modal-body {
  padding: 20px;
}

/* ---- Overall TQA Score selector ---- */
.tqa-score-card {
  background: #fff;
  border: 1px solid #e6eef8;
  border-radius: 0px;
  padding: 18px 20px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}
.tqa-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tqa-score-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
.tqa-score-subtitle {
  font-size: 12px;
  color: #6b7280;
  padding: 5px 0px 10px 0px;
}
.tqa-score-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  color: #fff;
  min-width: 84px;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.12);
}
.tqa-score-badge .num {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.tqa-score-badge .lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.95;
}
.tqa-score-badge.empty {
  background: #f1f5f9;
  color: #94a3b8;
  box-shadow: none;
}
.tqa-score-scale {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.tqa-score-btn {
  --c: #94a3b8;
  flex: 1 1;
  min-width: 38px;
  height: 46px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #475569;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.tqa-score-btn:hover {
  border-color: var(--c);
  color: var(--c);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.08);
}
.tqa-score-btn.selected {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.18);
}
.tqa-score-caption {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0px;
  padding: 5px;
}
.tqa-rag-field label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: block;
  margin-bottom: 8px;
}
.tqa-rag-field textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e6eef8;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.tqa-rag-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
@media (max-width: 640px) {
  .tqa-score-scale {
    flex-wrap: wrap;
  }
  .tqa-score-btn {
    flex-basis: 18%;
  }
}
.last-tqa-comment {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 44px;
  white-space: pre-wrap;
  word-break: break-word;
}
/* Last TQA Selection - fixed height with internal scroll */
.selected-cell {
  vertical-align: top;
  padding: 12px;
}

.last-tqa-selection {
  height: 42px;
  max-height: 42px;
  padding: 10px 12px;
  box-sizing: border-box;

  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;

  color: #64748b;
  line-height: 1.4;

  white-space: pre-wrap;
  word-break: break-word;

  overflow-y: auto;
  overflow-x: hidden;
}

.dashboard-page {
  height: 100%;
  padding: 20px 24px;
  overflow-y: auto;
  background-color: transparent;
}

/* ---------- Dashboard Layout (Main + Sidebar) ---------- */

.dashboard-layout {
  display: flex;
  gap: 16px;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
}

.dashboard-main {
  flex: 1 1;
  min-width: 0;
}

.dashboard-sidebar {
  width: 30%;
  min-width: 320px;
  max-width: 400px;
}

/* ---------- Top summary ---------- */

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

/* summary only */
.dashboard-summary .dashboard-card {
  border-left: 3px solid #1e3a8a;
}

.dashboard-card-title {
  font-size: 12px;
  color: #6b7280;
  font-weight: bold;
}

.dashboard-card-value {
  font-size: 26px;
  font-weight: 600;
  margin-top: 6px;
  color: #111827;
}

/* ---------- Section title ---------- */

.dashboard-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 10px;
}

.dashboard-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: #2563eb;
  vertical-align: middle;
}

/* Export button used in dashboard header/controls */
.dashboard-export-btn {
  background-color: var(--text-inverse);
  color: var(--primary-color);
  border: 1px solid rgba(var(--primary-color-rgb), 0.12);
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.dashboard-export-btn:hover {
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border-color: var(--primary-color);
}

/* ---------- Domain readiness ---------- */

.dashboard-domain-row {
  display: flex;
  gap: 40px;
}

.dashboard-domain-item {
  text-align: center;
  min-width: 110px;
}

.dashboard-domain-label {
  font-size: 12px;
  margin-top: 6px;
  color: #374151;
  font-weight: 600;
}

.dashboard-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 5px solid #1e3a8a;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  background: #ffffff;
}

/* ---------- Two column tables ---------- */

.dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
  margin: 16px 0;
}

/* ---------- Tables ---------- */

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #e5e7eb;
}

.dashboard-table td {
  font-size: 13px;
  color: #111827;
  padding: 10px 6px;
  border-bottom: 1px solid #f3f4f6;
}

/* ---------- AI insights ---------- */


.dashboard-ai-list li {
  font-size: 13px;
  color: #111827;
  margin-bottom: 6px;
}

/* ---------- Activity ---------- */

.dashboard-ai-list,
.dashboard-activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

/* AI cards */
.dashboard-ai-list li {
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid rgb(14 75 141);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Activity cards */
.dashboard-activity-list li {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 12px 10px 36px;
  font-size: 13px;
  color: var(--text-primary);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.dashboard-activity-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: rgb(14 75 141);
  border-radius: 50%;
  position: absolute;
  left: 14px;
  top: 16px;
}


.dashboard-activity-list li {
  font-size: 13px;
  color: #111827;
  margin-bottom: 6px;
}
/* ---------------- Dashboard tables (match TQA report style) ---------------- */

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.dashboard-bottom-grid {
  margin-top: 4px;
}


/* Header */
.dashboard-table thead {
  background: rgb(249 250 251 / 1);
  background: rgb(249 250 251 / var(--tw-bg-opacity, 1));
}

.dashboard-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: rgb(107 114 128 / 1);
  color: rgb(107 114 128 / var(--tw-text-opacity, 1));
  font-size: 13px;
  white-space: nowrap;
}

/* Body rows */
.dashboard-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-normal);
}

.dashboard-table tbody tr:last-child {
  border-bottom: none;
}

.dashboard-table td {
  padding: 14px 16px;
  vertical-align: top;
  color: rgb(17 24 39 / 1);
  color: rgb(17 24 39 / var(--tw-text-opacity, 1));
  font-size: 13px;
  font-weight: 500;
}

.dashboard-domain-full {
  grid-column: 1 / -1;
}

.dashboard-domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  grid-gap: 32px;
  gap: 32px;
  margin-top: 12px;
}

.dashboard-domain-item {
  text-align: center;
}

.dashboard-domain-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 6px;
  margin-top: 10px;
  overflow: hidden;
}

.dashboard-domain-bar span {
  display: block;
  height: 100%;
  border-radius: 6px;
}
.dashboard-summary-card {
  border-left: 4px solid;
}

.dashboard-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-summary-icon {
  font-size: 18px;
}

.dashboard-summary-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.dashboard-summary-bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.dashboard-summary-card {
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.08);
}
.dashboard-circle {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 6px solid rgb(14 75 141);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  background: #ffffff;
  box-shadow: inset 0 0 0 4px #e1e8ee;
}
.dashboard-filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
  padding:4px 2px;
}

.dashboard-email-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-left: auto;
  max-width: 100%;
}

.dashboard-email-actions .dashboard-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .dashboard-email-actions { width: 100%; gap: 8px; }
  .dashboard-email-actions .dashboard-export-btn { flex: 1 1; padding: 10px 8px; font-size: 11px; }
}

.dashboard-filter-title{
  font-size:14px;
  font-weight:600;
  color:#0f172a;
}

.dashboard-filter-select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  padding:8px 36px 8px 12px;
  border:1px solid #d1d5db;
  border-radius:8px;

  font-size:13px;
  font-weight:500;
  color:#0f172a;
  background:#ffffff
    url("data:image/svg+xml;utf8,<svg fill=%27none%27 stroke=%27%236b7280%27 stroke-width=%272%27 viewBox=%270 0 24 24%27 xmlns=%27http://www.w3.org/2000/svg%27><path d=%27M6 9l6 6 6-6%27/></svg>")
    no-repeat right 10px center;

  background-size:16px;
  min-width:260px;

  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease;
}

.dashboard-filter-select:focus{
  outline:none;
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,0.12);
}

.dashboard-content{
  background:#ffffff;
  border-radius:12px;

  /* Compact KPI styles */
  --kpi-bg: #f8fafc;
}

.dashboard-practice-metrics-section {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  margin: 12px 0 20px 0;
}

.dashboard-practice-metrics-card.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eef2f7;
}

.dashboard-practice-metrics-header.compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-practice-kpi-summary {
  font-size: 12px;
  color: #6b7280;
}

.dashboard-kpi-metrics-compact-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dashboard-kpi-compact {
  min-width: 120px;
  background: var(--kpi-bg);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
}

.dashboard-kpi-compact-name {
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-kpi-compact-value {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 6px;
}

.dashboard-kpi-expand-btn {
  background: transparent;
  border: 1px dashed #cbd5e1;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.dashboard-dropdown{
  position:relative;
  min-width:260px;
}

/* Email modal */
.email-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
}
.email-modal {
  width: 560px;
  max-width: 94%;
  background: #fff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.email-modal h3 { margin: 0 0 6px 0; }
  .email-modal { max-height: 92vh; overflow-y: auto; box-sizing: border-box; }
  .email-preview-dialog {
    width: 1100px;
    max-width: calc(100vw - 40px);
    height: 88vh;
    max-height: calc(100dvh - 40px);
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
  }
  .email-preview-dialog[open] { display: flex; flex-direction: column; }
  .email-preview-dialog::backdrop { background: rgba(15, 23, 42, 0.6); }
  .email-preview-dialog-fullscreen { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .email-preview-heading { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; background: #f8fafc; color: var(--primary-color); border-bottom: 1px solid #e2e8f0; }
  .email-preview-heading h3 { margin: 0; }
  .email-preview-details { flex: 1 1; min-width: 180px; }
  .email-preview-controls { display: flex; flex-wrap: wrap; gap: 8px; }
  .email-preview-subject { margin-top: 4px; font-size: 13px; color: #475569; overflow-wrap: anywhere; }
  .email-preview-dialog iframe { display: block; width: 100%; flex: 1 1; min-height: 0; border: 0; background: #edf1f6; }
  .email-preview-error { color: #b52e43; margin: 4px 0; font-size: 13px; }
  .email-technology-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 2px 12px;
    gap: 2px 12px;
    min-width: 0;
    margin: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    padding: 8px 10px;
    max-height: 190px;
    overflow-y: auto;
  }
  .email-technology-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 32px;
    padding: 4px;
    border-radius: 4px;
    color: #374151;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
    cursor: pointer;
  }
  .email-technology-option:hover { background: #f8fafc; }
  .email-technology-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
  }
  .email-technology-option input:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }
  .email-technology-option input:disabled { cursor: not-allowed; }
  .email-technology-groups:disabled .email-technology-option { opacity: .6; cursor: not-allowed; }
.email-modal > label { color: #374151; font-size: 13px; font-weight: 500; }
.email-modal input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  box-shadow: none;
}
.email-modal input[type="text"]:hover { border-color: #94a3b8; }
.email-modal input[type="text"]:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.email-modal input[type="text"]::placeholder { color: #6b7280; opacity: 1; }
.email-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.email-modal-actions .dashboard-export-btn {
  min-height: 36px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: none;
}
.email-modal-actions .dashboard-export-btn:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
.email-modal-actions .dashboard-export-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.email-modal-actions .dashboard-export-btn:disabled { opacity: .6; cursor: not-allowed; }

/* A single control treatment for recipients, subject, groups and actions. */
.email-modal {
  --email-control-surface: linear-gradient(135deg, #f8faff, #f1f5f9);
  --email-control-border: #d4deed;
  width: 600px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  gap: 10px;
  color: #334155;
}
.email-modal h3 { color: var(--primary-color); font-size: 20px; font-weight: 650; margin: 0 0 6px; padding-bottom: 14px; border-bottom: 1px solid #e2e8f0; }
.email-modal > label { color: #334155; font-size: 13px; font-weight: 600; margin-top: 2px; }
.email-modal input.email-form-control,
.email-modal fieldset.email-form-control {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--email-control-border);
  border-radius: 12px;
  background: var(--email-control-surface);
  color: #334155;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.email-modal input.email-form-control:hover, .email-modal fieldset.email-form-control:hover { border-color: #a7bcdb; }
.email-modal input.email-form-control:focus-visible, .email-modal fieldset.email-form-control:focus-visible { border-color: var(--primary-color); outline: 2px solid #bdd0ee; outline-offset: 2px; }
.email-modal input.email-form-control::placeholder { color: #8390a5; }
.email-modal .email-technology-option { box-sizing: border-box; min-height: 34px; margin: 0; border-radius: 7px; padding: 5px 6px; color: #334155; }
.email-modal .email-technology-option:hover { background: #eaf0fa; }
.email-modal-actions { border-top: 1px solid #e2e8f0; padding-top: 16px; margin-top: 6px; gap: 10px; }
.email-modal-actions .dashboard-export-btn { min-height: 40px; padding: 9px 18px; border-radius: 12px; border-color: var(--email-control-border); background: var(--email-control-surface); color: var(--primary-color); font-weight: 600; }
.email-modal-actions .dashboard-export-btn:hover:not(:disabled) { border-color: #a7bcdb; background: #eaf0fa; }
.email-modal-actions .dashboard-export-btn:last-child { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.email-modal-actions .dashboard-export-btn:last-child:hover:not(:disabled) { background: var(--primary-color); border-color: var(--primary-color); color: #fff; filter: brightness(1.1); }
@media (max-width: 480px) { .email-modal { padding: 18px; } .email-modal-actions .dashboard-export-btn { flex: 1 1; padding: 9px 10px; } }

.dashboard-filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin: 12px 0 18px 0;
  flex-wrap: wrap;
}

.dashboard-filter-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-leadership-card {
  background: linear-gradient(90deg, #ffffff, #fbfbff);
  border: 1px solid #e6eef8;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-leadership-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-leadership-stats {
  display: flex;
  gap: 16px;
  align-items: center;
}

.dashboard-leadership-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dashboard-leadership-number {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.dashboard-leadership-label {
  font-size: 12px;
  color: #6b7280;
}

.dashboard-action-row-alert {
  background: linear-gradient(90deg, rgba(255,241,230,0.6), rgba(255,250,240,0.3));
  border-left: 4px solid #f59e0b;
  transition: background 0.2s ease;
}

.dashboard-action-row-alert:hover {
  background: linear-gradient(90deg, rgba(255,233,213,0.9), rgba(255,245,230,0.6));
}

.dashboard-dropdown-trigger{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:8px 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;

  font-size:13px;
  font-weight:500;
  color:#0f172a;
  cursor:pointer;
}

.dashboard-dropdown-trigger:hover{
  border-color:#94a3b8;
}

.dashboard-dropdown-arrow{
  font-size:12px;
  color:#6b7280;
}

.dashboard-dropdown-menu{
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  z-index:50;

  width:100%;
  max-height:260px;
  overflow:auto;

  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  box-shadow:0 12px 24px rgba(0,0,0,.08);

  padding:6px 0;
}

.dashboard-dropdown-item{
  padding:8px 12px;
  font-size:13px;
  cursor:pointer;
  color:#0f172a;
}

.dashboard-dropdown-item:hover{
  background:#f1f5f9;
}

/* ==================== Practice RAG Status Tiles ==================== */

.dashboard-practice-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-practice-tiles-balanced {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(200px, calc((100% - (var(--practice-columns) - 1) * 16px) / var(--practice-columns)))), 1fr));
}

.dashboard-practice-tile {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

.dashboard-practice-tile:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.dashboard-practice-tile-selected {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border-color: #0e4b8d;
  box-shadow: inset 4px 0 0 #0e4b8d, 0 0 0 2px rgba(14, 75, 141, 0.2);
}

.dashboard-practice-tile-selected:hover {
  box-shadow: inset 4px 0 0 #0e4b8d, 0 4px 10px rgba(14, 75, 141, 0.25);
}

.dashboard-practice-tile-selected .dashboard-practice-name {
  color: #073a70;
}

.dashboard-practice-tile-selected .dashboard-practice-count,
.dashboard-practice-tile-selected .dashboard-coverage-note {
  color: #1e3a5f;
}

.dashboard-practice-name {
  font-size: 14px;
  font-weight: 600;
  color: rgb(14, 75, 141);
  margin-bottom: 4px;
}

.dashboard-practice-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dashboard-practice-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-practice-mini-spark {
  width: 48px;
  height: 20px;
  display: block;
}

.dashboard-practice-mini-health {
  min-width: 40px;
  height: 22px;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.dashboard-practice-count {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
}

.dashboard-practice-bar {
  display: flex;
  height: 24px;
  background-color: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dashboard-practice-bar-segment {
  transition: width 0.3s ease;
  cursor: pointer;
}

.dashboard-practice-bar-green {
  background-color: #16a34a;
}

.dashboard-practice-bar-amber {
  background-color: #f59e0b;
}

.dashboard-practice-bar-red {
  background-color: #dc2626;
}

.dashboard-practice-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.dashboard-practice-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
}

.dashboard-practice-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dashboard-practice-legend-green {
  background-color: #16a34a;
}

.dashboard-practice-legend-amber {
  background-color: #f59e0b;
}

.dashboard-practice-legend-red {
  background-color: #dc2626;
}

/* ==================== Strategic Account Tiles (Compact) ==================== */

.dashboard-account-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 24px;
}

.dashboard-account-tile {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-account-tile:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.dashboard-account-logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

.dashboard-account-logo {
  height: 32px;
  max-width: 100px;
  object-fit: contain;
  display: block;
}

.dashboard-account-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgb(14, 75, 141) 0%, rgb(208, 70, 39) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: default;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-account-bar {
  display: flex;
  height: 20px;
  background-color: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.dashboard-account-bar-segment {
  transition: width 0.3s ease;
  cursor: pointer;
}

.dashboard-account-bar-green {
  background-color: #16a34a;
}

.dashboard-account-bar-amber {
  background-color: #f59e0b;
}

.dashboard-account-bar-red {
  background-color: #dc2626;
}

/* ==================== TQA Coverage (Pie Charts) ==================== */

.dashboard-tqa-coverage {
  grid-column: 1 / -1;
  margin-bottom: 16px;
}

.dashboard-pie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 24px;
  gap: 24px;
  margin-top: 16px;
}

.dashboard-pie-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.dashboard-pie-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px 0;
  text-align: center;
}

.dashboard-pie-chart {
  width: 160px;
  height: 160px;
  margin-bottom: 12px;
}

.dashboard-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.dashboard-pie-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #111827;
}

.dashboard-pie-legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dashboard-pie-legend-label {
  flex: 1 1;
  font-weight: 500;
}

/* KPIs display in Last Week TQA table */
.dashboard-kpi-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-kpi-item {
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dashboard-kpi-more {
  color: #64748b;
  font-size: 12px;
  align-self: center;
}

/* Tech group KPI card */
.dashboard-techgroup-kpis .dashboard-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

@media (max-width: 1200px) {
  .dashboard-pie-grid {
    grid-template-columns: 1fr;
  }
}
/* ==================== Last Week TQA ==================== */

.dashboard-last-week-tqa {
  grid-column: 1 / -1;
  margin-bottom: 16px;
}

.dashboard-last-tqa-sessions {
  grid-column: 1 / -1;
  margin-bottom: 16px;
}

.dashboard-last-tqa-comments {
  min-width: 240px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dashboard-last-tqa-comment-text {
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dashboard-last-tqa-comment-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.dashboard-last-tqa-comment-toggle {
  margin-top: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
}

.dashboard-last-tqa-comment-toggle:hover {
  text-decoration: underline;
}

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

.dashboard-last-tqa-header .dashboard-section-title {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.dashboard-last-tqa-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
}

.dashboard-last-tqa-filter select {
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.dashboard-last-tqa-download {
  padding: 8px 12px;
  border: 1px solid #0e4b8d;
  border-radius: 6px;
  background: #0e4b8d;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.dashboard-last-tqa-download:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Row coloring based on TQA RAG status */
.dashboard-tqa-row-green {
  background: linear-gradient(90deg, rgba(22,163,74,0.06), rgba(22,163,74,0.03));
}

.dashboard-tqa-row-amber {
  background: linear-gradient(90deg, rgba(245,158,11,0.06), rgba(245,158,11,0.03));
}

.dashboard-tqa-row-red {
  background: linear-gradient(90deg, rgba(220,38,38,0.06), rgba(220,38,38,0.03));
}

.dashboard-tqa-row-green .dashboard-rag-status {
  border: 1px solid rgba(34,197,94,0.12);
}
.dashboard-tqa-row-amber .dashboard-rag-status {
  border: 1px solid rgba(245,158,11,0.12);
}
.dashboard-tqa-row-red .dashboard-rag-status {
  border: 1px solid rgba(220,38,38,0.12);
}

.dashboard-rag-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-width: 60px;
}

.dashboard-rag-red {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.dashboard-rag-amber {
  background-color: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.dashboard-rag-green {
  background-color: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
}

.dashboard-rag-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-rag-clickable:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.dashboard-rag-clickable:active {
  transform: scale(0.98);
}

.dashboard-tqa-link {
  background: transparent;
  border: none;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.dashboard-tqa-link:hover {
  background: rgba(37,99,235,0.06);
}

.dashboard-tqa-session-name {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* mini RAG blocks */
.dashboard-rag-mini-container {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.dashboard-rag-mini {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 700;
    color: #fff;

    margin-right: 6px;
    flex-shrink: 0;
}

.dashboard-table th:last-child,
.dashboard-table td:last-child {
    text-align: center;
    vertical-align: middle;
}

/* tooltip square that appears on hover or when the container is focused */
.dashboard-rag-mini {
  position: relative;
}

.dashboard-rag-tooltip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);
  width: 180px;
  height: 180px; /* square */
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16,24,40,0.12);
  padding: 10px;
  display: none;
  z-index: 60;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
}

.dashboard-rag-tooltip .tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dashboard-rag-tooltip .tooltip-title {
  font-weight: 700;
  font-size: 13px;
}

.dashboard-rag-tooltip .tooltip-sub {
  font-size: 12px;
  color: #6b7280;
}

.dashboard-customer-initial-circle {
  width: 40px;
  height: 40px;
  margin: 0 auto;

  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;

  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 40px;

  display: block;
  white-space: nowrap;
}

/* show tooltip on hover of the mini block or when the whole container is focused */
.dashboard-rag-mini:hover .dashboard-rag-tooltip,
.dashboard-rag-mini:focus .dashboard-rag-tooltip,
.dashboard-rag-mini-container:hover .dashboard-rag-mini:hover .dashboard-rag-tooltip {
  display: block;
}

.dashboard-rag-mini-green {
  background: #16a34a;
}

.dashboard-rag-mini-amber {
  background: #f59e0b;
}

.dashboard-rag-mini-red {
  background: #dc2626;
}

.dashboard-rag-mini-na,
.dashboard-rag-mini-undefined,
.dashboard-rag-mini- {
  background: #4b5563; /* darker gray */
  color: #ffffff;
}

/* ==================== Due Date Highlighting ==================== */

.dashboard-due-red {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.dashboard-due-amber {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background-color: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.dashboard-due-green {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background-color: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
}

/* ==================== Customer Logo ==================== */



.dashboard-customer-logo {
  height: 32px;
  max-width: 80px;
  object-fit: contain;
  display: block;
}

.dashboard-customer-initials {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    border-radius: 50%;

    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    text-align: center;

    overflow: hidden;
}
/**/
.dashboard-customer-logo-container{
    position:relative;
    width:40px;
    height:40px;
}


/* ==================== Right Sidebar Panel ==================== */

.dashboard-insights-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.dashboard-insights-header {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
  flex-shrink: 0;
}

/* ==================== Trends Section (25%) ==================== */

.dashboard-trends-section {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  overflow-y: auto;
}

.dashboard-trend-item {
  padding: 8px 10px;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-left: 3px solid rgb(14 75 141);
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-trend-item:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dashboard-trend-title {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.dashboard-trend-value {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 3px;
}

.dashboard-trend-desc {
  font-size: 10px;
  color: #6b7280;
}

/* ==================== Chatbot Section (75%) ==================== */

.dashboard-chatbot-section {
  flex: 0 0 75%;
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  min-height: 0;
}

.dashboard-chatbot-header {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  flex-shrink: 0;
}

/* Quick Links for Key Accounts */

.dashboard-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.dashboard-quick-link-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  color: rgb(14 75 141);
  background: #f0f7ff;
  border: 1px solid rgb(14 75 141 / 0.3);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dashboard-quick-link-btn:hover {
  background: rgb(14 75 141);
  color: #ffffff;
  border-color: rgb(14 75 141);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(14, 75, 141, 0.2);
}

.dashboard-quick-link-btn:active {
  transform: translateY(0);
}

.dashboard-chat-messages {
  flex: 1 1;
  overflow-y: auto;
  padding: 8px;
  background: #f9fafb;
  border-radius: 6px;
  margin-bottom: 12px;
  min-height: 150px;
  max-height: 300px;
}

.dashboard-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.dashboard-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.dashboard-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9ca3af;
  text-align: center;
  padding: 20px;
}

.dashboard-chat-empty span {
  font-size: 32px;
  margin-bottom: 8px;
}

.dashboard-chat-empty p {
  font-size: 12px;
  margin: 0;
  line-height: 1.4;
}

.dashboard-chat-message {
  margin-bottom: 12px;
  display: flex;
}

.dashboard-chat-user {
  justify-content: flex-end;
}

.dashboard-chat-assistant {
  justify-content: flex-start;
}

.dashboard-chat-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  word-wrap: break-word;
}

.dashboard-chat-user .dashboard-chat-bubble {
  background: rgb(14 75 141);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.dashboard-chat-assistant .dashboard-chat-bubble {
  background: #e5e7eb;
  color: #111827;
  border-bottom-left-radius: 4px;
}

.dashboard-chat-input-container {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.dashboard-chat-input {
  flex: 1 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  transition: border-color 0.2s ease;
}

.dashboard-chat-input:focus {
  outline: none;
  border-color: rgb(14 75 141);
  box-shadow: 0 0 0 3px rgba(14, 75, 141, 0.1);
}

.dashboard-chat-send-btn {
  width: 40px;
  height: 40px;
  background: rgb(14 75 141);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-chat-send-btn:hover:not(:disabled) {
  background: rgb(10 55 105);
  transform: scale(1.05);
}

.dashboard-chat-send-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.dashboard-chat-send-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.dashboard-insights-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-insight-item {
  padding: 12px;
  background: #f9fafb;
  border-left: 3px solid rgb(14 75 141);
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
}

.dashboard-insight-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  font-style: italic;
}

/* ==================== Scrollable Table Container ==================== */

.dashboard-table-wrapper{
   width:100%;
    overflow:visible !important;
    max-height:none !important;
    height:auto !important;
}
.dashboard-card{
    overflow:visible !important;
    max-height:none !important;
    height:auto !important;
}

.dashboard-table-scrollable::-webkit-scrollbar {
  width: 6px;
}

.dashboard-table-scrollable::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.dashboard-table-scrollable::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.dashboard-table-scrollable::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.dashboard-table {
    table-layout: fixed;
    width: 100%;
    overflow: visible;
}

.dashboard-table td,
.dashboard-table th {
    word-break: break-word;
    white-space: normal;
}

.dashboard-table th:nth-child(3),
.dashboard-table td:nth-child(3) {
    width: 23%;
    min-width: 420px;
}

.dashboard-table-wrapper,
.dashboard-table-container,
.dashboard-card {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

.dashboard-table-wrapper::-webkit-scrollbar,
.dashboard-table-container::-webkit-scrollbar,
.dashboard-card::-webkit-scrollbar {
    display: none !important;
}
/* ---------- Practice Filter ---------- */

.dashboard-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-right: 8px;
  display: inline-block;
}

/* ---------- Practice Metrics Section ---------- */

.dashboard-practice-metrics-section {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-practice-metrics-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-practice-metrics-header {
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.dashboard-practice-metrics-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
}

.dashboard-practice-metrics-summary {
  display: flex;
  gap: 32px;
  align-items: center;
}

.dashboard-practice-metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-metric-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.dashboard-metric-value {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.dashboard-metric-health {
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
}

/* Secondary caption used for assessment-coverage text (tile + detail header) */
.dashboard-coverage-note {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.dashboard-kpi-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.dashboard-kpi-metric-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dashboard-kpi-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: rgb(14, 75, 141);
}

.dashboard-kpi-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 75, 141, 0.15);
  border-color: rgb(14, 75, 141);
}

.dashboard-kpi-metric-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.dashboard-kpi-metric-description {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 12px;
  line-height: 1.4;
}

.dashboard-kpi-metric-average {
  font-size: 28px;
  font-weight: 700;
  color: rgb(14, 75, 141);
  margin-bottom: 4px;
}

.dashboard-kpi-metric-count {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.dashboard-no-kpis {
  text-align: center;
  padding: 32px 20px;
  color: #94a3b8;
  font-size: 14px;
  font-style: italic;
}

.dashboard-kpi-viewmore {
  margin-top: 12px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0e4b8d;
  background: transparent;
  border: 1px solid #cbd8e8;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dashboard-kpi-viewmore:hover {
  background: #eef4fb;
  border-color: #0e4b8d;
}

.dashboard-kpi-viewmore:focus-visible {
  outline: 2px solid #0e4b8d;
  outline-offset: 2px;
}

.dashboard-rag-card-red::before {
  background: #dc2626;
}

.dashboard-rag-card-red .dashboard-kpi-metric-average {
  color: #dc2626;
}

.dashboard-rag-card-amber::before {
  background: #f59e0b;
}

.dashboard-rag-card-amber .dashboard-kpi-metric-average {
  color: #f59e0b;
}

.dashboard-rag-card-green::before {
  background: #16a34a;
}

.dashboard-rag-card-green .dashboard-kpi-metric-average {
  color: #16a34a;
}

.dashboard-three-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

/* ===================== Dashboard Summary Strip ===================== */

.dashboard-summary-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-gap: 0;
  gap: 0;
  margin: 0 0px 20px;
  padding: 18px 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.dashboard-summary-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 8px;
  border-right: 1px solid #e5e7eb;
}

.dashboard-summary-item:last-child {
  border-right: none;
}

.dashboard-summary-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  background: #eff6ff;
}

.dashboard-summary-icon-projects {
  color: #2563eb;
  background: #eff6ff;
}

.dashboard-summary-icon-green {
  color: #16a34a;
  background: #dcfce7;
}

.dashboard-summary-icon-amber {
  color: #f59e0b;
  background: #fef3c7;
}

.dashboard-summary-icon-red {
  color: #dc2626;
  background: #fee2e2;
}

.dashboard-summary-icon-observations {
  color: #7c3aed;
  background: #ede9fe;
}

.dashboard-summary-icon-actions {
  color: #2563eb;
  background: #dbeafe;
}

.dashboard-summary-icon-recommendations {
  color: #059669;
  background: #d1fae5;
}

.dashboard-summary-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-summary-value {
  font-size: 24px;
  line-height: 1.05;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-summary-value-green {
  color: #16a34a;
}

.dashboard-summary-value-amber {
  color: #f59e0b;
}

.dashboard-summary-value-red {
  color: #dc2626;
}

.dashboard-summary-label {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.dashboard-summary-percentage {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.dashboard-summary-link {
  width: fit-content;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.dashboard-summary-link:hover {
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .dashboard-summary-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-summary-item:nth-child(4) {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .dashboard-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-summary-item {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .dashboard-summary-item:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .dashboard-summary-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-item {
    border-bottom: 1px solid #e5e7eb;
  }

  .dashboard-summary-item:last-child {
    border-bottom: none;
  }
}

@media (max-width: 900px) {
  .dashboard-three-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .dashboard-three-card-grid {
    grid-template-columns: 1fr;
  }
}


.dashboard-activity-filter { margin-left: auto; }

.dashboard-activity-status {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding: 4px 8px;
  overflow-wrap: anywhere;
}

.dashboard-activity-status.dashboard-rag-neutral {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Keep the metadata compact and reserve most of the row for observations. */
.dashboard-observations .dashboard-table th,
.dashboard-observations .dashboard-table td {
  min-width: 0;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.dashboard-observations .dashboard-table th:nth-child(1) {
  width: 22%;
}

.dashboard-observations .dashboard-table th:nth-child(2) {
  width: 54%;
}

.dashboard-observations .dashboard-table th:nth-child(3),
.dashboard-observations .dashboard-table td:nth-child(3) {
  width: 14%;
  min-width: 0;
}

.dashboard-observations .dashboard-table th:nth-child(4) {
  width: 10%;
}

.ai-dashboard-page {
  padding: 24px 32px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.ai-dashboard-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
  border-radius: 16px;
  padding: 32px 36px;
  color: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.25);
}

.ai-dashboard-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ai-dashboard-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
}

.ai-dashboard-hero p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
  max-width: 640px;
}

.ai-dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.ai-dashboard-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.ai-dashboard-filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.ai-dashboard-filter-field select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: #111827;
  background: #ffffff;
}

.ai-dashboard-clear-filters-btn {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #4f46e5;
  cursor: pointer;
  height: fit-content;
}

.ai-dashboard-clear-filters-btn:hover {
  background: #f5f3ff;
}

.ai-dashboard-filter-summary {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 20px;
}

.ai-dashboard-kpi-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.ai-dashboard-kpi-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.ai-dashboard-kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ai-dashboard-kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #4f46e5;
}

.ai-dashboard-kpi-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.ai-dashboard-kpi-count {
  font-size: 11px;
  color: #9ca3af;
}

.ai-dashboard-sparkline {
  width: 120px;
  height: 32px;
  margin: 4px 0;
}

.ai-dashboard-sparkline polyline {
  stroke: #9ca3af;
}

.ai-dashboard-sparkline--up polyline {
  stroke: #16a34a;
}

.ai-dashboard-sparkline--down polyline {
  stroke: #dc2626;
}

.ai-dashboard-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.ai-dashboard-loading--inline {
  padding: 24px 0;
}

.ai-dashboard-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.ai-dashboard-retry-btn {
  background: #b91c1c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
}

.ai-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 28px;
}

.ai-dashboard-stat {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-dashboard-stat--critical {
  border-color: #fecaca;
  background: #fff5f5;
}

.ai-dashboard-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
}

.ai-dashboard-stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ai-dashboard-stat--critical .ai-dashboard-stat-value {
  color: #b91c1c;
}

.ai-dashboard-stat-label {
  font-size: 13px;
  color: #6b7280;
}

.ai-dashboard-trend-caption {
  font-size: 11px;
  color: #9ca3af;
  margin-top: -18px;
  margin-bottom: 20px;
}

.ai-dashboard-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
}

.ai-dashboard-trend--up {
  color: #16a34a;
}

.ai-dashboard-trend--down {
  color: #dc2626;
}

.ai-dashboard-trend--flat {
  color: #6b7280;
}

.ai-dashboard-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 14px;
}

.ai-dashboard-empty {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  color: #6b7280;
}

.ai-dashboard-insight-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.ai-dashboard-insight-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #9ca3af;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-dashboard-insight-card--critical {
  border-left-color: #dc2626;
}

.ai-dashboard-insight-card--high {
  border-left-color: #ea580c;
}

.ai-dashboard-insight-card--medium {
  border-left-color: #d97706;
}

.ai-dashboard-insight-card--low {
  border-left-color: #16a34a;
}

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

.ai-dashboard-severity-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #9ca3af;
}

.ai-dashboard-severity-badge--critical {
  background: #dc2626;
}

.ai-dashboard-severity-badge--high {
  background: #ea580c;
}

.ai-dashboard-severity-badge--medium {
  background: #d97706;
}

.ai-dashboard-severity-badge--low {
  background: #16a34a;
}

.ai-dashboard-insight-date {
  font-size: 12px;
  color: #9ca3af;
}

.ai-dashboard-insight-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.ai-dashboard-insight-card p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

.ai-dashboard-status-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px 10px;
}

.ai-dashboard-footer-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

.ai-dashboard-link-btn {
  background: none;
  border: none;
  color: #4f46e5;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.ai-dashboard-link-btn:hover {
  text-decoration: underline;
}


  .winsights-admin-scope{ --ink:#1F2430; --muted:#5F6368; --line:#E1E3E6; --accent:#2B5FE2; --page:#F4F6F8; --card:#fff; }
  .winsights-admin-scope *{ box-sizing:border-box; }
  .winsights-admin-scope{ margin:0; font-family:"Segoe UI",Roboto,Arial,sans-serif; background:var(--page); color:var(--ink); }
  .winsights-admin-scope header{ background:#101828; color:#fff; padding:14px 22px; display:flex; justify-content:space-between; align-items:center; }
  .winsights-admin-scope header a{ color:#9FB4FF; text-decoration:none; font-size:13px; }
  .winsights-admin-scope main{ max-width:920px; margin:0 auto; padding:22px 22px 48px; }
  .winsights-admin-scope .panel{ background:var(--card); border:1px solid var(--line); border-radius:10px; padding:18px; margin-bottom:16px; }
  .winsights-admin-scope h1{ font-size:18px; margin:0; font-weight:600; }
  .winsights-admin-scope h2{ font-size:13px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin:0 0 12px; }
  .winsights-admin-scope label{ display:block; font-size:12px; font-weight:600; color:var(--muted); margin-bottom:6px; }
  .winsights-admin-scope input[type=text], .winsights-admin-scope input[type=url], .winsights-admin-scope input[type=number]{ width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-size:14px; }
  .winsights-admin-scope .row{ display:grid; grid-template-columns:repeat(3,1fr); grid-gap:12px; gap:12px; margin-bottom:14px; }
  .winsights-admin-scope .param-row{ display:grid; grid-template-columns:1fr 80px; grid-gap:10px; gap:10px; align-items:end; margin-bottom:8px; }
  .winsights-admin-scope .param-row span{ font-size:13px; font-weight:600; }
  .winsights-admin-scope button.primary{ background:var(--accent); color:#fff; border:none; border-radius:8px; padding:10px 18px; font-size:14px; font-weight:600; cursor:pointer; }
  .winsights-admin-scope button.primary:disabled{ opacity:.5; cursor:not-allowed; }
  .winsights-admin-scope .status{ font-size:13px; margin-top:12px; padding:10px 12px; border-radius:8px; display:none; }
  .winsights-admin-scope .status.ok{ display:block; background:#E6F4EA; color:#1E8E3E; }
  .winsights-admin-scope .status.err{ display:block; background:#FCE8E6; color:#D93025; }
  .winsights-admin-scope .footnote{ font-size:12px; color:var(--muted); line-height:1.5; margin-top:10px; }
  .winsights-admin-scope .badge{ font-size:11px; background:#EEF2FF; color:#31408A; padding:4px 8px; border-radius:6px; }
  .winsights-admin-scope .run-banner{ display:flex; flex-wrap:wrap; gap:10px 16px; align-items:center; font-size:14px; }
  .winsights-admin-scope .run-banner .label{ font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; }
  .winsights-admin-scope .run-banner .pill{ font-size:12px; font-weight:600; padding:4px 10px; border-radius:999px; }
  .winsights-admin-scope .pill.running{ background:#EEF2FF; color:#31408A; }
  .winsights-admin-scope .pill.completed{ background:#E6F4EA; color:#1E8E3E; }
  .winsights-admin-scope .pill.failed{ background:#FCE8E6; color:#D93025; }
  .winsights-admin-scope .pill.none{ background:#F1F3F4; color:var(--muted); }
  .winsights-admin-scope .run-detail{ font-size:13px; color:var(--muted); line-height:1.5; margin-top:8px; }


/*# sourceMappingURL=main.c19e6587.css.map*/