/* ==========================================================
   AITANA SUITE - CAPACITY PLANNING STYLESHEET (style.css)
   Core Design System, Premium Aesthetics, Glassmorphism & Grid
   ========================================================== */

:root {
  /* Design Tokens - Devoteam Corporate Light Theme */
  --bg-gradient: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-modal: #ffffff;
  --border-color: #e2e8f0;
  --primary-accent: #f8485e;
  --border-color-hover: #cbd5e1;
  
  --color-primary: #f8485e; /* Devoteam Coral */
  --color-primary-hover: #e0364c;
  --color-primary-glow: rgba(248, 72, 94, 0.2);
  --color-devoteam-coral: #f8485e;
  --color-devoteam-coral-hover: #e0364c;
  --color-devoteam-coral-light: #fff1f3;
  --color-devoteam-grey: #56555a;
  --color-devoteam-charcoal: #1e2026;
  
  --color-gold: #d97706; /* Amber Gold */
  --color-emerald: #059669; /* Success Emerald */
  --color-rose: #dc2626; /* Danger Red */
  
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dark: #1e293b;
  
  --glass-blur: none;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 24px;
  
  --shadow-premium: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-glow-indigo: 0 0 25px rgba(248, 72, 94, 0.15);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fa;
  background-image: none;
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* DYNAMIC BACKGROUND GLOW ORBS (Disabled to eliminate GPU contention during meetings) */
.bg-ambient-glow {
  display: none !important;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  mix-blend-mode: screen;
}

.orb-indigo {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, #6366f1 0%, rgba(99,102,241,0) 70%);
  top: -10%;
  left: -10%;
}

.orb-gold {
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, #d97706 0%, rgba(217,119,6,0) 70%);
  bottom: -5%;
  right: -5%;
  animation-delay: -5s;
}

.orb-violet {
  width: 30vw;
  height: 30vw;
  background: radial-gradient(circle, #7c3aed 0%, rgba(124,58,237,0) 70%);
  top: 40%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, -4vw) scale(1.1); }
  100% { transform: translate(-2vw, 4vw) scale(0.9); }
}

/* UTILITIES */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }

/* SCROLLBAR CUSTOMIZATION */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(13, 20, 38, 0.1);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.2);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

/* APPLICATION CONTAINER (FULL WIDTH LAYOUT) */
.app-container {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 0.75rem 1.5rem; /* Ampliado top padding para alinear con el botón */
  margin: 0 auto;
  overflow: hidden;
}

/* APP HEADER */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem; /* Incrementado para dar más aire */
  padding-bottom: 1.25rem; /* Ampliado padding para albergar completamente el botón */
  border-bottom: 1px solid var(--border-color);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* PREMIUM BACK TO PORTAL BUTTON (TOP HEADER) */
.btn-portal-back-premium {
  position: relative !important;
  z-index: 1000 !important;
  background: var(--color-devoteam-coral-light) !important;
  border: 1px solid rgba(248, 72, 94, 0.25) !important;
  color: var(--color-devoteam-coral) !important;
  text-decoration: none !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  font-family: 'Inter', sans-serif !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.08) !important;
  box-sizing: border-box !important;
  height: 38px !important;
  width: 165px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  margin: 0 !important;
}

.btn-portal-back-premium:hover {
  transform: translateY(-2px) !important;
  background: rgba(248, 72, 94, 0.12) !important;
  border-color: rgba(248, 72, 94, 0.45) !important;
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.18) !important;
  color: var(--color-devoteam-coral-hover) !important;
}

.btn-portal-back-premium:active {
  transform: translateY(0) !important;
}

.btn-portal-back-premium i {
  color: var(--color-devoteam-coral) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-portal-back-premium:hover i {
  color: var(--color-devoteam-coral-hover) !important;
  transform: translateX(-4px) !important;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-glow-gold,
.logo-glow-devoteam {
  width: 36px;
  height: 36px;
  background: var(--color-devoteam-coral-light);
  border: 1px solid rgba(248, 72, 94, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-devoteam-coral);
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.12);
  transition: var(--transition-smooth);
}

.logo-glow-gold:hover,
.logo-glow-devoteam:hover {
  background: rgba(248, 72, 94, 0.15);
  border-color: rgba(248, 72, 94, 0.45);
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.2);
  transform: rotate(5deg) scale(1.05);
}

.logo-icon {
  width: 18px;
  height: 18px;
}

.brand-text h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  margin: 0;
}

.brand-text > span {
  font-size: 0.7rem;
  color: var(--color-devoteam-grey);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  display: block;
}

.text-gold-gradient {
  color: var(--color-devoteam-coral);
  font-size: inherit !important;
  font-weight: inherit !important;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-devoteam-grey);
  background: #f1f5f9;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
}

.meta-item i {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
}

.user-badge {
  background: var(--color-devoteam-coral-light);
  color: var(--color-devoteam-coral);
  border: 1px solid rgba(248, 72, 94, 0.25);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.08);
}

/* CONTROL & FILTERS BAR */
.control-bar {
  position: relative;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center; /* Changed from flex-end to center */
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-premium);
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.control-left {
  display: flex;
  align-items: center;
  flex-grow: 1;
  gap: 0.45rem;
  min-width: 0;
  flex-shrink: 1;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.control-group:first-child {
  min-width: 0;
}

.staff-multiselect-group {
  flex-grow: 0;
  max-width: none;
}

.btn-clear-all-filters {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #64748b;
  font-weight: 500;
}

.btn-clear-all-filters.active-filter-badge {
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  color: #dc2626 !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.1);
}

.btn-clear-all-filters.active-filter-badge:hover {
  background: #fecaca !important;
  border-color: #f87171 !important;
  color: #b91c1c !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
  transform: translateY(-1px);
}

.btn-clear-all-filters.active-filter-badge:active {
  transform: translateY(0);
}

.control-group label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.control-select {
  width: 100%;
  background: #ffffff !important;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  height: 28px;
  padding: 0 2.2rem 0 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2356555a' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 0.85rem !important;
  transition: var(--transition-smooth);
}

.control-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(248, 72, 94, 0.12);
  outline: none;
}

.control-select option {
  background-color: #ffffff !important;
  color: #1e293b !important;
}

.select-wrapper::after {
  display: none !important;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 0.85rem;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.control-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  height: 28px;
  padding: 0 1rem 0 2.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.control-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(248, 72, 94, 0.12);
  outline: none;
}

input[type="date"] {
  padding-left: 0.75rem !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease-in-out;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease-in-out;
}

input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.control-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* BUTTONS */
.btn-primary, .btn-secondary, .btn-danger {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(248, 72, 94, 0.35);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-primary-small {
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.2);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary-small:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(248, 72, 94, 0.3);
}

#btn-sync-jira {
  background: var(--color-devoteam-coral-light) !important;
  border: 1px solid rgba(248, 72, 94, 0.25) !important;
  color: var(--color-devoteam-coral) !important;
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.08) !important;
}

#btn-sync-jira:hover {
  background: rgba(248, 72, 94, 0.15) !important;
  border-color: rgba(248, 72, 94, 0.45) !important;
  color: var(--color-devoteam-coral-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.18) !important;
}

.btn-primary-small i,
.btn-primary-small svg {
  width: 13px !important;
  height: 13px !important;
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

/* MATRIX CARD DESIGN */
.matrix-section {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.matrix-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-premium);
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.matrix-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem; /* Reduced from 1.75rem 2.25rem */
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem; /* Reduced from 1.5rem */
}

.card-title-group h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--text-main);
}

.legend-group {
  display: flex;
  align-items: center;
  gap: 1rem; /* Reduced from 1.25rem */
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem; /* Reduced from 0.4rem */
  font-size: 0.75rem; /* Reduced from 0.8rem */
  color: var(--text-secondary);
}

.legend-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.legend-icon {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}

/* FULL WIDTH MATRIX TABLE WITH STICKY COLUMNS & GLOBAL CSS VIRTUALIZATION */
.matrix-container {
  width: 100%;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.table-scroll-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-height: 100%;
  max-width: 100%;
  position: relative;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  contain: paint;
}

.capacity-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: fixed; /* Added to enforce strict column widths */
}

.capacity-matrix-table th, 
.capacity-matrix-table td {
  padding: 0.25rem 0.4rem; /* Reduced from 0.65rem 0.5rem */
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem; /* Reduced from 0.85rem */
}

/* STICKY COLUMN 1: PROFESIONALES */
.capacity-matrix-table th.sticky-col.first-col, 
.capacity-matrix-table td.sticky-col.first-col {
  position: sticky;
  left: 0;
  z-index: 10;
  width: 235px;
  min-width: 235px;
  max-width: 235px; /* Added to enforce exact layout */
  background-color: #ffffff;
  border-right: 1px solid var(--border-color);
}

/* STICKY COLUMN 2: PROYECTO */
.capacity-matrix-table th.sticky-col.second-col, 
.capacity-matrix-table td.sticky-col.second-col {
  position: sticky;
  left: 235px;
  z-index: 10;
  width: 235px;
  min-width: 235px;
  max-width: 235px; /* Added to enforce exact layout */
  background-color: #ffffff;
  border-right: 2px solid #cbd5e1;
}

/* Headers style */
.capacity-matrix-table thead {
  position: sticky;
  top: 0;
  z-index: 20;
}

.capacity-matrix-table th {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #f1f5f9 !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem; /* Reduced from 0.775rem */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.3rem;
  border-bottom: 2px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  background-clip: padding-box;
}

.capacity-matrix-table th.sticky-col.first-col {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 30;
  background-color: #f1f5f9 !important;
  border-right: 1px solid var(--border-color);
}

.capacity-matrix-table th.sticky-col.second-col {
  position: sticky;
  top: 0;
  left: 235px; /* Aligned with td.sticky-col.second-col (235px) */
  z-index: 30;
  background-color: #f1f5f9 !important;
  border-right: 1.5px solid var(--border-color);
}

.capacity-matrix-table th.week-header-cell,
.capacity-matrix-table td.global-week-cell,
.capacity-matrix-table td.allocation-cell,
.capacity-matrix-table td.cell-locked {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  text-align: center;
}

.capacity-matrix-table td.global-month-cell {
  text-align: center;
}

.capacity-matrix-table th.week-header-cell {
  background-color: #f1f5f9 !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.capacity-matrix-table th.week-header-cell:hover {
  background-color: #e2e8f0 !important;
  color: var(--text-main);
}

.week-date {
  display: block;
  font-size: 0.55rem; /* Reduced from 0.6rem */
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  margin-top: 0.05rem;
}



.professional-row-header {
  background: #f8fafc;
  border-top: 2px solid var(--border-color);
}

/* Row-by-row Hovering exclusions to avoid sticky conflicts */
.capacity-matrix-table tr:hover td {
  background-color: #f8fafc;
}

.capacity-matrix-table tr:hover td.sticky-col.first-col {
  background-color: #f1f5f9;
}

.capacity-matrix-table tr:hover td.sticky-col.second-col {
  background-color: #f1f5f9;
}

/* RESOURCE IDENTIFICATION CARD CELL */
.resource-card-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.1rem 0.2rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.badge-shared-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #7c3aed;
  cursor: help;
  flex-shrink: 0;
  margin-left: 2px;
  transition: all 0.15s ease-in-out;
}

.badge-shared-icon:hover {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(124, 58, 237, 0.6);
  color: #6d28d9;
  transform: scale(1.08);
}

.resource-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.resource-role {
  font-size: 0.7rem; /* Reduced from 0.725rem */
  color: var(--text-secondary);
}

.btn-add-project-row {
  flex-shrink: 0;
  width: 18px; /* Reduced from 22px */
  height: 18px; /* Reduced from 22px */
  background: var(--color-devoteam-coral-light);
  border: 1px solid rgba(248, 72, 94, 0.25);
  color: var(--color-devoteam-coral);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: var(--transition-smooth);
}

.btn-add-project-row:hover {
  background: var(--color-primary);
  border-color: var(--color-primary-hover);
  color: #fff;
  transform: scale(1.1);
}

.btn-add-project-row i {
  width: 10px; /* Reduced from 12px */
  height: 10px; /* Reduced from 12px */
}

/* PROJECT NAME STYLING */
.project-name-cell {
  vertical-align: middle;
}

.project-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem; /* Reduced from 0.5rem */
  justify-content: space-between;
  padding-right: 0.15rem; /* Reduced from 0.25rem */
}

.project-badge-indicator {
  display: inline-block;
  width: 6px; /* Reduced from 8px */
  height: 6px; /* Reduced from 8px */
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-presales {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.badge-preventa {
  background: linear-gradient(135deg, #c084fc 0%, #7c3aed 100%);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
}

.badge-tag-pv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.35);
  flex-shrink: 0;
  line-height: 1.2;
}

.badge-delivery {
  background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.5);
}

.project-name-text {
  font-weight: 500;
  font-size: 0.8rem; /* Reduced from 0.85rem */
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  text-align: left;
  margin-right: 0.35rem; /* Reduced from 0.5rem */
}

.btn-delete-alloc {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.btn-icon-sm {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  opacity: 0;
  transition: var(--transition-smooth);
}

.btn-icon-sm:hover {
  background: rgba(244, 63, 94, 0.2) !important;
}

.btn-icon-sm-amber:hover {
  background: rgba(234, 179, 8, 0.2) !important;
}

.text-rose {
  color: var(--color-rose) !important;
}

/* PROJECT ROW ACTIONS CONTAINER - Hidden by default to free space for project name, shown on tr:hover */
.project-row-actions {
  display: none;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
}

tr:hover .project-row-actions {
  display: flex;
}

.project-row-actions .btn-icon-sm {
  opacity: 1;
}

tr:hover .btn-delete-alloc,
tr:hover .btn-icon-sm {
  opacity: 1;
}

.btn-delete-alloc:hover {
  color: var(--color-rose);
  background: rgba(239, 68, 68, 0.15);
}

.btn-delete-alloc i,
.btn-delete-alloc svg,
.btn-icon-sm i,
.btn-icon-sm svg {
  width: 14px !important;
  height: 14px !important;
}

/* EXPAND / COLLAPSE BUTTON FOR PROFESSIONAL ROWS */
.btn-toggle-expand {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 0;
}

.btn-toggle-expand:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
  transform: scale(1.05);
}

.btn-toggle-expand:active {
  transform: scale(0.95);
}

.btn-toggle-expand i,
.btn-toggle-expand svg {
  width: 12px !important;
  height: 12px !important;
}

/* ALLOCATION CELL WRAPPER & FILL TO HERE BUTTON */
.alloc-cell-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.btn-fill-to-here {
  position: absolute;
  right: -2px;
  background: var(--color-primary) !important;
  border: none !important;
  color: white !important;
  cursor: pointer;
  border-radius: 3px !important;
  width: 14px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 5;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.alloc-cell-wrapper:hover .btn-fill-to-here {
  opacity: 1;
}

.btn-fill-to-here i,
.btn-fill-to-here svg {
  width: 10px !important;
  height: 10px !important;
  color: #ffffff !important;
}

.btn-fill-to-here:hover {
  background: var(--color-primary-hover) !important;
  transform: scale(1.1);
}

/* TOTALS INDICATOR ROW CELL */
.total-indicator-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.75rem; /* Reduced from 0.8rem */
  letter-spacing: 0.05em;
  color: var(--color-devoteam-grey);
}

/* ALLOCATION CELDAS - PORCENTAJES EDITABLES (ESTILOS PLANOS DE ALTO RENDIMIENTO) */
.allocation-cell {
  text-align: center;
  padding: 0.15rem 0.15rem !important; /* Reduced from 0.35rem 0.25rem */
}

.alloc-input {
  width: 44px; /* Reduced from 48px */
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  text-align: center;
  padding: 0.15rem 0; /* Reduced from 0.35rem 0 */
  font-size: 0.8rem; /* Reduced from 0.825rem */
  font-weight: 500;
  border-radius: 4px; /* Reduced from 6px */
  appearance: textfield;
}

.alloc-input::-webkit-outer-spin-button,
.alloc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.alloc-input:focus {
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.15);
  outline: none;
}

.alloc-input:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.alloc-input:placeholder-shown {
  color: var(--text-muted);
}

/* ==========================================================================
   ESTILOS VISUALES PARA FILAS DE FORECAST (VENTAS) Y PREVENTA (ESTRUCTURAL)
   ========================================================================== */

/* 1. FILAS DE FORECAST (Oportunidades de Preventa) - Tono Naranja Suave Tenue */
.capacity-matrix-table tr.project-row-presales td.sticky-col.second-col {
  background-color: #fffaf5 !important;
}

.capacity-matrix-table tr.project-row-presales:hover td.sticky-col.second-col {
  background-color: #fff0e5 !important;
}

.capacity-matrix-table tr.project-row-presales td.allocation-cell,
.capacity-matrix-table tr.project-row-presales td.cell-forecast-bg,
.cell-forecast-bg {
  background-color: #fff4ea !important;
}

.capacity-matrix-table tr.project-row-presales:hover td.allocation-cell,
.capacity-matrix-table tr.project-row-presales:hover td.cell-forecast-bg {
  background-color: #ffedd5 !important;
}

.capacity-matrix-table tr.project-row-presales .alloc-input,
.cell-forecast-bg .alloc-input {
  background: #ffffff;
  border-color: #fed7aa;
}

.capacity-matrix-table tr.project-row-presales .alloc-input:focus,
.cell-forecast-bg .alloc-input:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

/* 2. FILAS DE DEDICACIÓN A PREVENTA (Actividad Estructural) - Tono Violeta Suave Tenue */
.capacity-matrix-table tr.project-row-preventa td.sticky-col.second-col {
  background-color: #faf8ff !important;
}

.capacity-matrix-table tr.project-row-preventa:hover td.sticky-col.second-col {
  background-color: #f5f3ff !important;
}

.capacity-matrix-table tr.project-row-preventa td.allocation-cell,
.capacity-matrix-table tr.project-row-preventa td.cell-preventa-bg,
.cell-preventa-bg {
  background-color: #f5f3ff !important;
}

.capacity-matrix-table tr.project-row-preventa:hover td.allocation-cell,
.capacity-matrix-table tr.project-row-preventa:hover td.cell-preventa-bg {
  background-color: #ede9fe !important;
}

.capacity-matrix-table tr.project-row-preventa .alloc-input,
.cell-preventa-bg .alloc-input {
  background: #ffffff;
  border-color: #ddd6fe;
}

.capacity-matrix-table tr.project-row-preventa .alloc-input:focus,
.cell-preventa-bg .alloc-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

/* ESTILOS DE CELDA TOTALES Y ALERTAS */
.total-cell {
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem; /* Reduced from 0.825rem */
  border-radius: 4px; /* Reduced from 6px */
}

/* Alerta: Sobre-asignación (>100%) - Rojo Vivo Plano */
.cell-overallocated {
  background: #fef2f2 !important;
  border: 1px solid #fca5a5;
  color: #dc2626 !important;
}

/* Alerta: Infra-asignación (0% < x < 75%) - Glassmorphic Amber */
.cell-underallocated {
  background: #fffbeb !important;
  border: 1px solid #fde68a;
  color: #b45309 !important;
}

/* Óptimo (75% - 100%) - Verde Esmeralda */
.cell-optimal {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0;
  color: #047857 !important;
}

/* Sin Carga (0%) */
.cell-empty {
  color: var(--text-muted);
}

@keyframes pulseWarning {
  0% { box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.15); }
  100% { box-shadow: inset 0 0 15px rgba(239, 68, 68, 0.35), 0 0 10px rgba(239, 68, 68, 0.15); }
}

/* CELDAS BLOQUEADAS (PROJECT BUDGET - OPCIÓN 2) */
.cell-locked {
  background: #f1f5f9 !important;
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: not-allowed;
  position: relative;
  text-align: center;
  border: 1px solid var(--border-color) !important;
}

.locked-value-text {
  opacity: 0.85;
}

.locked-icon {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px !important;
  height: 9px !important;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ESTILOS PARA CELDAS Y INPUTS DESHABILITADOS POR FECHA FIN DE PROYECTO */
.cell-disabled {
  background: #f8fafc !important;
  cursor: not-allowed;
  opacity: 0.6;
  border: 1px solid var(--border-color) !important;
}

.cell-disabled.cell-disabled-with-val {
  opacity: 1 !important;
  background: #fffbeb !important;
  border: 1px dashed #fde68a !important;
  cursor: not-allowed;
}

.alloc-input:disabled {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.alloc-input.input-disabled-with-val:disabled {
  color: #b45309 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
  cursor: not-allowed;
}

.disabled-lock-icon {
  position: absolute;
  top: 1px;
  right: 2px;
  width: 9px;
  height: 9px;
  color: #d97706;
  opacity: 0.85;
  pointer-events: none;
}

/* BOTÓN DE LIMPIEZA RÁPIDA EN CELDA FUERA DE PLAZO */
.btn-clear-expired-cell {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 14px;
  height: 14px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  z-index: 5;
  transition: all 0.15s ease;
}

.btn-clear-expired-cell .disabled-lock-icon {
  position: static;
  display: block;
  pointer-events: none;
}

.btn-clear-expired-cell .clear-expired-hover-icon {
  display: none;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  color: #dc2626;
  pointer-events: none;
}

.btn-clear-expired-cell:hover {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-clear-expired-cell:hover .disabled-lock-icon {
  display: none;
}

.btn-clear-expired-cell:hover .clear-expired-hover-icon {
  display: inline-block;
}

.cell-disabled.cell-disabled-with-val:hover {
  background: #fef9c3 !important;
  border-color: #f59e0b !important;
}

/* BADGE Y ACCIÓN DE FILA PARA LIMPIAR DEDICACIONES FUERA DE FECHA */
.btn-icon-sm-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-icon-sm-warning:hover {
  background: rgba(245, 158, 11, 0.28) !important;
  color: #b45309 !important;
  border-color: rgba(245, 158, 11, 0.7) !important;
  transform: scale(1.08);
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.25);
}

.btn-icon-sm-warning svg {
  width: 13px !important;
  height: 13px !important;
  color: #d97706 !important;
}

.btn-clean-out-of-bounds {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.btn-clean-out-of-bounds svg {
  color: #d97706;
  flex-shrink: 0;
}

.btn-clean-out-of-bounds:hover {
  background: #fde68a;
  color: #78350f;
  border-color: #f59e0b;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.15);
  transform: translateY(-0.5px);
}

/* SUMMARY COLUMN */
.summary-col {
  text-align: center;
  min-width: 100px;
  background-color: #f8fafc !important;
  border-left: 1.5px solid var(--border-color);
}

/* EMPTY STATES */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  gap: 1rem;
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  opacity: 0.6;
}

/* LOADING OVERLAY */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: #f8f9fa;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(248, 72, 94, 0.15);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 20px rgba(248, 72, 94, 0.15);
  margin-bottom: 1.5rem;
}

.loader-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(248, 72, 94, 0.15);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

.loader-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  color: #56555A;
  font-weight: 500;
  animation: pulseText 2s infinite;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* CONFIGURATION MODAL / SLIDE-OVER */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem 2.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title-icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.modal-title-wrapper h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  background: none;
  -webkit-text-fill-color: initial;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-modal-close:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.btn-modal-close i {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 2rem 2.25rem;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-devoteam-grey);
}

.modal-section h3 i {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media(min-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .form-group:last-child {
    grid-column: span 2;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.modal-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  width: 100%;
}

.modal-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(248, 72, 94, 0.12);
  outline: none;
}

.btn-input-action {
  position: absolute;
  right: 1.1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-input-action:hover {
  color: var(--text-main);
}

.btn-input-action i {
  width: 16px;
  height: 16px;
}

/* MAPPING TABLE */
.mapping-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}

.mapping-table {
  width: 100%;
  border-collapse: collapse;
}

.mapping-table th, .mapping-table td {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.mapping-table th {
  background: #f1f5f9;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.mapping-table td strong {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.db-actions-row {
  margin-top: 0.5rem;
}

.modal-footer {
  padding: 1.25rem 2.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: #f8fafc;
}

/* TOAST TOASTS NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10000;
  pointer-events: none;
}

.aitana-toast {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 0.875rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #1e293b !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  min-width: 300px;
  max-width: 450px;
}

.aitana-toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.aitana-toast i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success {
  border-left: 4px solid #10b981 !important;
}
.toast-success i {
  color: #059669 !important;
}

.toast-warning {
  border-left: 4px solid #f59e0b !important;
}
.toast-warning i {
  color: #d97706 !important;
}

.toast-danger {
  border-left: 4px solid #ef4444 !important;
}
.toast-danger i {
  color: #dc2626 !important;
}

.toast-info {
  border-left: 4px solid var(--color-devoteam-coral) !important;
}
.toast-info i {
  color: var(--color-devoteam-coral) !important;
}

.toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.toast-close:hover {
  color: #1e293b;
}

/* SUITE CONNECTION STATUS INDICATOR */
.suite-connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  cursor: help;
}

.suite-connection-status.connected {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.suite-connection-status.disconnected {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.suite-connection-status.connected .status-dot {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981, 0 0 15px #10b981;
  animation: pulse-green 2s infinite;
}

.suite-connection-status.disconnected .status-dot {
  background-color: #fbbf24;
  box-shadow: 0 0 8px #fbbf24, 0 0 15px #fbbf24;
  animation: pulse-amber 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-amber {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* FIELD SEARCH RESULTS */
.search-results-box {
  margin-top: 1.25rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.95);
  padding: 1.25rem;
  box-shadow: var(--shadow-glow-indigo);
  transition: var(--transition-smooth);
}

.search-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.search-field-row:hover {
  background: rgba(99, 102, 241, 0.12) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-1px);
}

.search-field-badge {
  font-size: 0.7rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition-smooth);
}

.search-field-row:hover .search-field-badge {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-glow-indigo);
}

/* CENTRALIZED CONFIGURATION READ-ONLY MODAL STYLES */
.centralized-config-alert {
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.05);
}

.centralized-config-alert .alert-icon {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.centralized-config-alert .alert-icon i {
  width: 20px;
  height: 20px;
}

.centralized-config-alert .alert-content h4 {
  color: #fbbf24;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.centralized-config-alert .alert-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.centralized-config-action {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.btn-primary-hub-config {
  background: linear-gradient(135deg, #F8485E 0%, #E0364C 100%);
  border: none;
  color: #FFFFFF;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(248, 72, 94, 0.25);
}

.btn-primary-hub-config:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
  filter: brightness(1.1);
}

.btn-primary-hub-config i {
  width: 18px;
  height: 18px;
}

.modal-section-read-only {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-section-read-only h3 {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #a5b4fc;
}

.modal-section-read-only h3 i {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.read-only-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

@media(min-width: 600px) {
  .read-only-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.read-only-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.read-only-item.full-width {
  grid-column: span 1;
}

@media(min-width: 600px) {
  .read-only-item.full-width {
    grid-column: span 2;
  }
}

.read-only-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.read-only-value {
  font-size: 0.9rem;
  color: var(--text-main);
  word-break: break-all;
}

/* NATIVE EMOJI RESOLUTION FOR GRADIENT HEADERS */
.native-emoji {
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
  background: none !important;
  display: inline-block;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif !important;
}

/* GLOBAL SUBUNIT LOAD ROWS STYLING */
.global-load-row {
  background: #f8fafc !important;
}

.global-load-row td {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.775rem !important;
  letter-spacing: 0.02em;
  border-bottom: 2px solid #e2e8f0 !important;
  color: #1e293b !important;
  padding: 0.5rem 0.4rem !important;
}

.global-load-row td.sticky-col.first-col {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  border-right: 1px solid #e2e8f0 !important;
}

.global-load-row td.sticky-col.second-col {
  background-color: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  border-right: 1px solid #e2e8f0 !important;
}

.monthly-load-row td.first-col span {
  color: #b45309 !important;
  font-weight: 700 !important;
}

.weekly-load-row td.first-col span {
  color: #1d4ed8 !important;
  font-weight: 700 !important;
}

.global-month-cell, .global-week-cell {
  font-size: 0.75rem !important;
  text-align: center;
  color: #1e293b !important;
  font-weight: 700 !important;
}

.global-month-cell span {
  margin-bottom: 2px;
  color: #64748b !important;
  font-weight: 600 !important;
}

/* ==========================================================
   YEAR NAVIGATOR & EXPORT EXCEL PREMIUM STYLES
   ========================================================== */

.year-navigator-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  justify-content: center;
}

.control-label-micro {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  line-height: 1;
}

.year-navigator {
  display: flex;
  align-items: center;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--radius-sm);
  padding: 1px;
  height: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-nav-year {
  background: transparent;
  border: none;
  color: #475569 !important;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-nav-year:hover {
  background: #f1f5f9 !important;
  color: #F8485E !important;
}

.btn-nav-year:active {
  transform: scale(0.95);
}

.btn-nav-year i {
  width: 14px;
  height: 14px;
}

.year-display {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b !important;
  min-width: 42px;
  padding: 0 0.5rem;
  text-align: center;
  line-height: 1;
  user-select: none;
}

.year-nav-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #e2e8f0;
  border-top-color: #F8485E;
  border-radius: 50%;
  animation: yearNavSpin 0.7s linear infinite;
  margin-left: 0.2rem;
}

@keyframes yearNavSpin {
  to { transform: rotate(360deg); }
}


/* QUARTER NAVIGATOR PILLS (Q1, Q2, Q3, Q4) */
.quarter-navigator {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 2px;
  height: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.btn-quarter-pill {
  border: none;
  background: transparent;
  color: #64748b;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-quarter-pill:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.btn-quarter-pill.active {
  background: #F8485E;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(248, 72, 94, 0.3);
}

/* ==========================================================================
   RESALTADO DE LA SEMANA ACTUAL
   ========================================================================== */
.capacity-matrix-table th.week-header-cell.current-week-header {
  background: #fff1f3 !important;
  box-shadow: inset 0 0 0 1.5px rgba(248, 72, 94, 0.45) !important;
  color: var(--text-secondary) !important;
  font-weight: 700 !important;
}

.capacity-matrix-table th.week-header-cell.current-week-header .week-date {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
}

.capacity-matrix-table td.current-week-cell {
  position: relative;
  box-shadow: inset 0 0 0 1.5px rgba(248, 72, 94, 0.45) !important;
}

/* EXPORT EXCEL BUTTON (MISMO TAMAÑO Y FORMA QUE EL BOTÓN ADYACENTE DE EQUIPOS) */
.btn-export-excel {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  padding: 0 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #10b981 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-export-excel i,
.btn-export-excel svg {
  width: 15px !important;
  height: 15px !important;
}

.btn-export-excel:hover {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #059669 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
}

/* DROPDOWN FILTER ITEMS HOVER & SELECTED */
.subunit-select-item:hover,
.staff-multiselect-item:hover,
.squad-multiselect-item:hover,
.project-multiselect-item:hover {
  background: #f1f5f9 !important;
}

.subunit-select-item.selected {
  background: #f5f3ff !important;
}

/* BOTÓN DE AYUDA DE SECCIÓN PREMIUM & SOBRE NOTIFICACIÓN */
#btn-section-info:hover {
  color: var(--color-devoteam-coral) !important;
  background: #fff1f3 !important;
  border-color: rgba(248, 72, 94, 0.3) !important;
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.2) !important;
}

#btn-weekly-emails:hover {
  color: var(--color-devoteam-coral) !important;
  background: #fff1f3 !important;
  border-color: rgba(248, 72, 94, 0.3) !important;
  transform: scale(1.08) rotate(-5deg);
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.2) !important;
}

/* ==========================================================================
   ASISTENTE DE CAPACIDAD AI (AI ADVISOR) - PREMIUM GOLD THEMING
   ========================================================================== */

@keyframes ai-glow-pulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes ai-skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

#ai-advisor-container {
  display: none !important;
}

.ai-trigger-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-devoteam-coral) !important;
  border: 2px solid #ffffff !important;
  color: white !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(248, 72, 94, 0.4) !important;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-trigger-btn:hover {
  transform: scale(1.1) translateY(-3px);
  background: var(--color-devoteam-coral-hover) !important;
  box-shadow: 0 12px 30px rgba(248, 72, 94, 0.5) !important;
}

.ai-trigger-btn:active {
  transform: scale(0.95);
}

.ai-trigger-btn * {
  pointer-events: none !important;
}

.ai-sparkles-icon {
  width: 22px;
  height: 22px;
  color: white;
  transition: transform 0.3s ease;
}

.ai-trigger-btn:hover .ai-sparkles-icon {
  transform: rotate(20deg) scale(1.1);
}

.ai-badge-notification {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-devoteam-coral);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  letter-spacing: 0.05em;
}

/* Panel Desplegable */
.ai-panel-glass {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 390px;
  max-height: 520px;
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12) !important;
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
}

.ai-panel-glass.hidden {
  opacity: 0;
  transform: translateY(40px) scale(0.85);
  pointer-events: none;
}

/* Header */
.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.ai-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ai-title-group h4 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s ease;
}

.ai-status-dot.status-heuristic {
  background: #64748b;
  box-shadow: 0 0 8px rgba(100, 116, 139, 0.4);
}

.ai-status-dot.status-active {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.ai-status-dot.status-inactive {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.ai-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ai-close-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

/* Body */
.ai-panel-body {
  padding: 1.25rem;
  overflow-y: auto;
  max-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

/* Tarjetas de Consejos */
.ai-advice-card {
  background: #f8fafc;
  border-left: 3px solid var(--border-color);
  padding: 0.9rem 1.05rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: all 0.25s ease;
}

.ai-advice-card:hover {
  background: #f1f5f9;
  transform: translateX(3px);
}

.ai-advice-card.alert-critical {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.ai-advice-card.alert-critical:hover {
  background: #fee2e2;
}

.ai-advice-card.alert-warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.ai-advice-card.alert-warning:hover {
  background: #fef3c7;
}

.ai-advice-card.alert-success {
  border-left-color: #10b981;
  background: #ecfdf5;
}

.ai-advice-card.alert-success:hover {
  background: #d1fae5;
}

.ai-advice-card.alert-info {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.ai-advice-card.alert-info:hover {
  background: #dbeafe;
}

.ai-card-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.alert-critical .ai-card-title { color: #dc2626; }
.alert-warning .ai-card-title { color: #d97706; }
.alert-success .ai-card-title { color: #059669; }
.alert-info .ai-card-title { color: #2563eb; }

.ai-advice-card p {
  margin: 0;
  font-size: 0.825rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Skeleton Loading */
.ai-skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.9rem 1.05rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.ai-skeleton-line {
  height: 12px;
  width: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: ai-skeleton-shimmer 1.5s infinite;
}

.ai-skeleton-line.title {
  width: 40%;
  height: 16px;
  margin-bottom: 0.25rem;
}

.ai-skeleton-line.short {
  width: 75%;
}

/* Footer */
.ai-panel-footer {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
}

.btn-ai-primary {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--color-devoteam-coral);
  border: 1px solid var(--color-devoteam-coral);
  border-radius: var(--radius-md);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.25);
  transition: all 0.2s ease;
}

.btn-ai-primary:hover {
  background: var(--color-devoteam-coral-hover);
  border-color: var(--color-devoteam-coral-hover);
  box-shadow: 0 4px 14px rgba(248, 72, 94, 0.35);
}

.btn-ai-primary:active {
  transform: translateY(1px);
}

.ai-footer-disclaimer {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

.ai-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1rem;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.ai-empty-state i {
  width: 32px;
  height: 32px;
  color: #4f46e5;
  opacity: 0.6;
}

.ai-empty-state p {
  margin: 0;
  font-size: 0.825rem;
  line-height: 1.5;
}

/* GENERAL FOOTER UNIFICADO */
.footer {
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  width: 100%;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.8rem;
}

.footer p {
  margin: 0;
}

#jira-last-sync-badge {
  cursor: default !important;
  transition: all 0.2s ease-in-out;
  width: 170px !important;
  min-width: 170px !important;
  max-width: 170px !important;
  justify-content: center !important;
}
#jira-last-sync-badge:hover {
  background: rgba(0, 82, 204, 0.2) !important;
  border-color: rgba(0, 82, 204, 0.5) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
}
#jira-last-sync-badge .jira-logo-svg {
  transition: transform 0.4s ease;
}
#jira-last-sync-badge:hover .jira-logo-svg {
  transform: rotate(180deg);
}

.subunit-select-btn:hover,
.squad-multiselect-btn:hover,
.project-multiselect-btn:hover,
.staff-multiselect-btn:hover {
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
  color: #1e293b !important;
}

.subunit-select-item:hover,
.squad-multiselect-item:hover,
.project-multiselect-item:hover,
.staff-multiselect-item:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

.subunit-select-item.selected {
  background: #f5f3ff !important;
  border-color: #c4b5fd !important;
  color: #6d28d9 !important;
}

/* ESTILOS PREMIUM PARA BADGES DE SINCRONIZACIÓN DE PROYECTOS (FORECAST Y EJECUCIÓN) */
.project-sync-badge {
  cursor: default !important;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  height: 28px;
  box-sizing: border-box;
  white-space: nowrap;
}

#btn-sync-forecast {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}
#btn-sync-forecast .sync-icon {
  width: 13px;
  height: 13px;
  color: #d97706;
  transition: transform 0.4s ease;
}
#btn-sync-forecast:hover {
  background: #fde68a !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}
#btn-sync-forecast:hover .sync-icon {
  transform: rotate(180deg);
}

#btn-sync-delivery {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
#btn-sync-delivery .sync-icon {
  width: 13px;
  height: 13px;
  color: #2563eb;
  transition: transform 0.4s ease;
}
#btn-sync-delivery:hover {
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
  color: #1e3a8a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}
#btn-sync-delivery:hover .sync-icon {
  transform: rotate(180deg);
}

/* ONBOARDING JIRA SYNC OVERLAY */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 2rem;
  box-sizing: border-box;
  animation: overlayFadeIn 0.5s ease-out;
}

.onboarding-card {
  max-width: 550px;
  width: 100%;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem;
  box-sizing: border-box;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
  animation: cardScaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onboarding-icon-wrapper {
  width: 72px;
  height: 72px;
  background: rgba(0, 82, 204, 0.1);
  border: 1px solid rgba(0, 82, 204, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #0052cc;
  box-shadow: 0 0 20px rgba(0, 82, 204, 0.15);
  transition: transform 0.3s ease;
}

.onboarding-icon-wrapper.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.onboarding-card:hover .onboarding-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.onboarding-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.onboarding-description {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0 0 2rem;
}

.onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.onboarding-btn {
  width: 100%;
  max-width: 320px;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.onboarding-btn-primary {
  background: linear-gradient(135deg, #0052cc 0%, #0747a6 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.onboarding-btn-primary:hover {
  background: linear-gradient(135deg, #0747a6 0%, #0052cc 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 82, 204, 0.4);
}

.onboarding-btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1e1b4b;
}

.onboarding-btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cardScaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.btn-delete-absence-row:hover {
  background: rgba(244, 63, 94, 0.22) !important;
  color: #ff4d6d !important;
  transform: scale(1.05);
}

/* WEEK NAVIGATOR PILLS AND CONTROLS (OPTIMIZATION SLIDER) */
.week-navigator-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  justify-content: center;
}

.week-navigator {
  display: flex;
  align-items: center;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--radius-sm);
  padding: 1px;
  height: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-nav-week {
  background: transparent;
  border: none;
  color: #475569 !important;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-nav-week:hover {
  background: #f1f5f9 !important;
  color: #F8485E !important;
}

.btn-nav-week:active {
  transform: scale(0.95);
}

.btn-nav-week i {
  width: 14px;
  height: 14px;
}

.weeks-display {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b !important;
  padding: 0 0.5rem;
  min-width: 90px;
  text-align: center;
  user-select: none;
}


/* =====================================================================
   PREMIUM NOTIFICATION & AUDIT SLIDE DRAWERS STYLE SYSTEM
   ===================================================================== */

/* CORNER MARKERS FOR COMMENTS */
.allocation-cell {
  position: relative;
}

.allocation-cell.comment-pending::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 6px 6px 0;
  border-color: transparent #fbbf24 transparent transparent;
  pointer-events: none;
  z-index: 10;
}

.allocation-cell.comment-approved::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 6px 6px 0;
  border-color: transparent #10b981 transparent transparent;
  pointer-events: none;
  z-index: 10;
}

/* SIDEBAR SLIDE PANELS */
.sidebar-slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  transform: translateX(0);
}

.sidebar-slide-panel.hidden {
  transform: translateX(100%);
  visibility: hidden;
  box-shadow: none !important;
  pointer-events: none;
}

.sidebar-panel-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-panel-header h3 {
  font-size: 1.1rem;
  margin: 0;
  color: #1e293b;
}

.sidebar-close-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sidebar-close-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.sidebar-panel-body {
  padding: 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-empty-state {
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 4rem;
}

/* TIMELINE & NOTIFICATION CARDS */
.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.25rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 8px #6366f1;
}

.timeline-item.timeline-gold::before {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.timeline-item.timeline-green::before {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.timeline-time {
  font-size: 0.725rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: #e2e8f0;
  transition: all 0.2s;
  cursor: default;
}

.timeline-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.timeline-user {
  font-weight: 700;
  color: #ffffff;
}

.timeline-text {
  line-height: 1.4;
  margin-top: 0.25rem;
}

.timeline-deviation {
  font-weight: 700;
  color: #fbbf24;
}

/* POP-OVER CELL COMMENTS & HISTORY LIGHT-THEME OVERRIDES */
#cell-comment-popover .timeline-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#cell-comment-popover .timeline-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

#cell-comment-popover .timeline-user {
  font-weight: 700;
  color: #0f172a;
}

#cell-comment-popover .timeline-text {
  color: #334155 !important;
  font-size: 0.8rem;
  line-height: 1.45;
  margin-top: 0.35rem;
}

#cell-comment-popover .timeline-deviation {
  color: #b45309;
  font-weight: 700;
}

#cell-comment-popover .ai-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#cell-comment-popover .ai-empty-state p {
  color: #64748b !important;
  font-size: 0.8rem !important;
}

#cell-comment-popover .ai-empty-state i {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

/* HEATMAP MODE STATE RULES */
.heatmap-mode-active .alloc-input {
  transition: all 0.25s ease-in-out;
}

.heatmap-mode-active .alloc-input.heatmap-pending {
  background: rgba(251, 191, 36, 0.08) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fde047 !important;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.1);
}

.heatmap-mode-active .alloc-input.heatmap-approved {
  background: rgba(16, 185, 129, 0.08) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}

.heatmap-mode-active .alloc-input:not(.heatmap-pending):not(.heatmap-approved) {
  opacity: 0.35;
}

/* HEATMAP SLIDER DESIGN (SIDEBAR IN-DRAWER) */
.heatmap-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
}

.heatmap-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.heatmap-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.heatmap-switch input:checked + .heatmap-slider {
  background-color: #6366f1;
}

.heatmap-switch input:checked + .heatmap-slider::before {
  transform: translateX(14px);
}

.heatmap-slider::before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

/* ==========================================================
   CUSTOM SEARCHABLE COMBOBOX & AUTOCOMPLETE DROPDOWN
   ========================================================== */
.custom-combobox-wrapper {
  position: relative;
  width: 100%;
}

.combobox-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.combobox-input.has-selection {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
  color: #1e40af !important;
  font-weight: 500;
}

.btn-clear-combobox {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 5;
  transition: all 0.15s ease;
}

.btn-clear-combobox:hover {
  color: #e11d48;
  background: #fee2e2;
}

/* Modal de Asignación Ampliado */
#assign-project-modal .modal-card {
  max-width: 1540px;
  width: 96vw;
  height: auto;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
}

#assign-project-modal .modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#assign-project-modal .assign-columns-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1.35fr;
  gap: 0.85rem;
  align-items: stretch;
}

@media (max-width: 1280px) {
  #assign-project-modal .assign-columns-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  #assign-project-modal .assign-columns-grid {
    grid-template-columns: 1fr;
  }
}

#assign-project-modal .assign-block-column {
  min-height: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#assign-project-modal .assign-block-column:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
}

/* Hover temático unificado para cada una de las 4 columnas */
#assign-project-modal #assign-preventa-block:hover,
#assign-project-modal .assign-preventa-card:hover {
  border-color: #c4b5fd !important;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.14) !important;
}

#assign-project-modal #assign-forecast-block:hover {
  border-color: #fcd34d !important;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.14) !important;
}

#assign-project-modal #assign-delivery-block:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.14) !important;
}

#assign-project-modal #assign-absence-block:hover,
#assign-project-modal .assign-absence-card:hover {
  border-color: #fda4af !important;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.14) !important;
}

.assign-preventa-card {
  cursor: default;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.assign-preventa-card.is-selected {
  border-color: #8b5cf6 !important;
  background: #ffffff !important;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.16) !important;
}

.preventa-preset-option {
  user-select: none;
  transition: all 0.15s ease;
}

.preventa-preset-option:hover {
  background: #faf5ff !important;
  border-color: #d8b4fe !important;
}

.preventa-preset-option.is-active {
  background: #f5f3ff !important;
  border-color: #a855f7 !important;
}

.preventa-preset-option.is-active span:first-child {
  color: #581c87 !important;
}

.btn-select-preventa {
  transition: all 0.15s ease;
}

.btn-select-preventa:hover {
  filter: brightness(0.96);
}

.custom-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1050;
  max-height: 320px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 4px;
  box-sizing: border-box;
}

.custom-combobox-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-combobox-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.combobox-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}

.combobox-item:last-child {
  border-bottom: none;
}

.combobox-item:hover,
.combobox-item.active-item {
  background: #f1f5f9;
}

.combobox-item.is-forecast:hover,
.combobox-item.is-forecast.active-item {
  background: #fef3c7;
}

.combobox-item.is-delivery:hover,
.combobox-item.is-delivery.active-item {
  background: #eff6ff;
}

.combobox-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.combobox-item-key {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.combobox-item.is-forecast .combobox-item-key {
  color: #d97706;
}

.combobox-item.is-delivery .combobox-item-key {
  color: #2563eb;
}

.combobox-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.combobox-item-subunit {
  font-size: 0.68rem;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.combobox-item-prob {
  font-size: 0.68rem;
  color: #15803d;
  font-weight: 700;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 1px 5px;
  border-radius: 4px;
}

.combobox-item-name {
  font-size: 0.8rem;
  color: #1e293b;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}

.combobox-highlight {
  background: #fef08a;
  color: #854d0e;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

.combobox-empty {
  padding: 12px 10px;
  text-align: center;
  color: #64748b;
  font-size: 0.78rem;
  font-style: italic;
}

.combobox-selected-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
  animation: fadeIn 0.2s ease-out;
}

.combobox-selected-badge.is-forecast {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}

.combobox-selected-badge.is-delivery {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* UNDO / REDO BUTTONS & HIGHLIGHT ANIMATION */
#btn-undo-action:hover:not(:disabled),
#btn-redo-action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px);
}

#btn-undo-action:active:not(:disabled),
#btn-redo-action:active:not(:disabled) {
  transform: translateY(0);
}

@keyframes undoPulse {
  0% {
    box-shadow: inset 0 0 0 2px #38bdf8, 0 0 14px rgba(56, 189, 248, 0.6) !important;
    background-color: rgba(56, 189, 248, 0.22) !important;
  }
  50% {
    box-shadow: inset 0 0 0 2px #38bdf8, 0 0 8px rgba(56, 189, 248, 0.4) !important;
    background-color: rgba(56, 189, 248, 0.15) !important;
  }
  100% {
    box-shadow: none !important;
  }
}

.undo-highlight {
  animation: undoPulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* ==========================================================================
   DESPLEGABLE MULTISELECCIÓN DE PROYECTOS ASIGNADOS
   ========================================================================== */
.project-multiselect-group {
  position: relative;
  z-index: 500;
}

.subunit-select-btn,
.project-multiselect-btn,
.squad-multiselect-btn,
.staff-multiselect-btn {
  transition: all 0.2s ease;
  height: 28px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 0.55rem !important;
  background-image: none !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

#subunit-select-label,
#squad-multiselect-label,
#project-multiselect-label,
#staff-multiselect-label {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.subunit-select-btn:hover {
  background: #f8fafc !important;
  border-color: #a855f7 !important;
  color: #1e293b !important;
}

.project-multiselect-btn:hover {
  background: #f8fafc !important;
  border-color: #f59e0b !important;
  color: #1e293b !important;
}

.squad-multiselect-btn:hover {
  background: #f8fafc !important;
  border-color: #3b82f6 !important;
  color: #1e293b !important;
}

.subunit-select-dropdown,
.project-multiselect-dropdown,
.squad-multiselect-dropdown {
  animation: dropdownFadeSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 9999 !important;
  font-family: 'Outfit', sans-serif !important;
}

@keyframes dropdownFadeSlide {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.subunit-select-item,
.project-multiselect-item,
.squad-multiselect-item,
.staff-multiselect-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 400 !important;
  background: transparent;
  border: 1px solid transparent;
}

.subunit-select-item:hover,
.project-multiselect-item:hover,
.squad-multiselect-item:hover,
.staff-multiselect-item:hover {
  background: #f1f5f9 !important;
}

.subunit-select-item.selected {
  background: #f5f3ff !important;
  border: 1px solid #c4b5fd !important;
  color: #6d28d9 !important;
}

.subunit-select-item.selected:hover {
  background: #ede9fe !important;
}

/* ==========================================================================
   ESTILOS PREMIUM PARA SQUADS EN CAPACITY PLANNING
   ========================================================================== */
.btn-squad-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  line-height: 1.15;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
  flex-shrink: 0;
  max-width: 140px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.btn-squad-badge.no-squad {
  background: rgba(148, 163, 184, 0.08);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  color: #94a3b8;
}

.btn-squad-badge.no-squad:hover {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.5);
  color: #f1f5f9;
  transform: translateY(-1px);
}

.btn-squad-badge.has-squad {
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: #2dd4bf;
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.1);
}

.btn-squad-badge.has-squad:hover {
  background: rgba(20, 184, 166, 0.22);
  border-color: rgba(20, 184, 166, 0.6);
  color: #5eead4;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(20, 184, 166, 0.25);
}

.squad-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.squad-item-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.squad-item-card .squad-item-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
}

.squad-item-card .squad-item-sub {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
  margin-left: 0.4rem;
}

.squad-action-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.squad-action-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.squad-action-btn.btn-delete:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* ==========================================================================
   MODAL EXPORTAR EXCEL (.XLSX)
   ========================================================================== */
#modal-export-excel .modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  max-height: 92vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.05);
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.export-mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.export-mode-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.18s ease;
  min-width: 0;
}

.export-mode-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.65);
  color: #1e293b;
}

.export-mode-tab.active {
  background: #ffffff;
  color: #059669;
  border-color: #a7f3d0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.export-squad-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.45rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
  font-size: 0.76rem;
  color: #1e293b;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.export-squad-checkbox-item > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-squad-checkbox-item:hover {
  background: #f1f5f9;
}

.export-squad-checkbox-item input[type="checkbox"] {
  accent-color: #059669;
  cursor: pointer;
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
}

#btn-confirm-export-excel:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45) !important;
}

#btn-confirm-export-excel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
   REACTIVITY & SQUAD HEALTH SUMMARY SECTION (CAPACITY PLANNING)
   ========================================================================== */
.squad-summary-section {
  padding: 1.1rem 1.35rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: sticky;
  left: 0.75rem;
  width: calc(100% - 1.5rem);
  max-width: calc(100vw - 4.5rem);
  margin: 0.75rem 0.75rem 1rem 0.75rem;
  box-sizing: border-box;
  z-index: 5;
}

.squad-summary-section.collapsed {
  display: none !important;
}

.btn-toggle-squad-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-toggle-squad-summary i,
.btn-toggle-squad-summary svg {
  width: 15px;
  height: 15px;
}

.btn-toggle-squad-summary:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}

.btn-toggle-squad-summary.active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.squad-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}

.squad-summary-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.squad-summary-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  flex-shrink: 0;
}

.badge-window-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.squad-summary-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.toggle-presales-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.65rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.toggle-presales-checkbox:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.toggle-presales-checkbox input[type="checkbox"] {
  cursor: pointer;
  accent-color: #7c3aed;
  width: 14px;
  height: 14px;
  margin: 0;
}

.hero-presales-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.55rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.hero-presales-toggle:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.squad-window-switch {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 2px;
}

.squad-window-switch .btn-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748b;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.squad-window-switch .btn-switch i {
  width: 13px;
  height: 13px;
}

.squad-window-switch .btn-switch:hover {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.04);
}

.squad-window-switch .btn-switch.active {
  background: #ffffff;
  color: #d97706;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-collapse-squad-summary {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-collapse-squad-summary:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* UNIT HERO CARD */
.unit-hero-container {
  margin-bottom: 1rem;
  width: 100%;
}

.unit-hero-card {
  display: grid;
  grid-template-columns: 1.15fr 1.65fr 0.8fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 1.35rem;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.unit-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #f59e0b 0%, #ea580c 100%);
}

.unit-hero-card:hover {
  border-color: #f97316;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.12);
  transform: translateY(-1px);
}

.unit-hero-left {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.unit-hero-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.unit-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 9999px;
  color: #c2410c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.unit-hero-headcount {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
}

.unit-hero-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-hero-metric-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.unit-hero-occ-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.unit-hero-subtext {
  font-size: 0.72rem;
  color: #64748b;
}

.unit-hero-middle {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  background: #f8fafc;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid #e2e8f0;
}

.unit-hero-breakdown-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

.hero-legend {
  font-size: 0.72rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.unit-hero-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.unit-hero-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.45rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm, 8px);
  text-align: center;
}

.unit-hero-stat-label {
  font-size: 0.66rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.unit-hero-stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}

/* SUBUNITS / SQUADS CARDS ROW */
.subunits-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  width: 100%;
}

.team-card {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md, 10px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.25s ease;
  cursor: pointer;
  user-select: none;
}

.team-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.team-card.selected-squad-card {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 2px #bfdbfe !important;
}

.team-card.team-card-excluded {
  opacity: 0.52;
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  filter: grayscale(0.2);
}

.team-card.team-card-excluded:hover {
  opacity: 0.85;
}

.team-card-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #2563eb;
  margin: 0;
  flex-shrink: 0;
}

.team-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.team-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-headcount {
  font-size: 0.70rem;
  color: #64748b;
  white-space: nowrap;
}

.team-metrics-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.team-occ-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.team-breakdown-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.1rem;
  padding: 0.45rem 0.55rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.team-breakdown-bar {
  display: flex;
  height: 6px;
  width: 100%;
  border-radius: 3px;
  overflow: hidden;
  background: #e2e8f0;
}

.team-bar-exec {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.3s ease;
}

.team-bar-fc {
  background: linear-gradient(90deg, #a855f7, #c084fc);
  transition: width 0.3s ease;
}

.team-bar-abs {
  background: linear-gradient(90deg, #64748b, #94a3b8);
  transition: width 0.3s ease;
}

.team-breakdown-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.70rem;
  color: #64748b;
  gap: 0.25rem;
}

.team-breakdown-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.team-breakdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-exec {
  background: #0284c7;
  box-shadow: 0 0 4px rgba(2, 132, 199, 0.4);
}

.dot-fc {
  background: #9333ea;
  box-shadow: 0 0 4px rgba(147, 51, 234, 0.4);
}

.dot-abs {
  background: #64748b;
  box-shadow: 0 0 4px rgba(100, 116, 139, 0.4);
}

/* BADGES & UTILITIES */
.kpi-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-emerald {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
}

.badge-rose {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

.badge-gold {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
}

.text-rose { color: #dc2626 !important; }
.text-emerald { color: #16a34a !important; }
.text-gold { color: #d97706 !important; }

@media (max-width: 1024px) {
  .unit-hero-card {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .unit-hero-right {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   COMPONENTE AVANZADO DE CALENDARIO Y GESTIÓN DE AUSENCIAS (CAPACITY PLANNING)
   ========================================================================== */

.assign-absence-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Sede Badge */
.badge-absence-sede {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

/* Presets Rápidos */
.absence-presets-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.absence-presets-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.absence-presets-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.btn-absence-preset {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.btn-absence-preset:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-absence-preset.active {
  background: #ffe4e6;
  border-color: #fecdd3;
  color: #e11d48;
  font-weight: 700;
}

/* Widget Calendario */
.absence-calendar-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.cal-month-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-month-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  text-transform: capitalize;
}

.cal-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.cal-nav-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.cal-today-btn {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-today-btn:hover {
  background: #fee2e2;
  color: #e11d48;
  border-color: #fecdd3;
}

.cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  padding: 2px 0;
}

.cal-weekdays-row span.is-weekend-col {
  color: #94a3b8;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  user-select: none;
}

.cal-day-cell {
  position: relative;
  height: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  color: #1e293b;
  background: transparent;
}

.cal-day-cell:hover {
  background: #fee2e2;
  color: #9f1239;
}

.cal-day-cell.is-other-month {
  opacity: 0.3;
  color: #94a3b8;
}

.cal-day-cell.is-weekend {
  background: #f8fafc;
  color: #94a3b8;
}

.cal-day-cell.is-weekend:hover {
  background: #fee2e2;
  color: #9f1239;
}

.cal-day-cell.is-today {
  box-shadow: inset 0 0 0 1.5px #f43f5e;
  font-weight: 700;
}

.cal-day-cell.has-holiday {
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 600;
}

.cal-day-cell.has-holiday::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0284c7;
}

.cal-day-cell.has-existing-absence::before {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e11d48;
}

/* Rango de Selección */
.cal-day-cell.is-range-start {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  z-index: 2;
}

.cal-day-cell.is-range-end {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  z-index: 2;
}

.cal-day-cell.is-range-single {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  z-index: 2;
}

.cal-day-cell.is-in-range {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  font-weight: 600;
  border-radius: 0 !important;
}

.cal-day-cell.is-range-hover {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  border-radius: 0 !important;
}

/* Card Resumen de Impacto */
.absence-range-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  display: block;
  font-size: 0.74rem;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.absence-range-summary-card.empty {
  color: #64748b;
  font-style: italic;
}

.absence-range-summary-card.active {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #1e293b;
}

.absence-summary-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.35;
}

.absence-summary-dates {
  font-weight: 700;
  color: #e11d48;
  font-size: 0.82rem;
  white-space: normal;
}

.absence-summary-metrics {
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.absence-summary-impact {
  color: #0369a1;
  font-weight: 600;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
  margin-top: 2px;
  max-width: 100%;
  box-sizing: border-box;
}

.absence-summary-warning {
  color: #b91c1c;
  font-weight: 600;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

/* Motivos de Ausencia (Chips) */
.absence-reason-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.btn-reason-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 0.7rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-reason-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-reason-chip.active {
  background: #ffe4e6;
  border-color: #f43f5e;
  color: #9f1239;
  font-weight: 700;
}

/* ==========================================================================
   MAPA DE CALOR DE PRESIÓN Y FATIGA (LOAD INDEX P+F)
   ========================================================================== */

.matrix-card-header {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
}

.matrix-card-header .card-title-group {
  justify-self: start;
}

.matrix-card-header .legend-group {
  justify-self: end;
}

.pf-heatmap-header-controls {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 1280px) {
  .matrix-card-header {
    display: flex !important;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .pf-heatmap-header-controls {
    margin: 0 auto;
  }
}

.btn-pf-heatmap-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-pf-heatmap-toggle:hover {
  background: #fff1f3;
  border-color: #fda4af;
  color: #e11d48;
}

.btn-pf-heatmap-toggle.active {
  background: linear-gradient(135deg, #f8485e 0%, #e11d48 100%);
  border-color: #be123c;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.28);
}

.pf-metric-switch {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.pf-metric-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.15;
}

.pf-metric-btn:hover {
  color: #0f172a;
}

.pf-metric-btn.active {
  background: #ffffff;
  color: #e11d48;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* Leyenda de 5 niveles de Presión y Fatiga */
.pf-legend-group {
  gap: 0.75rem;
}

.legend-color.pf-dot-lvl0 {
  background-color: #e2e8f0;
  border: 1px solid #cbd5e1;
}

.legend-color.pf-dot-lvl1 {
  background-color: #93c5fd;
  border: 1px solid #3b82f6;
}

.legend-color.pf-dot-lvl2 {
  background-color: #fcd34d;
  border: 1px solid #eab308;
}

.legend-color.pf-dot-lvl3 {
  background-color: #fb923c;
  border: 1px solid #ea580c;
}

.legend-color.pf-dot-lvl4 {
  background-color: #f8485e;
  border: 1px solid #e11d48;
}

/* Celdas de totales con escala térmica de 5 niveles (idéntica a KPIs & Analytics) */
.total-cell.pf-cell-lvl0 {
  background-color: #f8fafc !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #e2e8f0;
}

.total-cell.pf-cell-lvl1 {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border-bottom: 1px solid #bfdbfe;
}

.total-cell.pf-cell-lvl2 {
  background-color: #fefce8 !important;
  color: #a16207 !important;
  border-bottom: 1px solid #fde68a;
}

.total-cell.pf-cell-lvl3 {
  background-color: #fff7ed !important;
  color: #c2410c !important;
  border-bottom: 1px solid #fed7aa;
}

.total-cell.pf-cell-lvl4 {
  background-color: #fff1f3 !important;
  color: #e11d48 !important;
  border-bottom: 1px solid #fecdd3;
  font-weight: 800 !important;
}

/* Formato dual en celda semanal: Índice principal arriba + % ocupación debajo */
.pf-dual-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  width: 100%;
  gap: 1px;
  padding: 0;
}

.pf-dual-main-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.pf-val-main {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pf-val-sub {
  font-size: 0.58rem;
  font-weight: 600;
  display: none !important;
  letter-spacing: -0.01em;
}

/* Indicador en sub-filas de proyectos con cobertura fina (<25% apoyo del equipo) */
.pf-heatmap-active .allocation-cell.pf-thin-cell {
  background-color: rgba(251, 146, 60, 0.1) !important;
}

.pf-heatmap-active .alloc-input.pf-thin-input {
  border-color: rgba(234, 88, 12, 0.55) !important;
  box-shadow: inset 0 0 0 1px rgba(234, 88, 12, 0.2);
}

.pf-heatmap-active .allocation-cell.pf-thin-streak-cell {
  background-color: rgba(248, 72, 94, 0.12) !important;
}

.pf-heatmap-active .alloc-input.pf-thin-streak-input {
  border-color: rgba(225, 29, 72, 0.65) !important;
  box-shadow: inset 0 0 0 1px rgba(225, 29, 72, 0.25);
}

