/* ==========================================================
   AITANA SUITE - PROJECT BUDGET STYLESHEET
   Core Design System, Devoteam Corporate Light Theme
   ========================================================== */
:root {
  --bg-gradient: #f8f9fa;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-modal: #ffffff;
  --primary-accent: #f8485e;
  
  --border-color: #e2e8f0;
  --border-color-hover: rgba(248, 72, 94, 0.4);
  --border-color-focus: #f8485e;
  
  --color-primary: #f8485e; /* Devoteam Coral */
  --color-primary-hover: #e0364c;
  --color-primary-glow: rgba(248, 72, 94, 0.12);
  
  --color-devoteam-coral: #f8485e;
  --color-devoteam-coral-hover: #e0364c;
  --color-devoteam-coral-light: #fff1f3;
  --color-devoteam-charcoal: #1e2026;
  --color-devoteam-grey: #56555a;
  
  --color-indigo: #4f46e5;
  --color-emerald: #059669;
  
  --color-success: #10b981; /* Emerald */
  --color-success-glow: rgba(16, 185, 129, 0.15);
  
  --color-warning: #f59e0b; /* Amber */
  --color-warning-glow: rgba(245, 158, 11, 0.15);
  
  --color-danger: #ef4444; /* Rose */
  --color-danger-glow: rgba(239, 68, 68, 0.15);
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-dark: #1e293b;
  
  --glass-blur: none;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  
  --shadow-premium: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 15px rgba(248, 72, 94, 0.06);
  
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* GLOBAL RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: 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;
}

/* SCROLLBAR CUSTOMIZATION */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Firefox scrollbar compatibility */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}


/* UTILITIES */
.text-muted { color: var(--text-muted); }
.text-bold { font-weight: 700; }
.text-indigo { color: #4f46e5; }
.text-emerald { color: #059669; }
.text-rose { color: #dc2626; }
.text-amber { color: #d97706; }
.text-coral { color: var(--color-devoteam-coral); }
.text-grey { color: var(--color-devoteam-grey); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-small { font-size: 0.825rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.pr-2 { padding-right: 2.2rem !important; }
.w-100 { width: 100%; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 1rem; }

.badge-gold {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #b45309;
}

.badge-amber {
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.3);
  color: #b45309;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #4338ca;
}

.badge-purple {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #7e22ce;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #047857;
}

.badge-neutral {
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid #cbd5e1;
  color: #475569;
}

.badge-devoteam {
  background: var(--color-devoteam-coral-light);
  border: 1px solid rgba(248, 72, 94, 0.25);
  color: var(--color-devoteam-coral);
}

/* APP LAYOUT STRUCTURE */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR STYLES */
.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 99;
}

.sidebar-header {
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.logo-glow,
.logo-glow-gold,
.logo-glow-devoteam {
  width: 42px;
  height: 42px;
  background: var(--color-devoteam-coral-light);
  border: 1px solid rgba(248, 72, 94, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-devoteam-coral);
  box-shadow: 0 2px 10px rgba(248, 72, 94, 0.12);
  transition: var(--transition-smooth);
}

.logo-glow:hover,
.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 14px rgba(248, 72, 94, 0.25);
  transform: rotate(5deg) scale(1.05);
}

.logo-icon {
  width: 22px;
  height: 22px;
}

.brand-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.brand-text > span {
  font-size: 0.75rem;
  color: var(--color-devoteam-grey);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.text-gold-gradient {
  color: var(--color-devoteam-coral);
  font-size: inherit !important;
  font-weight: 800 !important;
}

.sidebar-menu {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
}

.menu-item {
  background: transparent;
  border: none;
  color: var(--color-devoteam-grey);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.925rem;
  font-weight: 500;
  text-align: left;
  transition: var(--transition-smooth);
  width: 100%;
}

.menu-item i {
  width: 18px;
  height: 18px;
  transition: var(--transition-smooth);
}

.menu-item:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.menu-item.active {
  background: var(--color-devoteam-coral-light);
  color: var(--color-devoteam-coral);
  border: 1px solid rgba(248, 72, 94, 0.25);
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.08);
  font-weight: 600;
}

.menu-item.active i {
  color: var(--color-devoteam-coral);
}

/* SIDEBAR STATUS WIDGETS */
.sidebar-status-container {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.sidebar-status-card:hover {
  background: #f1f5f9;
  border-color: rgba(248, 72, 94, 0.3);
}

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.project-info-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-name-group h4 {
  font-size: 0.875rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.project-name-group p {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* MAIN CONTENT CONTAINER */
.main-content {
  flex-grow: 1;
  margin-left: 280px;
  padding: 22px 2.5rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Evita desbordamientos en flexboxes */
}

/* TOP HEADER */
.top-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  flex-wrap: wrap;
}

.top-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.header-left {
  width: 100%;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.header-quick-kpi {
  font-size: 0.825rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-quick-kpi .label {
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* APP SECTIONS STYLING */
.app-section {
  display: none;
}

.app-section.active {
  display: block;
  animation: fadeIn 0.15s ease-out forwards;
  overflow: visible;
}

/* CARDS AND PANELS - GLASSMORPHISM */
.panel-glass {
  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: 1.75rem;
  box-shadow: var(--shadow-premium), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.panel-glass:hover {
  border-color: var(--border-color-hover);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
  font-size: 1.2rem;
  color: var(--color-devoteam-grey);
  font-weight: 700;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.panel-header.border-indigo { border-bottom-color: rgba(99, 102, 241, 0.2); }
.panel-header.border-emerald { border-bottom-color: rgba(16, 185, 129, 0.2); }
.panel-header.border-amber { border-bottom-color: rgba(245, 158, 11, 0.2); }

/* KPI CARDS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 5;
}

.kpi-card {
  position: relative;
  z-index: 1;
  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: 1.5rem;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
  z-index: 30;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.09), 0 4px 10px rgba(0, 0, 0, 0.04);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kpi-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-indigo-light { background: rgba(99, 102, 241, 0.1); }
.bg-rose-light { background: rgba(239, 68, 68, 0.1); }
.bg-emerald-light { background: rgba(16, 185, 129, 0.1); }
.bg-amber-light { background: rgba(245, 158, 11, 0.1); }

.kpi-value {
  font-size: 2rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.kpi-footer {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* COMPARATIVE VIEW GRID */
.summary-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  font-size: 0.95rem;
}

.metric-row.border-top {
  border-top: 1px solid var(--border-color);
  padding-top: 1.15rem;
  margin-top: 0.5rem;
}

.metric-row .value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}

/* CHARTS LAYOUT */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-panel-large {
  min-height: 400px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 320px;
}

/* TABLE STYLING */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  contain: layout paint;
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: fixed;
}

.premium-table th {
  background: #f8fafc;
  padding: 0.85rem 1.15rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-devoteam-grey);
  border-bottom: 1px solid var(--border-color);
}

.premium-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-main);
  vertical-align: middle;
}

.premium-table tbody tr {
  transition: var(--transition-smooth);
}

.premium-table tbody tr:hover {
  background: rgba(248, 72, 94, 0.03);
}

.premium-table tbody tr.row-real-data,
.premium-table tbody tr.row-closed-month {
  background-color: #f1f4f9 !important;
}

.premium-table tbody tr.row-real-data > td,
.premium-table tbody tr.row-closed-month > td {
  background-color: #f1f4f9 !important;
}

.premium-table tbody tr.row-real-data:hover,
.premium-table tbody tr.row-closed-month:hover,
.premium-table tbody tr.row-real-data:hover > td,
.premium-table tbody tr.row-closed-month:hover > td {
  background-color: #e2e8f0 !important;
}

.wip-cierres-table tbody tr > td:first-child {
  border-left: 3px solid transparent;
}

.wip-cierres-table tbody tr.row-real-data > td:first-child,
.wip-cierres-table tbody tr.row-closed-month > td:first-child {
  border-left: 3px solid #6366f1 !important;
}

.premium-table tbody tr:last-child td {
  border-bottom: none;
}

.icon-inline {
  width: 14px !important;
  height: 14px !important;
  vertical-align: middle;
  display: inline-block;
  margin-top: -2px;
}

/* GRIDS AND SECTIONS FOR OTHERS */
.grid-2col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

.grid-2col-reales {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
}

.grid-adquisiciones {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}

.bg-glass-amber {
  background: rgba(245, 158, 11, 0.05) !important;
  border-color: rgba(245, 158, 11, 0.15) !important;
}

/* INPUTS & SELECTS */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.input-premium {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-premium:focus {
  border-color: var(--color-devoteam-coral);
  box-shadow: 0 0 0 3px rgba(248, 72, 94, 0.12);
}

.select-premium {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
  cursor: pointer;
  appearance: none;
  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");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.select-premium:focus {
  border-color: var(--color-devoteam-coral);
  box-shadow: 0 0 0 3px rgba(248, 72, 94, 0.12);
}

.select-premium option {
  background-color: #ffffff;
  color: var(--text-main);
}

.currency-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  right: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

/* BUTTONS */
.btn-primary {
  background: var(--color-devoteam-coral);
  border: none;
  color: white;
  padding: 0.8rem 1.5rem;
  font-size: 0.925rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.25);
}

.btn-primary:hover {
  background: var(--color-devoteam-coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(248, 72, 94, 0.35);
}

.btn-primary-sm {
  background: var(--color-devoteam-coral);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.2);
}

.btn-primary-sm:hover {
  background: var(--color-devoteam-coral-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(248, 72, 94, 0.3);
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--color-devoteam-grey);
  padding: 0.8rem 1.25rem;
  font-size: 0.925rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: var(--text-main);
}

.btn-secondary-sm {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--color-devoteam-grey);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-secondary-sm:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

#btn-preload-wip {
  transition: all 0.2s ease;
}

#btn-preload-wip:not(:disabled):hover {
  background: rgba(16, 185, 129, 0.2) !important;
  transform: scale(1.05);
}

.btn-danger-sm {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-danger-sm:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-danger-sm:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 6px;
}

.btn-icon:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon-sm {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 4px;
}

.btn-icon-sm:hover {
  color: white;
}

/* RRHH PLANNER GRID SPECIFIC STYLES */
.rrhh-grid-container {
  max-height: 600px;
  overflow-x: auto !important;
}

.rrhh-grid-table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 100% !important;
  margin: 0 auto !important;
}

.rrhh-grid-table th,
.rrhh-grid-table td {
  padding: 0.8rem 0.25rem !important;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.rrhh-grid-table th:last-child,
.rrhh-grid-table td:last-child {
  width: 145px !important;
  min-width: 140px !important;
  text-overflow: clip !important;
  overflow: visible !important;
  white-space: nowrap !important;
  padding-right: 0.85rem !important;
}

.rrhh-grid-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f1f5f9;
  color: var(--color-devoteam-grey);
}

.input-grid-pct {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  color: var(--text-main);
  font-size: 0.825rem;
  font-weight: 500;
  text-align: center;
  transition: var(--transition-smooth);
  outline: none;
}

.input-grid-pct:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.input-grid-pct:focus {
  background: #ffffff;
  border-color: var(--color-devoteam-coral);
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.15);
}

.input-grid-pct.has-allocation {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.input-grid-pct.cell-has-absence {
  border-left: 3px solid #f43f5e !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.input-table-money.has-allocation {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.week-pager {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0 0.65rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  height: 38px;
  box-sizing: border-box;
}

.week-pager .btn-icon-sm {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #56555a;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.week-pager .btn-icon-sm:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--color-devoteam-coral);
}

.week-pager #rrhh-page-label,
.week-pager #rrhh-month-page-label {
  color: #1e293b;
  font-weight: 700;
  white-space: nowrap;
}

/* IN-TABLE INPUTS FOR COSTE REAL & FACTURACION */
.input-table-money {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  color: #1e293b !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
  outline: none;
  transition: var(--transition-smooth);
  width: 150px;
}

.input-table-money:focus {
  border-color: var(--color-devoteam-coral) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.15) !important;
}

/* INPUT EMBEDDED SYMBOLS WRAPPERS */
.input-currency-wrapper, .input-percent-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.input-currency-wrapper .input-table-money, .input-percent-wrapper .input-table-money {
  padding-right: 1.5rem !important; /* Leave space for symbol */
  width: 100% !important;
}

.input-currency-wrapper .currency-symbol, .input-percent-wrapper .percent-symbol {
  position: absolute;
  right: 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  pointer-events: none;
}

/* Remove spinner arrows from number inputs (WIP, Cierres, etc.) */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* MODAL SCROLL LOCK & SPINNER ANIMATION */
html.aitana-modal-open,
body.aitana-modal-open {
  overflow: hidden !important;
  overscroll-behavior: contain !important;
}

@keyframes aitanaSpin {
  to { transform: rotate(360deg); }
}

/* MODAL OVERLAYS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.35rem;
  color: var(--color-devoteam-grey);
  font-weight: 700;
}

.modal-body {
  margin-bottom: 2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* MODAL EMAIL DRAFT (AMPLIA, ESPACIOSA Y CONFORTABLE) */
#modal-email-draft .modal-card {
  max-width: 950px !important;
  width: 95% !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 1.75rem 2.25rem !important;
  overflow-y: auto !important;
}

#modal-email-draft .modal-header {
  margin-bottom: 1.2rem !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 1px solid #e2e8f0;
}

#modal-email-draft .modal-body {
  margin-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1.15rem !important;
}

#modal-email-draft .modal-footer {
  margin-top: 1.25rem !important;
  padding-top: 1rem !important;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
  #modal-email-draft .modal-card {
    padding: 1.25rem 1.25rem !important;
  }
  #modal-email-draft .panel-glass {
    grid-template-columns: 1fr !important;
  }
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10000;
  max-width: 380px;
  width: calc(100% - 4rem);
}

.toast {
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  color: #1e293b !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #1e293b;
  font-weight: 500;
}

.toast-success { border-left-color: var(--color-success); }
.toast-success i { color: var(--color-success); }
.toast-error { border-left-color: var(--color-danger); }
.toast-error i { color: var(--color-danger); }
.toast-warning { border-left-color: #f59e0b; }
.toast-warning i { color: #d97706; }
.toast-info { border-left-color: var(--color-primary); }
.toast-info i { color: var(--color-primary); }

.toast-close {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.toast-close:hover {
  color: #1e293b;
}

/* LOADER OVERLAY */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loader-ring {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(248, 72, 94, 0.15);
  border-radius: 50%;
  border-top-color: var(--color-devoteam-coral);
  border-bottom-color: var(--color-devoteam-coral);
  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-text {
  font-family: 'Outfit', sans-serif;
  color: var(--color-devoteam-grey);
  font-size: 1.1rem;
  font-weight: 500;
  animation: pulseText 2s infinite;
}

/* FOOTER */
.footer {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  margin-top: auto;
}

/* ANIMATIONS */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulseText {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE DESIGN MEDIA QUERIES */
@media (max-width: 1200px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .main-content {
    margin-left: 0;
    padding: 1.5rem;
  }
  .top-header {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }
  .header-right {
    align-items: flex-start;
    width: 100%;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .grid-adquisiciones {
    grid-template-columns: 1fr;
  }
  .grid-2col-reales {
    grid-template-columns: 1fr;
  }
  .summary-comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .flex-column-mobile {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* PREMIUM RRHH TOTAL ROW HIGHLIGHT */
.total-row-highlight {
  background: #f1f5f9 !important;
  border-top: 2px solid #cbd5e1 !important;
  border-bottom: 2px solid #cbd5e1 !important;
  transition: var(--transition-smooth);
}

.total-row-highlight:hover {
  background: #e2e8f0 !important;
}

.total-row-highlight td {
  padding: 1.15rem 1.15rem !important;
  color: #1e293b !important;
  font-weight: 700 !important;
}

.total-row-highlight td span,
.total-row-highlight td div {
  color: #1e293b !important;
  font-weight: 700 !important;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

/* HEADER MULTI-PROJECT & MULTI-BASELINE SELECTORS */
.header-selectors-group {
  display: flex;
  gap: 1.25rem;
  margin-right: 0;
  background: rgba(10, 15, 30, 0.4);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.header-selector-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.selector-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.selector-action-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.select-premium-sm {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.35rem 1.75rem 0.35rem 0.65rem;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  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");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.8rem;
  transition: var(--transition-smooth);
}

.select-premium-sm:focus {
  border-color: var(--color-devoteam-coral);
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.15);
}

.select-premium-sm:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: var(--text-muted, #64748b) !important;
}

.select-premium-sm option {
  background: #ffffff;
  color: var(--text-main);
}

/* RRHH CELL PROPAGATION & BULK FILL */
.grid-pct-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.btn-propagate-right {
  position: absolute;
  right: -2px;
  background: var(--color-primary);
  border: none;
  border-radius: 4px;
  color: white;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.grid-pct-container:hover .btn-propagate-right {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(4px);
}

.btn-propagate-right:hover {
  background: var(--color-primary-hover);
  transform: scale(1.15) translateX(4px) !important;
}

.btn-row-fill-fast {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-row-fill-fast:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary-hover);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

@keyframes syncPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}
.sync-dot.pulse-animation {
  animation: syncPulse 1.4s infinite ease-in-out;
}

/* HISTORICAL WARNING BANNER */
.historical-warning-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  animation: bannerFadeIn 0.4s ease-out;
}

/* JIRA MISSING DATES WARNING BANNER */
.jira-warning-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.08);
  animation: bannerFadeIn 0.4s ease-out;
}

.jira-warning-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 500;
}

.jira-warning-icon {
  color: #d97706;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* SMART PROJECT CLOSURE PENDING WARNING BANNER (Devoteam Light Theme) */
.closure-warning-banner {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.08);
  animation: bannerFadeIn 0.4s ease-out;
}

.closure-warning-banner.closure-ready {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.08);
}

.closure-warning-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.closure-warning-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(225, 29, 72, 0.12);
  color: #e11d48;
  flex-shrink: 0;
}

.closure-warning-banner.closure-ready .closure-warning-icon-wrap {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.closure-warning-icon {
  width: 20px;
  height: 20px;
}

.closure-warning-text-group {
  flex: 1;
  min-width: 280px;
}

.closure-warning-title {
  color: #9f1239;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: 'Outfit', sans-serif;
}

.closure-warning-banner.closure-ready .closure-warning-title {
  color: #065f46;
}

.closure-warning-desc {
  color: #881337;
  font-size: 0.85rem;
  line-height: 1.45;
}

.closure-warning-banner.closure-ready .closure-warning-desc {
  color: #065f46;
}

.closure-warning-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-closure-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #fda4af;
  color: #be123c;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-closure-action:hover {
  background: #fff1f2;
  border-color: #f43f5e;
  color: #9f1239;
  transform: translateY(-1px);
}

.btn-closure-action.btn-closure-archive {
  background: #059669;
  border-color: #047857;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.btn-closure-action.btn-closure-archive:hover {
  background: #047857;
  border-color: #065f46;
  color: #ffffff;
  transform: translateY(-1px);
}

.read-only-premium-display {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 600;
  user-select: text;
}

/* ALINEACION DE PANELES Y ELEMENTOS EN DETALLES */
#section-config .panel-header {
  min-height: 56px;
  display: flex;
  align-items: center;
}

#section-config {
  min-width: 0;
}

#section-config > .grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 1.5rem;
  min-width: 0;
}

#section-config .panel-glass {
  min-width: 0 !important;
  overflow: hidden;
}

#section-config .jira-read-only-card {
  min-width: 0;
}

#section-config .jira-read-only-card > .grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 1.2rem;
  min-width: 0;
}

#section-config .panel-glass:first-child .jira-read-only-card > .grid-2col:first-child {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
}

#section-config .panel-glass:last-child .jira-read-only-card > .grid-2col:nth-child(4),
#section-config .panel-glass:last-child .jira-read-only-card > .grid-2col:nth-child(5) {
  grid-template-columns: minmax(0, 1fr) !important;
}

#section-config .form-group {
  min-width: 0 !important;
}

#section-config .read-only-premium-display {
  min-height: 44px;
  max-height: 44px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0 !important;
}

#section-config #resp-assigned-people.read-only-premium-display {
  max-height: none !important;
  white-space: normal !important;
  overflow: visible !important;
}


@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.warning-banner-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #92400e; /* Deep amber for high contrast and readability on light theme */
  font-size: 0.88rem;
  line-height: 1.5;
}

.warning-banner-content strong {
  color: #78350f;
  font-weight: 700;
}

.warning-banner-icon-wrap {
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.warning-banner-icon {
  width: 18px;
  height: 18px;
  color: #d97706; /* Solid warm amber */
  flex-shrink: 0;
}

#warning-baseline-name {
  font-weight: 700;
  color: #78350f;
}

/* Print utility to hide elements on screen */
.print-only, .print-only-tfoot {
  display: none !important;
}

/* PRINT PREVIEW TRANSITION HELPER FOR ZERO CHART DISTORTION */
body.print-preview-active #cost-distribution-panel {
  display: none !important;
}

body.print-preview-active .chart-panel-large {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}

body.print-preview-active .chart-panel-large .chart-container {
  width: 700px !important; /* Perfect match for standard A4 printable width at 96 DPI */
  height: 280px !important;
  max-height: 280px !important;
  margin: 0 auto !important;
}

/* PRINT STYLES */
@media print {
  /* Set background white and text dark */
  body, html {
    background: #ffffff !important;
    color: #1e293b !important;
    font-size: 11pt !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Force background colors to print in browsers */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide UI chrome & other non-printable elements */
  .sidebar,
  .top-header,
  .top-header-premium,
  #project-jira-metadata-bar,
  .footer,
  .toast-container,
  .historical-warning-banner,
  #project-closure-warning-banner,
  .closure-warning-banner,
  .modal-overlay,
  #dashboard-actions-row,
  .dashboard-actions-row,
  .panel-actions,
  #sheets-sync-status,
  .btn-icon,
  .btn-icon-sm,
  .badge-emerald,
  .badge-amber,
  .badge-indigo,
  #ai-advisor-container {
    display: none !important;
  }

  /* Make sure main content takes full width without margins/scrollbars */
  .app-layout {
    display: block !important;
  }

  .main-content {
    display: block !important;
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    overflow: visible !important;
    height: auto !important;
  }

  .content-body {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    overflow: visible !important;
    height: auto !important;
  }

  /* Only show section dashboard when printing, hide other sections */
  .app-section {
    display: none !important;
  }
  
  #section-dashboard {
    display: block !important;
    min-height: auto !important; /* Allow natural page breaking */
  }

  /* Print Header Styles */
  .print-only {
    display: block !important;
  }

  #print-only-header {
    margin-bottom: 0.2rem !important;
  }

  .print-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
  }

  .print-header-top h2 {
    font-family: 'Outfit', sans-serif;
    color: #000000 !important; /* Solid black for print */
    margin: 0;
    font-size: 11pt !important;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .print-date {
    font-size: 8pt;
    color: #64748b !important;
  }

  .print-separator {
    border: none;
    border-top: 1px solid #cbd5e1 !important;
    margin: 0.1rem 0 0.2rem 0 !important;
  }

  /* Flex structure for print project info layout */
  .print-project-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.05rem !important;
    font-size: 8.5pt !important;
    color: #334155;
    background: #f8fafc !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
  }

  .print-info-row-full {
    width: 100% !important;
    font-size: 10pt !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    padding-bottom: 0.3rem !important;
    margin-bottom: 0.2rem !important;
  }

  .print-info-row-split {
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 1rem !important;
  }

  .print-info-row-split > div {
    flex: 1 !important;
  }

  /* Eliminar degradados y pintar en negro los títulos de las secciones en el informe impreso */
  .panel-header h3,
  .print-header-top h2,
  .text-gold-gradient,
  h1, h2, h3, h4, .section-title {
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #000000 !important;
    text-shadow: none !important;
  }

  /* KPI Grid layout for print */
  .kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 0.2rem !important; /* Reducido para ahorrar espacio vertical */
    page-break-inside: avoid;
  }

  .kpi-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 0.3rem !important; /* Reducido para ahorrar espacio vertical */
    box-shadow: none !important;
    color: #1e293b !important;
  }

  .kpi-card .kpi-title {
    color: #475569 !important;
    font-size: 8pt !important;
  }

  .kpi-card .kpi-value {
    color: #1e293b !important;
    font-size: 11.5pt !important;
    margin-top: 0.05rem !important;
  }

  .kpi-card .kpi-footer {
    border-top: 1px solid #f1f5f9 !important;
    padding-top: 0.1rem !important;
    margin-top: 0.1rem !important;
    font-size: 7pt !important;
    color: #64748b !important;
  }

  /* Summary side-by-side print layout */
  .summary-comparison-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 0.2rem !important; /* Reducido para ahorrar espacio vertical */
    page-break-inside: avoid;
  }

  .panel-glass {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 0.3rem !important; /* Reducido para ahorrar espacio vertical */
    box-shadow: none !important;
  }

  .panel-header {
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 0.15rem !important;
    margin-bottom: 0.15rem !important; /* Reducido para ahorrar espacio vertical */
  }

  .panel-header h3 {
    color: #1e293b !important;
    font-size: 9.5pt !important;
    font-weight: 700;
  }

  .panel-header .badge {
    display: none !important; /* Ocultar badges redundantes como "Dinámico" en impresión */
  }

  .metric-row {
    font-size: 8pt !important;
    color: #334155 !important;
    padding: 0.15rem 0 !important;
  }

  .metric-row.border-top {
    border-top: 1px dashed #e2e8f0 !important;
  }

  .metric-row .label {
    color: #475569 !important;
  }

  .metric-row .value {
    color: #1e293b !important;
  }

  .text-indigo {
    color: #4f46e5 !important; /* Strong dark indigo for print contrast */
    font-weight: 700;
  }

  .text-emerald, .value.text-emerald, .text-green, .bg-emerald-light i {
    color: #15803d !important; /* Deep green for positive metrics in print */
    font-weight: 700;
  }

  .text-rose, .value.text-rose, .text-red, .text-danger, .bg-rose-light i {
    color: #be123c !important; /* Deep red for negative metrics in print */
    font-weight: 700;
  }

  /* Ensure the monthly table prints and footer sticks to the bottom */
  #print-only-footer {
    position: fixed !important;
    bottom: 0 !important; /* Anchored exactly to the bottom margin boundary */
    left: 0 !important;
    right: 0 !important;
    height: 1.0cm !important;
    display: block !important;
    background: #ffffff !important; /* Solid white background so it looks premium on print */
    margin: 0 !important;
    padding: 5px 0 0 0 !important;
    border-top: 1.5px solid #cbd5e1 !important;
    z-index: 9999 !important;
  }

  #print-only-footer .print-separator {
    display: none !important;
  }

  @page {
    size: A4 portrait;
    margin: 1.2cm 1.2cm 1.6cm 1.2cm !important; /* Sleek 1.6cm bottom margin for precise anchoring */
  }

  .print-only-tfoot {
    display: table-footer-group !important;
  }

  /* Reducir padding de paneles en impresión para evitar recortes y dar más espacio a los gráficos */
  .panel-glass, .charts-grid > .panel-glass, .chart-panel-large {
    padding: 0.3rem !important; /* Mínimo padding para maximizar espacio útil del canvas */
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    border-radius: var(--radius-sm) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    min-height: 0 !important; /* Quitar restricciones de altura mínima para que no sobre espacio debajo */
    min-height: auto !important;
  }

  /* Charts Container layout */
  .charts-grid {
    display: flex !important;
    flex-direction: column !important; /* Block layout for full width */
    gap: 8px !important;
    margin-bottom: 0.2rem !important; /* Reducido para ahorrar espacio vertical */
    width: 100% !important;
    max-width: 100% !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    box-sizing: border-box !important;
  }

  /* Ocultar gráfico de distribución (barras) en impresión para dejar solo el de líneas */
  #cost-distribution-panel {
    display: none !important;
  }

  /* El gráfico de líneas (Curva S) ocupa todo el ancho de forma majestuosa y aprovecha el espacio de la página 1 */
  .chart-panel-large {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .chart-panel-large .chart-container {
    height: 280px !important;
    max-height: 280px !important;
    width: 100% !important;
    display: block !important;
    position: relative !important;
  }

  .chart-panel-large canvas {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
  }

  .chart-container {
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  /* Cuadro de Control Mensual Table */
  .premium-table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  .premium-table th {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.25rem 0.35rem !important;
    font-size: 6.5pt !important;
  }

  .premium-table td {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.25rem 0.35rem !important;
    font-size: 6.8pt !important;
  }

  .premium-table td .text-small {
    font-size: 5.8pt !important;
  }

  .premium-table tr:nth-child(even) td {
    background: #f8fafc !important; /* Subtle zebra striping */
  }

  .premium-table tr.row-real-data td {
    background: #f0f2ff !important; /* Soft indigo-tinted shaded background for real months */
  }

  /* Page break rules to prevent ugly split */
  .charts-grid, .summary-comparison-grid {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Allow the monthly control table panel to break naturally, removing overflow limits & card styles */
  .panel-glass {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  #dashboard-monthly-table-panel {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem !important;
    margin: 0.5rem 0 0 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    page-break-before: always !important;
    break-before: page !important;
  }

  #dashboard-monthly-table-panel .table-responsive {
    overflow: visible !important;
    border: none !important;
    background: transparent !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  .premium-table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  .premium-table thead {
    display: table-header-group !important;
  }

  .premium-table tbody {
    display: table-row-group !important;
  }

  .premium-table tr {
    display: table-row !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .premium-table th, .premium-table td {
    display: table-cell !important;
  }

  .text-gold-gradient {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #b45309 !important; /* Dorado oscuro premium para alta legibilidad en impresión sobre fondo blanco */
  }
}

/* Custom Header Layout for Planificación RRHH */
.rrhh-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rrhh-header .panel-title-group {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.rrhh-header .panel-title-group h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}

.rrhh-header-actions {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 1rem;
}

.rrhh-header-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rrhh-header .rrhh-pager-container {
  display: flex;
  align-items: center;
}

.rrhh-header #btn-bulk-fill-rrhh {
  flex: 0 0 auto;
  margin: 0 0.5rem;
}

@media (max-width: 900px) {
  .rrhh-header {
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }
  .rrhh-header-actions {
    margin: 0.25rem 0 !important;
    width: 100% !important;
    justify-content: center !important;
    order: 3;
  }
  .rrhh-header-controls {
    margin-left: auto !important;
    order: 2;
  }
}

/* RRHH View Mode Switcher (S (%) vs M (€)) */
.rrhh-view-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
  height: 38px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-rrhh-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
}

.btn-rrhh-view:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.7);
}

.btn-rrhh-view.active {
  background: #ffffff;
  color: var(--color-devoteam-coral, #ff3b00);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.btn-rrhh-view i,
.btn-rrhh-view svg {
  width: 14px;
  height: 14px;
}

.rrhh-monthly-cell {
  padding: 0.5rem 0.25rem !important;
  vertical-align: middle;
  text-align: center;
  transition: background-color 0.15s ease;
}

.rrhh-monthly-cell-value {
  font-weight: 700;
  font-size: 0.84rem;
  color: #1e293b;
  display: block;
  white-space: nowrap;
}

.rrhh-monthly-cell-sub {
  font-size: 0.68rem;
  color: #64748b;
  display: block;
  margin-top: 2px;
  white-space: nowrap;
}

.rrhh-monthly-cell.has-cost {
  background: rgba(99, 102, 241, 0.04);
}

.rrhh-monthly-cell.has-cost:hover {
  background: rgba(99, 102, 241, 0.1);
}

.rrhh-monthly-cell.is-zero {
  opacity: 0.45;
}

/* ==========================================================
   PMO GENERAL TOP HEADER & JIRA METADATA PREMIUM STYLING
   ========================================================== */

.top-header-premium {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  width: 100%;
  position: relative;
  z-index: 2;
}

.content-body {
  position: relative;
  z-index: 3;
}

.header-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  width: 100%;
  flex-wrap: wrap;
}

.header-title-container {
  flex: 1;
  min-width: 250px;
}

.header-title-container h1,
#page-title {
  display: inline-block;
  width: fit-content;
  font-size: 2.25rem;
  font-weight: 700;
  -webkit-text-fill-color: var(--text-main) !important;
  color: var(--text-main) !important;
  background: none !important;
}

.btn-primary-premium {
  background: var(--color-devoteam-coral);
  border: 1px solid var(--color-devoteam-coral);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.25);
}

.btn-primary-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(248, 72, 94, 0.35);
  background: var(--color-devoteam-coral-hover);
  border-color: var(--color-devoteam-coral-hover);
}

.btn-primary-premium:active {
  transform: translateY(0);
}

.header-controls-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.header-selectors-group-premium {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

.header-search-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 260px;
}

.header-selector-pm {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 200px;
}

.header-selector-pm .select-premium-sm {
  width: 100%;
}

.header-selector-project {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 300px;
}

.header-selector-project .select-premium-sm {
  width: 100%;
  flex: 1;
  min-width: 0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s;
}

.search-input-premium {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.35rem 2rem 0.35rem 2rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.search-input-premium:focus {
  outline: none;
  border-color: var(--color-devoteam-coral);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.15);
}

.search-input-premium:focus + .search-icon {
  color: var(--color-devoteam-coral);
}

.clear-search-btn {
  position: absolute;
  right: 0.6rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.15rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.clear-search-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.header-selector-item-premium {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
}

.btn-icon-premium-sm {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  color: var(--color-devoteam-grey);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon-premium-sm:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: var(--text-main);
  transform: translateY(-1px);
}

.btn-icon-premium-sm:active {
  transform: translateY(0);
}

.btn-icon-premium-sm.active-toggle {
  background: var(--color-devoteam-coral-light) !important;
  border-color: rgba(248, 72, 94, 0.45) !important;
  color: var(--color-devoteam-coral) !important;
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.15) !important;
}

.btn-icon-premium-sm.active-toggle:hover {
  background: #ffe4e6 !important;
  border-color: var(--color-devoteam-coral) !important;
  color: var(--color-devoteam-coral) !important;
}

/* JIRA METADATA BAR */
.jira-metadata-bar {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Semáforo de Riesgo: Tonos muy claros y elegantes pero diferenciados */
.jira-metadata-bar.risk-green {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #a7f3d0;
  border-left: 5px solid #10b981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
}
.jira-metadata-bar.risk-green .meta-divider {
  background: #a7f3d0;
}

.jira-metadata-bar.risk-amber {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-left: 5px solid #f59e0b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.1);
}
.jira-metadata-bar.risk-amber .meta-divider {
  background: #fde68a;
}

.jira-metadata-bar.risk-red {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  border-left: 5px solid #ef4444;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.1);
}
.jira-metadata-bar.risk-red .meta-divider {
  background: #fecaca;
}

.metadata-left-glow {
  display: none;
}

.metadata-content {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.meta-badge-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #56555a;
  letter-spacing: 0.05em;
}

.badge-status-premium {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Status colors */
.status-done {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-progress {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.status-todo {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-archived {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  border: 1px solid #cbd5e1;
}

.status-neutral {
  background: rgba(100, 116, 139, 0.08);
  color: #475569;
  border: 1px solid #cbd5e1;
}

.status-blocked {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-psf {
  background: var(--color-devoteam-coral-light);
  color: var(--color-devoteam-coral);
  border: 1px solid rgba(248, 72, 94, 0.25);
  cursor: default;
}

.status-client {
  background: #f1f5f9;
  color: var(--color-devoteam-grey);
  border: 1px solid #cbd5e1;
  cursor: default;
}

.meta-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

.meta-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-icon {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

.icon-ticket { color: #818cf8; }
.icon-pm { color: #f472b6; }
.icon-comercial { color: #fb7185; }
.icon-type { color: #2dd4bf; }
.icon-subunit { color: #fbbf24; }

.meta-text-group {
  display: flex;
  flex-direction: column;
}

.meta-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
}

.meta-budget-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
}

.meta-budget-item-push {
  margin-left: auto;
}

.sheets-link-button {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #065f46 !important;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(6, 95, 70, 0.1);
}

.sheets-link-button:hover {
  background: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(6, 95, 70, 0.2);
}

.sheets-link-button:active {
  transform: translateY(0);
}

.sheets-link-button span {
  color: #065f46 !important;
  font-weight: 700 !important;
}

.slides-link-button {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #92400e !important;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(146, 64, 14, 0.1) !important;
}

.slides-link-button:hover {
  background: #fef3c7 !important;
  border-color: #fcd34d !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(146, 64, 14, 0.2) !important;
}

.slides-link-button:active {
  transform: translateY(0);
}

.slides-link-button span {
  color: #92400e !important;
  font-weight: 700 !important;
}

.docs-link-button {
  background: rgba(59, 130, 246, 0.12) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  color: #60a5fa !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15) !important;
}

.docs-link-button:hover {
  background: rgba(59, 130, 246, 0.25) !important;
  border-color: #60a5fa !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.docs-link-button span {
  color: #60a5fa !important;
}

.pdf-link-button {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15) !important;
}

.pdf-link-button:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #f87171 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.pdf-link-button span {
  color: #f87171 !important;
}

.sheets-svg-icon {
  width: 13px;
  height: 13px;
  transition: transform 0.2s;
}

.sheets-link-button:hover .sheets-svg-icon {
  transform: rotate(15deg);
}

.meta-value-empty {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.25rem 0.5rem;
}

@media (max-width: 1024px) {
  .meta-divider {
    display: none;
  }
  .meta-budget-item,
  .meta-budget-item-push {
    margin-left: 0 !important;
    width: 100%;
    align-items: flex-start;
  }
}

#btn-section-info {
  transition: all 0.2s ease-in-out;
}

#btn-section-info:hover {
  color: var(--primary-accent) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  transform: scale(1.1) rotate(5deg);
}

@keyframes warning-pulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0.4));
  }
  70% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0));
  }
}

.pulse-warning {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.5));
}

/* ==========================================
   8. HELP SECTION PREMIUM STYLES
   ========================================== */
.help-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  padding-left: 0.5rem;
  margin-top: 1.5rem;
}

.help-timeline::before {
  content: '';
  position: absolute;
  left: 1.35rem;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary) 0%, rgba(99, 102, 241, 0.05) 100%);
  z-index: 0;
}

.help-step-item {
  display: flex;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.help-step-number {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--color-devoteam-coral);
  color: var(--color-devoteam-coral);
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-step-item:hover .help-step-number {
  border-color: var(--color-devoteam-coral);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.25);
  background: var(--color-devoteam-coral-light);
}

.help-step-content {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-step-item:hover .help-step-content {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateX(4px);
}

.help-step-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.4rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.help-step-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #334155;
  margin: 0;
}

/* Workflow Cards (Right Column) */
.workflow-card {
  display: flex;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.workflow-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.workflow-badge {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.workflow-card:hover .workflow-badge {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.workflow-desc h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.3rem 0;
}

.workflow-desc p {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #334155;
  margin: 0;
}

/* Useful Tips List */
.help-tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.help-tips-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.help-tips-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.help-tips-list li i {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
}

.help-tips-list li strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.help-tips-list li span {
  display: block;
  line-height: 1.4;
}

/* ==========================================================================
   ASISTENTE FINANCIERO AI (AI ADVISOR)
   ========================================================================== */

@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-trigger-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-devoteam-coral);
  border: 2px solid #ffffff;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(248, 72, 94, 0.35);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

.ai-trigger-btn:hover {
  transform: scale(1.1) translateY(-3px);
  background: var(--color-devoteam-coral-hover);
  box-shadow: 0 12px 28px rgba(248, 72, 94, 0.45);
}

.ai-trigger-btn:active {
  transform: scale(0.95);
}

.ai-trigger-btn * {
  pointer-events: none !important;
}

.ai-sparkles-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

.ai-trigger-btn:hover .ai-sparkles-icon {
  transform: rotate(20deg) scale(1.1);
}

.ai-badge-notification {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #f59e0b;
  color: #0b0f19;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1.5px solid #0a0f1e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.05em;
  line-height: 1;
  z-index: 2;
}

/* Panel Desplegable */
.ai-panel-glass {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 390px;
  max-height: 520px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  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 #cbd5e1;
  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: #f0fdf4;
}

.ai-advice-card.alert-success:hover {
  background: #dcfce7;
}

.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-muted);
}

/* Skeleton Loading */
.ai-skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.9rem 1.05rem;
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.ai-skeleton-line {
  height: 12px;
  width: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 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 16px rgba(248, 72, 94, 0.35);
}

.btn-ai-primary:active {
  transform: translateY(1px);
}

.ai-footer-disclaimer {
  font-size: 0.65rem;
  color: #64748b;
  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-muted);
}

.ai-empty-state i {
  width: 32px;
  height: 32px;
  color: var(--color-devoteam-coral);
  opacity: 0.6;
}

.ai-empty-state p {
  margin: 0;
  font-size: 0.825rem;
  line-height: 1.5;
}

/* Alineación de Tarjetas Comparativas en Dashboard General */
.summary-comparison-grid .panel-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
}

.summary-comparison-grid .metric-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Spinner rotation helper */
.animate-spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

/* Selector de planificaciones con ancho fijo para evitar saltos de maquetación */
#header-baseline-select {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
}

/* BACK TO PORTAL BUTTON (SIDEBAR LEGACY - RETAINED FOR COMPATIBILITY) */
.back-to-portal-btn {
  text-decoration: none;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  color: var(--color-devoteam-coral) !important;
  font-weight: 600;
}

.back-to-portal-btn:hover {
  background: var(--color-devoteam-coral-light) !important;
  color: var(--color-devoteam-coral-hover) !important;
  box-shadow: none;
}

.back-to-portal-btn i {
  color: var(--color-devoteam-coral) !important;
  transition: transform 0.3s ease;
}

.back-to-portal-btn:hover i {
  color: var(--color-devoteam-coral-hover) !important;
  transform: translateX(-4px);
}

/* NEW 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.1) !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.2) !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;
}

/* OVER-ALLOCATION PULSATING CELLS */
.input-grid-pct.cell-overallocated,
.input-grid-pct.has-allocation.cell-overallocated,
.cell-overallocated {
  background: #fef2f2 !important;
  border: 1px solid #f87171 !important;
  color: #b91c1c !important;
  font-weight: 700 !important;
  /* animation: pulseWarningBg 2s infinite ease-in-out !important; */
}

@keyframes pulseWarningBg {
  0% {
    background-color: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
  }
  50% {
    background-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.45);
  }
  100% {
    background-color: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
  }
}

#jira-sync-status-card {
  cursor: default !important;
  background: rgba(0, 82, 204, 0.1) !important;
  border: 1px solid rgba(0, 82, 204, 0.25) !important;
  transition: all 0.2s ease-in-out;
}

#jira-sync-status-card:hover {
  background: rgba(0, 82, 204, 0.2) !important;
  border-color: rgba(0, 82, 204, 0.5) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
}

#jira-sync-status-card .jira-logo-svg {
  transition: transform 0.4s ease;
}

#jira-sync-status-card:hover .jira-logo-svg {
  transform: scale(1.15) 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); }
}

/* PREMIUM POPOVER & CELL COMMENTS FOR PROJECT BUDGET */
.grid-pct-container.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;
}

.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;
}

/* PM GLOBAL SUMMARY STRIP (DASHBOARD HEADER) */
.header-pm-summary-container {
  width: 100%;
  margin: 0;
  animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pm-summary-table-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.pm-summary-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pm-summary-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-devoteam-grey);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pm-summary-toggle-pill-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  gap: 3px;
}

.pm-pill-btn {
  background: transparent;
  border: none;
  color: var(--color-devoteam-grey);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Outfit', sans-serif;
}

.pm-pill-btn:hover {
  color: var(--text-main);
  background: #e2e8f0;
}

.pm-pill-btn.active {
  background: var(--color-devoteam-coral);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.25);
  border: none;
}

.pm-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
}

.pm-summary-table th {
  background: #f8fafc;
  color: var(--color-devoteam-grey);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.pm-summary-table td {
  padding: 0.65rem 1rem;
  color: var(--text-main);
  font-size: 0.85rem;
  border-bottom: none;
  vertical-align: middle;
}

.pm-summary-table tbody tr:hover {
  background: rgba(248, 72, 94, 0.03);
}

.pm-kpi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-rose {
  background: var(--color-devoteam-coral-light);
  color: var(--color-devoteam-coral);
  border: 1px solid rgba(248, 72, 94, 0.25);
}

/* WIP & CIERRES UNIFIED COMPACT TABLE */
.wip-cierres-table th,
.wip-cierres-table td {
  padding: 0.5rem 0.35rem !important;
  font-size: 0.82rem;
}

.wip-cierres-table th {
  white-space: normal;
  line-height: 1.2;
}

.wip-cierres-table .input-percent-wrapper .input-table-money {
  padding-left: 0.3rem !important;
  padding-right: 1.15rem !important;
  font-size: 0.8rem !important;
  height: 28px !important;
}

.wip-cierres-table .input-percent-wrapper .percent-symbol {
  right: 0.35rem !important;
  font-size: 0.72rem !important;
}

.wip-cierres-table .input-currency-wrapper {
  max-width: 95px;
  margin-left: auto;
}

.wip-cierres-table .input-currency-wrapper .input-table-money {
  padding-left: 0.35rem !important;
  padding-right: 1.15rem !important;
  font-size: 0.8rem !important;
  height: 28px !important;
  text-align: right !important;
}

.wip-cierres-table .input-currency-wrapper .currency-symbol {
  right: 0.35rem !important;
  font-size: 0.72rem !important;
  color: #64748b;
}

.wip-mini-split-input {
  width: 38px !important;
  height: 20px !important;
  padding: 0 3px !important;
  font-size: 0.70rem !important;
  font-weight: 600 !important;
  text-align: right !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.wip-mini-split-input:focus {
  border-color: #6366f1 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

.wip-split-inputs-column {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.wip-split-input-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.68rem;
  white-space: nowrap;
}

.wip-cierres-table th.text-center,
.wip-cierres-table td.text-center {
  text-align: center !important;
}

.wip-cierres-table td.text-center .badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
}

/* BILLING MILESTONES TABLE ALIGNMENT */
#billing-milestones-table th,
#billing-milestones-table td {
  text-align: center !important;
  vertical-align: middle !important;
}

#billing-milestones-table th.col-concept,
#billing-milestones-table td.col-concept {
  text-align: left !important;
}

#billing-milestones-table td .badge,
#billing-milestones-table td .badge-status-premium,
#billing-milestones-table td .btn-icon-sm {
  margin: 0 auto !important;
}

/* WIP Y CIERRES - MES CON GRADO DE AVANCE RECOGIDO / BLOQUEADO */
.premium-table tbody tr.row-wip-collected,
.wip-cierres-table tbody tr.row-wip-collected {
  background-color: rgba(16, 185, 129, 0.05) !important;
}

.premium-table tbody tr.row-wip-collected:hover,
.wip-cierres-table tbody tr.row-wip-collected:hover {
  background-color: rgba(16, 185, 129, 0.09) !important;
}

/* WIP Y CIERRES - ESTADO DE RECÁLCULO / BLOQUEO */
.wip-table-busy {
  pointer-events: none !important;
  opacity: 0.65;
  transition: opacity 0.15s ease-in-out;
  cursor: wait !important;
}

.wip-table-busy input {
  cursor: wait !important;
  opacity: 0.7 !important;
}

