/* Universal Box Sizing and Zoom Support */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  /* Sophisticated Corporate Color Palette */
  --primary: #0f2c58;
  /* Deep corporate navy */
  --primary-dark: #0a1d3a;
  --primary-light: #1e4a7c;
  --accent: #2563eb;
  /* Professional blue accent */
  --secondary: #64748b;
  /* Sophisticated gray */
  --danger: #dc2626;
  /* Refined red */
  --danger-dark: #b91c1c;
  --success: #10b981;
  /* Professional green */
  --warning: #f59e0b;
  /* Corporate amber */
  --light: #f8fafc;
  --light-2: #f1f5f9;
  --dark: #1e293b;
  --dark-2: #0f172a;
  --border: #e2e8f0;
  --border-2: #cbd5e1;
  --text-muted: #64748b;
  --text-primary: #1e293b;
  --text-secondary: #475569;

  /* Spacing & Sizing */
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --nav-height: 72px;
  --table-max-height: 500px;

  /* Typography - Uniform Font Sizes */
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.875rem;
  /* 14px */
  --font-size-base: 0.9375rem;
  /* 15px */
  --font-size-md: 1rem;
  /* 16px */
  --font-size-lg: 1.125rem;
  /* 18px */
  --font-size-xl: 1.5rem;
  /* 24px */
  --font-size-2xl: 1.75rem;
  /* 28px */
  --font-size-3xl: 2rem;
  /* 32px */
  --font-size-4xl: 2.5rem;
  /* 40px */

  /* Sophisticated Effects */
  --shadow-xs: 0 1px 2px rgba(15, 44, 88, 0.03);
  --shadow-sm: 0 2px 4px rgba(15, 44, 88, 0.04);
  --shadow: 0 4px 12px rgba(15, 44, 88, 0.08);
  --shadow-md: 0 6px 20px rgba(15, 44, 88, 0.12);
  --shadow-lg: 0 10px 30px rgba(15, 44, 88, 0.15);
  --shadow-hover: 0 8px 24px rgba(15, 44, 88, 0.12);
  --shadow-btn: 0 2px 6px rgba(15, 44, 88, 0.15);
  --transition: all 0.15s ease;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Solid Colors - No Gradients */
}

/* Loading Indicator */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 44, 88, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.loading-indicator p {
  color: white;
  font-size: var(--font-size-md);
  font-weight: 500;
  margin-top: 16px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton Loader Styles */
.skeleton {
  background: linear-gradient(90deg, #f8fafc 25%, #f1f5f9 50%, #f8fafc 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.skeleton-table-row {
  display: table-row;
  opacity: 1;
  animation: skeletonFadeIn 0.3s ease-out backwards;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skeleton-table-row.fade-out {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skeleton-table-cell {
  display: table-cell;
  padding: 0.75rem 0.5rem !important;
  background: white;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  text-align: center;
  position: relative;
  box-sizing: border-box;
  /* CRITICAL: With table-layout: fixed, cells MUST NOT have explicit width */
  /* They automatically inherit column widths from header row (first row) */
  /* The existing CSS rules like #winsTable td:nth-child(1) { width: 4%; } apply automatically */
  width: auto !important;
  min-width: 0;
}

.skeleton-table-cell>div {
  height: 0.875rem;
  margin: 0 auto;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  animation-delay: var(--skeleton-delay, 0s);
  border-radius: 4px;
  transition: opacity 0.3s ease-out;
}

@keyframes skeletonFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

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

/* Wins/Losses Table Skeleton - inherits from actual table column widths */
#winsTable .skeleton-table-cell>div,
#lossesTable .skeleton-table-cell>div,
#designWinsTable .skeleton-table-cell>div,
#designLossesTable .skeleton-table-cell>div {
  width: 80%;
}

/* Client Name column - wider shimmer */
#winsTable .skeleton-table-cell:nth-child(1)>div,
#lossesTable .skeleton-table-cell:nth-child(1)>div,
#designWinsTable .skeleton-table-cell:nth-child(1)>div,
#designLossesTable .skeleton-table-cell:nth-child(1)>div {
  width: 90%;
}

/* Value columns - narrower shimmer for numbers */
#winsTable .skeleton-table-cell:nth-child(6)>div,
#winsTable .skeleton-table-cell:nth-child(7)>div,
#lossesTable .skeleton-table-cell:nth-child(6)>div,
#lossesTable .skeleton-table-cell:nth-child(7)>div,
#designWinsTable .skeleton-table-cell:nth-child(6)>div,
#designWinsTable .skeleton-table-cell:nth-child(7)>div,
#designLossesTable .skeleton-table-cell:nth-child(6)>div {
  width: 70%;
}

/* Actions column - smaller shimmer */
#winsTable .skeleton-table-cell:nth-child(9)>div,
#lossesTable .skeleton-table-cell:nth-child(9)>div,
#designWinsTable .skeleton-table-cell:nth-child(9)>div,
#designLossesTable .skeleton-table-cell:nth-child(8)>div {
  width: 60%;
  height: 0.875rem;
}

/* RFP Table Skeleton - inherits from actual table column widths */
#rfpTable .skeleton-table-cell>div,
#designRfpTable .skeleton-table-cell>div {
  width: 75%;
}

/* ID column - very small shimmer */
#rfpTable .skeleton-table-cell:nth-child(1)>div,
#designRfpTable .skeleton-table-cell:nth-child(1)>div {
  width: 50%;
  height: 0.875rem;
}

/* Client Name column - wider shimmer */
#rfpTable .skeleton-table-cell:nth-child(2)>div,
#designRfpTable .skeleton-table-cell:nth-child(2)>div {
  width: 85%;
}

/* Amount column - narrower shimmer for numbers */
#rfpTable .skeleton-table-cell:nth-child(10)>div,
#designRfpTable .skeleton-table-cell:nth-child(10)>div {
  width: 65%;
}

/* Actions column - smaller shimmer */
#rfpTable .skeleton-table-cell:nth-child(11)>div,
#designRfpTable .skeleton-table-cell:nth-child(11)>div {
  width: 55%;
  height: 0.875rem;
}

/* Transfer column - smaller shimmer */
#rfpTable .skeleton-table-cell:nth-child(12)>div,
#designRfpTable .skeleton-table-cell:nth-child(12)>div {
  width: 60%;
  height: 0.875rem;
}

/* Wins Head Table Skeleton - inherits from actual table column widths */
#winsHeadTable .skeleton-table-cell>div {
  width: 75%;
}

/* Quarter column - wider shimmer */
#winsHeadTable .skeleton-table-cell:nth-child(1)>div {
  width: 80%;
}

/* Value columns - narrower shimmer for numbers */
#winsHeadTable .skeleton-table-cell:nth-child(3)>div,
#winsHeadTable .skeleton-table-cell:nth-child(4)>div,
#winsHeadTable .skeleton-table-cell:nth-child(5)>div,
#winsHeadTable .skeleton-table-cell:nth-child(6)>div {
  width: 70%;
}

.skeleton-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.skeleton-card-header {
  height: 1.5rem;
  width: 60%;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  border-radius: var(--radius-sm);
}

.skeleton-card-content {
  height: 2rem;
  width: 80%;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  border-radius: var(--radius-sm);
}

.skeleton-chart {
  width: 100%;
  flex: 1;
  min-height: 300px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  border-radius: var(--radius-lg);
  margin: 0;
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skeleton-chart.fade-out {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chart fade-in animation - removed default animation, handled by JS */
.chart-container canvas {
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skeleton-insight-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  min-height: 120px;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skeleton-insight-card.fade-out {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Insight cards fade-in animation */
.insight-card {
  opacity: 0;
  animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.insight-card:nth-child(1) {
  animation-delay: 0.1s;
}

.insight-card:nth-child(2) {
  animation-delay: 0.2s;
}

.insight-card:nth-child(3) {
  animation-delay: 0.3s;
}

.insight-card:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Fixed insight card layout with graceful number loading */
.insight-card {
  position: relative;
}

.insight-card .card-value {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.insight-card.value-loaded .card-value {
  opacity: 1;
}

/* Inline skeleton shimmer for card values while loading */
.insight-card.loading .card-value {
  position: relative;
  color: transparent;
}

.insight-card.loading .card-value::before {
  content: '';
  display: block;
  width: 70%;
  height: 1.4rem;
  margin: 0.1rem 0;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  border-radius: var(--radius-sm);
}

.skeleton-insight-title {
  height: 1rem;
  width: 50%;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  border-radius: var(--radius-sm);
}

.skeleton-insight-value {
  height: 2rem;
  width: 70%;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.skeleton-text.short {
  width: 40%;
}

.skeleton-text.medium {
  width: 60%;
}

.skeleton-text.long {
  width: 80%;
}

.skeleton-container {
  position: relative;
  overflow: hidden;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--light);
  /* background-image: url('background.jpg'); */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.65;
  padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-size: var(--font-size-base);
  letter-spacing: -0.01em;
  font-weight: 400;
  position: relative;
  overflow-x: auto;
  width: 100%;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      rgba(15, 44, 88, 0.02) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      rgba(15, 44, 88, 0.02) 100%);
  background-size: 200% 200%;
  animation: subtleShimmer 8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes subtleShimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Login Wrapper - Split Screen Layout */
.login-wrapper {
  display: none;
  min-height: 100vh;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  animation: fadeIn 0.6s ease-out;
  z-index: 10000 !important;
  background: #ffffff;
}

.login-wrapper[style*="display: flex"],
.login-wrapper.show {
  display: flex !important;
}

#loginForm {
  display: flex !important;
}

/* Completely hide login wrapper when not displayed */
.login-wrapper[style*="display: none"],
#loginForm[style*="display: none"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Left Panel - Promotional Section */
.login-promo-panel {
  flex: 0 0 50%;
  width: 50%;
  background: linear-gradient(135deg, #050a14 0%, #07111f 50%, #081828 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  min-height: 100vh;
  overflow: hidden;
}

.login-promo-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.login-promo-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.promo-background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  z-index: 1;
}

.promo-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  width: 100%;
  animation: fadeInGentle 0.8s ease-out;
}

@keyframes fadeInGentle {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4rem;
  animation: fadeInGentle 0.8s ease-out 0.1s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes fadeInGentle {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.brand-logo {
  width: 40px;
  height: 40px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: white;
  letter-spacing: -0.02em;
}

.promo-main {
  margin-bottom: 3rem;
  animation: fadeInGentle 0.8s ease-out 0.2s both;
}

.promo-title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.promo-description {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  font-weight: 400;
}

.promo-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: fadeInGentle 0.8s ease-out 0.3s both;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: 0.75rem;
  border-radius: 12px;
  cursor: default;
  position: relative;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item:nth-child(1) {
  animation: fadeInGentle 0.6s ease-out 0.4s both;
}

.feature-item:nth-child(2) {
  animation: fadeInGentle 0.6s ease-out 0.5s both;
}

.feature-item:nth-child(3) {
  animation: fadeInGentle 0.6s ease-out 0.6s both;
}

/* Right Panel - Login Form */
.login-form-panel {
  flex: 0 0 50%;
  width: 50%;
  background: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  min-height: 100vh;
  position: relative;
  animation: fadeInGentle 0.8s ease-out;
  overflow-y: auto;
  z-index: 100;
  isolation: isolate;
}

.login-form-content {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 101;
  opacity: 1;
  visibility: visible;
  display: block;
  animation: fadeInGentle 0.6s ease-out 0.2s both;
}

.login-header {
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 10;
}

.login-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: #1e293b !important;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  display: block;
  position: relative;
  z-index: 11;
}

.login-subtitle {
  font-size: var(--font-size-md);
  color: #64748b !important;
  font-weight: 400;
  display: block;
  position: relative;
  z-index: 11;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.form-input-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

.input-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: #1e293b !important;
  margin-bottom: 0.5rem;
  display: block;
  order: -1;
  position: relative;
  z-index: 1;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: var(--font-size-md);
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff !important;
  color: #1e293b !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  display: block;
  box-sizing: border-box;
  position: relative;
}

.form-input:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: #94a3b8;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  transform: translateY(-50%);
}

.input-wrapper:focus-within .input-icon {
  color: #2563eb;
}

.forgot-password-link {
  align-self: flex-end;
  font-size: var(--font-size-sm);
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  margin-top: -0.5rem;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.login-submit-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #2563eb !important;
  color: white !important;
  border: none;
  border-radius: 8px;
  font-size: var(--font-size-md);
  font-weight: 600;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  visibility: visible !important;
  opacity: 1 !important;
}

.login-submit-btn:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.login-submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

.login-submit-btn:active {
  transform: translateY(0);
}

.login-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-submit-btn svg {
  transition: transform 0.2s ease;
}

.login-submit-btn:hover svg {
  transform: translateX(2px);
}

.login-footer {
  margin-top: 2rem;
}

.divider-line {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.divider-line::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}

.divider-line span {
  position: relative;
  background: white;
  padding: 0 1rem;
  color: #94a3b8;
  font-size: var(--font-size-sm);
}

.create-account-link {
  display: block;
  text-align: center;
  font-size: var(--font-size-sm);
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.create-account-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 968px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-promo-panel {
    min-height: auto;
    padding: 2rem;
  }

  .promo-title {
    font-size: var(--font-size-3xl);
  }

  .brand-header {
    margin-bottom: 2rem;
  }

  .promo-main {
    margin-bottom: 2rem;
  }

  .login-form-panel {
    min-height: auto;
    padding: 2rem;
  }
}

@media (max-width: 640px) {
  .promo-title {
    font-size: var(--font-size-2xl);
  }

  .promo-description {
    font-size: var(--font-size-md);
  }

  .login-title {
    font-size: var(--font-size-2xl);
  }
}

.dashboard-container {
  padding: 1rem;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: auto;
}

.data-container {
  position: relative;
}

@media (min-width: 1440px) {
  .dashboard-container {
    max-width: 1400px;
  }
}

/* Navigation - Sophisticated Corporate */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 2000 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: var(--nav-height);
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

/* Hide nav when dashboard is hidden - nav is inside dashboard container */
.dashboard-container[style*="display: none"] nav {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Ensure dashboard and nav are visible when dashboard is shown */
.dashboard-container[style*="display: block"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.dashboard-container[style*="display: block"] nav {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 2000 !important;
}

/* Dropdown styles */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 2100;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
  border: 1px solid var(--border-2);
  margin-top: 6px;
}

.nav-dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  border-top: 1px solid var(--border-2);
  border-left: 1px solid var(--border-2);
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  font-size: var(--font-size-sm);
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: rgba(15, 44, 88, 0.05);
  color: var(--primary);
  border-left: 3px solid var(--primary);
  padding-left: calc(1rem - 3px);
}

.dropdown-item i,
.dropdown-item svg {
  margin-right: 10px;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border);
  margin: 0.5rem 0;
}

/* Dropdown header */
.dropdown-header {
  padding: 0.6rem 1rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border);
}

/* Dropdown footer */
.dropdown-footer {
  padding: 0.6rem 1rem;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  background-color: #f8fafc;
  border-top: 1px solid var(--border);
  text-align: center;
}


/* Form Elements */
.input-group {
  position: relative;
  margin: 1.25rem 0;
  animation: inputFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
  opacity: 0;
  transform: translateY(15px) scale(0.98);
}

@keyframes inputFadeIn {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }

  60% {
    transform: translateY(-2px) scale(1);
    opacity: 0.9;
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.input-group:nth-child(1) {
  animation-delay: 0.3s;
}

.input-group:nth-child(2) {
  animation-delay: 0.45s;
}

input {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-top: 1rem;
  font-size: var(--font-size-base);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

input:hover {
  border-color: var(--primary-light);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(15, 44, 88, 0.05), inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transform: translateY(-1px);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 44, 88, 0.15), 0 4px 12px rgba(15, 44, 88, 0.1);
  background-color: white;
  transform: translateY(-2px) scale(1.01);
}

/* Floating labels for .input-group only */
.input-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  font-weight: 500;
  padding: 0 0.25rem;
  border-radius: 3px;
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
  top: -0.5rem;
  left: 0.8rem;
  font-size: var(--font-size-xs);
  background: rgba(255, 255, 255, 0.98);
  padding: 0 0.4rem;
  color: var(--primary);
  font-weight: 600;
  transform: scale(0.95);
}

button {
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  border: none;
}

.login-container button {
  width: 100%;
  padding: 0.9rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  margin-top: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: var(--font-size-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(15, 44, 88, 0.3);
  position: relative;
  overflow: hidden;
  animation: buttonSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.6s;
  opacity: 0;
  transform: translateY(25px) scale(0.95);
}

.login-container button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-container button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-container button:hover::before {
  width: 350px;
  height: 350px;
}

.login-container button:hover::after {
  left: 100%;
}

.login-container button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(15, 44, 88, 0.4);
}

.login-container button:active {
  transform: translateY(-1px) scale(1);
  transition: transform 0.1s;
  box-shadow: 0 4px 15px rgba(15, 44, 88, 0.3);
}

@keyframes buttonSlideIn {
  0% {
    opacity: 0;
    transform: translateY(25px) scale(0.95);
  }

  60% {
    transform: translateY(-3px) scale(1.02);
    opacity: 0.9;
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#logoutBtn {
  padding: 0.5rem 1.25rem;
  background-color: rgba(255, 255, 255, 0.12);
  color: white;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 500;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#logoutBtn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

/* Table Styles */
.table-scroll-container {
  max-height: var(--table-max-height);
  overflow-y: auto;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-2);
  position: relative;
  box-shadow: var(--shadow);
  background: white;
  width: 100%;
  box-sizing: border-box;
}

.table-section {
  width: 100%;
  /*overflow-x: auto;*/
  box-sizing: border-box;
}

table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  box-sizing: border-box;
}

/* Ensure tables with skeleton rows maintain full width and proper layout */
table.skeleton-loading {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed !important;
  display: table !important;
}

/* Force table container to maintain full width during skeleton loading */
.table-scroll-container:has(table.skeleton-loading) {
  width: 100% !important;
}

/* Ensure skeleton rows maintain exact column widths - critical for seamless transition */
/* With table-layout: fixed, skeleton cells automatically inherit column widths from header */
/* But we need to ensure the table renders properly before data loads */
table.skeleton-loading tbody .skeleton-table-row {
  display: table-row;
  width: 100%;
}

table.skeleton-loading tbody .skeleton-table-cell {
  display: table-cell;
  /* Width is automatically determined by table-layout: fixed and header column widths */
  /* No explicit width needed - browser calculates from first row (header) */
}

/* Ensure skeleton cells maintain proper column widths to match headers */
/* With table-layout: fixed, skeleton cells should inherit widths from header columns */
#winsTable .skeleton-table-cell,
#lossesTable .skeleton-table-cell,
#designWinsTable .skeleton-table-cell,
#designLossesTable .skeleton-table-cell {
  /* Ensure cells don't collapse and respect table-layout: fixed */
  min-width: 0;
  overflow: hidden;
}

thead {
  position: sticky;
  top: 0;
  z-index: 20;
}

tbody {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

tbody.updating {
  opacity: 0.3;
}

/* Graceful fade-in for table rows - only for newly loaded rows */
tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row) {
  opacity: 0;
  animation: tableRowFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(1) {
  animation-delay: 0.05s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(2) {
  animation-delay: 0.1s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(3) {
  animation-delay: 0.15s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(4) {
  animation-delay: 0.2s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(5) {
  animation-delay: 0.25s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(6) {
  animation-delay: 0.3s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(7) {
  animation-delay: 0.35s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(8) {
  animation-delay: 0.4s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(9) {
  animation-delay: 0.45s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(10) {
  animation-delay: 0.5s;
}

tbody.loading-complete tr:not(.skeleton-table-row):not(.total-row):nth-child(n+11) {
  animation-delay: 0.55s;
}

@keyframes tableRowFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

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

/* Exclude skeleton rows and total rows from fade-in */
tbody tr.skeleton-table-row {
  animation: none;
  opacity: 1;
}

tbody tr.total-row {
  animation: none;
  opacity: 1;
}

th,
td {
  padding: 0.4rem 0.6rem;
  text-align: center;
  border: 0.5px solid #eff3f8;
  background: white;
}

td {
  padding: 0.4rem 0.35rem !important;
  font-size: 0.85rem !important;
}

/* Make RFP table more compact vertically */
#rfpTable td {
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
}

td.table-actions {
  padding: 0.4rem !important;
  text-align: center;
  vertical-align: middle;
}

th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  border-color: rgba(255, 255, 255, 0.1);
  position: relative;
}

th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* Inline filter in table header */
.th-with-filter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.th-with-filter span {
  display: block;
  white-space: nowrap;
}

.inline-filter-dropdown {
  width: 100%;
  max-width: 140px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  text-align: center;
}

.inline-filter-dropdown:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.inline-filter-dropdown:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.inline-filter-dropdown option {
  background: var(--primary);
  color: white;
  padding: 6px;
}

tr.total-row {
  position: sticky;
  bottom: 0;
  z-index: 9;
  padding: 0.4rem;
}

tr.total-row td {
  background-color: #f5f7fa;
  color: var(--dark);
  font-weight: 600;
  border-top: 2px solid var(--primary);
}

/* Fixed widths for wins table to prevent layout shifts during filtering */
#winsTable {
  table-layout: fixed;
  width: 100%;
}

/* id column (hidden) - nth-child(1) */
#winsTable th:nth-child(1),
#winsTable td:nth-child(1) {
  width: 4%;
  min-width: 40px;
  text-align: center;
}

/* Project Name - increased width - nth-child(2) */
#winsTable th:nth-child(2),
#winsTable td:nth-child(2) {
  width: 18%;
  min-width: 180px;
}

/* Repeat - decreased width - nth-child(3) */
#winsTable th:nth-child(3),
#winsTable td:nth-child(3) {
  width: 6%;
  min-width: 60px;
  text-align: center;
}

/* BD Lead - nth-child(4) */
#winsTable th:nth-child(4),
#winsTable td:nth-child(4) {
  width: 9%;
  min-width: 90px;
}

/* Location - decreased width and center-aligned - nth-child(5) */
#winsTable th:nth-child(5),
#winsTable td:nth-child(5) {
  width: 7%;
  min-width: 70px;
  text-align: center;
}

/* Month - decreased width and center-aligned - nth-child(6) */
#winsTable th:nth-child(6),
#winsTable td:nth-child(6) {
  width: 7%;
  min-width: 70px;
  text-align: center;
}

/* Year column - nth-child(7) */
#winsTable th:nth-child(7),
#winsTable td:nth-child(7) {
  width: 5%;
  min-width: 50px;
  text-align: center;
}

/* Service Line - nth-child(8) */
#winsTable th:nth-child(8),
#winsTable td:nth-child(8) {
  width: 9%;
  min-width: 90px;
}

/* Area (in sqft) - increased width - nth-child(9) */
#winsTable th:nth-child(9),
#winsTable td:nth-child(9) {
  width: 10%;
  min-width: 100px;
  text-align: center;
}

/* Value without taxes - increased width - nth-child(10) */
#winsTable th:nth-child(10),
#winsTable td:nth-child(10) {
  width: 12%;
  min-width: 120px;
  text-align: right;
}

/* Value with taxes - increased width - nth-child(11) */
#winsTable th:nth-child(11),
#winsTable td:nth-child(11) {
  width: 13%;
  min-width: 130px;
  text-align: right;
}

/* Actions - nth-child(12) */
#winsTable th:nth-child(12),
#winsTable td:nth-child(12) {
  width: 9%;
  min-width: 90px;
  text-align: center;
}

/* Interactive States */
button:hover {
  transform: translateY(-1px);
}

.login-container button:hover {
  background-color: var(--primary-dark);
  box-shadow: var(--shadow-btn);
}

#logoutBtn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

button:active {
  transform: scale(0.98);
}

.nav-item {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
}

.nav-item:hover::before {
  width: 60%;
}

.nav-item.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-item.active::before {
  width: 80%;
}

tr:hover td {
  background-color: #f5f7fa;
}

/* Animations */
@keyframes fadeInUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Login container pulse effect */
@keyframes containerPulse {

  0%,
  100% {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.5);
  }

  50% {
    box-shadow: 0 25px 70px rgba(15, 44, 88, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.7);
  }
}

.login-container {
  animation: loginSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards, containerPulse 4s ease-in-out infinite 0.8s;
}

.fade-in {
  animation: fadeIn 0.25s ease-out forwards;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .login-container {
    margin: 2.5rem auto;
    padding: 1.5rem;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  th,
  td {
    padding: 0.75rem;
  }
}

/* Scrollbar Styling - Sophisticated */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light);
  border-radius: 0;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--radius);
  border: 2px solid var(--light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

::-webkit-scrollbar-corner {
  background: var(--light);
}





/* Add these styles to the existing CSS file */

.filter-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.year-toggle,
.quarter-toggle {
  display: flex;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid var(--border);
  overflow: hidden;
  font-size: var(--font-size-sm);
}

.toggle-option {
  padding: 6px 12px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  min-width: 70px;
  user-select: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.toggle-option:not(:last-child) {
  border-right: 1px solid var(--border);
}

.toggle-option:hover:not(.active) {
  background-color: #e9ecef;
}

.toggle-option.active {
  background-color: var(--primary);
  color: white;
  font-weight: 500;
}

@media (max-width: 768px) {
  .filter-groups {
    flex-direction: column;
  }
}





/* Add these styles for multi-select toggle */
.toggle-switch.multi-select .toggle-option {
  position: relative;
}

.toggle-switch.multi-select .toggle-option.active::after {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 5px;
  font-size: var(--font-size-xs);
  color: white;
}

.toggle-switch.multi-select .toggle-option:not(.all-option).active {
  background-color: var(--primary);
  color: white;
  font-weight: 500;
}

/* When "All Quarters" is active, other options should be inactive */
.toggle-switch.multi-select .toggle-option[data-quarter-filter="all"].active~.toggle-option {
  background-color: #ffffff;
  color: initial;
  font-weight: normal;
}




/* Add column width styles for Wins Head table */
#winsHeadTable th:nth-child(1),
/* Financial Quarter */
#winsHeadTable td:nth-child(1) {
  width: 12%;
}

#winsHeadTable th:nth-child(2),
/* Month */
#winsHeadTable td:nth-child(2) {
  width: 13%;
}

#winsHeadTable th:nth-child(3),
/* Total Value with taxes */
#winsHeadTable td:nth-child(3) {
  width: 15%;
}

#winsHeadTable th:nth-child(4),
/* D&B */
#winsHeadTable td:nth-child(4) {
  width: 20%;
}

#winsHeadTable th:nth-child(5),
/* GC */
#winsHeadTable td:nth-child(5) {
  width: 20%;
}

#winsHeadTable th:nth-child(6),
/* C&I */
#winsHeadTable td:nth-child(6) {
  width: 20%;
}

/* Ensure table respects column widths */
#winsHeadTable {
  table-layout: fixed;
}

/* Adjust padding for Financial Quarter column with expand icon */
#winsHeadTable td:nth-child(1) {
  position: relative;
  padding-left: 35px !important;
}

#winsHeadTable .expand-icon {
  left: 15px;
}

/* Add box-sizing to account for borders/padding */
#winsHeadTable th,
#winsHeadTable td {
  box-sizing: border-box;
}






/* Add these styles for expandable rows */
.data-row {
  transition: background-color 0.15s ease;
}

.data-row:hover {
  background-color: #f0f7ff;
}

.data-row.expanded {
  background-color: #e6f0ff;
}

.data-row.expanded .expand-icon {
  transform: translateY(-50%) rotate(45deg);
}

.expand-icon {
  transition: transform 0.15s ease;
}

.location-breakdown {
  background-color: #f9f9ff;
  animation: fadeIn 0.2s ease-out;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 5;
}

.nested-table {
  border-collapse: collapse;
  margin: 0;
  width: 100%;
  border: 1px solid #ddd;
  /* Adds border around the table */
}


.nested-table thead {
  z-index: 10;
  /* Lower z-index for nested table headers */
}

.nested-table th {
  background-color: #e6e6ff !important;
  color: #333 !important;
  font-weight: 600;
  padding: 8px 6px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.nested-table tr:hover td {
  background-color: #f0f0ff !important;
}

/* Nested table column widths */
.nested-table {
  table-layout: fixed;
}

.nested-table th:nth-child(1),
.nested-table td:nth-child(1) {
  /* Location */
  width: 18% !important;
}

.nested-table th:nth-child(2),
.nested-table td:nth-child(2) {
  /* Total Value */
  width: 20% !important;
}

.nested-table th:nth-child(3),
.nested-table td:nth-child(3) {
  /* D&B */
  width: 20% !important;
}

.nested-table th:nth-child(4),
.nested-table td:nth-child(4) {
  /* GC */
  width: 20% !important;
}

.nested-table th:nth-child(5),
.nested-table td:nth-child(5) {
  /* C&I */
  width: 20% !important;
}

/* Keep existing styles, only modify column widths */
.nested-table th,
.nested-table td {
  border-bottom: 1px solid #ddd !important;
  padding: 6px;
  text-align: left;
  /* Changed from center to left for headers */
}

.expand-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.data-row.expanded .expand-icon {
  transform: translateY(-50%) rotate(45deg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}




/* Add these styles for the carousel */
.carousel-container {
  width: 100%;
  background-color: #f9f9ff;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 5;
  /* Lower z-index for carousel */
}

.carousel-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  background-color: #f0f0ff;
}

.carousel-tab {
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 500;
  color: #555;
  transition: all 0.15s ease;
  border-bottom: 3px solid transparent;
  user-select: none;
}

.carousel-tab:hover {
  background-color: #e6e6ff;
  color: #333;
}

.carousel-tab.active {
  background-color: #fff;
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  font-weight: 600;
}

.carousel-content {
  position: relative;
  background-color: #fff;
}

.carousel-item {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.carousel-item.active {
  display: block;
}

/* Adjust nested table styles for carousel */
.carousel-item .nested-table {
  margin: 0;
  border: none;
}

.carousel-item .nested-table th:first-child {
  width: 18% !important;
}

/* Add a subtle transition effect */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Make sure the carousel tabs are responsive */
@media (max-width: 768px) {
  .carousel-tabs {
    flex-direction: column;
  }

  .carousel-tab {
    text-align: center;
    padding: 10px;
  }

  .carousel-tab.active {
    border-bottom: none;
    border-left: 3px solid var(--primary);
  }
}




/* Add these styles for the chart containers */
.chart-container {
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
  height: 450px;
  position: relative;
  border: 1px solid var(--border);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.chart-container > h3 {
  flex-shrink: 0;
}

.chart-container > canvas {
  flex: 1;
  min-height: 0;
  position: relative;
}

.chart-container:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.chart-type-toggle {
  display: flex;
  background-color: #ffffff;
  border-radius: 30px;
  border: 1px solid #ccc;
  overflow: hidden;
  font-size: var(--font-size-sm);
}

.chart-type-toggle .toggle-option {
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  min-width: 80px;
  user-select: none;
}

.chart-type-toggle .toggle-option:not(:last-child) {
  border-right: 1px solid #ccc;
}

.chart-type-toggle .toggle-option:hover:not(.active) {
  background-color: #e0e0e0;
}

.chart-type-toggle .toggle-option.active {
  background-color: var(--primary);
  color: white;
  font-weight: 500;
}

/* Hide RFP Analysis chart type toggle for space utilization */
.chart-type-toggle-rfp {
  display: none !important;
}

/* Responsive adjustments for charts */
@media (max-width: 768px) {
  .chart-container {
    height: 300px;
  }
}




/* Add these styles for sticky headers in the Wins Analysis section */
#winsAnalysis {
  position: relative;
}

#winsAnalysis h2 {
  margin-bottom: 1rem;
}

#winsAnalysis .filter-groups-container {
  position: sticky;
  top: var(--nav-height);
  padding: 0.75rem 0;
  margin: 0 0 1rem 0;
  z-index: 100;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

#winsAnalysis .filter-groups-container.scrolled {
  box-shadow: 0 2px 8px rgba(15, 44, 88, 0.08);
  border-bottom-color: var(--border);
}

#winsAnalysis .filter-groups {
  margin-bottom: 0;
}

/* Add some spacing between charts to make scrolling more noticeable */
#winsAnalysis .chart-container {
  margin-bottom: 2rem;
}

/* Ensure proper spacing when sticky header is active */
#winsAnalysis .chart-container:first-of-type {
  margin-top: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #winsAnalysis .filter-groups-container {
    padding: 0.75rem 0;
  }
}

/* RFP Analysis - Match Wins Analysis spacing */
#rfpAnalysis h2 {
  margin-bottom: 0rem;
}

#rfpAnalysis .filter-groups-container {
  position: sticky;
  top: var(--nav-height);
  padding: 0.75rem 0;
  margin: 0 0 1rem 0;
  z-index: 100;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

#rfpAnalysis .filter-groups-container.scrolled {
  box-shadow: 0 2px 8px rgba(15, 44, 88, 0.08);
  border-bottom-color: var(--border);
}

#rfpAnalysis .filter-groups {
  margin-bottom: 0;
}

#rfpAnalysis .chart-container:first-of-type {
  margin-top: 0;
}

/* Hit Rate Analysis - Match Wins Analysis spacing */
#hitRateAnalysis h2 {
  margin-bottom: 0;
}

#hitRateAnalysis .filter-groups-container {
  top: var(--nav-height);
  padding: 0.75rem 0;
  margin: 0 0 1rem 0;
  z-index: 100;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

#hitRateAnalysis .filter-groups-container.scrolled {
  box-shadow: 0 2px 8px rgba(15, 44, 88, 0.08);
  border-bottom-color: var(--border);
}

/* Add these styles for disabled toggle options */
.toggle-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #e0e0e0;
  color: #888;
  pointer-events: none;
}

/* Ensure the disabled state doesn't change on hover */
.toggle-option.disabled:hover {
  background-color: #e0e0e0;
  transform: none;
}




/* Essential filter styles */
.filter-container {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.filters-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 0 0 auto;
  align-items: flex-start;
}

.filters-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

/* Filter toggle styles */
.rfp-filter-toggle {
  display: inline-flex;
  flex-wrap: nowrap;
  background-color: #ffffff;
  border-radius: 16px;
  border: 1px solid #ddd;
  overflow: hidden;
  font-size: var(--font-size-xs);
  width: auto;
  flex-shrink: 0;
}

.rfp-filter-toggle .toggle-option {
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  min-width: 56px;
  user-select: none;
  background: #fff;
  font-size: var(--font-size-xs);
}

.rfp-filter-toggle .toggle-option:hover:not(.active) {
  background-color: #e0e0e0;
}

.rfp-filter-toggle .toggle-option.active {
  background-color: var(--primary);
  color: white;
  font-weight: 500;
}

/* RFP table column widths */
#rfpTable {
  table-layout: fixed;
  font-size: var(--font-size-sm);
}

/* RFP table styling */
#rfpTable th:nth-child(1),
#rfpTable td:nth-child(1) {
  width: 4%;
  text-align: center;
}

/* ID */
#rfpTable th:nth-child(2) {
  width: 12%;
  text-align: center;
}

/* Client Name */
#rfpTable td:nth-child(2) {
  width: 12%;
  text-align: left;
}

/* Area */
#rfpTable th:nth-child(3),
#rfpTable td:nth-child(3),
#designRfpTable th:nth-child(3),
#designRfpTable td:nth-child(3) {
  width: 9%;
  text-align: center;
}

/* Location */
#rfpTable th:nth-child(4),
#rfpTable td:nth-child(4) {
  width: 7%;
}

/* Received Date */
#rfpTable th:nth-child(5),
#rfpTable td:nth-child(5) {
  width: 7%;
}

/* Submission Date */
#rfpTable th:nth-child(6),
#rfpTable td:nth-child(6) {
  width: 7%;
}

/* BD Lead */
#rfpTable th:nth-child(7),
#rfpTable td:nth-child(7) {
  width: 7%;
}

/* Contracts */
#rfpTable th:nth-child(8),
#rfpTable td:nth-child(8) {
  width: 7%;
}

/* Status — wrap long free-text, left-aligned (tbody + class: beats global th,td center & mobile nowrap) */
#rfpTable thead th:nth-child(9),
#rfpTable tbody td:nth-child(9),
#rfpTable tbody td.rfp-status-cell,
#rfpTable td.rfp-status-cell {
  width: 13%;
  min-width: 7rem;
  max-width: 14rem;
  text-align: left !important;
  vertical-align: top;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  padding: 0.35rem 10px !important;
  line-height: 1.4;
  box-sizing: border-box;
}

#designRfpTable thead th:nth-child(9),
#designRfpTable tbody td:nth-child(9),
#designRfpTable tbody td.rfp-status-cell,
#designRfpTable td.rfp-status-cell {
  min-width: 7rem;
  max-width: 14rem;
  text-align: left !important;
  vertical-align: top;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  padding: 0.35rem 10px !important;
  line-height: 1.4;
  box-sizing: border-box;
}

/* Amount */
#rfpTable th:nth-child(10) {
  width: 11%;
  text-align: center;
}

/* Amount */
#rfpTable td:nth-child(10) {
  width: 11%;
  text-align: right;
}

/* Amount */
#rfpTable th:nth-child(11),
#rfpTable td:nth-child(11) {
  width: 8%;
}

/* Actions */
#rfpTable th:nth-child(12),
#rfpTable td:nth-child(12) {
  width: 8%;
}

/* Transfer */



#rfpTable th:nth-child(3) {
  text-align: center !important;
}

/* Stage-based styling */
#rfpTable tr[data-stage="pass"] {
  background-color: rgba(0, 255, 0, 0.05);
}

#rfpTable tr[data-stage="hold"] {
  background-color: rgba(255, 255, 0, 0.05);
}

#rfpTable tr[data-stage="final"] {
  background-color: rgba(0, 0, 255, 0.05);
}

/* Records count styles */
.records-count {
  background-color: white;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.records-count i {
  color: var(--primary);
  font-size: var(--font-size-md);
}

.records-count strong {
  color: var(--primary);
  font-weight: 600;
}

/* Responsive styles */
@media (max-width: 768px) {
  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-left {
    width: 100%;
  }

  .filters-right {
    width: 100%;
    justify-content: stretch;
    margin-left: 0;
  }

  .rfp-filter-toggle {
    flex-direction: column;
    border-radius: 12px;
  }

  .rfp-filter-toggle .toggle-option {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
  }

  #rfpTable {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Allow Status column to wrap and stay left-aligned (do not inherit table nowrap) */
  #rfpTable thead th:nth-child(9),
  #rfpTable tbody td.rfp-status-cell,
  #rfpTable tbody td:nth-child(9),
  #designRfpTable thead th:nth-child(9),
  #designRfpTable tbody td.rfp-status-cell,
  #designRfpTable tbody td:nth-child(9) {
    white-space: normal !important;
    text-align: left !important;
  }

  .records-count {
    text-align: center;
    justify-content: center;
  }
}



.summary-tables {
  margin-top: 1rem;
}

.table-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-table-container {
  flex: 1;

}

.summary-table-container h3 {
  margin-bottom: 0.5rem;
  color: rgba(0, 0, 0, 0.9);
  /* 90% black */
  font-size: var(--font-size-lg);
  font-weight: 600;
}

/* Cumulative Wins Chart */
.cumulative-chart-container {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.cumulative-chart-container h3 {
  margin-bottom: 1rem;
  color: rgba(0, 0, 0, 0.9);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

#cumulativeWinsChart {
  width: 100%;
  height: 400px;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-2) !important;
  transition: var(--transition-smooth);
}

/* Summary table rows fade-in */
.summary-table tbody tr {
  opacity: 0;
  animation: summaryRowFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.summary-table tbody tr:nth-child(1) {
  animation-delay: 0.1s;
}

.summary-table tbody tr:nth-child(2) {
  animation-delay: 0.2s;
}

.summary-table tbody tr:nth-child(3) {
  animation-delay: 0.3s;
}

.summary-table tbody tr:nth-child(4) {
  animation-delay: 0.4s;
}

.summary-table tbody tr:nth-child(5) {
  animation-delay: 0.5s;
}

.summary-table tbody tr.skeleton-table-row {
  animation: none;
}

@keyframes summaryRowFadeIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.summary-table:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.summary-table th,
.summary-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--dark);
}

.summary-table th {
  background: var(--primary);
  font-weight: 600;
  color: white;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: var(--font-size-xs);
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid var(--primary-light);
}

.summary-table td {
  padding: 0.6rem 0.8rem;
  font-size: var(--font-size-sm);
}

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

.summary-table tr:hover td {
  background: rgba(255, 255, 255, 0.5);
}

.summary-table td:nth-child(2),
.summary-table td:nth-child(3) {
  text-align: right;
  font-weight: 500;
}

#serviceLineAreaTable th:nth-child(2),
#serviceLineAreaTable td:nth-child(2),
#locationAreaTable th:nth-child(2),
#locationAreaTable td:nth-child(2) {
  text-align: center;
}



/* Subtle fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.summary-table-container {
  animation: fadeIn 0.25s ease-out forwards;
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {

  .summary-table-container,
  .summary-table {
    background: rgba(255, 255, 255, 0.9);
  }
}






/* Add search filter styles */
.search-filter {
  flex: 1 1 320px;
  max-width: 420px;
}

.search-filter input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: var(--font-size-sm);
  transition: all 0.15s ease;
  margin: 0;
}

.search-filter input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Update filter container styles */
.filter-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

/* Left column: stack toggles vertically */
.controls-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 420px;
}

/* Right column: records, search, priority inline */
.controls-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 380px;
  justify-content: flex-end;
}

/* Update responsive styles */
@media (max-width: 768px) {
  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-filter {
    max-width: 100%;
    order: -1;
    margin-bottom: 1rem;
  }

  .controls-right {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .controls-left {
    min-width: 0;
  }
}




/* Add to styles.css */
.totals-row {
  position: sticky;
  bottom: 0;
  background: var(--light);
  font-weight: bold;
  border-top: 2px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.totals-row td {
  padding: 12px 15px !important;
}

.total-label {
  text-align: right !important;
  color: var(--primary);
}

.total-value {
  text-align: right !important;
  color: var(--primary);
}

/* Sqft totals in RFP tables — center aligned (amount totals stay right via .total-value) */
#rfpTable .totals-row td:nth-child(3),
#designRfpTable .totals-row td:nth-child(3) {
  text-align: center !important;
}






.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding-right: 60px;
  /* Add padding to prevent overlap with column visibility button */
  flex-wrap: nowrap;
}

.header-container h2 {
  margin: 0;
}

.column-visibility-container {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  margin-right: 0;
  flex-shrink: 0;
}

.column-toggle-btn {
  padding: 8px 16px;
  background-color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: var(--transition);
  border: 1px solid #ccc;
  z-index: 999 !important;
  position: relative;
  margin: 0;
  margin-bottom: 0;
  line-height: 1;
  vertical-align: baseline;
}

.column-toggle-btn:hover {
  background-color: var(--primary);
}

.column-toggle-dropdown {
  display: none;
  position: absolute;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1999;
  min-width: 200px;
  padding: 8px 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-top-width: 1px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Navigation dropdown */
.nav-dropdown .dropdown-content {
  z-index: 2100 !important;
  /* Higher z-index for nav dropdowns - above nav bar */
}

/* Analysis dropdown */
.analysis-dropdown {
  z-index: 2000;
  /* Same z-index as nav dropdowns */
}

.column-toggle-dropdown.show {
  display: block;
}

.column-toggle-dropdown.show[data-table-id="designWinsTable"] {
  left: -146px !important;
  top: 42px !important;
}

.column-toggle-item {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.column-toggle-item:hover {
  background-color: var(--light);
}

.column-toggle-item input[type="checkbox"] {
  margin: 0;
  width: auto;
}

.column-toggle-item label {
  position: static;
  cursor: pointer;
  color: var(--dark);
  font-size: var(--font-size-sm);
}

.controls-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  margin-bottom: 0;
  justify-content: flex-end;
  padding-right: 0;
  flex-shrink: 0;
}




/* Add to styles.css */

/* Repeat tag styling */
.repeat-tag {
  background-color: #e3f2fd;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid #bbdefb;
  margin-left: 8px;
}

/* Add highlight for rows with repeat clients */
tr:has(td:contains('Yes')) {
  background-color: rgba(232, 240, 254, 0.4) !important;
}

tr:has(td:contains('Yes')):hover {
  background-color: rgba(232, 240, 254, 0.6) !important;
}




/* Add to styles.css */
#rfpTable tr[data-stage="tentative"] {
  background-color: rgba(0, 128, 0, 0.05);
  /* Light green background */
}

.rfp-filter-toggle .toggle-option[data-rfp-filter="tentative"].active {
  background-color: var(--primary);
  color: white;
}




/* Add to styles.css */
.crud-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 2000;
  animation: fadeIn 0.2s ease-out;
}

.crud-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
  padding: 0;
  border-radius: 16px;
  width: 95%;
  max-width: 900px;
  box-shadow:
    0 0 0 1px rgba(15, 44, 88, 0.05),
    0 32px 64px rgba(15, 44, 88, 0.16),
    0 16px 32px rgba(15, 44, 88, 0.08),
    0 4px 12px rgba(15, 44, 88, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(15, 44, 88, 0.02);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  overflow: hidden;
  animation: modalFadeIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
}

.crud-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(135deg,
      rgba(15, 44, 88, 0.03) 0%,
      transparent 20%,
      transparent 80%,
      rgba(26, 77, 143, 0.02) 100%);
  pointer-events: none;
  z-index: 1;
}

@keyframes modalFadeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.92) rotateX(4deg);
    filter: blur(4px);
  }

  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.01) rotateX(0deg);
    filter: blur(0px);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotateX(0deg);
    filter: blur(0px);
  }
}

.crud-modal.crud-modal-sm {
  max-width: 440px;
}

.crud-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #0f2c58;
}

.crud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 18px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(250, 251, 252, 0.98) 100%);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(15, 44, 88, 0.06);
  margin-bottom: 0;
  min-height: 58px;
  position: relative;
  z-index: 2;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 1px 3px rgba(15, 44, 88, 0.04);
}

.crud-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(15, 44, 88, 0.4) 20%,
      rgba(59, 130, 246, 0.6) 50%,
      rgba(15, 44, 88, 0.4) 80%,
      transparent 100%);
  animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {

  0%,
  100% {
    opacity: 0.3;
    transform: scaleX(0.8);
  }

  50% {
    opacity: 0.8;
    transform: scaleX(1);
  }
}

.crud-header h3 {
  color: #0f2c58;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(135deg, #0f2c58 0%, #1a4d8f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.crud-header h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #0f2c58 0%, #3b82f6 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.close-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%);
  border: 1px solid rgba(15, 44, 88, 0.08);
  font-size: 18px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  line-height: 1;
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(15, 44, 88, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.close-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.close-btn:hover {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.95) 0%, rgba(254, 242, 242, 0.98) 100%);
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
  transform: rotate(90deg) scale(1.08);
  box-shadow:
    0 4px 12px rgba(239, 68, 68, 0.2),
    0 0 20px rgba(239, 68, 68, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.close-btn:hover::before {
  width: 100px;
  height: 100px;
}

.close-btn:active {
  transform: rotate(90deg) scale(0.95);
  box-shadow:
    0 1px 3px rgba(239, 68, 68, 0.15),
    inset 0 2px 4px rgba(239, 68, 68, 0.1);
}

.crud-body {
  padding: 18px 24px 20px;
  max-height: calc(85vh - 110px);
  overflow-y: auto;
}

.crud-body::-webkit-scrollbar {
  width: 8px;
}

.crud-body::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(15, 44, 88, 0.02) 0%, rgba(15, 44, 88, 0.04) 100%);
  border-radius: 10px;
  margin: 4px 0;
}

.crud-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(15, 44, 88, 0.15) 0%, rgba(15, 44, 88, 0.25) 100%);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 4px rgba(15, 44, 88, 0.1);
  transition: all 0.2s ease;
}

.crud-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(15, 44, 88, 0.3) 0%, rgba(37, 99, 235, 0.4) 100%);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 8px rgba(15, 44, 88, 0.15), 0 0 12px rgba(59, 130, 246, 0.2);
}

.crud-body::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, rgba(15, 44, 88, 0.4) 0%, rgba(37, 99, 235, 0.5) 100%);
}

.form-group {
  margin-bottom: 14px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group label.required::after {
  content: ' *';
  color: #ef4444;
}

/* Form validation states */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-group .error-message {
  color: #dc2626;
  font-size: 13px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Success states */
.form-group input.success,
.form-group select.success,
.form-group textarea.success {
  border-color: #10b981;
  background-color: #f0fdf4;
}

/* Loading state for buttons */
.btn-primary.loading,
.btn-secondary.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-primary.loading::after,
.btn-secondary.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

.btn-secondary.loading::after {
  border-color: rgba(15, 44, 88, 0.2);
  border-top-color: #0f2c58;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Enhanced select dropdown styling */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* File input styling */
.form-group input[type="file"] {
  padding: 10px 14px;
  cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 16px;
  margin-right: 12px;
  font-weight: 500;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input[type="file"]::file-selector-button:hover {
  background: #e5e7eb;
  border-color: #cbd5e1;
}

/* Modal closing animation */
.crud-modal.closing,
#lossDetailsModal.closing .modal-content,
#designWinModal.closing .modal-content,
#regularWinModal.closing .modal-content,
.rfp-settings-content.closing {
  animation: modalFadeOut 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95) translateY(20px);
  }
}

/* Improved modal backdrop */
.rfp-settings-modal.closing,
#lossDetailsModal.closing,
#designWinModal.closing,
#regularWinModal.closing {
  animation: backdropFadeOut 0.2s ease-out forwards;
}

@keyframes backdropFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Modal content sections */
.modal-section {
  margin-bottom: 24px;
}

.modal-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f2c58;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(15, 44, 88, 0.08);
}

/* Info callouts in modals */
.modal-info {
  background: #f0f9ff;
  border-left: 3px solid #0f2c58;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #374151;
}

.modal-warning {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #92400e;
}

/* Smooth dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here if needed */
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  border-radius: 10px;
  font-size: 13.5px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
  color: #0f172a;
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400;
  box-shadow:
    0 1px 2px rgba(15, 44, 88, 0.03),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
  position: relative;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: rgba(15, 44, 88, 0.2);
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    0 4px 8px rgba(15, 44, 88, 0.06),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0f2c58;
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 4px rgba(15, 44, 88, 0.08),
    0 8px 16px rgba(15, 44, 88, 0.08),
    0 0 24px rgba(59, 130, 246, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
  animation: inputGlow 2s ease-in-out infinite;
}

@keyframes inputGlow {

  0%,
  100% {
    box-shadow:
      0 0 0 4px rgba(15, 44, 88, 0.08),
      0 8px 16px rgba(15, 44, 88, 0.08),
      0 0 24px rgba(59, 130, 246, 0.15),
      inset 0 1px 1px rgba(255, 255, 255, 0.9);
  }

  50% {
    box-shadow:
      0 0 0 4px rgba(15, 44, 88, 0.12),
      0 8px 16px rgba(15, 44, 88, 0.12),
      0 0 32px rgba(59, 130, 246, 0.25),
      inset 0 1px 1px rgba(255, 255, 255, 0.9);
  }
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 18px 24px 20px;
  border-top: 1px solid rgba(15, 44, 88, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  justify-content: flex-end;
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: -20px;
  position: relative;
  z-index: 2;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.8) inset,
    0 -4px 12px rgba(15, 44, 88, 0.03);
}

.form-actions::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(59, 130, 246, 0.3) 50%,
      transparent 100%);
  animation: formActionGlow 3s ease-in-out infinite;
}

@keyframes formActionGlow {

  0%,
  100% {
    opacity: 0.2;
  }

  50% {
    opacity: 0.6;
  }
}

.btn-primary,
.btn-secondary {
  padding: 8px 20px;
  border: none;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.34, 1.4, 0.64, 1);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 35px;
}

.btn-primary {
  background: linear-gradient(135deg, #0f2c58 0%, #1a4d8f 50%, #2563eb 100%);
  color: white;
  box-shadow:
    0 4px 12px rgba(15, 44, 88, 0.25),
    0 2px 6px rgba(37, 99, 235, 0.2),
    0 0 20px rgba(59, 130, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

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

.btn-primary:hover::before {
  left: 100%;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 8px 24px rgba(15, 44, 88, 0.3),
    0 4px 12px rgba(37, 99, 235, 0.3),
    0 0 32px rgba(59, 130, 246, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 2px 8px rgba(15, 44, 88, 0.2),
    0 0 16px rgba(59, 130, 246, 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  color: #475569;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  box-shadow:
    0 2px 4px rgba(15, 44, 88, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 44, 88, 0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.btn-secondary:hover {
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: rgba(15, 44, 88, 0.15);
  color: #0f2c58;
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 4px 12px rgba(15, 44, 88, 0.08),
    0 0 16px rgba(15, 44, 88, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.btn-secondary:hover::before {
  width: 200px;
  height: 200px;
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 1px 3px rgba(15, 44, 88, 0.06),
    inset 0 2px 4px rgba(15, 44, 88, 0.04);
}

/* Focus states for accessibility */
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
  outline: 2px solid #0f2c58;
  outline-offset: 2px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid #0f2c58;
  outline-offset: 2px;
}

/* ============================================
   MATERIAL UI MODALS - PLAIN & ADVANCED
   ============================================ */

/* PLAIN MATERIAL UI MODAL */
.mui-modal-plain {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: muiFadeIn 0.225s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mui-modal-plain .mui-paper {
  background: #ffffff;
  border-radius: 4px;
  box-shadow:
    0px 11px 15px -7px rgba(0, 0, 0, 0.2),
    0px 24px 38px 3px rgba(0, 0, 0, 0.14),
    0px 9px 46px 8px rgba(0, 0, 0, 0.12);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  animation: muiScaleIn 0.225s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mui-modal-plain .mui-dialog-title {
  padding: 24px 24px 20px;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.0075em;
  color: rgba(0, 0, 0, 0.87);
  margin: 0;
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

.mui-modal-plain .mui-dialog-content {
  padding: 0 24px 20px;
  overflow-y: auto;
  color: rgba(0, 0, 0, 0.6);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.00938em;
}

.mui-modal-plain .mui-dialog-actions {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

/* Plain Material UI Buttons */
.mui-button-plain {
  padding: 6px 16px;
  font-size: 0.875rem;
  min-width: 64px;
  border-radius: 4px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.02857em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
  position: relative;
  overflow: hidden;
}

.mui-button-plain.text {
  background: transparent;
  color: #1976d2;
}

.mui-button-plain.text:hover {
  background-color: rgba(25, 118, 210, 0.04);
}

.mui-button-plain.contained {
  background-color: #1976d2;
  color: #fff;
  box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
    0px 2px 2px 0px rgba(0, 0, 0, 0.14),
    0px 1px 5px 0px rgba(0, 0, 0, 0.12);
}

.mui-button-plain.contained:hover {
  background-color: #1565c0;
  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2),
    0px 4px 5px 0px rgba(0, 0, 0, 0.14),
    0px 1px 10px 0px rgba(0, 0, 0, 0.12);
}

.mui-button-plain.outlined {
  background: transparent;
  color: #1976d2;
  border: 1px solid rgba(25, 118, 210, 0.5);
}

.mui-button-plain.outlined:hover {
  background-color: rgba(25, 118, 210, 0.04);
  border-color: #1976d2;
}

/* ADVANCED MATERIAL UI MODAL */
.mui-modal-advanced {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: muiFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mui-modal-advanced .mui-paper {
  background: #ffffff;
  border-radius: 8px;
  box-shadow:
    0px 11px 15px -7px rgba(0, 0, 0, 0.2),
    0px 24px 38px 3px rgba(0, 0, 0, 0.14),
    0px 9px 46px 8px rgba(0, 0, 0, 0.12);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.85) translateY(20px);
  animation: muiAdvancedSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  position: relative;
  overflow: hidden;
}

.mui-modal-advanced .mui-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1976d2 0%, #42a5f5 100%);
}

.mui-modal-advanced .mui-dialog-title {
  padding: 24px 24px 20px;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.0075em;
  color: rgba(0, 0, 0, 0.87);
  margin: 0;
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mui-modal-advanced .mui-icon-button {
  padding: 8px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.54);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.mui-modal-advanced .mui-icon-button:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.87);
}

.mui-modal-advanced .mui-icon-button:active {
  background-color: rgba(0, 0, 0, 0.12);
}

.mui-modal-advanced .mui-dialog-content {
  padding: 0 24px 20px;
  overflow-y: auto;
  color: rgba(0, 0, 0, 0.6);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.00938em;
}

.mui-modal-advanced .mui-dialog-content::-webkit-scrollbar {
  width: 8px;
}

.mui-modal-advanced .mui-dialog-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.mui-modal-advanced .mui-dialog-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.mui-modal-advanced .mui-dialog-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.mui-modal-advanced .mui-dialog-actions {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

/* Advanced Material UI Buttons */
.mui-button-advanced {
  padding: 8px 22px;
  font-size: 0.875rem;
  min-width: 64px;
  border-radius: 4px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.02857em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

.mui-button-advanced.text {
  background: transparent;
  color: #1976d2;
}

.mui-button-advanced.text:hover {
  background-color: rgba(25, 118, 210, 0.04);
}

.mui-button-advanced.contained {
  background-color: #1976d2;
  color: #fff;
  box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
    0px 2px 2px 0px rgba(0, 0, 0, 0.14),
    0px 1px 5px 0px rgba(0, 0, 0, 0.12);
}

.mui-button-advanced.contained:hover {
  background-color: #1565c0;
  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2),
    0px 4px 5px 0px rgba(0, 0, 0, 0.14),
    0px 1px 10px 0px rgba(0, 0, 0, 0.12);
}

.mui-button-advanced.outlined {
  background: transparent;
  color: #1976d2;
  border: 1px solid rgba(25, 118, 210, 0.5);
}

.mui-button-advanced.outlined:hover {
  background-color: rgba(25, 118, 210, 0.04);
  border-color: #1976d2;
}

/* Material UI Form Fields */
.mui-text-field {
  margin-bottom: 20px;
}

.mui-text-field label {
  display: block;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.66;
  letter-spacing: 0.03333em;
  margin-bottom: 4px;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mui-text-field input,
.mui-text-field textarea,
.mui-text-field select {
  width: 100%;
  padding: 16.5px 14px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.87);
  background-color: transparent;
  border: 1px solid rgba(0, 0, 0, 0.23);
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
  box-sizing: border-box;
}

.mui-text-field input:hover,
.mui-text-field textarea:hover,
.mui-text-field select:hover {
  border-color: rgba(0, 0, 0, 0.87);
}

.mui-text-field input:focus,
.mui-text-field textarea:focus,
.mui-text-field select:focus {
  outline: none;
  border-color: #1976d2;
  border-width: 2px;
  padding: 15.5px 13px;
}

.mui-text-field input:focus+label,
.mui-text-field textarea:focus+label {
  color: #1976d2;
}

/* Modal Closing Animations */
.mui-modal-plain.closing,
.mui-modal-advanced.closing {
  animation: muiFadeOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mui-modal-plain.closing .mui-paper {
  animation: muiScaleOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mui-modal-advanced.closing .mui-paper {
  animation: muiAdvancedSlideOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Material UI Animations */
@keyframes muiFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes muiFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes muiScaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes muiScaleOut {
  from {
    transform: scale(1);
    opacity: 1;
  }

  to {
    transform: scale(0.9);
    opacity: 0;
  }
}

@keyframes muiAdvancedSlideIn {
  from {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes muiAdvancedSlideOut {
  from {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  to {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
  }
}

/* Responsive Material UI Modals */
@media (max-width: 600px) {

  .mui-modal-plain .mui-paper,
  .mui-modal-advanced .mui-paper {
    width: 95%;
    max-width: 95%;
    margin: 16px;
  }

  .mui-modal-plain .mui-dialog-title,
  .mui-modal-advanced .mui-dialog-title {
    font-size: 1.125rem;
    padding: 20px 16px 16px;
  }

  .mui-modal-plain .mui-dialog-content,
  .mui-modal-advanced .mui-dialog-content {
    padding: 0 16px 16px;
  }

  .mui-modal-plain .mui-dialog-actions,
  .mui-modal-advanced .mui-dialog-actions {
    padding: 12px 8px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .mui-button-plain,
  .mui-button-advanced {
    width: 100%;
    justify-content: center;
  }
}

/* Modal overlay animations */
.crud-modal-overlay,
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 44, 88, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1999;
  animation: backdropFadeIn 0.3s ease-out;
}

/* Responsive modal adjustments */
@media (max-width: 640px) {

  .crud-modal,
  #lossDetailsModal .modal-content,
  .rfp-settings-content {
    width: 96%;
    max-width: 96%;
    margin: 4% auto;
  }

  .crud-header,
  #lossDetailsModal .modal-header,
  .rfp-settings-content h3 {
    padding: 20px 20px 16px;
  }

  .crud-body,
  #lossDetailsModal form {
    padding: 24px 20px;
  }

  .form-actions,
  #lossDetailsModal .form-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .btn-primary,
  .btn-secondary,
  #lossDetailsModal .btn {
    width: 100%;
    justify-content: center;
  }

  .rfp-filter-checkboxes {
    padding: 16px 20px;
  }

  .rfp-save-settings-btn {
    margin: 16px 20px 20px;
    width: calc(100% - 40px);
  }
}

/* Fortune 500 File List Style */
.rfp-files-list {
  margin-top: 24px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(15, 44, 88, 0.05);
}

.rfp-files-list h4 {
  font-size: 14px;
  font-weight: 600;
  color: #0f2c58;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rfp-files-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rfp-files-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(15, 44, 88, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  gap: 16px;
}

.rfp-files-items li:hover {
  transform: translateX(4px);
  border-color: #0f2c58;
  box-shadow: 0 4px 12px rgba(15, 44, 88, 0.08);
}

.rfp-files-items li span {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  flex: 1;
  margin-right: 16px;
  word-break: break-word;
  line-height: 1.4;
}

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

.rfp-file-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f1f5f9;
  color: #64748b;
  font-size: 14px;
  flex-shrink: 0;
}

.rfp-file-btn.download-btn {
  background: #10b981;
  color: white;
}

.rfp-file-btn.download-btn:hover {
  background: #059669;
  transform: scale(1.05);
}

.rfp-file-btn.delete-btn {
  background: #ef4444;
  color: white;
}

.rfp-file-btn.delete-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.rfp-files-items li:last-child {
  border-bottom: none;
}

.rfp-file-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.rfp-file-name {
  font-weight: 500;
  font-size: 14px;
  color: #374151;
  word-break: break-word;
  line-height: 1.4;
}

.rfp-file-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.rfp-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.help-text {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/*
.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
*/
.action-btn {
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all 0.2s;
}

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

.delete-btn {
  background: var(--danger);
  color: white;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}




.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 4px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 280px;
  max-width: 400px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
}

.notification.success {
  background-color: #4CAF50;
}

.notification.error {
  background-color: #f44336;
}

.notification-close {
  background: none;
  border: none;
  color: white;
  font-size: var(--font-size-lg);
  cursor: pointer;
  margin-left: 10px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}


.notification.info {
  background-color: #2196F3;
}

/* Add to your styles.css */
.add-record-btn {
  padding: 0.5rem 1rem;
  background-color: white;
  color: var(--text-muted);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 0;
  position: absolute;
  left: 160px;
}

.add-record-btn:hover {
  background-color: var(--primary);
  color: white;
}

.export-excel-btn {
  padding: 0.5rem 0.8rem;
  background-color: white;
  color: var(--text-muted);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 0;
  position: absolute;
  left: 245px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  z-index: 10;
}

.export-excel-btn:hover {
  background-color: var(--primary);
  color: white;
}

.export-excel-btn i {
  color: #1D6F42;
  font-size: var(--font-size-md);
  pointer-events: none;
}

.export-excel-btn:hover i {
  color: #ffffff;
}

td.table-actions {
  display: table-cell;
  padding: 0.4rem !important;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

td.table-actions>button {
  display: inline-flex;
  margin: 0 2px;
}

.action-btn {
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all 0.2s;
}

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

.edit-btn:hover {
  background: var(--primary-dark);
}

.delete-btn {
  background: var(--danger);
  color: white;
}

.delete-btn:hover {
  background: var(--danger-dark);
}



.form-group {
  margin-bottom: 16px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  position: static;
  background: transparent;
  z-index: auto;
  padding: 0;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 0;
  box-sizing: border-box;
  background-color: #fafbfc;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #cbd5e1;
  background-color: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0f2c58;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 44, 88, 0.08);
}

/* Fix the form row layout */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Specific body padding for compact aesthetic */
.crud-body,
#rfpCrudForm,
#lossDetailsForm,
#rfpFilesForm {
  padding: 24px 28px !important;
  position: relative;
  z-index: 1;
}

/* Focus highlighting for the entire group - World Class */
.form-group {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 2;
}

.form-group:focus-within {
  transform: translateY(-1px) scale(1.005);
}

.form-group:focus-within label {
  color: #0f2c58;
  transform: translateY(-1px);
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

/* Modal adjustments */
.crud-modal {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  max-width: 900px;
  width: 90%;
  margin: 20px auto;
  border: 1px solid var(--border);
}

.crud-header {
  margin-bottom: 1.5rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}




/* RFP specific button styles */
.rfp-add-btn {
  padding: 0.5rem 1rem;
  background-color: white;
  color: var(--text-muted);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 0;
  margin-left: 0.75rem;
}

/* RFP export buttons (full export + regional Summary) */
.rfp-export-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
}

.rfp-export-btn {
  padding: 0.5rem 0.8rem;
  background-color: white;
  color: var(--text-muted);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 0;
  margin-left: 0;
}

.rfp-export-btn:hover {
  background-color: var(--primary);
  color: white;
}

.rfp-export-btn i {
  color: #1D6F42;
  /* Excel green */
  font-size: var(--font-size-md);
  pointer-events: none;
}

.rfp-export-btn:hover i {
  color: #ffffff;
}

/* Regional Summary export: blue Excel icon (ID + !important beats .rfp-export-btn i and FA defaults) */
#rfpRegionSummaryExportBtn i.rfp-export-summary-icon,
#rfpRegionSummaryExportBtn i.rfp-export-summary-icon::before {
  color: #2563eb !important;
}

#rfpRegionSummaryExportBtn:hover i.rfp-export-summary-icon,
#rfpRegionSummaryExportBtn:hover i.rfp-export-summary-icon::before {
  color: #ffffff !important;
}

#rfpRegionSummaryExportBtn i.rfp-export-summary-icon svg,
#rfpRegionSummaryExportBtn svg {
  fill: #2563eb !important;
  color: #2563eb !important;
}

#rfpRegionSummaryExportBtn:hover i.rfp-export-summary-icon svg,
#rfpRegionSummaryExportBtn:hover svg {
  fill: #ffffff !important;
  color: #ffffff !important;
}

.rfp-add-btn:hover {
  background-color: var(--primary);
  color: white;
}

.city-mode-toggle-container {
  display: none;
  margin-left: 0.5rem;
  background: transparent;
  padding: 0;
  border: none;
}

.header-actions {
  position: absolute;
  right: 20px;
  top: 15px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rfp-column-visibility {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.rfp-toggle-btn {
  background: none;
  border: 1px solid #ccc !important;
  font-size: var(--font-size-sm);
  cursor: pointer;
  padding: 5px;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.rfp-toggle-btn:hover {
  background-color: var(--primary);
}

/* Make sure the header container has relative positioning */
#rfp .header-container {
  position: relative;
  padding: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  width: 100%;
}

#rfp .header-container h2 {
  margin: 0;
  flex: 0 0 auto;
}




/* Action buttons styling - improved design */
.action-btn {
  padding: 0.25rem 0.4rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  min-width: 22px;
  height: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.action-btn svg {
  display: block;
  width: 12px;
  height: 12px;
}

.action-btn.edit-btn {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.action-btn.edit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.action-btn.delete-btn {
  background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
  color: white;
}

.action-btn.delete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #da190b 0%, #c62828 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

.action-btn.doc-btn {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
}

.action-btn.doc-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* Legacy support for tables without action-btn class */
#rfpTable .edit-btn,
#rfpTable .delete-btn,
.edit-btn,
.delete-btn {
  /* Match compact action button sizing (same as document button) */
  padding: 0.25rem 0.4rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  min-width: 22px;
  height: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#rfpTable .edit-btn,
.edit-btn {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

#rfpTable .edit-btn:hover:not(:disabled),
.edit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

#rfpTable .delete-btn,
.delete-btn {
  background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
  color: white;
}

#rfpTable .delete-btn:hover:not(:disabled),
.delete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #da190b 0%, #c62828 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

#rfpTable .doc-btn,
.doc-btn {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
}

#rfpTable .doc-btn:hover:not(:disabled),
.doc-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* Ensure buttons don't wrap on smaller screens */
#rfpTable .actions {
  white-space: nowrap;
}




/* Loading indicator styles */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 4px;
  color: white;
  z-index: 10000;
  animation: slideIn 0.3s ease-out;
}

.notification.success {
  background-color: #4CAF50;
}

.notification.error {
  background-color: #f44336;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}





.crud-modal {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1rem;
}

/* Form column in general */
.form-column-full {
  width: 100%;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-group label {
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: var(--font-size-sm);
}

.collapsible-section {
  margin: 1rem 0;
}

.collapse-btn {
  width: 100%;
  padding: 8px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.collapse-btn:hover {
  background-color: #e9e9e9;
}

.collapse-icon {
  transition: transform 0.2s ease;
}

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

.additional-fields {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 0.5rem;
}




.rfp-column-visibility {
  position: relative;
  display: inline-block;
}

.rfp-toggle-btn {
  padding: 6px 12px;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  cursor: pointer;
}

.rfp-add-btn:hover {
  background-color: var(--primary);
}

.rfp-column-selector {
  display: none;
  position: fixed;
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 10px;
  z-index: 1999;
  /* below nav (2000) but above tables */
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  min-width: 180px;
  max-height: 400px;
  /* Default, will be adjusted dynamically */
  overflow-y: auto;
  overflow-x: hidden;
}

.rfp-column-selector.show {
  display: block;
  right: 10px;
}

.column-toggle-item {
  display: flex;
  align-items: center;
  padding: 5px;
  white-space: nowrap;
}

.column-toggle-item input[type="checkbox"] {
  margin-right: 8px;
}

.column-toggle-item label {
  cursor: pointer;
  user-select: none;
}


.hidden {
  display: none;
}


.nav-hidden {
  display: none !important;
}



/* Add this to your existing CSS */
.sort-indicator {
  font-size: var(--font-size-xs);
  margin-left: 5px;
  opacity: 0.7;
}

th[data-sort-direction="asc"] .sort-indicator {
  opacity: 1;
  color: #ffffff;
}

th[data-sort-direction="desc"] .sort-indicator {
  opacity: 1;
  color: #ffffff;
}

th:hover .sort-indicator {
  opacity: 1;
}





/* CSS for RFP filter settings - Enhanced Version */
:root {
  --primary-color: #4361ee;
  --primary-hover: #3a56d4;
  --text-color: #333;
  --light-text: #666;
  --border-color: #e0e0e0;
  --background-light: #ffffff;
  --background-hover: #f7f9fc;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  --border-radius: 8px;
}

/* Container for filter settings button */
.rfp-filter-settings {
  margin-left: 16px;
  display: inline-flex;
  align-items: center;
}

/* Settings button styling */
.rfp-settings-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rfp-settings-btn:hover {
  color: var(--dark);
  background-color: var(--light);
  border-color: #ccc;
}

/* Modal overlay */
.rfp-settings-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: backdropFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px) saturate(100%);
  }

  to {
    opacity: 1;
    backdrop-filter: blur(12px) saturate(120%);
  }
}

/* Fortune 500 Modal Button Group */
.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 40px;
  background: #f8fafc;
  border-top: 1px solid rgba(15, 44, 88, 0.06);
}

/* Paragraph in settings modal */
.rfp-settings-content p {
  margin: 0;
  padding: 0 24px 12px;
  font-size: 14px;
  color: #64748b;
}

.rfp-settings-content {
  background-color: white;
  margin: 40px auto;
  padding: 0;
  border: 0.5px solid rgba(15, 44, 88, 0.08);
  width: 460px;
  max-width: 95%;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(15, 44, 88, 0.12), 0 4px 12px rgba(15, 44, 88, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  animation: modalSlideIn 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.rfp-settings-content h3 {
  margin: 0;
  padding: 16px 24px 14px;
  font-weight: 700;
  font-size: 17px;
  border-bottom: 1px solid rgba(15, 44, 88, 0.06);
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(250, 251, 252, 0.98) 100%);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  letter-spacing: -0.03em;
  min-height: 50px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 1px 3px rgba(15, 44, 88, 0.04);
  color: #0f2c58;
}

.rfp-settings-content h3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(15, 44, 88, 0.4) 20%,
      rgba(59, 130, 246, 0.6) 50%,
      rgba(15, 44, 88, 0.4) 80%,
      transparent 100%);
  animation: headerGlow 3s ease-in-out infinite;
}

.rfp-settings-content h3::after {
  content: attr(data-text);
  background: linear-gradient(135deg, #0f2c58 0%, #1a4d8f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rfp-close-settings {
  color: #64748b;
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 44, 88, 0.1);
  z-index: 10;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 44, 88, 0.1);
  line-height: 1;
  font-weight: 600;
}

.rfp-close-settings::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.rfp-close-settings:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

.rfp-close-settings:hover::before {
  width: 100px;
  height: 100px;
}

.rfp-close-settings:active {
  transform: scale(0.95);
}

/* Checkbox container */
.rfp-filter-checkboxes {
  z-index: 1002;
  position: relative;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px;
  max-height: calc(85vh - 200px);
  overflow-y: auto;
  background: white;
}

.rfp-filter-checkboxes::-webkit-scrollbar {
  width: 6px;
}

.rfp-filter-checkboxes::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.rfp-filter-checkboxes::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.rfp-filter-checkboxes::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Checkbox label styling */
.rfp-filter-checkboxes label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  position: relative;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  background-color: white;
  border: 1px solid rgba(15, 44, 88, 0.08);
}

.rfp-filter-checkboxes label:hover {
  background-color: #f8fafc;
  border-color: rgba(15, 44, 88, 0.12);
}

/* Checkbox styling */
.rfp-filter-visibility {
  margin-right: 14px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  opacity: 1;
  pointer-events: auto;
  accent-color: #0f2c58;
  border-radius: 6px;
}

/* Label text */
.rfp-filter-checkboxes label span {
  font-size: 15px;
  color: #374151;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Save button */
.rfp-save-settings-btn {
  background: #0f2c58;
  color: white;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  float: none;
  font-weight: 600;
  transition: all 0.2s ease;
  margin: 0 24px 20px;
  box-shadow: 0 1px 2px rgba(15, 44, 88, 0.1);
  width: calc(100% - 48px);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  min-height: 40px;
}

.rfp-save-settings-btn:hover {
  background: #1a4d8f;
  box-shadow: 0 2px 4px rgba(15, 44, 88, 0.15);
}

.rfp-save-settings-btn:active {
  transform: scale(0.98);
}

/* Hide filter options that are not selected */
.toggle-option.rfp-hidden {
  display: none;
}

/* Scrollbar styling for the modal */
.rfp-settings-content::-webkit-scrollbar {
  width: 8px;
}

.rfp-settings-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.rfp-settings-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.rfp-settings-content::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}



/* Transfer button styles */
.transfer-buttons {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.transfer-win-btn,
.transfer-loss-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--font-size-xs);
  transition: all 0.15s ease;
}

.transfer-win-btn {
  background-color: #307032;
  color: white;
}

.transfer-win-btn:hover:not([disabled]) {
  background-color: #45a049;
}

.transfer-loss-btn {
  background-color: #9b2c2c;
  color: white;
}

.transfer-loss-btn:hover:not([disabled]) {
  background-color: #d32f2f;
}

.transfer-win-btn[disabled],
.transfer-loss-btn[disabled] {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
}

/* Disabled buttons for read-only users */
button:disabled,
.action-btn:disabled,
.edit-btn:disabled,
.delete-btn:disabled,
.doc-btn:disabled,
.rfp-add-btn:disabled,
.add-record-btn:disabled {
  background-color: #cccccc !important;
  color: #888888 !important;
  cursor: not-allowed !important;
  opacity: 0.4 !important;
}

button:disabled:hover,
.action-btn:disabled:hover,
.edit-btn:disabled:hover,
.delete-btn:disabled:hover,
.doc-btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Add this to your existing table styles */
#rfpTable td.transfer {
  padding: 5px;
  text-align: center;
}



/* Add this to your CSS */
.priority-flag {
  display: inline-flex;
  margin-right: 5px;
  vertical-align: middle;
  align-items: center;
}

.priority-flag svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* Priority filter styling */
.priority-toggle {
  margin-left: 8px;
  display: inline-flex;
  background-color: #ffffff;
  border-radius: 14px;
  border: 1px solid #ddd;
  overflow: hidden;
}

.priority-toggle .toggle-option {
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  user-select: none;
  display: flex;
  align-items: center;
  font-size: var(--font-size-xs);
}

.priority-toggle .toggle-option:not(:last-child) {
  border-right: 1px solid #ccc;
}

.priority-toggle .toggle-option:hover:not(.active) {
  background-color: #e0e0e0;
}

.priority-toggle .toggle-option.active {
  background-color: var(--primary);
  color: white;
}


/* Loss Details Modal & Design Win Modal Styling - World-Class Design */
#lossDetailsModal,
#designWinModal,
#regularWinModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  backdrop-filter: blur(12px) saturate(100%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
}

#lossDetailsModal.show,
#designWinModal.show {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  animation: backdropFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#lossDetailsModal .modal-content,
#designWinModal .modal-content,
#regularWinModal .modal-content {
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 16px;
  width: 560px;
  max-width: 92%;
  max-height: 90vh;
  box-shadow:
    0 0 0 1px rgba(15, 44, 88, 0.05),
    0 32px 64px rgba(15, 44, 88, 0.16),
    0 16px 32px rgba(15, 44, 88, 0.08),
    0 4px 12px rgba(15, 44, 88, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  position: relative;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
}

#lossDetailsModal .modal-content::before,
#designWinModal .modal-content::before,
#regularWinModal .modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #0f2c58;
  opacity: 0.8;
}

#lossDetailsModal .modal-header,
#designWinModal .modal-header,
#regularWinModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 18px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(250, 251, 252, 0.98) 100%);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  color: #0f2c58;
  border-bottom: 1px solid rgba(15, 44, 88, 0.06);
  min-height: 58px;
  position: relative;
  z-index: 2;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 1px 3px rgba(15, 44, 88, 0.04);
}

#lossDetailsModal .modal-header::before,
#designWinModal .modal-header::before,
#regularWinModal .modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(15, 44, 88, 0.4) 20%,
      rgba(59, 130, 246, 0.6) 50%,
      rgba(15, 44, 88, 0.4) 80%,
      transparent 100%);
  animation: headerGlow 3s ease-in-out infinite;
}

#lossDetailsModal .modal-header h3,
#designWinModal .modal-header h3,
#regularWinModal .modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f2c58 0%, #1a4d8f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 10px;
}

#lossDetailsModal .modal-header h3::before,
#designWinModal .modal-header h3::before,
#regularWinModal .modal-header h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #0f2c58 0%, #3b82f6 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

#lossDetailsModal .close-modal,
#designWinModal .close-modal,
#regularWinModal .close-modal {
  font-size: 18px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(15, 44, 88, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%);
  line-height: 1;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(15, 44, 88, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#lossDetailsModal .close-modal::before,
#designWinModal .close-modal::before,
#regularWinModal .close-modal::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

#lossDetailsModal .close-modal:hover,
#designWinModal .close-modal:hover,
#regularWinModal .close-modal:hover {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.95) 0%, rgba(254, 242, 242, 0.98) 100%);
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
  transform: rotate(90deg) scale(1.08);
  box-shadow:
    0 4px 12px rgba(239, 68, 68, 0.2),
    0 0 20px rgba(239, 68, 68, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#lossDetailsModal .close-modal:hover::before,
#designWinModal .close-modal:hover::before,
#regularWinModal .close-modal:hover::before {
  width: 100px;
  height: 100px;
}

#lossDetailsModal .close-modal:active,
#designWinModal .close-modal:active,
#regularWinModal .close-modal:active {
  transform: rotate(90deg) scale(0.95);
}

#lossDetailsModal form {
  padding: 32px;
  overflow-y: auto;
}

#lossDetailsModal form::-webkit-scrollbar,
#designWinModal form::-webkit-scrollbar,
#regularWinModal form::-webkit-scrollbar {
  width: 6px;
}

#lossDetailsModal form::-webkit-scrollbar-track,
#designWinModal form::-webkit-scrollbar-track,
#regularWinModal form::-webkit-scrollbar-track {
  background: #f3f4f6;
}

#lossDetailsModal form::-webkit-scrollbar-thumb,
#designWinModal form::-webkit-scrollbar-thumb,
#regularWinModal form::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

#lossDetailsModal .form-group,
#designWinModal .form-group,
#regularWinModal .form-group {
  margin-bottom: 24px;
  position: relative;
}

#lossDetailsModal label,
#designWinModal label,
#regularWinModal label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
  letter-spacing: 0.01em;
}

#lossDetailsModal .form-control,
#designWinModal .form-control,
#regularWinModal .form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #fafbfc;
  font-family: 'Inter', sans-serif;
  color: #1f2937;
}

#lossDetailsModal .form-control:hover,
#designWinModal .form-control:hover,
#regularWinModal .form-control:hover {
  border-color: #cbd5e1;
  background-color: #ffffff;
}

#lossDetailsModal .form-control:focus,
#designWinModal .form-control:focus,
#regularWinModal .form-control:focus {
  border-color: #0f2c58;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 44, 88, 0.08);
  outline: none;
}

#lossDetailsModal textarea.form-control {
  min-height: 120px;
  resize: vertical;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

#lossDetailsModal .form-actions,
#designWinModal .form-actions,
#regularWinModal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(15, 44, 88, 0.06);
}

#lossDetailsModal .btn,
#designWinModal .btn,
#regularWinModal .btn {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
  gap: 8px;
  min-height: 44px;
}

#lossDetailsModal .btn-primary,
#designWinModal .btn-primary,
#regularWinModal .btn-primary {
  background: linear-gradient(135deg, #0f2c58 0%, #1a4d8f 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(15, 44, 88, 0.2);
}

#lossDetailsModal .btn-primary:hover,
#designWinModal .btn-primary:hover,
#regularWinModal .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 44, 88, 0.3);
}

#lossDetailsModal .btn-primary:active,
#designWinModal .btn-primary:active,
#regularWinModal .btn-primary:active {
  transform: translateY(0);
}

#lossDetailsModal .btn-secondary,
#designWinModal .btn-secondary,
#regularWinModal .btn-secondary {
  background: #ffffff;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#lossDetailsModal .btn-secondary:hover,
#designWinModal .btn-secondary:hover,
#regularWinModal .btn-secondary:hover {
  background-color: var(--border);
  transform: translateY(-1px);
}

/* Design Win modal – formal tabular layout */
.design-win-table-wrapper {
  padding: 8px 24px 0 24px;
}

.design-win-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
  color: #111827;
}

.design-win-table th,
.design-win-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.design-win-table th {
  width: 40%;
  font-weight: 600;
  text-align: left;
  background-color: #f9fafb;
  color: #374151;
}

.design-win-table tr:last-child th,
.design-win-table tr:last-child td {
  border-bottom: none;
}

.design-win-table td .form-control {
  margin: 0;
}

.design-win-cess-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.design-win-checkbox-label {
  font-weight: 500;
  color: #4b5563;
  font-size: 13px;
}

.design-win-cess-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.design-win-cess-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2563eb;
}

.design-win-amount {
  font-weight: 600;
  color: #0f2c58;
  white-space: nowrap;
}

/* Design Win actions pinned to bottom of modal */
.design-win-actions {
  margin-top: auto;
  padding: 20px 28px 24px;
  border-top: 1px solid rgba(15, 44, 88, 0.06);
  background: #f9fafb;
}

/* Add a subtle animation when the modal appears */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#lossDetailsModal.show,
#designWinModal.show,
#regularWinModal.show {
  animation: fadeIn 0.2s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 576px) {

  #lossDetailsModal .modal-content,
  #designWinModal .modal-content,
  #regularWinModal .modal-content {
    width: 95%;
  }

  #lossDetailsModal .form-actions,
  #designWinModal .form-actions,
  #regularWinModal .form-actions {
    flex-direction: column-reverse;
  }

  #lossDetailsModal .btn,
  #designWinModal .btn,
  #regularWinModal .btn {
    width: 100%;
  }
}





/* Force column visibility to work */
table th[style*="display: none"],
table td[style*="display: none"] {
  display: none !important;
}



/* Add to your styles.css file */
.logo-container {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 70px;
  /* Adjust height as needed */
  margin-right: 20px;
  vertical-align: middle;
}




/* Losses table renders 11 columns from JS (Project Name, Lost To, Reason, BD
   Lead, Location, Month, Service Line, Area, Value w/o Taxes, Value w/ Taxes,
   Actions) but the historic per-column CSS below was sized for 9. With
   table-layout:fixed + width:100% those 11 columns squeeze into 9 columns'
   worth of space and cells clip: "80,51,67..." and half the Delete button.
   Switching to auto layout with min-width lets each column take its natural
   width and the .table-scroll-container's overflow-x:auto scrolls cleanly. */
#lossesTable {
  table-layout: auto;
  width: auto;
  min-width: 100%;
}

/* Actual DOM order (post-schema change; JS renders 12 columns incl. hidden id):
   1 id (hidden) | 2 Project Name | 3 Lost To | 4 Reason | 5 BD Lead |
   6 Location | 7 Month | 8 Service Line | 9 Area | 10 Value Without Taxes |
   11 Value With Taxes | 12 Actions.
   The old per-column rules were sized for the pre-schema 9-column layout and
   were clipping "80,51,67,563.00" to "80,51,67," on column 11 because a 140px
   Actions rule was landing on the value column. With table-layout:auto above
   and no per-column caps, cells size to their content. Kept: hide id,
   right-align money, center-align short atomic cells, cap Reason (paragraph
   text) so it wraps instead of dominating the row. */

#lossesTable th:nth-child(1),
#lossesTable td:nth-child(1) {
  display: none;
}

#lossesTable th:nth-child(4),
#lossesTable td:nth-child(4) {
  min-width: 160px;
  max-width: 260px;
  white-space: normal;
}

#lossesTable th:nth-child(6),
#lossesTable td:nth-child(6),
#lossesTable th:nth-child(7),
#lossesTable td:nth-child(7),
#lossesTable th:nth-child(8),
#lossesTable td:nth-child(8),
#lossesTable th:nth-child(9),
#lossesTable td:nth-child(9) {
  text-align: center;
  white-space: nowrap;
}

#lossesTable th:nth-child(10),
#lossesTable td:nth-child(10),
#lossesTable th:nth-child(11),
#lossesTable td:nth-child(11) {
  text-align: right;
  white-space: nowrap;
}

#lossesTable th:nth-child(12),
#lossesTable td:nth-child(12) {
  text-align: center;
  white-space: nowrap;
  min-width: 100px;
}

/* Fixed widths for Design Wins table to prevent layout shifts during filtering */
#designWinsTable {
  table-layout: fixed;
  width: 100%;
}

/* id column (hidden by default) - nth-child(1) */
#designWinsTable th:nth-child(1),
#designWinsTable td:nth-child(1) {
  width: 4%;
  min-width: 40px;
  text-align: center;
}

/* Project Name - nth-child(2) - left aligned */
#designWinsTable th:nth-child(2),
#designWinsTable td:nth-child(2) {
  width: 16%;
  min-width: 160px;
  text-align: left;
}

/* Repeat - nth-child(3) */
#designWinsTable th:nth-child(3),
#designWinsTable td:nth-child(3) {
  width: 6%;
  min-width: 60px;
  text-align: center;
}

/* BD Lead - nth-child(4) */
#designWinsTable th:nth-child(4),
#designWinsTable td:nth-child(4) {
  width: 8%;
  min-width: 80px;
}

/* Location - nth-child(5) */
#designWinsTable th:nth-child(5),
#designWinsTable td:nth-child(5) {
  width: 7%;
  min-width: 70px;
  text-align: center;
}

/* Month - nth-child(6) */
#designWinsTable th:nth-child(6),
#designWinsTable td:nth-child(6) {
  width: 7%;
  min-width: 70px;
  text-align: center;
}

/* Year column (hidden by default) - nth-child(7) */
#designWinsTable th:nth-child(7),
#designWinsTable td:nth-child(7) {
  width: 5%;
  min-width: 50px;
  text-align: center;
}

/* Service Line - nth-child(8) */
#designWinsTable th:nth-child(8),
#designWinsTable td:nth-child(8) {
  width: 8%;
  min-width: 80px;
}

/* Area (in sqft) - nth-child(9) */
#designWinsTable th:nth-child(9),
#designWinsTable td:nth-child(9) {
  width: 9%;
  min-width: 90px;
  text-align: center;
}

/* Value without taxes (hidden by default) - nth-child(10) */
#designWinsTable th:nth-child(10),
#designWinsTable td:nth-child(10) {
  width: 11%;
  min-width: 110px;
  text-align: right;
}

/* Value with taxes - nth-child(11) */
#designWinsTable th:nth-child(11),
#designWinsTable td:nth-child(11) {
  width: 12%;
  min-width: 120px;
  text-align: right;
}

/* Actions - nth-child(12) */
#designWinsTable th:nth-child(12),
#designWinsTable td:nth-child(12) {
  width: 7%;
  min-width: 70px;
  text-align: center;
}

/* Fixed widths for Design Losses table to prevent layout shifts during filtering */
#designLossesTable {
  table-layout: fixed;
  width: 100%;
}

/* id column (hidden by default) - nth-child(1) */
#designLossesTable th:nth-child(1),
#designLossesTable td:nth-child(1) {
  width: 4%;
  min-width: 40px;
  text-align: center;
}

/* Project Name - nth-child(2) - left aligned */
#designLossesTable th:nth-child(2),
#designLossesTable td:nth-child(2) {
  width: 14%;
  min-width: 140px;
  text-align: left;
}

/* Lost to - nth-child(3) */
#designLossesTable th:nth-child(3),
#designLossesTable td:nth-child(3) {
  width: 10%;
  min-width: 100px;
}

/* Reason - nth-child(4) */
#designLossesTable th:nth-child(4),
#designLossesTable td:nth-child(4) {
  width: 12%;
  min-width: 120px;
}

/* BD Lead - nth-child(5) */
#designLossesTable th:nth-child(5),
#designLossesTable td:nth-child(5) {
  width: 8%;
  min-width: 80px;
}

/* Location - nth-child(6) */
#designLossesTable th:nth-child(6),
#designLossesTable td:nth-child(6) {
  width: 7%;
  min-width: 70px;
  text-align: center;
}

/* Month - nth-child(7) */
#designLossesTable th:nth-child(7),
#designLossesTable td:nth-child(7) {
  width: 7%;
  min-width: 70px;
  text-align: center;
}

/* Year column (hidden by default) - nth-child(8) */
#designLossesTable th:nth-child(8),
#designLossesTable td:nth-child(8) {
  width: 5%;
  min-width: 50px;
  text-align: center;
}

/* Service Line - nth-child(9) */
#designLossesTable th:nth-child(9),
#designLossesTable td:nth-child(9) {
  width: 8%;
  min-width: 80px;
}

/* Area (in sqft) - nth-child(10) */
#designLossesTable th:nth-child(10),
#designLossesTable td:nth-child(10) {
  width: 9%;
  min-width: 90px;
  text-align: center;
}

/* Value with taxes - nth-child(11) */
#designLossesTable th:nth-child(11),
#designLossesTable td:nth-child(11) {
  width: 10%;
  min-width: 120px;
  text-align: right;
}

/* Repeat Client - nth-child(12) */
#designLossesTable th:nth-child(12),
#designLossesTable td:nth-child(12) {
  width: 6%;
  min-width: 60px;
  text-align: center;
}

/* Actions - nth-child(13) */
#designLossesTable th:nth-child(13),
#designLossesTable td:nth-child(13) {
  width: 7%;
  min-width: 70px;
  text-align: center;
}

/* Add to styles.css */

/* Disabled select option styling */
select option:disabled {
  opacity: 0.5;
  background-color: #ffffff;
  color: #999;
  cursor: not-allowed;
}

/* Design type specific styling */
.rfp-type-design .rfp-stage-ongoing {
  opacity: 0.5;
  background-color: #f0f0f0;
  pointer-events: none;
}

/* Design filter specific styling - removed custom background to match other tabs */

/* City Mode Toggle Styles */

.city-mode-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  white-space: nowrap;
  left: 330px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.city-mode-label:hover {
  background-color: rgba(15, 44, 88, 0.05);
  transform: translateY(-1px);
}

.city-mode-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.city-mode-checkbox {
  display: none;
}

.city-mode-switch {
  pointer-events: none;
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
  background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 44px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.city-mode-switch::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  top: 2px;
  left: 2px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 2px rgba(0, 0, 0, 0.1);
  transform-origin: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.city-mode-switch::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.city-mode-checkbox:checked+.city-mode-switch {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 0 2px rgba(15, 44, 88, 0.1),
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(15, 44, 88, 0.2);
  animation: cityToggleGlow 0.8s ease-out;
}

.city-mode-checkbox:checked+.city-mode-switch::before {
  transform: translateX(20px);
  box-shadow:
    0 4px 12px rgba(15, 44, 88, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  border: 1px solid rgba(15, 44, 88, 0.1);
}

.city-mode-checkbox:checked+.city-mode-switch::after {
  opacity: 0;
}

.city-mode-label:hover .city-mode-switch:not(:active) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.city-mode-label:hover .city-mode-switch::before {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2), 0 0 2px rgba(0, 0, 0, 0.1);
}

.city-mode-label:active .city-mode-switch {
  transform: translateY(0);
}

@keyframes cityToggleGlow {
  0% {
    box-shadow:
      0 0 0 0 rgba(15, 44, 88, 0.2),
      inset 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  50% {
    box-shadow:
      0 0 0 8px rgba(15, 44, 88, 0.1),
      inset 0 2px 4px rgba(0, 0, 0, 0.1),
      0 4px 16px rgba(15, 44, 88, 0.3);
  }

  100% {
    box-shadow:
      0 0 0 2px rgba(15, 44, 88, 0.1),
      inset 0 2px 4px rgba(0, 0, 0, 0.1),
      0 4px 12px rgba(15, 44, 88, 0.2);
  }
}

/* City filter toggle */
.rfp-city-filter-toggle {
  display: flex;
  flex-wrap: wrap;
  background-color: #ffffff;
  border-radius: 16px;
  border: 1px solid #ddd;
  overflow: hidden;
  font-size: var(--font-size-xs);
  min-height: 32px;
}

.rfp-city-filter-toggle .toggle-option {
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  min-width: 56px;
  user-select: none;
  font-size: var(--font-size-xs);
  font-weight: 500;
  background: #fff;
}

.rfp-city-filter-toggle .toggle-option:not(:last-child) {
  border-right: 1px solid #ccc;
}

.rfp-city-filter-toggle .toggle-option:hover:not(.active) {
  background-color: #e0e0e0;
}

.rfp-city-filter-toggle .toggle-option.active {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
}

/* Company Brief Nested Row Styles */
.brief-hover-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.brief-hover-row:hover {
  background-color: rgba(15, 44, 88, 0.05);
}

/* Company Brief Modal Styles */
.brief-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: overlayFadeIn 0.2s ease-out;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.brief-modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
  overflow: hidden;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.brief-modal-header {
  background: var(--primary);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.brief-modal-header h3 {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: white;
}

.brief-modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: var(--font-size-3xl);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  line-height: 1;
}

.brief-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.brief-modal-content {
  padding: 24px;
  min-height: 120px;
  max-height: calc(80vh - 180px);
  overflow-y: auto;
  flex: 1;
}

.brief-modal-content .brief-loading {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 40px 20px;
}

.brief-modal-content .brief-text {
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 15px;
}

.brief-modal-content .brief-text p {
  margin: 0 0 16px 0;
}

.brief-modal-content .brief-text p:last-child {
  margin-bottom: 0;
}

.brief-modal-content .brief-error {
  color: var(--danger);
  padding: 15px;
  background: rgba(220, 38, 38, 0.1);
  border-radius: var(--radius);
  text-align: center;
}

.brief-modal-feedback {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 16px;
  background: var(--light);
}

.brief-modal-feedback .feedback-btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-size: var(--font-size-lg);
  min-width: 60px;
}

.brief-modal-feedback .feedback-btn:hover {
  background: var(--light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.brief-modal-feedback .feedback-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.brief-modal-feedback .thumbs-up-btn.active {
  background: var(--success);
  border-color: var(--success);
}

.brief-modal-feedback .thumbs-down-btn.active {
  background: var(--danger);
  border-color: var(--danger);
}

/* Keep clickable row styling */
.brief-clickable-row td:first-child,
.brief-clickable-row .clickable-project-cell,
.clickable-project-cell {
  cursor: pointer !important;
  transition: color 0.2s ease;
  color: #0f2c58 !important;
  text-decoration: underline !important;
}

.brief-clickable-row td:first-child span,
.brief-clickable-row td:first-child div,
.brief-clickable-row .clickable-project-name,
.brief-clickable-row .clickable-project-container,
.clickable-project-name,
.clickable-project-container {
  color: #0f2c58 !important;
  text-decoration: underline !important;
}

.brief-clickable-row td:first-child:hover,
.brief-clickable-row td:first-child:hover span,
.brief-clickable-row td:first-child:hover div,
.brief-clickable-row .clickable-project-cell:hover,
.brief-clickable-row .clickable-project-name:hover,
.brief-clickable-row .clickable-project-container:hover,
.clickable-project-cell:hover,
.clickable-project-name:hover,
.clickable-project-container:hover {
  color: #1a4a7a !important;
}

/* More specific rules for wins table */
#winsTable .brief-clickable-row td:first-child,
#winsTable .clickable-project-cell,
#winsTable .brief-clickable-row .clickable-project-name,
#winsTable .brief-clickable-row .clickable-project-container {
  color: #0f2c58 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
}

/* Old nested row styles - keeping for backward compatibility but not used */
.brief-nested-row {
  display: none !important;
}

.brief-nested-row.show-brief {
  display: table-row !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 50px !important;
  max-height: none !important;
  width: 100% !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Force display when inline style is set - multiple selectors for maximum compatibility */
tr.brief-nested-row[style*="table-row"],
tr.brief-nested-row.show-brief,
tr#brief-* {
  display: table-row !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
}

/* Ensure the brief cell takes full width and has height */
.brief-nested-row td.brief-cell {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100px !important;
  height: auto !important;
  padding: 16px !important;
  display: table-cell !important;
}

.brief-nested-row.show-brief td.brief-cell {
  min-height: 100px !important;
  height: auto !important;
  padding: 16px !important;
}

.brief-container {
  min-height: 80px !important;
  display: block !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }

  to {
    opacity: 1;
    max-height: 500px;
  }
}

.brief-nested-row td {
  padding: 16px !important;
  border-top: 2px solid var(--primary);
  min-height: 100px !important;
  height: auto !important;
}

.brief-cell {
  background: white;
  border-left: 3px solid var(--primary);
}

.brief-container {
  padding: 16px !important;
  min-height: 80px !important;
  display: block !important;
  width: 100% !important;
}

.brief-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin: -16px -16px 12px -16px;
  background: var(--primary);
  color: white;
  border-bottom: 1px solid var(--border);
}

.brief-header-row h4 {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 600;
  color: white;
}

.brief-close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: var(--font-size-xl);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.brief-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.brief-content-row {
  padding: 12px 0;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 50px;
}

.brief-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.brief-loading {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-style: italic;
}

.brief-error {
  color: var(--danger);
  text-align: center;
  padding: 20px;
}

.brief-feedback-row {
  display: flex;
  gap: 8px;
  padding: 12px 0 0 0;
  border-top: 1px solid var(--border);
  justify-content: center;
}

.feedback-btn {
  background: white;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  font-size: var(--font-size-md);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
}

.feedback-btn:hover {
  background: var(--light-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.feedback-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.thumbs-up-btn.active {
  background: var(--success);
  border-color: var(--success);
}

.thumbs-down-btn.active {
  background: var(--danger);
  border-color: var(--danger);
}

/* Hit Rate Analysis Styles */
#hitRateAnalysis .filter-groups {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0;
}

#hitRateAnalysis .filter-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

#hitRateAnalysis .filter-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  margin: 0;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.project-summary-header h2 {
  margin: 0;
  color: #111827;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.project-summary-back-btn,
.project-summary-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: #111827;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.project-summary-view-toggle {
  background: #0f2c58;
}

.project-summary-view-toggle:hover {
  background: #1a4d8f;
}

.project-summary-back-btn:hover {
  background: #1f2937;
}

.project-summary-back-btn:active {
  background: #0f172a;
}

.project-summary-back-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.project-summary-back-btn:hover svg {
  transform: translateX(-2px);
}

.project-summary-content {
  padding: 2.5rem;
  overflow-y: auto;
  flex: 1;
  background: #f9fafb;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f9fafb;
}

.project-summary-content::-webkit-scrollbar {
  width: 6px;
}

.project-summary-content::-webkit-scrollbar-track {
  background: #f9fafb;
}

.project-summary-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.project-summary-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Enterprise JSON Format - Clean & Innovative */
.project-summary-json {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  gap: 1.5rem;
  max-width: 100%;
}

.summary-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #111827;
  transition: all 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.summary-item:hover {
  border-left-color: #2563eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.summary-key {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.key-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #111827;
  color: white;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.key-text {
  flex: 1;
  color: #111827;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-transform: none;
}

.summary-value {
  padding: 1.5rem;
  color: #374151;
  font-size: 0.9375rem;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.01em;
  position: relative;
}

.summary-value-content {
  position: relative;
}

.summary-value-content.collapsed {
  max-height: 5.1em;
  /* ~3 lines (1.7 line-height * 3) */
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

.summary-value-content.expanded {
  max-height: none;
  mask-image: none;
  -webkit-mask-image: none;
}

.summary-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding: 0.375rem 0.75rem;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.summary-read-more:hover {
  background: #e5e7eb;
  color: #111827;
  border-color: #d1d5db;
}

.summary-read-more:active {
  background: #d1d5db;
}

.summary-read-more.hidden {
  display: none;
}

.summary-value strong {
  color: #111827;
  font-weight: 600;
}

.summary-value br {
  margin-bottom: 0.75rem;
  display: block;
}

.summary-value .summary-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.summary-value .summary-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: #4b5563;
  line-height: 1.7;
}

.summary-value .summary-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #9ca3af;
  font-weight: 400;
}

.summary-value .summary-list li:first-child {
  padding-top: 0.25rem;
}

.summary-value .summary-list li:last-child {
  padding-bottom: 0.25rem;
}

.project-summary-points {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-value-content .project-summary-points {
  margin: 0;
}

.project-summary-points li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-primary);
  line-height: 1.7;
  font-size: var(--font-size-md);
  border-bottom: 1px solid #f1f5f9;
}

.project-summary-points li:last-child {
  border-bottom: none;
}

.project-summary-points li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: bold;
  font-size: 1.2em;
}

/* Project Summary Table Container */
.project-summary-table-container {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.project-summary-table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.project-summary-table-container thead {
  background: linear-gradient(135deg, #0f2c58 0%, #1a4d8f 100%);
  color: #ffffff;
}

.project-summary-table-container th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.project-summary-table-container th:first-child {
  border-top-left-radius: 6px;
}

.project-summary-table-container th:last-child {
  border-top-right-radius: 6px;
}

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

.project-summary-table-container tbody tr:hover {
  background-color: #f9fafb;
}

.project-summary-table-container tbody tr:last-child {
  border-bottom: none;
}

.project-summary-table-container td {
  padding: 12px 16px;
  vertical-align: top;
}

.project-summary-table-container td:first-child {
  font-weight: 600;
  color: #0f2c58;
  min-width: 200px;
  width: 25%;
}

.project-summary-table-container td:nth-child(2) {
  color: #4b5563;
  width: 75%;
}

/* Loading state */
.project-summary-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.project-summary-loading .loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #0f2c58;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.project-summary-loading p {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes overlayFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Hit Rate Analysis Styles */
#hitRateAnalysis .filter-groups {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0;
}

#hitRateAnalysis .filter-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

#hitRateAnalysis .filter-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  margin: 0;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

#hitRateAnalysis .filter-group label[for="hitRateLocationFilter"] {
  margin-right: 0.5rem;
}

#hitRateAnalysis .filter-select {
  min-width: 160px;
  padding: 0.375rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  font-size: 0.8125rem;
  color: #111827;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 10px;
  padding-right: 2rem;
  height: 32px;
}

/* Custom Multi-Select Dropdown */
.custom-multiselect-wrapper {
  position: relative;
  min-width: 180px;
  width: auto;
}

#hitRateAnalysis .custom-multiselect-wrapper {
  min-width: 180px;
  width: auto;
}

.custom-multiselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  font-size: 0.8125rem;
  color: #111827;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 32px;
  min-height: 32px;
}

.custom-multiselect-trigger:hover {
  border-color: #9ca3af;
}

.custom-multiselect-trigger.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.custom-multiselect-trigger svg {
  width: 12px;
  height: 12px;
  color: #6b7280;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-multiselect-trigger.active svg {
  transform: rotate(180deg);
}

.multiselect-selected-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-multiselect-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 100%;
  width: 100%;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: visible;
  display: none;
  padding: 0.25rem;
  box-sizing: border-box;
}

.custom-multiselect-dropdown.show {
  display: block;
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  line-height: 1.4;
  min-height: 28px;
  width: 100%;
  box-sizing: border-box;
}

.multiselect-option:hover {
  background-color: #f3f4f6;
}

.multiselect-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2563eb;
  margin: 0;
  flex-shrink: 0;
  display: block;
}

.custom-multiselect-dropdown .multiselect-option label {
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
  color: #111827 !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  user-select: none;
  flex: 1;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  width: auto !important;
  min-width: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

.custom-multiselect-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-multiselect-dropdown::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.custom-multiselect-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.custom-multiselect-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

#hitRateAnalysis .filter-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}


#hitRateAnalysis .chart-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.25rem 1.5rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

#hitRateAnalysis #hitRateChart {
  width: 100%;
  overflow: visible;
  position: relative;
}

.hit-rate-details {
  margin-top: 3rem;
}

.hit-rate-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.hit-rate-month-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.hit-rate-month-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}

.hit-rate-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f3f4f6;
}

.hit-rate-month-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.01em;
}

.hit-rate-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.rfp-badge {
  background: #dbeafe;
  color: #1e40af;
}

.wins-badge {
  background: #d1fae5;
  color: #065f46;
}

.hit-rate-badge {
  background: #fef3c7;
  color: #92400e;
}

.hit-rate-details-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.rfp-list h4,
.wins-list h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
}

.rfp-list,
.wins-list {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  max-height: 300px;
  overflow: hidden;
}

.rfp-list ul,
.wins-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.5rem;
}

/* Custom scrollbar styling for RFP and Wins lists */
.rfp-list ul::-webkit-scrollbar,
.wins-list ul::-webkit-scrollbar {
  width: 6px;
}

.rfp-list ul::-webkit-scrollbar-track,
.wins-list ul::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.rfp-list ul::-webkit-scrollbar-thumb,
.wins-list ul::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.rfp-list ul::-webkit-scrollbar-thumb:hover,
.wins-list ul::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Firefox scrollbar styling */
.rfp-list ul,
.wins-list ul {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.rfp-list li,
.wins-list li {
  padding: 0.5rem 0;
  color: #4b5563;
  font-size: 0.875rem;
  line-height: 1.6;
  border-bottom: 1px solid #e5e7eb;
}

.rfp-list li:last-child,
.wins-list li:last-child {
  border-bottom: none;
}

.rfp-list li::before {
  content: '📋';
  margin-right: 0.5rem;
}

.wins-list li::before {
  content: '✅';
  margin-right: 0.5rem;
}

.no-data {
  color: #9ca3af;
  font-style: italic;
  margin: 0;
  padding: 0.5rem 0;
}
/* Premium Graph Tooltip Styles */
.premium-tooltip {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0;
    overflow: hidden;
    min-width: 180px;
    font-family: "Inter", sans-serif;
}

.tooltip-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 15px;
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tooltip-body {
    padding: 12px 15px;
}

.tooltip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tooltip-row:last-child {
    margin-bottom: 0;
}

.tooltip-row.highlight {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

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

.dot.rfp { background: #6366f1; }
.dot.win { background: #10b981; }
.dot.rate { background: #f59e0b; }

.tooltip-row .label {
    flex: 1;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.tooltip-row .value {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.tooltip-row.highlight .value {
    color: #f59e0b;
    font-size: 14px;
}

.tooltip-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 8px 0;
}

/* =========================================================
   Mobile card layout — Wins / Losses / Design Wins / Losses
   Stacks each row as a readable card on phones
   ========================================================= */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 0.75rem;
    overflow-x: hidden;
    max-width: 100vw;
  }

  #wins .header-container,
  #losses .header-container,
  #designWins .header-container,
  #designLosses .header-container {
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }

  #wins .header-container h2,
  #losses .header-container h2,
  #designWins .header-container h2,
  #designLosses .header-container h2 {
    font-size: 1.25rem;
    margin: 0;
  }

  #wins .controls-container,
  #losses .controls-container,
  #designWins .controls-container,
  #designLosses .controls-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  #wins .table-scroll-container,
  #losses .table-scroll-container,
  #designWins .table-scroll-container,
  #designLosses .table-scroll-container {
    max-height: none;
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
    width: 100%;
  }

  #winsTable,
  #lossesTable,
  #designWinsTable,
  #designLossesTable {
    table-layout: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
  }

  #winsTable thead,
  #lossesTable thead,
  #designWinsTable thead,
  #designLossesTable thead {
    display: none;
  }

  #winsTable tbody,
  #lossesTable tbody,
  #designWinsTable tbody,
  #designLossesTable tbody {
    display: block;
    width: 100%;
  }

  #winsTable tbody tr:not(.no-data-row):not(.skeleton-table-row),
  #lossesTable tbody tr:not(.no-data-row):not(.skeleton-table-row),
  #designWinsTable tbody tr:not(.no-data-row):not(.skeleton-table-row),
  #designLossesTable tbody tr:not(.no-data-row):not(.skeleton-table-row) {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--border-2, #e5e7eb);
    border-radius: 12px;
    margin: 0 0 12px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(15, 44, 88, 0.08);
  }

  #winsTable tbody tr.total-row,
  #lossesTable tbody tr.total-row,
  #designWinsTable tbody tr.total-row,
  #designLossesTable tbody tr.total-row {
    background: #f8fafc;
    border: 2px solid var(--primary, #0f2c58);
    position: static;
    box-shadow: none;
  }

  #winsTable tbody tr.no-data-row,
  #lossesTable tbody tr.no-data-row,
  #designWinsTable tbody tr.no-data-row,
  #designLossesTable tbody tr.no-data-row {
    display: block;
    background: #f9fafb;
    border-radius: 12px;
    padding: 1rem;
  }

  #winsTable tbody tr:not(.no-data-row):not(.skeleton-table-row) > td,
  #lossesTable tbody tr:not(.no-data-row):not(.skeleton-table-row) > td,
  #designWinsTable tbody tr:not(.no-data-row):not(.skeleton-table-row) > td,
  #designLossesTable tbody tr:not(.no-data-row):not(.skeleton-table-row) > td {
    display: flex;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(15, 44, 88, 0.06) !important;
    text-align: right !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 0.92rem;
    line-height: 1.4;
  }

  #winsTable tbody tr:not(.no-data-row):not(.skeleton-table-row) > td:last-child,
  #lossesTable tbody tr:not(.no-data-row):not(.skeleton-table-row) > td:last-child,
  #designWinsTable tbody tr:not(.no-data-row):not(.skeleton-table-row) > td:last-child,
  #designLossesTable tbody tr:not(.no-data-row):not(.skeleton-table-row) > td:last-child {
    border-bottom: none !important;
  }

  #winsTable td::before,
  #lossesTable td::before,
  #designWinsTable td::before,
  #designLossesTable td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    max-width: 42%;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
    text-align: left;
    line-height: 1.35;
  }

  #winsTable td.mobile-field-hidden-label,
  #lossesTable td.mobile-field-hidden-label,
  #designWinsTable td.mobile-field-hidden-label,
  #designLossesTable td.mobile-field-hidden-label {
    display: none !important;
  }

  #winsTable td.mobile-primary-field,
  #lossesTable td.mobile-primary-field,
  #designWinsTable td.mobile-primary-field,
  #designLossesTable td.mobile-primary-field {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-bottom: 10px !important;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(15, 44, 88, 0.12) !important;
    text-align: left !important;
    font-size: 1rem;
    font-weight: 700;
    color: #0f2c58;
  }

  #winsTable td.mobile-primary-field::before,
  #lossesTable td.mobile-primary-field::before,
  #designWinsTable td.mobile-primary-field::before,
  #designLossesTable td.mobile-primary-field::before {
    max-width: 100%;
    flex: none;
    margin-bottom: 2px;
  }

  #winsTable td.mobile-actions-cell,
  #lossesTable td.mobile-actions-cell,
  #designWinsTable td.mobile-actions-cell,
  #designLossesTable td.mobile-actions-cell,
  #winsTable td.table-actions,
  #lossesTable td.table-actions,
  #designWinsTable td.actions,
  #designLossesTable td.actions {
    justify-content: flex-end;
    align-items: center;
    padding-top: 12px !important;
    gap: 8px;
  }

  #winsTable td.mobile-actions-cell::before,
  #lossesTable td.mobile-actions-cell::before,
  #designWinsTable td.mobile-actions-cell::before,
  #designLossesTable td.mobile-actions-cell::before,
  #winsTable td.table-actions::before,
  #lossesTable td.table-actions::before,
  #designWinsTable td.actions::before,
  #designLossesTable td.actions::before {
    content: none;
  }

  #winsTable .clickable-project-container,
  #winsTable .clickable-project-cell {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  #winsTable .action-btn,
  #lossesTable .action-btn,
  #designWinsTable .action-btn,
  #designLossesTable .action-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
  }

  #wins .toggle-switch-container,
  #losses .toggle-switch-container,
  #designWins .toggle-switch-container,
  #designLosses .toggle-switch-container {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .dashboard-container {
    padding: 0.5rem;
  }

  #winsTable tbody tr:not(.no-data-row):not(.skeleton-table-row),
  #lossesTable tbody tr:not(.no-data-row):not(.skeleton-table-row),
  #designWinsTable tbody tr:not(.no-data-row):not(.skeleton-table-row),
  #designLossesTable tbody tr:not(.no-data-row):not(.skeleton-table-row) {
    padding: 10px 12px;
    margin-bottom: 10px;
  }

  #winsTable td::before,
  #lossesTable td::before,
  #designWinsTable td::before,
  #designLossesTable td::before {
    flex: 0 0 38%;
    max-width: 38%;
    font-size: 0.72rem;
  }
}

/* ============================================================================
   Users admin section (#users). Visible only to access_level == 3; the reveal
   itself is done in JS. Kept intentionally light — reuses .data-table +
   .table-scroll-container patterns from the rest of the app.
   ========================================================================= */
/* --- Add User panel ------------------------------------------------------- */
#users .users-add-panel {
  background: white;
  border: 1px solid var(--border-2, #e5e7eb);
  border-radius: 10px;
  padding: 20px 24px 22px;
  margin: 16px 0 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
#users .users-add-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef1f5;
}
#users .users-add-panel-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e3a5f;
  letter-spacing: 0.2px;
}

/* Grid layout: 4 columns on desktop, collapses on narrow screens. Each column
   sizes to its own content plus a floor width, so inputs stop stretching to
   100% (which the global input rules were forcing). */
#users .users-add-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(200px, 1.4fr) minmax(170px, 1fr) auto;
  gap: 14px 16px;
  align-items: end;
}
@media (max-width: 900px) {
  #users .users-add-form { grid-template-columns: 1fr 1fr; }
  #users .users-add-form .users-add-submit { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  #users .users-add-form { grid-template-columns: 1fr; }
}

#users .users-add-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
#users .users-add-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Explicit width + box-sizing overrides the app-wide input:100% rules. */
#users .users-add-form input[type="text"],
#users .users-add-form input[type="password"],
#users .users-add-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  transition: border-color 120ms, box-shadow 120ms;
}
#users .users-add-form input:focus,
#users .users-add-form select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
#users .users-add-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

#users .users-add-submit { align-self: end; }
#users .users-add-form .users-add-btn {
  height: 40px;
  padding: 0 20px;
  border: none;
  background: #1e3a5f;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 120ms, transform 60ms;
  white-space: nowrap;
}
#users .users-add-form .users-add-btn:hover { background: #17304d; }
#users .users-add-form .users-add-btn:active { transform: translateY(1px); }

#users .users-status {
  font-size: 0.82rem;
  color: #64748b;
  min-height: 1em;
}
#users .users-status-ok { color: #167a3b; font-weight: 600; }
#users .users-status-err { color: #b00020; font-weight: 600; }

#users #usersTable td { padding: 8px 12px; vertical-align: middle; }
#users .users-active { color: #167a3b; font-weight: 600; }
#users .users-inactive { color: #b00020; font-weight: 600; }
#users .users-access-select {
  padding: 4px 8px;
  border: 1px solid var(--border-2, #cbd5e1);
  border-radius: 4px;
  font-size: 0.85rem;
}
#users .users-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#users .users-actions button {
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid var(--border-2, #cbd5e1);
  background: #f8fafc;
  border-radius: 4px;
  color: #1e3a5f;
}
#users .users-actions button.users-toggle-active { background: #fff4e5; border-color: #f0b56b; }
#users .users-actions button.users-reset-pwd { background: #eef4ff; border-color: #9bb6e0; }
#users .users-actions button:hover:not(:disabled) { filter: brightness(0.96); }
#users .users-actions button:disabled { opacity: 0.5; cursor: not-allowed; }

