/* ==========================================================================
   APPLE LIQUID GLASS DESIGN SYSTEM
   Ocean Blue Edition - Bold Glass with Cinematic Animations
   ========================================================================== */

:root {
  /* ===== COLOR PALETTE ===== */
  --primary-color: #0a2842;
  --primary-hover: #1a252f;
  --primary-light: #1488ba;
  --secondary-color: #585858;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --background-color: #f0f4f8;
  --surface-color: rgba(255, 255, 255, 0.75);
  --border-color: rgba(255, 255, 255, 0.3);
  --text-primary: #000000;
  --text-secondary: #585858;
  --text-light: #ffffff;

  /* ===== GLASS EFFECT SYSTEM ===== */
  --glass-blur: 25px;
  --glass-saturation: 180%;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-bg-dark: rgba(0, 95, 150, 0.88);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-border-subtle: rgba(255, 255, 255, 0.18);
  --glass-highlight: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  --glass-inner-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);

  /* ===== SHADOW SYSTEM ===== */
  --shadow-sm: 0 2px 8px rgba(0, 95, 150, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 95, 150, 0.12), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 95, 150, 0.18), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 16px 48px rgba(0, 95, 150, 0.22), 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(20, 136, 186, 0.35);
  --shadow-glow-sm: 0 0 10px rgba(20, 136, 186, 0.25);

  /* ===== ANIMATION TIMING ===== */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --duration-instant: 100ms;
  --duration-micro: 150ms;
  --duration-fast: 200ms;
  --duration-standard: 300ms;
  --duration-emphasis: 500ms;
  --duration-dramatic: 700ms;
  --stagger-delay: 60ms;

  /* ===== LAYOUT ===== */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-radius-pill: 100px;
  --transition: all var(--duration-fast) var(--ease-smooth);
  --transition-spring: all var(--duration-standard) var(--ease-spring);

  /* ===== Z-INDEX SCALE ===== */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 900;
  --z-modal: 1000;
  --z-toast: 1100;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes glassReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  }
}

@keyframes headerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }

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

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

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

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

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

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

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: var(--shadow-md), 0 0 0 rgba(20, 136, 186, 0);
  }

  50% {
    box-shadow: var(--shadow-md), var(--shadow-glow-sm);
  }
}

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

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

@keyframes backgroundGradientShift {

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

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

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Display',
    'SF Pro Text',
    'Segoe UI',
    'Inter',
    sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(20, 136, 186, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 95, 150, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 50% 0%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
    linear-gradient(180deg, #f8fafc 0%, #e8f0f8 50%, #f0f4f8 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: fadeIn var(--duration-emphasis) var(--ease-smooth);
}

/* Subtle noise texture for glass authenticity */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 9999;
}

/* Selection styling */
::selection {
  background: rgba(20, 136, 186, 0.25);
  color: var(--text-primary);
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== GLASS HEADER ===== */
.app-header {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border-bottom: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-md),
    var(--glass-inner-shadow);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  animation: headerSlideDown var(--duration-emphasis) var(--ease-out-expo);
}

/* Glass highlight effect on header */
.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  pointer-events: none;
}

.header-content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.app-title {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

.title-icon {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 95, 150, 0.2));
  transition: var(--transition-spring);
}

.app-title:hover .title-icon {
  transform: scale(1.1) rotate(-5deg);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  flex: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  animation: fadeInUp var(--duration-emphasis) var(--ease-out-expo);
  animation-delay: 0.15s;
  animation-fill-mode: backwards;
}

/* ==========================================================================
   GLASS BUTTON SYSTEM
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  height: 34px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-spring);
  text-decoration: none;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

/* Glass highlight overlay on all buttons */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, transparent 100%);
  pointer-events: none;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--secondary-color) !important;
  color: white !important;
  transform: none !important;
}

.btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Active/pressed state for all buttons */
.btn:active:not(:disabled) {
  transform: scale(0.97) !important;
}

/* ===== PRIMARY BUTTON ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), var(--shadow-glow-sm);
}

/* ===== SECONDARY BUTTON (Glass) ===== */
.btn-secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  color: var(--primary-color);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), var(--glass-inner-shadow);
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), var(--shadow-glow-sm);
  border-color: transparent;
}

/* ===== OUTLINE BUTTON ===== */
.btn-outline {
  background: rgba(255, 255, 255, 0.5);
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-outline::before {
  background: none;
}

.btn-outline:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), var(--shadow-glow-sm);
}

/* ===== DANGER BUTTON ===== */
.btn-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
  color: white;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #f87171 0%, var(--danger-color) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), 0 0 12px rgba(239, 68, 68, 0.3);
}

/* ===== SUCCESS BUTTON ===== */
.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), 0 0 12px rgba(34, 197, 94, 0.3);
}

/* ===== WARNING BUTTON ===== */
.btn-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
  color: #000000;
  font-weight: 600;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-warning:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24 0%, var(--warning-color) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), 0 0 12px rgba(245, 158, 11, 0.3);
}

/* ===== ADMIN BUTTON (Premium Glass) ===== */
.btn-admin {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  font-weight: 600;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-admin:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light) 0%, #0891b2 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Shimmer effect on admin button */
.btn-admin::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--duration-emphasis) var(--ease-smooth);
}

.btn-admin:hover::after {
  left: 100%;
}

/* ===== SMALL BUTTON ===== */
.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  border-radius: var(--border-radius-sm);
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  cursor: pointer;
  transition: var(--transition-spring);
  box-shadow: var(--shadow-sm);
}

.btn-small::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  pointer-events: none;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.btn-small:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

.btn-small:active {
  transform: scale(0.95);
}

/* ===== CLEAR FILTERS BUTTON ===== */
#clearFiltersBtn {
  background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
  color: #000000;
  font-weight: 600;
  border: none;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#clearFiltersBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24 0%, var(--warning-color) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), 0 0 12px rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   GLASS LIST FIELDS & CANDIDATE DATA
   ========================================================================== */

.list-field {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm), var(--glass-inner-shadow);
  animation: glassReveal var(--duration-emphasis) var(--ease-out-expo);
  animation-fill-mode: backwards;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.list-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-color);
  margin: 0;
  letter-spacing: -0.01em;
}

.list-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--glass-border-subtle);
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.visibility-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.sort-field-select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 100px;
  cursor: pointer;
  transition: var(--transition);
}

.sort-field-select:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--primary-light);
}

.sort-field-select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 136, 186, 0.15);
}

.sort-direction-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0.3rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-spring);
  box-shadow: var(--shadow-sm);
}

.sort-direction-btn:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  transform: translateY(-1px) scale(1.05);
  box-shadow: var(--shadow-md);
}

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

.show-hidden-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.list-summary {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--glass-border-subtle);
}

.category-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.summary-item {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius-pill);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
  transition: var(--transition);
}

.summary-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.list-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  transition: all var(--duration-standard) var(--ease-smooth);
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  border: 1px solid var(--glass-border-subtle);
  transition: var(--transition-spring);
  animation: fadeInUp var(--duration-standard) var(--ease-out-expo);
  animation-fill-mode: backwards;
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--glass-border);
}

.list-item-text {
  flex: 1;
  margin-right: 0.75rem;
  word-break: break-word;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.list-item-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.list-add-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.list-add-form input {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
}

.list-add-form input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 136, 186, 0.15);
  background: rgba(255, 255, 255, 0.9);
}

.list-add-form .btn-small {
  height: auto;
  padding: 0.5rem 0.75rem;
}

/* ===== GLASS CANDIDATE FORM ===== */
.candidate-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px) saturate(150%);
  -webkit-backdrop-filter: blur(15px) saturate(150%);
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.candidate-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.candidate-form .form-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.candidate-form .form-input,
.candidate-form .form-select {
  padding: 0.5rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
}

.candidate-form .form-input:hover,
.candidate-form .form-select:hover {
  border-color: var(--primary-light);
  background: rgba(255, 255, 255, 0.85);
}

.candidate-form .form-input:focus,
.candidate-form .form-select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 136, 186, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.candidate-form .candidate-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.candidate-form .form-select optgroup {
  font-weight: 600;
  font-size: 0.8rem;
  background: var(--background-color);
  padding: 0.4rem;
}

.candidate-form .form-select option {
  padding: 0.4rem;
  font-size: 0.8rem;
}

.candidate-form .form-select optgroup option {
  padding-left: 0.75rem;
  font-weight: normal;
}

.candidate-form .form-group small {
  font-style: italic;
  opacity: 0.8;
  font-size: 0.65rem;
}

/* Visual feedback for auto-updated fields */
.form-select.auto-updated {
  background: #e8f5e8 !important;
  transition: background 1s ease-out;
}

/* Loading state for list operations */
.list-field.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.list-field.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

/* ==========================================================================
   GLASS FORM SYSTEM
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.form-input,
.form-select,
.form-textarea {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--primary-light);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 136, 186, 0.15), var(--shadow-sm);
  background: rgba(255, 255, 255, 0.95);
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* Warranty exempt field styling (ProjectValue when Subcategory is "Garanciális teljesítés") */
.form-input.warranty-exempt {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
  border-color: #ddd;
}

/* Monthly Target Field Styles */
.monthly-target-group {
  background: linear-gradient(to right, #f8f9fa, #ffffff);
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 2px solid #e3e7eb;
  margin-bottom: 0.5rem;
}

.monthly-target-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.monthly-target-field {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: var(--border-radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
  transition: var(--transition);
}

.monthly-target-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.monthly-target-field[readonly] {
  background: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}

.monthly-target-container {
  width: 100%;
}

.monthly-target-container small {
  display: block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: #fef3c7;
  border-radius: 4px;
  border: 1px solid #fcd34d;
}

.form-input:invalid {
  border-color: var(--danger-color);
}

.record-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

/* ==========================================================================
   GLASS CONTROLS SECTION
   ========================================================================== */

.controls-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp var(--duration-standard) var(--ease-out-expo);
  animation-delay: 0.2s;
  animation-fill-mode: backwards;
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.25rem;
  border: 1px solid rgba(0, 95, 150, 0.12);
  border-radius: var(--border-radius-pill);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  transition: var(--transition);
  box-shadow: var(--shadow-sm), inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.search-input:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 95, 150, 0.25);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 136, 186, 0.15), var(--shadow-md);
  background: rgba(255, 255, 255, 0.9);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-input:focus+.search-icon,
.search-container:hover .search-icon {
  color: var(--primary-light);
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.record-count {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius-pill);
  border: 1px solid var(--glass-border-subtle);
}

/* ==========================================================================
   GLASS FILTERS SECTION
   ========================================================================== */

.filters-section {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), var(--glass-inner-shadow);
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  overflow: hidden;
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
  transition: all var(--duration-standard) var(--ease-smooth);
  animation: glassReveal var(--duration-emphasis) var(--ease-out-expo);
  animation-delay: 0.25s;
  animation-fill-mode: backwards;
}

.filters-section.hidden {
  max-height: 0;
  padding: 0 1rem;
  margin-bottom: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

/* Ultra-compact filters container */
.filters-container-ultra-compact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Legacy container for compatibility */
.filters-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Enhanced filters container */
.filters-container-enhanced {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-row.ultra-compact {
  gap: 0.3rem;
  margin-bottom: 0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 140px;
}

.filter-group.compact {
  gap: 0.2rem;
  min-width: 120px;
}

.filter-group.ultra-compact {
  gap: 0.05rem;
  min-width: 130px;
  flex: 1;
}

.filter-group.ultra-compact.date-group {
  min-width: 160px;
}

/* Filter buttons group - horizontal layout */
.filter-buttons-group {
  flex-direction: row !important;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 320px;
  justify-content: flex-start;
}

.filter-buttons-group.ultra-compact {
  min-width: 320px;
  gap: 0.1rem;
}

.filter-buttons-group .btn {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  height: 32px;
  flex: 0 0 auto;
  min-width: 95px;
  margin: 0;
}

.filter-buttons-group.ultra-compact .btn {
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  height: 28px;
  min-width: 95px;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.filter-group.ultra-compact .filter-label {
  font-size: 0.65rem;
  margin-bottom: 0.1rem;
}

.filter-select,
.filter-input,
.filter-date {
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(0, 95, 150, 0.15);
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
  height: 34px;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filter-group.ultra-compact .filter-select,
.filter-group.ultra-compact .filter-input,
.filter-group.ultra-compact .filter-date {
  padding: 0.3rem 0.4rem;
  font-size: 0.65rem;
  height: 30px;
  border: 1px solid rgba(0, 95, 150, 0.15);
}

.filter-select:hover,
.filter-input:hover,
.filter-date:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--primary-light);
}

.filter-select:focus,
.filter-input:focus,
.filter-date:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 136, 186, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.date-range {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.date-range span {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.filter-date {
  flex: 1;
}

.date-filters {
  padding-top: 0.2rem;
  border-top: 1px solid rgba(156, 163, 175, 0.2);
}

.date-filters.ultra-compact {
  padding-top: 0.15rem;
  border-top: 1px solid rgba(156, 163, 175, 0.15);
}

/* Tablet responsive design for ultra-compact filters */
@media (max-width: 1024px) and (min-width: 769px) {
  .filter-row.ultra-compact {
    flex-wrap: wrap;
  }

  .filter-group.ultra-compact {
    min-width: 45%;
    flex: 0 0 45%;
  }

  .filter-group.ultra-compact.date-group {
    min-width: 48%;
    flex: 0 0 48%;
  }
}

/* ==========================================================================
   WEEK SELECTOR
   ========================================================================== */

.week-selector-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-start;
  min-width: 160px;
}

.week-selector-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.week-date-picker {
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  background: var(--surface-color);
  transition: var(--transition);
  min-width: 130px;
  cursor: pointer;
}

.week-date-picker:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.1);
}

.week-display {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.2rem 0.4rem;
  background: var(--background-color);
  border-radius: 3px;
  border: 1px solid var(--border-color);
  min-height: 1.3rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* ==========================================================================
   REFRESH RIBBON
   ========================================================================== */

.refresh-ribbon {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  padding: 0.1rem 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   GLASS SUMMARY SECTION
   ========================================================================== */

.summary-section {
  max-width: 1500px;
  margin: 0 auto 0.75rem auto;
}

.summary-section-single-row {
  max-width: 1500px;
  margin: 0 auto 0.75rem auto;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), var(--glass-inner-shadow);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: glassReveal var(--duration-emphasis) var(--ease-out-expo);
  animation-delay: 0.3s;
  animation-fill-mode: backwards;
}

.summary-toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.summary-toggle-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.summary-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.summary-totals-horizontal {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}

.summary-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid var(--primary-color);
  border: 1px solid var(--glass-border-subtle);
  border-left: 3px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-spring);
}

.summary-card:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.summary-totals-horizontal .summary-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 100px;
}

.summary-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.summary-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: right;
}

.summary-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.summary-content {
  transition: var(--transition);
}

.summary-content[style*='display: none'] {
  display: none !important;
}

.group-summary h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.25rem;
}

.group-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  border: 1px solid var(--glass-border-subtle);
  transition: var(--transition);
}

.group-item:hover {
  background: rgba(255, 255, 255, 0.75);
}

.group-item-label {
  color: var(--text-secondary);
}

.group-item-value {
  font-weight: 600;
  color: var(--primary-color);
}

/* ==========================================================================
   GLASS TABLE STYLES
   ========================================================================== */

.table-container {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), var(--glass-inner-shadow);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 200px;
  animation: glassReveal var(--duration-emphasis) var(--ease-out-expo);
  animation-delay: 0.35s;
  animation-fill-mode: backwards;
}

/* Glass highlight on table container */
.table-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255, 255, 255, 0.6) 50%, transparent 90%);
  pointer-events: none;
  z-index: 10;
}

.table-wrapper {
  flex: 1;
  height: 100%;
  width: 100%;
  overflow: auto;
  position: relative;
  min-height: 0;
  isolation: isolate;
}

.data-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  font-size: 11px;
  table-layout: fixed;
  position: relative;
}

.data-table th,
.data-table td {
  padding: 0.35rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  min-width: 80px;
}

.data-table th {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  font-weight: 600;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 95, 150, 0.25);
  border-bottom: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  user-select: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
  letter-spacing: 0.01em;
}

/* Glass inner highlight on header */
.data-table th::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
}

.data-table th:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.data-table th.sorted {
  background: linear-gradient(135deg, var(--primary-light) 0%, #0891b2 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Enhanced sticky header support for different table contexts */
.table-container .data-table thead th,
#projectTable thead th,
#dataTable thead th {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
}

/* Ensure sticky headers work on mobile and smaller screens */
@media (max-width: 768px) {
  .data-table th {
    position: sticky;
    top: 0;
    z-index: 1000;
    font-size: 0.8rem;
    padding: 0.5rem 0.35rem;
  }
}

.data-table tbody tr {
  transition: var(--transition-spring);
  cursor: pointer;
  background: transparent;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.3);
}

.data-table tbody tr:hover {
  background: rgba(20, 136, 186, 0.08);
  transform: scale(1.002);
}

.data-table tbody tr.highlighted {
  background: rgba(20, 136, 186, 0.12);
  box-shadow: inset 0 0 0 1px rgba(20, 136, 186, 0.2);
}

.data-table tbody tr:first-child td {
  padding-top: 0.5rem;
}

.sort-indicator {
  font-size: 0.75rem;
  margin-left: 0.35rem;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.data-table th:hover .sort-indicator {
  color: white;
}

/* ==========================================================================
   DAILY REPORT SPECIFIC STYLES
   ========================================================================== */

/* Weekly Data Form - 3 column layout for daily project editing */
.weekly-data-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--background-color);
  border-radius: var(--border-radius);
}

.weekly-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

.day-section {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem;
}

.day-section.summary-section {
  background: rgba(39, 174, 96, 0.05);
  border-color: var(--success-color);
}

.day-section .day-header {
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.8rem;
}

.day-section.summary-section .day-header {
  color: var(--success-color);
  border-bottom-color: var(--success-color);
}

.day-section .form-group {
  margin-bottom: 0.5rem;
}

.day-section .form-group:last-child {
  margin-bottom: 0;
}

.day-section .form-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
  display: block;
}

.day-section .form-input {
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 0.75rem;
  background: var(--background-color);
  width: 100%;
}

.day-section .form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.1);
}

.day-section.summary-section .form-input[readonly] {
  background: rgba(39, 174, 96, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
  font-weight: 500;
}

.daily-legend {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: var(--background-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-color.behivott {
  background: rgba(74, 144, 226, 0.3);
}

.legend-color.interju {
  background: rgba(46, 204, 113, 0.3);
}

.legend-color.lekuldott {
  background: rgba(230, 126, 34, 0.3);
}

/* Compact Daily Table */
.compact-project-row {
  border-bottom: 5px solid var(--primary-color);
}

.compact-project-row:hover {
  background: var(--background-color);
}

.project-info-cell {
  width: 15%;
  min-width: 150px;
  padding: 0.5rem;
  vertical-align: top;
}

/* Hide priority label in compact project rows */
.project-info-cell .project-priority {
  display: none;
}

.project-info-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-main {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.15rem;
}

.project-id {
  font-weight: 600;
  color: var(--primary-color);
  background: var(--background-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.project-week {
  font-weight: 500;
  background: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: normal;
  /* Allows text to wrap naturally */
  overflow-wrap: break-word;
  /* Breaks long words to wrap to the next line */
}

.project-service {
  font-weight: 500;
  background: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: normal;
  /* Allows text to wrap naturally */
  overflow-wrap: break-word;
  /* Breaks long words to wrap to the next line */
}

.research-order {
  font-weight: 500;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.project-serial {
  font-weight: 600;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  margin: 0 0.25rem;
}

.project-company {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.project-position {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
}

.project-user {
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  background: var(--background-color);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

/* Priority styles */
.project-priority {
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.project-priority.priority-high {
  background: var(--danger-color);
  color: white;
}

.project-priority.priority-medium {
  background: var(--warning-color);
  color: var(--text-primary);
}

.project-priority.priority-low {
  background: var(--secondary-color);
  color: white;
}

/* Priority-based row background styles */
.priority-high-bg {
  background-color: rgba(231, 76, 60, 0.25) !important;
  /* --danger-color with 0.25 alpha */
}

.priority-medium-bg {
  background-color: rgba(255, 193, 7, 0.25) !important;
  /* --warning-color with 0.25 alpha */
}

.daily-data-cell {
  width: 40%;
  min-width: 300px;
  padding: 0.5rem;
  vertical-align: top;
}

/* Daily Metrics Table Styling - Compact */
.daily-metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.65rem;
  background: white;
  table-layout: fixed;
}

.daily-metrics-table thead th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  text-align: center;
  padding: 0.2rem 0.15rem;
  border: 1px solid var(--border-color);
  font-size: 0.6rem;
  line-height: 1.1;
}

.daily-metrics-table thead th:first-child {
  background: var(--background-color);
  border: none;
  width: 90px;
}

.daily-metrics-table thead th:not(:first-child) {
  width: 28px;
}

.daily-metrics-table tbody td {
  text-align: center;
  padding: 0.15rem 0.1rem;
  border: 1px solid var(--border-color);
  font-size: 0.65rem;
  line-height: 1.2;
}

.daily-metrics-table tbody td.metric-label {
  text-align: left;
  font-weight: 500;
  background: var(--background-color);
  color: var(--text-color);
  padding-left: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.6rem;
}

.daily-metrics-table tbody td.weekly-total-cell {
  text-align: center;
  font-weight: 600;
  background: rgba(63, 81, 181, 0.08);
  color: var(--text-color);
  font-size: 0.7rem;
}

.daily-metrics-table tbody tr:hover {
  background: rgba(63, 81, 181, 0.05);
}

.daily-metrics-table tbody tr.target-unreached {
  background: rgba(255, 152, 0, 0.08);
}

.daily-metrics-table tbody tr.target-unreached:hover {
  background: rgba(255, 152, 0, 0.15);
}

.daily-metrics-table tbody tr.target-unreached td.metric-label {
  background: rgba(255, 152, 0, 0.12);
  font-weight: 600;
}

.daily-data-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.daily-day {
  background: var(--background-color);
  border-radius: 6px;
  padding: 0.3rem;
  border: 1px solid var(--border-color);
  text-align: center;
}

.day-label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-color);
}

.day-values {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
}

.day-value {
  font-size: 0.7rem;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  display: flex;
  justify-content: center;
}

.day-value:nth-child(1) {
  background: rgba(74, 144, 226, 0.1);
  color: #4a90e2;
}

.day-value:nth-child(2) {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
}

.day-value:nth-child(3) {
  background: rgba(230, 126, 34, 0.1);
  color: #e67e22;
}

.summary-cell {
  width: 25%;
  min-width: 180px;
  padding: 0.5rem;
  vertical-align: top;
}

.summary-cell .summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.15rem 0.25rem;
  background: var(--background-color);
  border-radius: 3px;
  border: 1px solid var(--border-color);
  margin-bottom: 0.15rem;
  gap: 0.5rem;
  white-space: normal;
}

.summary-cell .summary-label {
  flex-shrink: 1;
  white-space: normal;
  min-width: 0;
}

.summary-cell .summary-value {
  flex-shrink: 0;
  min-width: 2rem;
  text-align: right;
}

.summary-item:last-child {
  margin-bottom: 0;
}

.actions-cell {
  width: 20%;
  min-width: 160px;
  max-width: 200px;
  padding: 0.5rem;
  vertical-align: top;
  overflow: hidden;
}

.actions-cell .actions-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.actions-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}

.actions-container .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.75rem;
  padding: 0.5rem;
}

/* Two-column grid layout for action buttons */
.actions-container.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
}

.actions-container.actions-grid .btn {
  min-width: 0;
}

/* Delete button for empty records */
.actions-container .btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

.actions-container .btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

/* Unfinished Tasks Container */
/* All Tasks Container */
.all-tasks-container {
  margin-top: 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
  max-width: 100%;
  flex: 1;
}

.tasks-section {
  margin-bottom: 0.75rem;
}

.tasks-section:last-child {
  margin-bottom: 0;
}

.tasks-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 100%;
}

/* Task Items - Base Styling */
.task-item {
  border-radius: 3px;
  padding: 0.25rem 0.3rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.6rem;
  line-height: 1.5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  min-height: 1.5rem;
  border: 1px solid;
}

/* Unfinished Tasks (Yellow/Warning) */
.task-item:not(.completed) {
  background: #fff3cd;
  border-color: #ffc107;
}

.task-item:not(.completed):hover {
  background: #ffeaa7;
  border-color: var(--warning-color);
}

.task-item.overdue {
  background: #f8d7da;
  border-color: var(--danger-color);
  animation: pulse 2s infinite;
}

.task-item.overdue:hover {
  background: #f1b4b8;
  border-color: var(--danger-color);
}

/* Completed Tasks (Green) */
.task-item.completed {
  background: #d1edcc;
  border-color: #28a745;
}

.task-item.completed:hover {
  background: #c3e6be;
  border-color: #1e7e34;
}

.task-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.task-item.completed .task-name {
  color: #155724;
}

.task-deadline {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-style: italic;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Legacy compatibility - keep old classes for any remaining references */
.unfinished-tasks-container {
  margin-top: 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
  max-width: 100%;
  flex: 1;
}

.unfinished-tasks-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.unfinished-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 100%;
}

.unfinished-task-item {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 3px;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.7rem;
  line-height: 1.2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  min-height: 1.5rem;
}

.unfinished-task-item:hover {
  background: #ffeaa7;
  border-color: var(--warning-color);
}

.unfinished-task-item.overdue {
  background: #f8d7da;
  border: 1px solid var(--danger-color);
  animation: pulse 2s infinite;
}

.unfinished-task-item.overdue:hover {
  background: #f1b4b8;
  border-color: var(--danger-color);
}

.unfinished-task-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.unfinished-task-deadline {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-style: italic;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Task View Controls */
.task-view-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.task-view-controls .btn.active {
  background: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
}

/* Task Group Headers */
.task-group-header {
  padding: 0.75rem 1rem;
  margin: 1rem 0 0.5rem 0;
  border-radius: 6px;
  background: #f8f9fa;
  border-left: 4px solid #dee2e6;
}

.task-group-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.task-group-header.status-teendő {
  background: #fff3cd;
  border-left-color: var(--warning-color);
}

.task-group-header.status-folyamatban {
  background: #d1ecf1;
  border-left-color: #17a2b8;
}

.task-group-header.status-kész {
  background: #d4edda;
  border-left-color: var(--success-color);
}

/* Compact modal styles */
.task-modal-enhanced .modal-body {
  padding: 1rem;
}

.task-modal-enhanced .form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.task-modal-enhanced .task-view-controls {
  margin-bottom: 0.75rem;
}

.task-modal-enhanced .project-info-display div {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.3;
}

.task-modal-enhanced .project-info-display div:last-child {
  margin-bottom: 0;
}

/* Auto-save indicator */
.auto-save-indicator {
  position: absolute;
  top: 1rem;
  right: 3rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 1000;
  transition: all 0.3s ease;
}

.auto-save-indicator.saving {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
}

.auto-save-indicator.saved {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.auto-save-indicator.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.megjegyzes-display {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
  width: 100%;
  overflow: hidden;
}

.megjegyzes-content {
  max-height: 100px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-color);
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  width: 100%;
  box-sizing: border-box;
}

.megjegyzes-content:empty::before {
  content: 'Nincs megjegyzés';
  color: var(--text-muted);
  font-style: italic;
}

/* TinyMCE Rich Text Editor Styles */
.rich-text-editor {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  min-height: 200px;
}

.tox-tinymce {
  border: 1px solid var(--border-color) !important;
  border-radius: 4px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.tox .tox-toolbar {
  border-bottom: 1px solid var(--border-color) !important;
  background: var(--background-color) !important;
  display: flex !important;
  visibility: visible !important;
}

.tox .tox-edit-area {
  border: none !important;
  min-height: 150px !important;
}

.tox .tox-statusbar {
  display: none !important;
}

/* Ensure TinyMCE toolbar buttons are visible */
.tox .tox-tbtn {
  display: inline-block !important;
  visibility: visible !important;
}

.tox .tox-toolbar__group {
  display: flex !important;
}

/* ==========================================================================
   GLASS MODAL SYSTEM
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-standard) var(--ease-smooth);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--glass-bg);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl), var(--glass-inner-shadow);
  max-width: 85vw;
  max-height: 85vh;
  width: 700px;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: all var(--duration-standard) var(--ease-spring);
  position: relative;
}

/* Glass highlight on modal top */
.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(255, 255, 255, 0.7) 50%, transparent 95%);
  pointer-events: none;
  z-index: 1;
}

/* Daily Project Modal - larger for 3-column layout */
.daily-project-modal {
  width: 90vw;
  max-width: 1000px;
  max-height: 85vh;
}

.daily-project-modal .modal-body {
  max-height: 65vh;
  overflow-y: auto;
}

.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.3);
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

.modal-close {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-subtle);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-spring);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  transform: scale(1.1) rotate(90deg);
  border-color: rgba(239, 68, 68, 0.2);
}

.modal-body {
  padding: 1.25rem;
  max-height: 55vh;
  overflow-y: auto;
}

/* Custom scrollbar for modal body */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 95, 150, 0.3);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 95, 150, 0.5);
}

.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--glass-border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   FUNNEL MODAL SPECIFIC STYLES
   ========================================================================== */

.funnel-modal {
  width: 85vw;
  max-width: 800px;
  max-height: 80vh;
}

.funnel-project-info {
  background: var(--background-color);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary-color);
}

.funnel-project-info h3 {
  margin: 0 0 0.4rem 0;
  color: var(--primary-color);
  font-size: 1rem;
}

.funnel-project-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.conversion-alerts {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--border-radius);
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.conversion-alerts h4 {
  margin: 0 0 0.5rem 0;
  color: #dc2626;
  font-size: 0.9rem;
}

.alert-item {
  background: white;
  border-left: 3px solid #dc2626;
  padding: 0.5rem;
  margin-bottom: 0.4rem;
  border-radius: 3px;
  font-size: 0.8rem;
  line-height: 1.3;
}

.funnel-chart-container {
  margin: 1rem 0;
  background: var(--surface-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.funnel-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-height: 300px;
}

.funnel-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.75rem;
  border-radius: 6px;
  transition: var(--transition);
  min-height: 50px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.funnel-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.funnel-step.step-messages {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.funnel-step.step-invited {
  width: 85%;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.funnel-step.step-interviews {
  width: 70%;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.funnel-step.step-sent {
  width: 55%;
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.funnel-step.step-presentation {
  width: 40%;
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.funnel-step.step-sold {
  width: 25%;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #2d3748;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   Apple Liquid Glass Edition
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: var(--z-toast, 10000);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  pointer-events: none;
}

.toast {
  /* Glass morphism */
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  min-width: 320px;
  max-width: 100%;
  border-left: 4px solid var(--primary-color);
  position: relative;
  overflow: hidden;
  pointer-events: auto;

  /* Glass shadows */
  box-shadow:
    0 8px 32px rgba(0, 95, 150, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);

  /* Animation: start off-screen */
  transform: translateX(120%) scale(0.95);
  opacity: 0;
  transition:
    transform 0.5s var(--ease-spring),
    opacity 0.3s var(--ease-smooth),
    box-shadow 0.3s var(--ease-smooth);
}

/* Glass highlight on top */
.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(255, 255, 255, 0.9) 50%, transparent 95%);
  pointer-events: none;
}

/* Shimmer effect on hover */
.toast::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
  transition: left 0.6s ease;
}

.toast:hover::after {
  left: 100%;
}

.toast.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.toast:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 12px 40px rgba(0, 95, 150, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* Toast type variants */
.toast.success {
  border-left-color: var(--success-color);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(236, 253, 245, 0.9) 100%);
}

.toast.success .toast-title {
  color: var(--success-color);
}

.toast.error {
  border-left-color: var(--danger-color);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(254, 242, 242, 0.9) 100%);
}

.toast.error .toast-title {
  color: var(--danger-color);
}

.toast.warning {
  border-left-color: var(--warning-color);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 251, 235, 0.9) 100%);
}

.toast.warning .toast-title {
  color: var(--warning-color);
}

.toast.info {
  border-left-color: var(--primary-light);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(236, 248, 255, 0.9) 100%);
}

.toast.info .toast-title {
  color: var(--primary-light);
}

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

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

.toast-close {
  /* Glass close button */
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-subtle);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1;
  transition: all 0.3s var(--ease-spring);
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border-color: rgba(239, 68, 68, 0.2);
  transform: scale(1.1) rotate(90deg);
}

.toast-close:active {
  transform: scale(0.95) rotate(90deg);
}

.toast-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Toast exit animation */
.toast.hiding {
  transform: translateX(120%) scale(0.95);
  opacity: 0;
}

/* Staggered entrance for multiple toasts */
.toast-container .toast:nth-child(1) { animation-delay: 0ms; }
.toast-container .toast:nth-child(2) { animation-delay: 60ms; }
.toast-container .toast:nth-child(3) { animation-delay: 120ms; }

/* Mobile responsiveness */
@media (max-width: 640px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }

  .toast {
    min-width: 0;
    padding: 0.875rem 1rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .toast {
    transform: translateX(0) scale(1);
    opacity: 1;
    transition: none;
  }

  .toast::after {
    display: none;
  }

  .toast-close {
    transition: none;
  }
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */

.login-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.error-message {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 1rem;
  text-align: center;
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

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

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.build-number {
  position: fixed;
  bottom: 0.5rem;
  right: 0.5rem;
  background: var(--text-secondary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 50;
  opacity: 0.7;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   COMPACT FILTERS
   ========================================================================== */

.filter-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 0 0 auto;
  min-width: 140px;
}

.filter-group:last-child {
  margin-left: auto;
}

/* ==========================================================================
   LOCATION TABS
   ========================================================================== */

.location-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.location-tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  border-radius: 6px 6px 0 0;
}

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

.location-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: var(--background-color);
}

.location-tab-content {
  display: none;
}

.location-tab-content.active {
  display: block;
}

.all-locations-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  background: var(--background-color);
}

.location-user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--surface-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.location-user-name {
  font-weight: 600;
  color: var(--text-primary);
}

.location-user-schedule {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.location-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background: var(--background-color);
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.location-day-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.location-day-value {
  color: var(--text-primary);
  font-weight: 600;
}

.location-day-value.home-office {
  color: #10b981;
}

.location-day-value.office {
  color: #3b82f6;
}

/* ==========================================================================
   Task Management Modal Styles
   ========================================================================== */

.task-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface-color);
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.3rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.task-item:hover {
  background: var(--background-color);
}

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

.task-item-content {
  flex: 1;
  margin-right: 0.75rem;
}

.task-item-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.task-item-day {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.8rem;
}

.task-item-type {
  background: var(--primary-color);
  color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.task-item-description {
  color: var(--text-secondary);
  font-size: 0.6rem;
  line-height: 1.3;
}

.task-item-actions {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
}

.task-due-date {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  font-style: italic;
}

.task-management {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-form {
  padding: 0.75rem;
  background: var(--background-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.task-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.task-form .form-label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.75rem;
}

.task-form .form-input,
.task-form .form-select,
.task-form .form-textarea {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  background: var(--surface-color);
}

.task-form .form-textarea {
  resize: vertical;
  min-height: 60px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1200px) {
  .summary-section-single-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .summary-totals-horizontal {
    justify-content: center;
    gap: 1rem;
  }

  .daily-data-container {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
  }

  .weekly-data-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 0.4rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .main-content {
    padding: 0.4rem;
  }

  .controls-section {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    max-width: none;
  }

  .view-controls {
    justify-content: space-between;
  }

  .record-form {
    grid-template-columns: 1fr;
  }

  .modal {
    width: 90vw;
    margin: 0.75rem;
  }

  .daily-project-modal {
    width: 95vw;
  }

  .modal-footer {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .summary-totals {
    grid-template-columns: 1fr;
  }

  .summary-groups {
    grid-template-columns: 1fr;
  }

  .summary-totals-horizontal {
    flex-direction: column;
    gap: 0.5rem;
  }

  .summary-totals-horizontal .summary-card {
    width: 100%;
    justify-content: space-between;
    min-width: auto;
  }

  .filter-group {
    min-width: 100%;
  }

  /* Ultra-compact filter layout - mobile responsive */
  .filter-row.ultra-compact {
    flex-direction: column;
    gap: 0.3rem;
  }

  .filter-group.ultra-compact {
    min-width: 100%;
    flex: 1;
  }

  .filter-group.ultra-compact.date-group {
    min-width: 100%;
  }

  .filter-buttons-group.ultra-compact {
    min-width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .filter-buttons-group.ultra-compact .btn {
    min-width: 30%;
    flex: 1;
  }

  .date-range {
    flex-direction: column;
    align-items: stretch;
  }

  .date-range.compact {
    flex-direction: row;
    align-items: center;
  }

  .date-range span {
    display: none;
  }

  .date-range.compact span {
    display: inline;
  }
}

/* Extra small screens - ultra-compact layout */
@media (max-width: 480px) {
  .filters-section {
    padding: 0.3rem;
  }

  .filters-container-ultra-compact {
    gap: 0.3rem;
  }

  .filter-row.ultra-compact {
    gap: 0.25rem;
  }

  .filter-group.ultra-compact .filter-select,
  .filter-group.ultra-compact .filter-input,
  .filter-group.ultra-compact .filter-date {
    font-size: 0.65rem;
    padding: 0.2rem;
    height: 26px;
  }

  .filter-group.ultra-compact .filter-label {
    font-size: 0.6rem;
  }

  .filter-buttons-group.ultra-compact .btn {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    height: 26px;
    min-width: 28%;
  }
}

@media (max-width: 768px) {
  .compact-project-row {
    display: block;
  }

  .project-info-cell,
  .daily-data-cell,
  .summary-cell,
  .actions-cell {
    display: block;
    width: 100%;
    min-width: auto;
    padding: 0.5rem;
  }

  .daily-data-container {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Daily Metrics Table - Mobile Responsive */
  .daily-metrics-table {
    font-size: 0.7rem;
  }

  .daily-metrics-table thead th {
    font-size: 0.65rem;
    padding: 0.3rem 0.2rem;
  }

  .daily-metrics-table tbody td {
    font-size: 0.65rem;
    padding: 0.25rem 0.2rem;
  }

  .daily-metrics-table tbody td.metric-label {
    font-size: 0.65rem;
    padding-left: 0.4rem;
  }

  .project-main {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .actions-container {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
  }

  .actions-container .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.7rem;
    padding: 0.4rem 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .actions-container .btn.btn-secondary {
    font-size: 0.65rem;
  }

  .weekly-data-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .day-section {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .header-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.4rem 0.75rem;
  }

  .daily-project-modal {
    width: 95vw;
    margin: 0.5rem;
  }
}

/* ==========================================================================
   COLUMN SORT MODAL
   ========================================================================== */

.column-sort-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.column-sort-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--background-color);
  cursor: pointer;
  transition: var(--transition);
}

.column-sort-item:hover {
  background: var(--surface-color);
  border-color: var(--primary-color);
}

.column-sort-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.column-sort-item-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.column-sort-item-desc {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.column-sort-actions {
  display: flex;
  gap: 0.3rem;
}

.sort-direction-indicator {
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

.sort-asc {
  background: #e8f5e8;
  color: #2d5a2d;
}

.sort-desc {
  background: #fff2e8;
  color: #8b4000;
}

/* Make table headers clickable */
.data-table th {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.data-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}


/* ==========================================================================
   QUICK EDIT MODAL STYLES
   ========================================================================== */

.quick-edit-modal {
  width: 95vw;
  max-width: 1400px;
  max-height: 90vh;
}

.quick-edit-modal .modal-body {
  max-height: 75vh;
  overflow-y: auto;
  padding: 1rem;
}

.quick-edit-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--background-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.quick-edit-controls .form-group {
  flex: 1;
  min-width: 200px;
}

.quick-edit-table-container {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.quick-edit-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: collapse;
  font-size: 11px;
  background: var(--surface-color);
}

.quick-edit-table th,
.quick-edit-table td {
  border: 3px solid var(--primary-hover);
  padding: 0.3rem;
  text-align: center;
  min-width: 60px;
}

.quick-edit-table th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  font-size: 10px;
}

.quick-edit-table .section-header {
  background: var(--secondary-color);
  color: white;
  font-weight: 600;
  text-align: center;
}

.quick-edit-table .week-header {
  background: rgba(59, 130, 246, 0.1);
  font-weight: 600;
  color: var(--primary-color);
}

.quick-edit-table .project-info {
  background: var(--background-color);
  text-align: left;
  font-weight: 500;
  min-width: 150px;
  max-width: 200px;
}

.quick-edit-table .day-group {
  background: rgba(59, 130, 246, 0.15);
  color: black;
}

.quick-edit-table .messages-group {
  background: rgba(16, 185, 129, 0.15);
  color: black;
}

.quick-edit-table .summary-group {
  background: rgba(245, 158, 11, 0.15);
  color: black;
}

.quick-edit-input {
  width: 50px;
  padding: 0.2rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 11px;
  text-align: center;
  background: var(--surface-color);
}

.quick-edit-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.1);
}

.quick-edit-readonly {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
}

.project-name-cell {
  font-size: 10px;
  line-height: 1.2;
}

.project-company {
  font-weight: 600;
  background: var(--warning-color);
  color: black;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: normal;
  /* Allows text to wrap naturally */
  overflow-wrap: break-word;
  /* Breaks long words to wrap to the next line */
}

.project-position {
  font-weight: 500;
  background: var(--primary-hover);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: normal;
  /* Allows text to wrap naturally */
  overflow-wrap: break-word;
  /* Breaks long words to wrap to the next line */
}

.project-id {
  color: var(--primary-color);
  font-weight: 500;
}

@media (max-width: 1200px) {
  .quick-edit-modal {
    width: 98vw;
  }

  .quick-edit-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .quick-edit-table {
    font-size: 10px;
  }

  .quick-edit-input {
    width: 45px;
    font-size: 10px;
  }
}

/* Alternating day group backgrounds and dividers for quick edit */
.quick-edit-table .day-0 {
  background: rgba(59, 130, 246, 0.15) !important;
  /* Blue */
}

.quick-edit-table .day-1 {
  background: rgba(16, 185, 129, 0.15) !important;
  /* Green */
}

.quick-edit-table .day-2 {
  background: rgba(245, 158, 11, 0.15) !important;
  /* Yellow */
}

.quick-edit-table .day-3 {
  background: rgba(139, 69, 19, 0.15) !important;
  /* Brown */
}

.quick-edit-table .day-4 {
  background: rgba(168, 85, 247, 0.15) !important;
  /* Purple */
}

/* Day group dividers - right border on last column of each day group */
.quick-edit-table .day-0:last-child,
.quick-edit-table .day-1:last-child,
.quick-edit-table .day-2:last-child,
.quick-edit-table .day-3:last-child {
  border-right: 3px solid var(--border-color) !important;
}

/* Special handling for activity sections - add divider after every 3rd column */
.quick-edit-table tr:not(.section-header) td.day-0:nth-child(4n + 1),
.quick-edit-table tr:not(.section-header) td.day-1:nth-child(4n + 4),
.quick-edit-table tr:not(.section-header) td.day-2:nth-child(4n + 7),
.quick-edit-table tr:not(.section-header) td.day-3:nth-child(4n + 10) {
  border-right: 2px solid var(--secondary-color) !important;
}

/* Message section dividers - add divider after every 9th column */
.quick-edit-table tr td.day-0:nth-child(10n + 9),
.quick-edit-table tr td.day-1:nth-child(10n + 18),
.quick-edit-table tr td.day-2:nth-child(10n + 27),
.quick-edit-table tr td.day-3:nth-child(10n + 36) {
  border-right: 2px solid var(--secondary-color) !important;
}

/* Enhanced hover effects for day groups */
.quick-edit-table .day-0:hover {
  background: rgba(59, 130, 246, 0.25) !important;
}

.quick-edit-table .day-1:hover {
  background: rgba(16, 185, 129, 0.25) !important;
}

.quick-edit-table .day-2:hover {
  background: rgba(245, 158, 11, 0.25) !important;
}

.quick-edit-table .day-3:hover {
  background: rgba(139, 69, 19, 0.25) !important;
}

.quick-edit-table .day-4:hover {
  background: rgba(168, 85, 247, 0.25) !important;
}

/* Compact Quick Edit Table Styles */
.quick-edit-table .day-label-cell {
  background: var(--background-color);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-primary);
  padding: 0.3rem 0.5rem;
  text-align: center;
  border-right: 2px solid var(--primary-color);
  min-width: 60px;
}

.quick-edit-table .project-row {
  border-bottom: 1px solid var(--border-color);
}

.quick-edit-table .project-row.day-row-4 {
  border-bottom: 3px solid var(--primary-color);
}

.quick-edit-table td[rowspan] {
  vertical-align: middle;
  background: var(--surface-color);
}

.quick-edit-table .summary-header {
  background: rgba(245, 158, 11, 0.15);
  color: var(--text-primary);
}

.quick-edit-table input.quick-edit-input {
  width: 45px;
  font-size: 10px;
}

.quick-edit-table .project-info.project-name-cell {
  min-width: 160px;
  max-width: 200px;
  padding: 0.5rem;
  background: var(--surface-color);
  border-right: 2px solid var(--primary-color);
}

/* Remove old day grouping styles */
.quick-edit-table .day-group,
.quick-edit-table .messages-group,
.quick-edit-table .section-header {
  display: none;
}

/* Day label header styling */
.quick-edit-table .day-label-header {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  text-align: center;
  min-width: 60px;
}

/* Alternating blue backgrounds for day rows */
.quick-edit-table .day-row-0 td:not(.project-info):not([rowspan]) {
  background: rgba(59, 130, 246, 0.25) !important;
  /* Lighter blue */
}

.quick-edit-table .day-row-1 td:not(.project-info):not([rowspan]) {
  background: rgba(44, 62, 80, 0.15) !important;
  /* Darker blue */
}

.quick-edit-table .day-row-2 td:not(.project-info):not([rowspan]) {
  background: rgba(59, 130, 246, 0.25) !important;
  /* Lighter blue */
}

.quick-edit-table .day-row-3 td:not(.project-info):not([rowspan]) {
  background: rgba(44, 62, 80, 0.15) !important;
  /* Darker blue */
}

.quick-edit-table .day-row-4 td:not(.project-info):not([rowspan]) {
  background: rgba(59, 130, 246, 0.25) !important;
  /* Lighter blue */
}

/* Keep day label cells with their own background */
.quick-edit-table .day-label-cell {
  background: var(--background-color) !important;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-primary);
  padding: 0.3rem 0.5rem;
  text-align: center;
  border-right: 2px solid var(--primary-color);
  min-width: 60px;
}

/* Single column form layout */
.record-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  grid-template-columns: none !important;
}

.record-form .form-group {
  width: 100% !important;
  grid-column: unset !important;
}

.record-form .form-group.full-width {
  grid-column: unset !important;
}

/* Allow HTML content in list item text */
.list-item-text {
  flex: 1;
  margin-right: 0.75rem;
  word-break: break-word;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Style for candidate comments in list */
.list-item-text small {
  font-size: 0.65rem;
  color: #6b7280;
  font-style: italic;
  line-height: 1.2;
  margin-top: 0.25rem;
}

/* Ensure candidate data in SentApplicantsInformation is left-aligned */
.list-field .list-item-text {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}

.list-field .list-item-text small {
  text-align: left;
}

.project-comments-item {
  flex-direction: column !important;
  /* Stack label and content vertically */
  align-items: flex-start !important;
  /* Align to left */
}

.project-comments-item .summary-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.project-comments-content {
  width: 100%;
  background: rgba(107, 114, 128, 0.05);
  border-radius: 4px;
  border: 1px solid rgba(107, 114, 128, 0.2);
  max-height: 100px;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  font-size: 0.75rem;
  line-height: 1.1;
  padding: 0.25rem 0.25rem;
  text-indent: 0;
  /* Remove any text indentation */
  margin: 0;
  /* Remove any margins */
}

/* Custom scrollbar for project comments */
.project-comments::-webkit-scrollbar {
  width: 4px;
}

.project-comments::-webkit-scrollbar-track {
  background: rgba(107, 114, 128, 0.1);
  border-radius: 2px;
}

.project-comments::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.3);
  border-radius: 2px;
}

.project-comments::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.5);
}

/* ==========================================================================
   COMPACT WEEKLY DATA FORM & TARGET SETTINGS
   ========================================================================== */

/* Weekly main container - vertical layout */
.weekly-main-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* Compact target setting area */
.target-setting-area {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  margin-bottom: 0;
  width: 100%;
}

.target-header {
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
}

.target-controls {
  display: flex;
  flex-direction: column;
  gap: 3.3rem;
}

.target-header-row {
  display: grid;
  grid-template-columns: 95px 65px 110px 55px 20px;
  gap: 0.4rem;
  padding: 0.3rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.25rem;
}

.target-col-header {
  font-size: 0.65rem;
  font-weight: 600;
  color: black;
  text-align: center;
}

.target-row {
  display: grid;
  grid-template-columns: 95px 65px 110px 55px 20px;
  gap: 0.4rem;
  align-items: center;
  padding: 0.3rem;
  background: var(--surface-color);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.target-row:hover {
  background: var(--background-color);
}

.target-checkbox {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 500;
}

.target-checkbox input[type='checkbox'] {
  width: 12px;
  height: 12px;
}

.target-checkbox label {
  margin: 0;
  cursor: pointer;
}

.target-input,
.target-deadline {
  padding: 0.15rem 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 0.65rem;
  background: var(--surface-color);
  text-align: center;
}

.target-input:focus,
.target-deadline:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.1);
}

.target-input:readonly,
.target-deadline:readonly {
  background: var(--background-color);
  color: var(--text-secondary);
}

.target-actual {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.65rem;
  text-align: center;
  padding: 0.15rem;
  background: var(--background-color);
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

.target-status {
  font-size: 0.85rem;
  text-align: center;
}

.target-status.target-achieved {
  color: var(--success-color);
}

.target-status.target-warning {
  color: var(--warning-color);
}

/* Research Order Section */
.research-order-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.research-order-header {
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 600;
}

.research-order-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.research-order-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.research-order-input {
  padding: 0.15rem 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 0.65rem;
  background: var(--surface-color);
  text-align: center;
  width: 65px;
  min-width: 65px;
}

.research-order-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.1);
}

.research-order-warning {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 4px;
  padding: 0.4rem;
  margin-top: 0.25rem;
  width: 100%;
  max-width: 280px;
}

.research-order-warning .warning-icon {
  color: var(--error-color);
  font-size: 0.7rem;
  margin-right: 0.25rem;
}

.research-order-warning .warning-text {
  color: var(--error-color);
  font-size: 0.6rem;
  font-weight: 500;
}

/* Compact weekly data grid - now properly below target area */
.compact-weekly-grid {
  display: grid;
  grid-template-columns: 1fr 440px 220px;
  gap: 1rem;
  margin-top: 0;
  width: 100%;
}

.daily-container,
.target-container,
.summary-container {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem;
}

/* Compact summary container variant for table cells */
.summary-cell .summary-container {
  padding: 0.4rem;
}

.summary-cell .summary-totals {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0;
}

/* Active candidates list in summary cell */
.active-candidates-section {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border-color);
}

.active-candidates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.active-candidates-list {
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.active-candidates-list::-webkit-scrollbar {
  width: 4px;
}

.active-candidates-list::-webkit-scrollbar-track {
  background: transparent;
}

.active-candidates-list::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 2px;
}

.active-candidate-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.25rem;
  font-size: 0.65rem;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 3px;
  margin-bottom: 0.15rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.active-candidate-item:hover {
  background: rgba(34, 197, 94, 0.15);
}

.active-candidate-item:last-child {
  margin-bottom: 0;
}

.candidate-icon {
  flex-shrink: 0;
  font-size: 0.6rem;
}

.candidate-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.candidate-status {
  flex-shrink: 0;
  font-size: 0.55rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-more-candidates {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.2rem;
  font-size: 0.6rem;
  text-align: center;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  cursor: pointer;
  color: var(--primary-color);
  transition: background-color 0.15s ease;
}

.load-more-candidates:hover {
  background: var(--surface-color);
}

.no-candidates-message {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  padding: 0.3rem;
}

.section-header {
  margin: 0 0 0.75rem 0;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.daily-compact-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}

.day-column {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.day-header {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.75rem;
  margin: 0 0 0.4rem 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.summary-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.field-group label {
  font-size: 0.65rem;
  font-weight: 500;
  color: black;
  margin: 0;
}

.form-input.compact {
  padding: 0.15rem 0.25rem;
  font-size: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--surface-color);
  min-height: 22px;
}

.form-input.compact:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.1);
}

.form-input.compact.readonly {
  background: rgba(39, 174, 96, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .compact-weekly-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .daily-compact-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .target-header-row,
  .target-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    text-align: left;
  }

  .target-col-header {
    display: none;
  }
}

@media (max-width: 768px) {
  .daily-compact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-compact-grid {
    grid-template-columns: 1fr;
  }

  .target-checkbox {
    justify-self: start;
  }
}

@media (max-width: 768px) {
  .daily-compact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-compact-grid {
    grid-template-columns: 1fr;
  }
}

.compact-project-modal {
  width: 95vw;
  max-width: 1400px;
  max-height: 90vh;
}

.compact-project-modal .modal-body {
  max-height: 75vh;
  overflow-y: auto;
}

/* Weekly main container for better organization */
.weekly-main-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Ensure target area is visually separated */
.target-setting-area {
  margin-bottom: 1.5rem;
  border: 2px solid rgba(59, 130, 246, 0.3);
}

/* Enhanced target row layout */
.target-row {
  display: grid;
  grid-template-columns: 95px 65px 110px 55px 20px;
  gap: 0.4rem;
  align-items: center;
  padding: 0.3rem;
  background: var(--surface-color);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.target-row:hover {
  background: var(--background-color);
}

/* ==========================================================================
   PROJECT EDITING MODAL - PROJECT INFO DISPLAY
   ========================================================================== */

.project-info-display {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.project-info-display h4 {
  margin: 0 0 1rem 0;
  color: #495057;
  font-size: 1rem;
  font-weight: 600;
}

.project-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-label {
  font-weight: 500;
  color: #6c757d;
  min-width: 80px;
}

.info-value {
  font-weight: 600;
  color: #212529;
  flex: 1;
}

@media (max-width: 768px) {
  .project-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   COMPACT DAILY DATA AND MINI-FUNNEL STYLES
   ========================================================================== */

/* Updated legend styles - horizontal layout with emojis */
.daily-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--background-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-emoji {
  font-size: 1rem;
}

/* Compact daily data styles - cleaner without background colors */
.daily-data-container-compact {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  padding: 0.25rem;
}

.daily-day-compact {
  background: var(--background-color);
  border-radius: 4px;
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  text-align: center;
  min-height: 95px;
}

.day-label-compact {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.65rem;
  margin-bottom: 0.2rem;
  padding-bottom: 0.1rem;
  border-bottom: 1px solid var(--border-color);
}

.day-values-compact {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.day-value-compact {
  font-size: 0.6rem;
  padding: 0.05rem 0.15rem;
  font-weight: 500;
  text-align: center;
  color: var(--text-primary);
  border-radius: 2px;
}

.day-value-compact:hover {
  background: rgba(44, 62, 80, 0.05);
}

/* Mini-funnel styles with proper boundaries and sizing */
.summary-container-new {
  padding: 0.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.mini-funnel-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  box-sizing: border-box;
}

.mini-funnel-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.funnel-label-external {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 70px;
  max-width: 70px;
  text-align: left;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-funnel-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  color: var(--text-light);
  font-size: 0.6rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  min-height: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
  max-width: calc(100% - 75px);
  /* Account for label width + gap */
}

.mini-funnel-step:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Neutral dark colors using base palette */
.mini-funnel-step.funnel-normal {
  background: var(--primary-color);
  border: 1px solid var(--primary-hover);
}

.mini-funnel-step.funnel-normal:hover {
  background: var(--primary-hover);
}

/* Zero value - danger color from base palette */
.mini-funnel-step.funnel-zero {
  background: var(--danger-color) !important;
  border: 1px solid #c0392b !important;
  color: var(--text-light) !important;
}

/* Low conversion - warning color from base palette */
.mini-funnel-step.funnel-low {
  background: var(--warning-color) !important;
  border: 1px solid #e6ac00 !important;
  color: var(--text-primary) !important;
}

.funnel-value {
  font-size: 0.6rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

/* Responsive adjustments for compact layout */
@media (max-width: 1200px) {
  .daily-legend {
    gap: 1rem;
  }

  .daily-data-container-compact {
    grid-template-columns: repeat(5, 1fr);
  }

  .day-label-compact {
    font-size: 0.6rem;
  }

  .day-value-compact {
    font-size: 0.55rem;
  }

  .funnel-label-external {
    font-size: 0.55rem;
    min-width: 65px;
    max-width: 65px;
  }

  .mini-funnel-step {
    font-size: 0.55rem;
    padding: 0.1rem 0.25rem;
    min-height: 12px;
    max-width: calc(100% - 70px);
  }

  .funnel-value {
    font-size: 0.55rem;
  }
}

@media (max-width: 768px) {
  .daily-legend {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .daily-data-container-compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.2rem;
  }

  .day-value-compact {
    font-size: 0.5rem;
    padding: 0.05rem 0.1rem;
  }

  .mini-funnel-row {
    gap: 0.3rem;
  }

  .funnel-label-external {
    font-size: 0.5rem;
    min-width: 55px;
    max-width: 55px;
  }

  .mini-funnel-step {
    padding: 0.1rem 0.2rem;
    min-height: 10px;
    font-size: 0.5rem;
    max-width: calc(100% - 60px);
  }

  .funnel-value {
    font-size: 0.5rem;
  }
}

/* Responsive adjustments for compact layout */
@media (max-width: 1200px) {
  .daily-legend {
    gap: 1rem;
  }

  .daily-data-container-compact {
    grid-template-columns: repeat(5, 1fr);
  }

  .day-label-compact {
    font-size: 0.6rem;
  }

  .day-value-compact {
    font-size: 0.55rem;
  }

  .funnel-label-external {
    font-size: 0.55rem;
    min-width: 60px;
  }

  .mini-funnel-step {
    font-size: 0.55rem;
    padding: 0.1rem 0.25rem;
    min-height: 12px;
  }
}

@media (max-width: 768px) {
  .daily-legend {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .daily-data-container-compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.2rem;
  }

  .day-value-compact {
    font-size: 0.5rem;
    padding: 0.05rem 0.1rem;
  }

  .mini-funnel-row {
    gap: 0.3rem;
  }

  .funnel-label-external {
    font-size: 0.5rem;
    min-width: 50px;
  }

  .mini-funnel-step {
    padding: 0.1rem 0.2rem;
    min-height: 10px;
    font-size: 0.5rem;
  }
}

/* ==========================================================================
   COMPACT FUNNEL MODAL STYLES
   ========================================================================== */

.compact-funnel-modal {
  width: 95vw;
  max-width: 1400px;
  max-height: 90vh;
}

.compact-funnel-modal .modal-body {
  max-height: 75vh;
  overflow-y: auto;
  padding: 1rem;
}

.funnel-project-info {
  background: var(--background-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--primary-color);
}

.funnel-project-info-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.funnel-project-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.funnel-project-id {
  font-weight: 600;
  color: var(--primary-color);
  background: var(--background-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.funnel-project-week {
  font-weight: 500;
  background: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.funnel-project-company {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
  background: var(--warning-color);
  color: black;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.25rem;
}

.funnel-project-position {
  font-weight: 500;
  background: var(--primary-hover);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.funnel-project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.funnel-project-user {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  background: var(--background-color);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.funnel-project-period {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
}

.funnel-main-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
}

.funnel-chart-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.funnel-chart-section h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.compact-funnel-chart {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem;
  background: var(--surface-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  min-height: 400px;
}

.compact-funnel-chart .mini-funnel-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.compact-funnel-chart .mini-funnel-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.compact-funnel-chart .funnel-label-external {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 120px;
  max-width: 120px;
  text-align: left;
  flex-shrink: 0;
}

.compact-funnel-chart .mini-funnel-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius);
  color: white;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  min-height: 45px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  max-width: calc(100% - 125px);
}

.compact-funnel-chart .mini-funnel-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.compact-funnel-chart .mini-funnel-step.low-conversion {
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 2px var(--danger-color);
}

.compact-funnel-chart .funnel-value {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.modal-funnel-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.modal-funnel-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 100px;
  text-align: right;
}

.modal-funnel-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius);
  color: white;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  min-height: 45px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.modal-funnel-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.modal-funnel-step.low-conversion {
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 2px var(--danger-color);
}

.modal-funnel-step.step-cvcheck {
  background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
}

.modal-funnel-step.step-messages {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-funnel-step.step-calls {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.modal-funnel-step.step-invited {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.modal-funnel-step.step-interviews {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.modal-funnel-step.step-sent {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.modal-funnel-step.step-presentation {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: var(--text-primary);
}

.modal-funnel-step.step-sold {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: var(--text-primary);
}

.modal-funnel-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.modal-funnel-value {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.modal-funnel-conversion {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
}

.funnel-settings-section {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  border: 1px solid var(--border-color);
  height: fit-content;
}

.funnel-settings-section h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.settings-grid-compact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setting-group {
  padding: 0.75rem;
  background: var(--background-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.setting-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.setting-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.setting-input {
  width: 80px;
  padding: 0.3rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 0.75rem;
  background: var(--surface-color);
}

.setting-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.1);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  cursor: pointer;
}

.checkbox-label input[type='checkbox'] {
  width: 14px;
  height: 14px;
  margin: 0;
}

.setting-message {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 0.75rem;
  background: var(--surface-color);
  resize: vertical;
  min-height: 40px;
  max-height: 80px;
}

.setting-message:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.1);
}

.setting-message::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.conversion-alerts.compact {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--border-radius);
  padding: 0.75rem;
}

.conversion-alerts.compact h4 {
  margin: 0 0 0.75rem 0;
  color: #dc2626;
  font-size: 0.9rem;
}

.alert-item {
  background: white;
  border-left: 3px solid #dc2626;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  line-height: 1.3;
}

.alert-step {
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 0.25rem;
}

.alert-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.alert-rates {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.alert-message {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.75rem;
  font-style: italic;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
  }
}

/* Mini-funnel low conversion animation - matches full funnel modal */
.mini-funnel-step.low-conversion {
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 2px var(--danger-color);
  border: 1px solid var(--danger-color) !important;
}

/* Unreached target animation */
@keyframes targetAlert {
  0% {
    background-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    transform: scale(1);
  }

  50% {
    background-color: rgba(239, 68, 68, 0.4);
    color: #b91c1c;
    transform: scale(1.05);
  }

  100% {
    background-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    transform: scale(1);
  }
}

.target-unreached {
  animation: targetAlert 1.5s ease-in-out infinite;
  font-weight: 700 !important;
  border: 1px solid #dc2626 !important;
  border-radius: 3px;
  padding: 1px 2px !important;
}

.day-value-compact.target-unreached {
  background-color: rgba(239, 68, 68, 0.3) !important;
  color: #dc2626 !important;
  font-weight: 700 !important;
}

/* Responsive design for compact funnel modal */
@media (max-width: 1200px) {
  .compact-funnel-modal {
    width: 98vw;
  }

  .funnel-main-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .funnel-settings-section {
    order: -1;
  }

  .modal-funnel-label {
    min-width: 80px;
    font-size: 0.75rem;
  }

  .modal-funnel-step {
    padding: 0.5rem 0.8rem;
    min-height: 40px;
  }
}

@media (max-width: 768px) {
  .modal-funnel-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
  }

  .modal-funnel-label {
    text-align: left;
    min-width: auto;
  }

  .modal-funnel-step {
    width: 100%;
    justify-content: center;
  }

  .funnel-project-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .setting-inputs {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
}

/* ==========================================================================
   USER SELECTION MODAL
   ========================================================================== */

.user-selection-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.user-selection-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--background-color);
}

.user-selection-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.user-selection-item:hover {
  background: var(--surface-color);
}

.user-selection-item:last-child {
  border-bottom: none;
}

.user-selection-checkbox {
  width: 16px;
  height: 16px;
  margin-right: 0.75rem;
  cursor: pointer;
}

.user-selection-label {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.user-selection-email {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-style: italic;
}

#userFilterBtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-width: 150px;
}

#userFilterDisplay {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   BAP STATUS STYLING
   ========================================================================== */

.bap-missing {
  background: var(--danger-color) !important;
  color: var(--text-light) !important;
  border: 1px solid #c0392b !important;
}

/* Ensure text remains readable */
.project-id.bap-missing,
.project-company.bap-missing,
.project-position.bap-missing {
  background: var(--danger-color) !important;
  color: var(--text-light) !important;
  border: 1px solid #c0392b !important;
  font-weight: 600;
}

/* ==========================================================================
   DAILY LEGEND WITH SUMMARY STYLES - COMPACT VERSION
   ========================================================================== */

.daily-legend-with-summary {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.4rem 0.5rem;
  margin: 0 auto 0.5rem auto;
  max-width: 1500px;
  box-shadow: var(--shadow-sm);
}

.daily-legend-with-summary h3 {
  margin: 0 0 0.4rem 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary-color);
}

.legend-summary-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.3rem;
}

.summary-single-column {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.summary-single-column .field-group.editable-section {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 2px solid var(--border-color);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: var(--background-color);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  min-height: 42px;
}

.legend-item.clickable {
  cursor: pointer;
  user-select: none;
}

.legend-item.clickable:hover {
  background: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.legend-item.clickable:hover .legend-emoji {
  transform: scale(1.1);
}

.legend-item.clickable:hover .legend-text {
  color: var(--text-light);
}

.legend-item.clickable:hover .legend-value {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.legend-item.clickable:active {
  transform: translateY(0);
}

.legend-emoji {
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.legend-text {
  flex: 1;
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--text-primary);
  transition: var(--transition);
  line-height: 1.2;
  text-align: center;
}

.legend-value {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.8rem;
  background: var(--surface-color);
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  min-width: 35px;
  text-align: center;
  transition: var(--transition);
  flex-shrink: 0;
}

/* Responsive adjustments for compact legend */
@media (max-width: 1400px) {
  .legend-summary-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }
}

@media (max-width: 1200px) {
  .legend-summary-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }

  .legend-item {
    padding: 0.35rem 0.5rem;
    gap: 0.3rem;
    min-height: 38px;
  }

  .legend-emoji {
    font-size: 0.9rem;
  }

  .legend-text {
    font-size: 0.65rem;
  }

  .legend-value {
    font-size: 0.75rem;
    padding: 0.1rem 0.25rem;
    min-width: 30px;
  }
}

@media (max-width: 768px) {
  .daily-legend-with-summary {
    padding: 0.5rem 0.75rem;
  }

  .legend-summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .legend-item {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.5rem;
    gap: 0.5rem;
    min-height: 40px;
  }

  .legend-text {
    font-size: 0.7rem;
    text-align: left;
    flex: 1;
  }

  .legend-value {
    font-size: 0.8rem;
    min-width: 35px;
  }
}

@media (max-width: 480px) {
  .legend-summary-grid {
    grid-template-columns: 1fr;
  }

  .legend-item {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.6rem;
  }

  .legend-emoji {
    font-size: 1rem;
  }

  .legend-text {
    flex: 1;
    text-align: left;
    margin: 0 0.5rem;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   CHART MODAL STYLES
   ========================================================================== */

.chart-modal {
  width: 90vw;
  max-width: 1200px;
  height: 80vh;
  max-height: 700px;
}

.chart-modal .modal-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: var(--text-light);
  border-bottom: none;
}

.chart-modal .modal-header h2 {
  color: var(--text-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-modal .modal-header h2::before {
  content: '📊';
  font-size: 1.2rem;
}

.chart-modal .modal-close {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.chart-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.chart-modal .modal-body {
  padding: 1.5rem;
  background: var(--background-color);
}

.chart-container {
  position: relative;
  height: 450px;
  width: 100%;
  background: var(--surface-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

#metricChart {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--border-radius);
}

.chart-modal .modal-footer {
  background: var(--background-color);
  border-top: 1px solid var(--border-color);
}

.chart-modal .modal-footer .btn {
  min-width: 120px;
}

/* Chart loading state */
.chart-container.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-secondary);
}

.chart-container.loading::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.chart-container.loading::after {
  content: 'Grafikon betöltése...';
  font-size: 0.9rem;
  font-weight: 500;
}

/* Chart error state */
.chart-container.error {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: var(--danger-color);
}

.chart-container.error::before {
  content: '⚠️';
  font-size: 2rem;
}

/* Danger color styling for warranty services */
.danger-color {
  background-color: var(--danger-color);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
}

.chart-container.error::after {
  content: 'Hiba a grafikon betöltésekor';
  font-size: 0.9rem;
  font-weight: 500;
}

/* Responsive chart modal */
@media (max-width: 1200px) {
  .chart-modal {
    width: 95vw;
    max-width: 1000px;
    height: 75vh;
  }

  .chart-container {
    height: 400px;
    padding: 0.75rem;
  }
}

@media (max-width: 768px) {
  .chart-modal {
    width: 95vw;
    height: 85vh;
    max-height: none;
  }

  .chart-modal .modal-body {
    padding: 1rem;
  }

  .chart-container {
    height: 350px;
    padding: 0.5rem;
  }

  .chart-modal .modal-header h2 {
    font-size: 1rem;
  }

  .chart-modal .modal-footer {
    padding: 0.75rem;
  }

  .chart-modal .modal-footer .btn {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .chart-modal {
    width: 98vw;
    height: 90vh;
    margin: 1vh;
  }

  .chart-container {
    height: 300px;
    padding: 0.5rem;
  }

  .chart-modal .modal-header {
    padding: 0.75rem;
  }

  .chart-modal .modal-body {
    padding: 0.75rem;
  }
}

/* ==========================================================================
   CHART TOOLTIP CUSTOMIZATION
   ========================================================================== */

/* Custom tooltip styles for Chart.js (these will be applied via JavaScript) */
.chartjs-tooltip {
  background: var(--surface-color) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow-md) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.8rem !important;
}

.chartjs-tooltip-title {
  color: var(--primary-color) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding-bottom: 0.25rem !important;
  margin-bottom: 0.25rem !important;
}

.chartjs-tooltip-body {
  font-weight: 500 !important;
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

.legend-item.clickable:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.legend-item.clickable:focus:not(:hover) {
  background: var(--surface-color);
  border-color: var(--primary-color);
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   ENHANCED TASK SYSTEM STYLES
   ========================================================================== */

.task-modal-enhanced {
  width: 95vw;
  max-width: 1400px;
  max-height: 90vh;
}

.task-detail-modal {
  width: 90vw;
  max-width: 1200px;
  max-height: 90vh;
}

.task-list-enhanced {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface-color);
  padding: 0.5rem;
  margin-top: 1rem;
}

.task-card {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
  cursor: pointer;
}

.task-card:hover {
  background: var(--surface-color);
  box-shadow: var(--shadow-sm);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.task-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.task-status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-block;
}

.task-status-badge.status-teendo {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.task-status-badge.status-folyamatban {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.task-status-badge.status-kesz {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.task-card-day {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.8rem;
}

.task-card-actions {
  display: flex;
  gap: 0.25rem;
}

.task-card-body {
  margin-bottom: 0.4rem;
}

.task-card-type {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.task-card-description {
  color: var(--text-primary);
  font-size: 0.8rem;
  line-height: 1.4;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.task-subtasks-summary {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.task-comments-count {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Subtasks Styles */
.subtasks-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border-color);
}

.subtasks-section h3 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.subtask-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.subtask-form .form-input {
  flex: 1;
}

.subtasks-list {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.5rem;
  background: var(--background-color);
}

.subtask-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

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

.subtask-checkbox {
  margin-top: 0.1rem;
}

.subtask-content {
  flex: 1;
}

.subtask-text {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.subtask-text.completed {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.subtask-children {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.subtask-add-child {
  font-size: 0.7rem;
  color: var(--primary-color);
  cursor: pointer;
  margin-top: 0.25rem;
  display: inline-block;
}

.subtask-add-child:hover {
  text-decoration: underline;
}

.subtask-actions {
  display: flex;
  gap: 0.25rem;
}

/* Comments Styles */
.comments-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border-color);
}

.comments-section h3 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.comment-form {
  margin-bottom: 0.75rem;
}

.comment-form .form-textarea {
  width: 100%;
  min-height: 60px;
  margin-bottom: 0.5rem;
}

.comments-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.5rem;
  background: var(--background-color);
}

.comment-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.comment-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.comment-timestamp {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.comment-type {
  font-size: 0.65rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-weight: 500;
}

.comment-type.system {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

.comment-type.user {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-secondary);
}

.comment-text {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.comment-item.system-log {
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid var(--primary-color);
}

/* Task Detail Info */
.task-detail-info {
  background: var(--background-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.task-detail-field {
  margin-bottom: 0.75rem;
}

.task-detail-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.task-detail-field input,
.task-detail-field select,
.task-detail-field textarea {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 0.8rem;
  background: var(--surface-color);
}

.task-detail-field textarea {
  min-height: 60px;
  resize: vertical;
}

/* ==========================================================================
   ANIMATION ENHANCEMENTS
   ========================================================================== */

@keyframes chartFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

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

.chart-container canvas {
  animation: chartFadeIn 0.3s ease-out;
}

/* Pulse effect for interactive elements */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(44, 62, 80, 0.4);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(44, 62, 80, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(44, 62, 80, 0);
  }
}

.legend-item.clickable:active {
  animation: pulse-glow 0.3s ease-out;
}

/* Retry button states */
button[type='submit']:disabled {
  opacity: 0.7;
  cursor: wait;
}

button[type='submit']:disabled:hover {
  transform: none;
}

/* Animated waiting indicator */
@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

button[type='submit']:disabled[style*='ff9800'] {
  animation: pulse 2s infinite;
}

button[type='submit'][style*='4CAF50'] {
  animation: pulse 0.5s 2;
  cursor: pointer !important;
}

/* ==========================================================================
   ACTIVE USERS MODAL STYLES
   ========================================================================== */

.active-users-content {
  max-height: 60vh;
  overflow-y: auto;
}

.active-users-summary {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  border-left: 4px solid #667eea;
}

.active-users-summary p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.active-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.active-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.active-user-item:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.active-user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.active-user-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.active-user-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.active-user-details {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.active-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.active-user-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27ae60;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }

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

.duration-badge {
  padding: 0.2rem 0.5rem;
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.no-active-users {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .active-user-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .active-user-meta {
    align-items: flex-start;
    width: 100%;
  }

  .active-user-details {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   BACKUP RESTORE MODAL STYLES
   ========================================================================== */

.textarea-with-restore {
  position: relative;
}

.restore-backup-btn {
  margin-top: 8px;
  font-size: 14px;
  padding: 6px 12px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.restore-backup-btn:hover {
  background-color: #f8f9fa;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.backup-restore-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.current-version,
.backup-versions,
.selected-backup {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--surface-color);
}

.current-version h3,
.backup-versions h3,
.selected-backup h3 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}

.comment-preview {
  padding: 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  min-height: 60px;
  overflow-wrap: break-word;
}

.comment-preview.current-comment {
  border-left: 4px solid var(--primary-color);
}

.comment-preview.backup-comment {
  border-left: 4px solid var(--success-color);
}

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.backup-item {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--surface-color);
  cursor: pointer;
  transition: var(--transition);
}

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

.backup-item.selected {
  border-color: var(--success-color);
  background-color: #f0f9f4;
  box-shadow: var(--shadow-md);
}

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

.backup-change-indicator {
  font-size: 12px;
  color: var(--success-color);
  background-color: #f0f9f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
}

.backup-date {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.backup-select {
  padding: 4px 8px;
  font-size: 12px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition);
}

.backup-select:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.backup-item.selected .backup-select {
  background-color: var(--success-color);
  color: var(--text-light);
  border-color: var(--success-color);
}

.backup-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 8px;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.backup-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.backup-timestamp {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.no-backups {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 24px;
}

.error-message {
  text-align: center;
  color: var(--danger-color);
  padding: 24px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--border-radius);
}

/* Loading spinner for backup modal */
.backup-list .loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 16px;
}

.backup-list .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .backup-restore-content {
    max-height: 60vh;
  }

  .backup-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .backup-list {
    max-height: 250px;
  }
}

/* ==========================================================================
   RESEARCH TABLE MODAL STYLES
   ========================================================================== */

/* Remove transforms from parent elements when research modal is open */
body.research-modal-open .app-container {
  transform: none !important;
  perspective: none !important;
  filter: none !important;
}

body.research-modal-open {
  overflow: hidden;
}

/* Research table modal overlay - full viewport coverage */
.research-table-modal-overlay {
  /* Inline styles in JS take precedence, these are fallbacks */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}

.research-table-modal {
  max-width: 98vw !important;
  width: 1800px !important;
  max-height: 95vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.research-table-modal .modal-header {
  padding: 0.5rem 0.75rem;
}

.research-table-modal .modal-body {
  flex: 1;
  padding: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 88vh !important;
}

.research-table-container {
  min-height: 300px;
  max-height: 78vh;
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.research-candidates-table {
  table-layout: auto;
  border-collapse: collapse;
}

.research-candidates-table th,
.research-candidates-table td {
  padding: 0.3rem 0.4rem;
  vertical-align: middle;
  border: 1px solid var(--border-color);
}

.research-candidates-table th {
  background-color: #2c3e50;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.research-candidates-table td {
  font-size: 0.8rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 250px;
}

.research-candidates-table tr.editing {
  background-color: #fffbea;
}

.research-candidates-table tr.editing td {
  padding: 0.4rem 0.4rem;
  vertical-align: top;
}

.research-candidates-table tbody tr:not(.editing) {
  cursor: pointer;
}

.research-candidates-table tr:hover:not(.editing) {
  background-color: #f8f9fa;
}

/* Research table column widths - optimized for 12 columns */
.research-candidates-table .col-name {
  width: 100px;
  min-width: 90px;
}

.research-candidates-table .col-email {
  width: 95px;
  min-width: 95px;
}

.research-candidates-table .col-phone {
  width: 90px;
  min-width: 85px;
}

.research-candidates-table .col-bap-status {
  width: 100px;
  min-width: 80px;
}

.research-candidates-table .col-research-status {
  width: 110px;
  min-width: 100px;
}

.research-candidates-table .col-note {
  width: 100px;
  min-width: 100px;
}

.research-candidates-table .col-info {
  width: 100px;
  min-width: 100px;
}

.research-candidates-table .col-salary {
  width: 70px;
  min-width: 60px;
}

.research-candidates-table .col-platform {
  width: 60px;
  min-width: 60px;
}

.research-candidates-table .col-date {
  width: 80px;
  min-width: 80px;
}

.research-candidates-table .col-link {
  width: 90px;
  min-width: 45px;
}

.research-candidates-table .col-actions {
  width: 100px;
  min-width: 60px;
}

.research-candidates-table .note-cell {
  max-width: 150px;
  min-width: 100px;
}

.research-candidates-table .info-cell {
  max-width: 160px;
  min-width: 100px;
}

.research-candidates-table .note-content,
.research-candidates-table .info-content {
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.research-candidates-table .note-content:hover,
.research-candidates-table .info-content:hover {
  background-color: #e3f2fd;
  text-decoration: underline;
}

/* Category color coding - pale but visible backgrounds */
.research-candidates-table tr.category-active {
  background-color: #e8f5e9;
}

.research-candidates-table tr.category-inactive {
  background-color: #ffebee;
}

.research-candidates-table tr.category-other {
  background-color: #fff9e6;
}

.research-candidates-table tr.editing.category-active {
  background-color: #f1f8e9;
}

.research-candidates-table tr.editing.category-inactive {
  background-color: #ffecec;
}

.research-candidates-table tr.editing.category-other {
  background-color: #fffaed;
}

.research-candidates-table tr.category-active:hover:not(.editing) {
  background-color: #c8e6c9;
}

.research-candidates-table tr.category-inactive:hover:not(.editing) {
  background-color: #ffcdd2;
}

.research-candidates-table tr.category-other:hover:not(.editing) {
  background-color: #fff3cd;
}

.research-candidates-table .actions-cell {
  white-space: nowrap;
  text-align: center;
}

.research-candidates-table .actions-cell .btn {
  margin: 1px;
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
}

/* Link button style */
.research-candidates-table .btn-link {
  background-color: transparent;
  border: 1px solid #007bff;
  color: #007bff;
  text-decoration: none;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  font-size: 0.8rem;
}

.research-candidates-table .btn-link:hover {
  background-color: #007bff;
  color: white;
}

.research-candidates-table input.form-input,
.research-candidates-table select.form-select {
  width: 100%;
  padding: 0.3rem;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  min-width: 80px;
  box-sizing: border-box;
  margin: 0;
}

.research-candidates-table input.form-input[list] {
  /* Combobox styling for datalist inputs */
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23333" d="M6 9L1 4h10z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 12px;
  padding-right: 2rem;
}

.research-candidates-table input[type='number'] {
  max-width: 100px;
}

.research-candidates-table input[type='url'] {
  min-width: 120px;
}

/* Responsive table for mobile */
@media (max-width: 1024px) {
  .research-table-modal {
    width: 95vw !important;
  }

  .research-candidates-table {
    font-size: 0.85rem;
  }

  .research-candidates-table th,
  .research-candidates-table td {
    padding: 0.5rem 0.25rem;
  }

  .research-candidates-table .actions-cell .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .research-table-modal .modal-body {
    padding: 1rem;
  }

  /* Stack table cells for very small screens */
  .research-candidates-table thead {
    display: none;
  }

  .research-candidates-table,
  .research-candidates-table tbody,
  .research-candidates-table tr,
  .research-candidates-table td {
    display: block;
    width: 100%;
  }

  .research-candidates-table tr {
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    background: white;
  }

  .research-candidates-table tr.editing {
    border-color: var(--warning-color);
  }

  .research-candidates-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .research-candidates-table td:last-child {
    border-bottom: none;
  }

  .research-candidates-table td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 1rem;
    flex: 0 0 120px;
  }

  .research-candidates-table td>* {
    flex: 1;
    text-align: right;
  }

  .research-candidates-table .actions-cell {
    justify-content: flex-end;
  }

  .research-candidates-table .actions-cell .btn {
    margin: 0 0.25rem;
  }
}

/* Button variants for research table */
.btn-info {
  background: linear-gradient(135deg, var(--primary-light) 0%, #0891b2 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-info:hover:not(:disabled) {
  background: linear-gradient(135deg, #22d3ee 0%, var(--primary-light) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), var(--shadow-glow-sm);
}

.research-table-modal .modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Quick-add footer form */
.research-table-modal .quick-add-footer {
  flex-direction: row;
  flex-wrap: nowrap;
}

.quick-add-form {
  flex: 1;
}

.quick-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
}

.quick-add-input {
  padding: 0.4rem 0.6rem !important;
  font-size: 0.9rem !important;
  height: 36px;
}

.quick-add-input::placeholder {
  font-size: 0.85rem;
  color: #999;
}

.quick-add-row .btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  white-space: nowrap;
  height: 36px;
}

.quick-add-row select.quick-add-input {
  padding-right: 1.5rem !important;
}

/* ============================================
   MODERN RESEARCH TABLE MODAL ENHANCEMENTS
   ============================================ */

/* Modal container - modern shadow and rounded corners */
.research-table-modal {
  border-radius: 12px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  border: none !important;
  overflow: hidden !important;
}

/* Modern header - matches app's primary color */
.research-table-modal .modal-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border-bottom: none;
  padding: 1rem 1.25rem !important;
}

.research-table-modal .modal-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.research-table-modal .modal-header .modal-close {
  color: white;
  opacity: 0.8;
  font-size: 1.5rem;
  transition: opacity 0.2s, transform 0.2s;
}

.research-table-modal .modal-header .modal-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Modern search bar container - fixed to contain all elements */
.research-table-modal .search-container {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 0.75rem !important;
  margin-bottom: 0.75rem !important;
  border: 1px solid var(--border-color);
}

.research-table-modal .search-container input[type="text"] {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 1rem !important;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  min-width: 200px;
}

.research-table-modal .search-container input[type="text"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.15);
  outline: none;
}

.research-table-modal .search-container input[type="text"]::placeholder {
  color: var(--text-secondary);
}

/* Modern checkbox styling */
.research-table-modal .search-container label {
  background: white;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.research-table-modal .search-container label:hover {
  border-color: var(--primary-color);
  background: #ecf0f1;
}

/* Modern Import/Export buttons */
.research-table-modal #importCandidatesBtn,
.research-table-modal #exportCandidatesBtn {
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s;
  border: 2px solid var(--border-color);
  background: white;
  white-space: nowrap;
}

.research-table-modal #importCandidatesBtn {
  color: var(--success-color);
  border-color: #d5f5e3;
  background: #eafaf1;
}

.research-table-modal #importCandidatesBtn:hover {
  background: #d5f5e3;
  border-color: var(--success-color);
  transform: translateY(-1px);
}

.research-table-modal #exportCandidatesBtn {
  color: var(--primary-color);
  border-color: #d6eaf8;
  background: #ebf5fb;
}

.research-table-modal #exportCandidatesBtn:hover {
  background: #d6eaf8;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* Modern table styling with grid lines */
.research-candidates-table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #bdc3c7;
  border-collapse: separate !important;
  border-spacing: 0;
}

.research-candidates-table th {
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-hover) 100%) !important;
  color: white !important;
  font-size: 0.8rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.6rem 0.5rem !important;
  border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-bottom: 2px solid var(--primary-hover) !important;
}

.research-candidates-table th:last-child {
  border-right: none !important;
}

.research-candidates-table th:first-child {
  border-top-left-radius: 8px;
}

.research-candidates-table th:last-child {
  border-top-right-radius: 8px;
}

.research-candidates-table td {
  border-right: 1px solid #dce1e5 !important;
  border-bottom: 1px solid #dce1e5 !important;
  padding: 0.5rem !important;
  vertical-align: middle !important;
}

.research-candidates-table td:last-child {
  border-right: none !important;
}

.research-candidates-table tbody tr {
  transition: background-color 0.15s;
}

.research-candidates-table tbody tr:hover:not(.editing) {
  background-color: #f8f9fa !important;
}

/* Alternating row colors (subtle) */
.research-candidates-table tbody tr:nth-child(even):not(.editing):not(.category-active):not(.category-inactive):not(.category-other) {
  background-color: #fafbfc;
}

/* Modern status pills */
.research-candidates-table td:nth-child(5) {
  font-weight: 500;
}

/* Action buttons - modern pill style */
.research-candidates-table .actions-cell .btn {
  border-radius: 6px !important;
  font-weight: 500;
  font-size: 0.7rem !important;
  padding: 0.25rem 0.5rem !important;
  transition: all 0.15s;
  border: none !important;
}

.research-candidates-table .actions-cell .btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
}

.research-candidates-table .actions-cell .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.4);
}

.research-candidates-table .actions-cell .btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #1e8449 100%);
}

.research-candidates-table .actions-cell .btn-success:hover {
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.4);
}

.research-candidates-table .actions-cell .btn-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
}

.research-candidates-table .actions-cell .btn-danger:hover {
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.research-candidates-table .actions-cell .btn-secondary {
  background: var(--secondary-color);
  color: white;
}

/* Modern pagination */
.research-table-modal .pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 0.75rem;
}

.research-table-modal .pagination button {
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: white;
  transition: all 0.15s;
}

.research-table-modal .pagination button:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.research-table-modal .pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.research-table-modal .pagination span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Modern quick-add footer */
.research-table-modal .quick-add-footer {
  background: linear-gradient(180deg, #f8f9fa 0%, #ecf0f1 100%);
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1rem !important;
  gap: 0.75rem;
}

.research-table-modal .quick-add-input {
  border-radius: 6px !important;
  border: 2px solid var(--border-color) !important;
  transition: border-color 0.2s !important;
}

.research-table-modal .quick-add-input:focus {
  border-color: var(--primary-color) !important;
  outline: none;
}

.research-table-modal .quick-add-row .btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #1e8449 100%) !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 600;
  transition: all 0.15s;
}

.research-table-modal .quick-add-row .btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.research-table-modal #closeResearchModalBtn {
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
}

/* Editing row highlight */
.research-candidates-table tr.editing {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%) !important;
  box-shadow: inset 0 0 0 2px var(--warning-color);
}

/* Input fields in table - modern style */
.research-candidates-table input.form-input,
.research-candidates-table select.form-select {
  border-radius: 6px !important;
  border: 2px solid var(--border-color) !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

.research-candidates-table input.form-input:focus,
.research-candidates-table select.form-select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2) !important;
  outline: none;
}

/* Note/Info content hover - modern style */
.research-candidates-table .note-content,
.research-candidates-table .info-content {
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.research-candidates-table .note-content:hover,
.research-candidates-table .info-content:hover {
  background: #d6eaf8 !important;
  color: var(--primary-color);
}

/* Scrollbar styling for the modal */
.research-table-modal ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.research-table-modal ::-webkit-scrollbar-track {
  background: #ecf0f1;
  border-radius: 4px;
}

.research-table-modal ::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.research-table-modal ::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Hide Bitwarden extension iframe */
iframe[src^="chrome-extension://"][title*="Bitwarden"] {
  display: none !important;
}

/* ==========================================================================
   OVERVIEW MODAL
   ========================================================================== */

.overview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-color);
  z-index: 1001;
  flex-direction: column;
}

.overview-modal.show {
  display: flex;
}

.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}

.overview-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.overview-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* BAP Toggle Switch */
.bap-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.bap-toggle input {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.bap-toggle input:checked+.toggle-slider {
  background: var(--success-color);
}

.bap-toggle input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Overview Legend */
.overview-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  padding: 0.1rem 0.5rem;
  background: transparent;
  border-radius: 4px;
  font-size: 0.75rem;
}

.overview-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #fff;
  background: var(--primary-color);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.legend-item i {
  font-size: 0.6rem;
}

.legend-active {
  color: #ecf0f1;
}

.legend-warranty {
  color: #f0ad4e;
}

.legend-closed {
  color: #dc3545;
}

.overview-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.overview-sidebar {
  width: 220px;
  min-width: 220px;
  background: #f8f9fa;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: #ecf0f1;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.recruiter-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.recruiter-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 2px;
  background: transparent;
  border: none;
  border-radius: var(--border-radius);
  text-align: left;
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.recruiter-item:hover {
  background: #e8f4fd;
}

.recruiter-item.active {
  background: var(--primary-color);
  color: var(--text-light);
}

.recruiter-item.all-recruiters {
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
}

.recruiter-item.no-recruiter {
  font-style: italic;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  color: var(--text-muted);
}

.recruiter-item.no-recruiter.active {
  color: var(--text-light);
}

/* Overview Content */
.overview-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.overview-table-wrapper {
  flex: 1;
  overflow: auto;
  /*padding: 0.5rem; Not needed*/
}

/* Overview Table */
.overview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
  background: white;
}

.overview-table th {
  position: sticky;
  top: 0;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 0.5rem 0.4rem;
  text-align: left;
  font-weight: 500;
  font-size: 0.7rem;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.overview-table th:hover {
  background: var(--primary-hover);
}

.overview-table th.sorted-asc::after {
  content: ' ▲';
  font-size: 0.6rem;
}

.overview-table th.sorted-desc::after {
  content: ' ▼';
  font-size: 0.6rem;
}

.overview-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #ecf0f1;
  vertical-align: top;
  max-width: 200px;
}

.overview-table tr:hover {
  background: #f8f9fa;
}

/* Row backgrounds for BAP status */
.overview-table tr.bap-missing-row {
  background: #ffebee !important;
}

.overview-table tr.bap-missing-row:hover {
  background: #ffcdd2 !important;
}

.overview-table tr.warranty-period-row {
  background: #fff8e1 !important;
}

.overview-table tr.warranty-period-row:hover {
  background: #ffecb3 !important;
}

/* Wrapped cells (candidates, partner info, holidays) */
.overview-table .wrapped-cell {
  max-width: 180px;
  font-size: 0.7rem;
  line-height: 1.3;
}

.overview-table .wrapped-cell .item {
  display: block;
  padding: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-table .candidate-item {
  color: var(--text-primary);
}

.overview-table .candidate-item.invited {
  color: var(--success-color);
  font-weight: 500;
}

.overview-table .partner-info {
  font-size: 0.7rem;
  line-height: 1.4;
}

.overview-table .partner-info .label {
  color: var(--text-secondary);
  font-size: 0.65rem;
}

/* Currency formatting */
.overview-table .currency {
  text-align: right;
  font-family: 'Consolas', 'Monaco', monospace;
  white-space: nowrap;
}

/* Number formatting */
.overview-table .number {
  text-align: center;
}

/* Megjegyzés cell */
.overview-table .megjegyzes-cell {
  max-width: 200px;
  min-width: 150px;
  vertical-align: top;
}

.overview-table .megjegyzes-cell .megjegyzes-content {
  max-height: 80px;
  font-size: 0.7rem;
}

.overview-table .megjegyzes-cell .empty-value {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.7rem;
}

/* Summary row */
.overview-summary-row {
  background: linear-gradient(135deg, #e8f4fd 0%, #d1e8fa 100%);
  border-bottom: 2px solid var(--primary-color);
}

.overview-summary-row .summary-cell {
  padding: 6px 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-dark);
}

.overview-summary-row .summary-cell.currency {
  font-family: 'Consolas', 'Monaco', monospace;
  white-space: nowrap;
  text-align: right;
}

.overview-summary-row .summary-cell.number {
  text-align: center;
}

/* Sticky columns for horizontal scrolling (Company & Position) */
.overview-table th.sticky-col-1,
.overview-table td.sticky-col-1 {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
  min-width: 120px;
  max-width: 150px;
  /* Override semi-transparent border from base th style */
  border-right: none;
}

.overview-table th.sticky-col-2,
.overview-table td.sticky-col-2 {
  position: sticky;
  left: 120px;
  z-index: 2;
  background: inherit;
  min-width: 140px;
  max-width: 180px;
  /* Override semi-transparent border from base th style */
  border-right: none;
}

/* Sticky column header specific styling (higher z-index for header) */
.overview-table th.sticky-col-1 {
  z-index: 12;
  background: var(--primary-color);
  /* Solid opaque border to cover scrolling content */
  border-right: 1px solid var(--primary-color);
}

.overview-table th.sticky-col-2 {
  z-index: 12;
  background: var(--primary-color);
  /* Solid border with separator line */
  border-right: 2px solid #1a252f;
}

/* Sticky column data cell background colors */
.overview-table td.sticky-col-1 {
  background: white;
  border-right: 1px solid white;
  box-shadow: 1px 0 0 0 white;
}

.overview-table td.sticky-col-2 {
  background: white;
  border-right: 2px solid #ccc;
}

.overview-table tr:hover td.sticky-col-1 {
  background: #f8f9fa;
  border-right: 1px solid #f8f9fa;
  box-shadow: 1px 0 0 0 #f8f9fa;
}

.overview-table tr:hover td.sticky-col-2 {
  background: #f8f9fa;
  border-right: 2px solid #ccc;
}

.overview-table tr.bap-missing-row td.sticky-col-1 {
  background: #ffebee;
  border-right: 1px solid #ffebee;
  box-shadow: 1px 0 0 0 #ffebee;
}

.overview-table tr.bap-missing-row td.sticky-col-2 {
  background: #ffebee;
  border-right: 2px solid #ccc;
  box-shadow: 2px 0 0 0 #ccc;
}

.overview-table tr.bap-missing-row:hover td.sticky-col-1 {
  background: #ffcdd2;
  border-right: 1px solid #ffcdd2;
  box-shadow: 1px 0 0 0 #ffcdd2;
}

.overview-table tr.bap-missing-row:hover td.sticky-col-2 {
  background: #ffcdd2;
  border-right: 2px solid #ccc;
  box-shadow: 2px 0 0 0 #ccc;
}

.overview-table tr.warranty-period-row td.sticky-col-1 {
  background: #fff8e1;
  border-right: 1px solid #fff8e1;
  box-shadow: 1px 0 0 0 #fff8e1;
}

.overview-table tr.warranty-period-row td.sticky-col-2 {
  background: #fff8e1;
  border-right: 2px solid #ccc;
  box-shadow: 2px 0 0 0 #ccc;
}

.overview-table tr.warranty-period-row:hover td.sticky-col-1 {
  background: #ffecb3;
  border-right: 1px solid #ffecb3;
  box-shadow: 1px 0 0 0 #ffecb3;
}

.overview-table tr.warranty-period-row:hover td.sticky-col-2 {
  background: #ffecb3;
  border-right: 2px solid #ccc;
  box-shadow: 2px 0 0 0 #ccc;
}

/* Summary row sticky cells */
.overview-summary-row td.sticky-col-1 {
  background: #d1e8fa;
  border-right: 1px solid #d1e8fa;
  box-shadow: 1px 0 0 0 #d1e8fa;
  z-index: 3;
}

.overview-summary-row td.sticky-col-2 {
  background: #d1e8fa;
  border-right: 2px solid var(--primary-color);
  box-shadow: 0px 0 0 0 var(--primary-color);
  z-index: 3;
}

/* Empty state */
.overview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.overview-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Loading state */
.overview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
}

/* Scrollbar styling */
.overview-table-wrapper::-webkit-scrollbar,
.recruiter-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.overview-table-wrapper::-webkit-scrollbar-track,
.recruiter-list::-webkit-scrollbar-track {
  background: #ecf0f1;
}

.overview-table-wrapper::-webkit-scrollbar-thumb,
.recruiter-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.overview-table-wrapper::-webkit-scrollbar-thumb:hover,
.recruiter-list::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Overview Responsive Styles */
@media (max-width: 1400px) {

  .overview-table th,
  .overview-table td {
    padding: 0.3rem 0.35rem;
    font-size: 0.7rem;
  }

  .overview-table th {
    font-size: 0.65rem;
  }

  .overview-table .wrapped-cell {
    max-width: 140px;
    font-size: 0.65rem;
  }
}

@media (max-width: 1200px) {
  .overview-sidebar {
    width: 180px;
    min-width: 180px;
  }

  .recruiter-item {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  .overview-table th,
  .overview-table td {
    padding: 0.25rem 0.3rem;
    font-size: 0.65rem;
  }

  .overview-table th {
    font-size: 0.6rem;
  }
}

@media (max-width: 1024px) {
  .overview-header {
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .overview-header h2 {
    font-size: 1rem;
  }

  .overview-controls {
    gap: 1rem;
  }

  .toggle-label {
    font-size: 0.75rem;
  }

  .overview-sidebar {
    width: 160px;
    min-width: 160px;
  }

  .sidebar-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .recruiter-item {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
  }

  .overview-table th,
  .overview-table td {
    padding: 0.2rem 0.25rem;
    font-size: 0.6rem;
  }

  .overview-table th {
    font-size: 0.55rem;
  }

  .overview-table .wrapped-cell {
    max-width: 120px;
    font-size: 0.58rem;
  }

  .overview-table .partner-info {
    font-size: 0.58rem;
  }

  .overview-table .partner-info .label {
    font-size: 0.52rem;
  }
}

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

  .overview-sidebar {
    width: 100%;
    min-width: 100%;
    max-height: 120px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .recruiter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .recruiter-item {
    flex: 0 0 auto;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    margin-bottom: 0;
  }

  .recruiter-item.all-recruiters {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0.3rem;
  }

  .overview-content {
    flex: 1;
    min-height: 0;
  }

  .overview-table th,
  .overview-table td {
    padding: 0.2rem;
    font-size: 0.55rem;
  }

  .overview-table th {
    font-size: 0.5rem;
  }

  .overview-controls {
    width: 100%;
    justify-content: space-between;
  }
}

/* High zoom / very small text support */
@media (max-width: 600px) {
  .overview-header {
    padding: 0.4rem 0.75rem;
  }

  .overview-header h2 {
    font-size: 0.9rem;
  }

  .bap-toggle {
    gap: 0.3rem;
  }

  .toggle-slider {
    width: 36px;
    height: 20px;
  }

  .toggle-slider::before {
    width: 16px;
    height: 16px;
  }

  .bap-toggle input:checked+.toggle-slider::before {
    transform: translateX(16px);
  }

  .toggle-label {
    font-size: 0.65rem;
  }

  #closeOverviewBtn {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  .overview-sidebar {
    max-height: 100px;
  }

  .sidebar-header {
    padding: 0.4rem 0.5rem;
    font-size: 0.7rem;
  }

  .recruiter-item {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
  }

  .overview-table th,
  .overview-table td {
    padding: 0.15rem;
    font-size: 0.5rem;
  }

  .overview-table th {
    font-size: 0.45rem;
  }

  .overview-table .wrapped-cell {
    max-width: 80px;
    font-size: 0.48rem;
  }
}

/* ==========================================================================
   WEEKLY OVERVIEW MODAL (daily.html)
   ========================================================================== */

.weekly-overview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-color);
  z-index: 1001;
  flex-direction: column;
}

.weekly-overview-modal.show {
  display: flex;
}

.weekly-overview-modal .overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  flex-shrink: 0;
}

.weekly-overview-modal .overview-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.weekly-overview-modal .overview-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Weekly Sidebar */
.weekly-sidebar {
  width: 220px;
  min-width: 220px;
  background: #f8f9fa;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.weekly-sidebar .sidebar-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.weekly-sidebar .sidebar-section.week-section {
  max-height: 280px;
  border-bottom: 2px solid var(--border-color);
  flex-shrink: 0;
}

.weekly-sidebar .sidebar-section.recruiter-section {
  flex: 1;
  min-height: 0;
}

.weekly-sidebar .sidebar-header {
  padding: 0.6rem 0.75rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: #e9ecef;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Week selector list */
.week-selector-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.week-selector-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 4px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  text-align: left;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.week-selector-item:hover {
  background: #e8f4fd;
  border-color: var(--primary-color);
}

.week-selector-item.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.week-selector-item .week-dates {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

/* Recruiter list in weekly overview */
.weekly-sidebar .recruiter-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.weekly-sidebar .recruiter-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 4px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.weekly-sidebar .recruiter-item:hover {
  background: #e8f4fd;
  border-color: var(--primary-color);
}

.weekly-sidebar .recruiter-item.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.weekly-sidebar .recruiter-item.all-recruiters {
  font-weight: 600;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.6rem;
}

/* Weekly content area */
.weekly-content {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.weekly-overview-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weekly-section {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.weekly-section .section-header {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Weekly table wrapper */
.weekly-table-wrapper {
  overflow-x: auto;
}

/* Weekly overview tables */
.weekly-overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.weekly-overview-table th {
  position: sticky;
  top: 0;
  background: var(--primary-color);
  color: white;
  padding: 0.4rem 0.5rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.7rem;
  white-space: nowrap;
  z-index: 5;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.weekly-overview-table th:last-child {
  border-right: none;
}

.weekly-overview-table th.sticky-col {
  position: sticky;
  left: 0;
  z-index: 10;
  background: var(--primary-color);
  text-align: left;
  min-width: 120px;
}

.weekly-overview-table .sub-header th {
  background: var(--primary-hover);
  font-size: 0.65rem;
  padding: 0.25rem 0.3rem;
  top: 28px;
}

.weekly-overview-table .day-group-header {
  background: #f39c12 !important;
  border-left: 2px solid rgba(255, 255, 255, 0.4);
}

.weekly-overview-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #ecf0f1;
  border-right: 1px solid #f0f0f0;
  vertical-align: middle;
}

.weekly-overview-table td:last-child {
  border-right: none;
}

.weekly-overview-table td.sticky-col {
  position: sticky;
  left: 0;
  background: white;
  z-index: 2;
  font-weight: 500;
}

.weekly-overview-table tr:hover td {
  background: #f8f9fa;
}

.weekly-overview-table tr:hover td.sticky-col {
  background: #f0f4f8;
}

/* Cell types */
.weekly-overview-table .company-cell {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-overview-table .position-cell {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-overview-table .recruiter-cell {
  max-width: 100px;
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-overview-table .metric-cell {
  text-align: center;
  min-width: 35px;
}

.weekly-overview-table .metric-sub {
  font-size: 0.6rem !important;
  padding: 0.2rem !important;
}

.weekly-overview-table .presentation-cell {
  background: #fff8e1 !important;
  font-weight: 600;
}

.weekly-overview-table tr:hover .presentation-cell {
  background: #fff3cd !important;
}

/* Day group borders */
.weekly-overview-table .day-start {
  border-left: 2px solid #bdc3c7 !important;
}

/* Summary row */
.weekly-overview-table .summary-row {
  background: linear-gradient(135deg, #e8f4fd 0%, #d1e8fa 100%) !important;
  border-top: 2px solid var(--primary-color);
}

.weekly-overview-table .summary-row td {
  font-weight: 600;
  color: var(--primary-dark);
}

.weekly-overview-table .summary-row td.sticky-col {
  background: linear-gradient(135deg, #e8f4fd 0%, #d1e8fa 100%) !important;
}

.weekly-overview-table .summary-row:hover td {
  background: linear-gradient(135deg, #d1e8fa 0%, #c4e0f8 100%) !important;
}

.weekly-overview-table .summary-row:hover td.sticky-col {
  background: linear-gradient(135deg, #d1e8fa 0%, #c4e0f8 100%) !important;
}

/* Platform and activity labels */
.weekly-overview-table .platform-label,
.weekly-overview-table .activity-label {
  font-weight: 500;
  white-space: nowrap;
  min-width: 180px;
}

/* Wrapped cells for activities */
.weekly-overview-table .wrapped-cell {
  max-width: 200px;
  font-size: 0.7rem;
  line-height: 1.4;
  vertical-align: top;
  padding: 0.4rem 0.5rem;
}

.weekly-overview-table .activity-item {
  padding: 3px 0;
  border-bottom: 1px dotted #e0e0e0;
}

.weekly-overview-table .activity-item:last-child {
  border-bottom: none;
}

/* Location row styling */
.weekly-overview-table .location-row {
  background: #f5f5f5;
  border-top: 2px solid var(--border-color);
}

.weekly-overview-table .location-row td {
  font-weight: 500;
}

.weekly-overview-table .location-cell {
  text-align: center;
  font-weight: 500;
}

.weekly-overview-table .location-office {
  background: #e3f2fd !important;
  color: #1565c0;
}

.weekly-overview-table .location-home {
  background: #f3e5f5 !important;
  color: #7b1fa2;
}

/* Messages table specific */
.messages-table th,
.messages-table td {
  text-align: center;
}

.messages-table td.sticky-col {
  text-align: left;
}

/* Responsive adjustments for weekly overview */
@media (max-width: 1200px) {
  .weekly-sidebar {
    width: 180px;
    min-width: 180px;
  }

  .week-selector-item {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  .weekly-sidebar .recruiter-item {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  .weekly-overview-table {
    font-size: 0.7rem;
  }

  .weekly-overview-table th {
    font-size: 0.65rem;
    padding: 0.3rem 0.4rem;
  }
}

@media (max-width: 992px) {
  .weekly-sidebar {
    width: 160px;
    min-width: 160px;
  }

  .weekly-sidebar .sidebar-section.week-section {
    max-height: 200px;
  }

  .weekly-overview-table .platform-label,
  .weekly-overview-table .activity-label {
    min-width: 140px;
  }
}

@media (max-width: 768px) {
  .weekly-overview-modal .overview-body {
    flex-direction: column;
  }

  .weekly-sidebar {
    width: 100%;
    min-width: 100%;
    max-height: 180px;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .weekly-sidebar .sidebar-section {
    flex: 1;
    max-height: none !important;
    border-bottom: none !important;
  }

  .weekly-sidebar .sidebar-section.week-section {
    border-right: 1px solid var(--border-color);
  }

  .weekly-content {
    flex: 1;
    min-height: 0;
  }

  .weekly-overview-table th,
  .weekly-overview-table td {
    padding: 0.25rem 0.3rem;
    font-size: 0.65rem;
  }
}

/* ==========================================================================
   BUG REPORT FAB — always-visible link to the bug submission form
   ========================================================================== */
.bug-report-fab {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-light);
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-pill);
  box-shadow: var(--shadow-md);
  opacity: 0.85;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition: var(--transition);
}

.bug-report-fab:hover {
  opacity: 1;
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  box-shadow: var(--shadow-lg);
}

.bug-report-fab:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.bug-report-fab:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .bug-report-fab {
    bottom: 12px;
    right: 12px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media print {
  .bug-report-fab {
    display: none;
  }
}