/* ==========================================================
   AITANA SUITE — FINANCE CONTROL MODULE
   Devoteam Corporate Theme, Glassmorphism & High-Density Tables
   ========================================================== */

:root {
  --color-primary: #F8485E;
  --color-devoteam-coral: #F8485E;
  --color-devoteam-coral-hover: #E0364C;
  --color-devoteam-coral-light: rgba(248, 72, 94, 0.08);
  --color-devoteam-grey: #56555A;

  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-border: #E2E8F0;
  --color-border-hover: rgba(248, 72, 94, 0.35);

  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;

  --color-emerald-50: #ECFDF5;
  --color-emerald-600: #059669;
  --color-emerald-700: #047857;

  --color-indigo-50: #EEF2FF;
  --color-indigo-600: #4F46E5;
  --color-indigo-700: #4338CA;

  --color-purple-50: #FAF5FF;
  --color-purple-600: #9333EA;

  --color-amber-50: #FFFBEB;
  --color-amber-600: #D97706;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 8px 24px -4px rgba(248, 72, 94, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 24px 48px -12px rgba(15, 23, 42, 0.25);

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-full: 9999px;

  --transition-fast: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  color: var(--slate-800);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* CONTAINER */
.fc-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  padding: 0.5rem 1rem 0.65rem 1rem;
  max-width: 100%;
  margin: 0 auto;
  gap: 0.5rem;
  box-sizing: border-box;
}

/* HEADER (DEVOTEAM CORPORATE SUITE STANDARD) */
.app-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0.5rem 0 0.85rem 0 !important;
  border-bottom: 1px solid #E2E8F0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
  margin-bottom: 0 !important;
}

.header-left {
  display: flex !important;
  align-items: center !important;
  gap: 1.25rem !important;
}

.brand-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}

.logo-glow-devoteam {
  width: 42px !important;
  height: 42px !important;
  background: #FFF1F3 !important;
  border: 1px solid rgba(248, 72, 94, 0.3) !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--color-devoteam-coral) !important;
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.12) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: default !important;
}

.logo-glow-devoteam:hover {
  background: #FFE4E8 !important;
  border-color: rgba(248, 72, 94, 0.5) !important;
  box-shadow: 0 4px 14px rgba(248, 72, 94, 0.25) !important;
  transform: rotate(5deg) scale(1.05) !important;
}

.logo-glow-devoteam i,
.logo-glow-devoteam svg,
.logo-icon {
  width: 22px !important;
  height: 22px !important;
  color: var(--color-devoteam-coral) !important;
  stroke: var(--color-devoteam-coral) !important;
  display: block !important;
}

.brand-text {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.brand-text h2 {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 0 !important;
  letter-spacing: -0.02em !important;
}

.brand-text h2 span {
  font-family: 'Outfit', sans-serif !important;
  font-size: inherit !important;
  font-weight: 800 !important;
  display: inline !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  line-height: inherit !important;
}

.brand-text > span {
  font-size: 0.7rem !important;
  color: #56555a !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  display: block !important;
  white-space: nowrap !important;
  margin-top: 1px !important;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-help-circle {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #56555a !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.btn-help-circle:hover {
  background: #FFF1F3 !important;
  color: #F8485E !important;
  border-color: rgba(248, 72, 94, 0.35) !important;
  transform: scale(1.05) !important;
}

.btn-help-circle i,
.btn-help-circle svg {
  width: 18px !important;
  height: 18px !important;
  color: inherit !important;
  stroke: currentColor !important;
}

.badge-unit-active {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  padding: 0 16px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #047857 !important;
  font-family: var(--font-heading) !important;
  height: 38px !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  white-space: nowrap !important;
}

.badge-unit-active i,
.badge-unit-active svg {
  width: 14px !important;
  height: 14px !important;
  color: #047857 !important;
  stroke: #047857 !important;
  flex-shrink: 0 !important;
}

.badge-beta-header {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.25rem 0.65rem !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #d97706 !important;
  text-transform: uppercase !important;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif !important;
  line-height: 1 !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.08) !important;
}

.btn-portal-back-premium {
  position: relative !important;
  z-index: 1000 !important;
  background: #FFF1F3 !important;
  border: 1px solid rgba(248, 72, 94, 0.25) !important;
  color: #F8485E !important;
  text-decoration: none !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  font-family: var(--font-body) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.08) !important;
  box-sizing: border-box !important;
  height: 38px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  margin: 0 !important;
}

.btn-portal-back-premium:hover {
  transform: translateY(-2px) !important;
  background: rgba(248, 72, 94, 0.12) !important;
  border-color: rgba(248, 72, 94, 0.45) !important;
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.18) !important;
  color: #d62d43 !important;
}

.btn-portal-back-premium i,
.btn-portal-back-premium svg {
  width: 14px !important;
  height: 14px !important;
  color: #F8485E !important;
  stroke: #F8485E !important;
}

/* EXECUTIVE KPIS STRIP */
.kpis-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

@media (max-width: 1400px) {
  .kpis-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .kpis-strip {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-border-hover);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: var(--transition-fast);
}

.kpi-card.highlight-coral::before { background: var(--color-devoteam-coral); }
.kpi-card.highlight-slate::before { background: var(--slate-600); }
.kpi-card.highlight-blue::before { background: #2563EB; }
.kpi-card.highlight-emerald::before { background: var(--color-emerald-600); }
.kpi-card.highlight-indigo::before { background: var(--color-indigo-600); }
.kpi-card.highlight-amber::before { background: var(--color-amber-600); }

.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-box.coral { background: rgba(248, 72, 94, 0.1); color: var(--color-devoteam-coral); }
.kpi-icon-box.slate { background: var(--slate-100); color: var(--slate-700); }
.kpi-icon-box.emerald { background: var(--color-emerald-50); color: var(--color-emerald-600); }
.kpi-icon-box.indigo { background: var(--color-indigo-50); color: var(--color-indigo-600); }
.kpi-icon-box.amber { background: var(--color-amber-50); color: var(--color-amber-600); }

.kpi-icon-box i {
  width: 22px;
  height: 22px;
}

.kpi-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.kpi-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  margin-bottom: 0.2rem;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-subtext {
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-top: 0.25rem;
}

.kpi-breakdown-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.pill-breakdown {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.pill-breakdown.own {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.pill-breakdown.sub {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FED7AA;
}

/* CONTROL & FILTERS BAR (COMPACT SINGLE ROW, EVENLY DISTRIBUTED) */
.control-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.35rem 0.75rem !important;
  box-shadow: var(--shadow-sm) !important;
  gap: 0.65rem !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.control-search {
  flex: 1 1 180px !important;
  min-width: 130px !important;
  max-width: 220px !important;
}

.search-input-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.search-icon-inside {
  position: absolute !important;
  left: 0.55rem !important;
  width: 13px !important;
  height: 13px !important;
  color: var(--slate-400) !important;
  pointer-events: none !important;
}

.custom-input {
  width: 100% !important;
  height: 28px !important;
  padding: 0 1.5rem 0 1.7rem !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 6px !important;
  background: var(--slate-50) !important;
  color: var(--slate-800) !important;
  font-size: 0.78rem !important;
  font-family: var(--font-body) !important;
  transition: var(--transition-fast) !important;
}

.custom-input:focus {
  outline: none !important;
  border-color: var(--color-devoteam-coral) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.12) !important;
}

.btn-clear-search-x {
  position: absolute !important;
  right: 0.4rem !important;
  background: transparent !important;
  border: none !important;
  color: var(--slate-400) !important;
  cursor: pointer !important;
  padding: 0.15rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-clear-search-x:hover {
  color: var(--color-devoteam-coral) !important;
}

.btn-clear-search-x i,
.btn-clear-search-x svg {
  width: 12px !important;
  height: 12px !important;
}

.control-divider {
  width: 1px !important;
  height: 20px !important;
  background: var(--color-border) !important;
  flex-shrink: 0 !important;
  margin: 0 0.1rem !important;
}

.control-filters {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.6rem !important;
  flex-wrap: nowrap !important;
  flex: 3 1 auto !important;
  min-width: 0 !important;
}

.control-group {
  display: flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.control-group label {
  font-size: 0.73rem !important;
  font-weight: 700 !important;
  color: var(--slate-600) !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.2rem !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.custom-select {
  height: 28px !important;
  padding: 0 1.25rem 0 0.45rem !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 6px !important;
  background: var(--slate-50) !important;
  color: var(--slate-800) !important;
  font-size: 0.78rem !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: var(--transition-fast) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.custom-select:focus {
  outline: none !important;
  border-color: var(--color-devoteam-coral) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.12) !important;
}

.custom-select:disabled,
.custom-select.disabled-locked {
  background-color: #F1F5F9 !important;
  color: #475569 !important;
  border-color: #CBD5E1 !important;
  cursor: not-allowed !important;
  opacity: 0.85 !important;
  font-weight: 600 !important;
}

.badge-active-period {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  height: 28px !important;
  padding: 0 0.65rem !important;
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 6px !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
  white-space: nowrap !important;
  letter-spacing: -0.01em !important;
  box-sizing: border-box !important;
  cursor: default !important;
}

.badge-active-period i,
.badge-active-period svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  color: var(--color-devoteam-coral) !important;
  stroke: var(--color-devoteam-coral) !important;
}

#group-period-indicator,
#group-period-filter {
  flex: 0 0 auto !important;
}

.period-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.period-select-wrapper .period-select-icon {
  position: absolute;
  left: 7px;
  width: 13px !important;
  height: 13px !important;
  min-width: 13px !important;
  color: var(--color-devoteam-coral, #F8485E) !important;
  stroke: var(--color-devoteam-coral, #F8485E) !important;
  pointer-events: none;
  z-index: 2;
}

.custom-select.period-select {
  padding-left: 1.55rem !important;
  padding-right: 1.4rem !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  background-color: #F8FAFC !important;
  border-color: #CBD5E1 !important;
  min-width: 145px !important;
  height: 28px !important;
}

.custom-select.period-select:focus {
  border-color: var(--color-devoteam-coral, #F8485E) !important;
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.12) !important;
}

#select-unit,
#select-subunit {
  min-width: 105px !important;
  flex: 1.3 1 auto !important;
}

#select-pm {
  min-width: 110px !important;
  flex: 1.5 1 auto !important;
}

#select-ops-filter {
  min-width: 110px !important;
  flex: 1.4 1 auto !important;
}

.control-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  flex-shrink: 0 !important;
}

.btn-action-ghost {
  height: 28px !important;
  padding: 0 0.65rem !important;
  background: var(--slate-50) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 6px !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  color: var(--slate-700) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  cursor: pointer !important;
  transition: var(--transition-fast) !important;
  white-space: nowrap !important;
}

.btn-action-ghost:hover {
  background: var(--slate-100) !important;
  color: var(--slate-900) !important;
  border-color: var(--slate-300) !important;
}

.btn-action-ghost i,
.btn-action-ghost svg {
  width: 13px !important;
  height: 13px !important;
}

.btn-export-csv {
  background: #FFFFFF !important;
  border: 1px solid var(--color-border) !important;
  color: var(--slate-700) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.btn-export-csv:hover {
  background: #FFF1F3 !important;
  color: var(--color-devoteam-coral) !important;
  border-color: rgba(248, 72, 94, 0.35) !important;
  transform: translateY(-1px) !important;
}

.btn-export-csv i,
.btn-export-csv svg {
  width: 13px !important;
  height: 13px !important;
  color: var(--color-devoteam-coral) !important;
  stroke: var(--color-devoteam-coral) !important;
}

.btn-action-primary {
  height: 38px;
  padding: 0 1rem;
  background: var(--color-devoteam-coral);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.25);
}

.btn-action-primary:hover {
  background: var(--color-devoteam-coral-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.35);
}

.btn-action-primary i {
  width: 15px;
  height: 15px;
}

/* MAIN TABLE CARD */
.table-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  width: 100%;
  max-width: 100%;
}

.table-responsive {
  overflow-x: hidden !important; /* Sin scroll horizontal */
  overflow-y: auto;
  max-height: none;
  flex: 1;
  min-height: 0 !important;
  min-height: 400px;
  width: 100%;
  position: relative;
}

.fc-table {
  width: 100%;
  table-layout: fixed; /* Distribución estricta sin desbordamiento */
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.15;
  text-align: left;
}

/* TABLE HEADER */
.fc-table thead th {
  background: #F8FAFC;
  color: var(--slate-600);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 5px 4px !important;
  height: 28px;
  line-height: 1.1;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: sticky;
  top: 0;
  z-index: 10;
  user-select: none;
  text-align: center !important;
}

/* Ensure all header column titles are centered regardless of cell classes */
.fc-table thead th,
.fc-table thead th.col-code,
.fc-table thead th.col-client,
.fc-table thead th.col-project,
.fc-table thead th.col-pm,
.fc-table thead th.col-ops,
.fc-table thead th.col-num,
.fc-table thead th.col-invoiced-eur,
.fc-table thead th.col-metric,
.fc-table thead th.col-acum-eur,
.fc-table thead th.col-current-pct,
.fc-table thead th.col-current-eur,
.fc-table thead th.col-pending-pct {
  text-align: center !important;
}

.fc-table thead th.sortable {
  cursor: pointer;
  transition: var(--transition-fast);
}

.fc-table thead th.sortable:hover {
  background: var(--slate-100);
  color: var(--color-devoteam-coral);
}

.sort-icon {
  width: 10px;
  height: 10px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.15rem;
  opacity: 0.4;
  transition: var(--transition-fast);
}

.fc-table thead th.sorted .sort-icon {
  opacity: 1;
  color: var(--color-devoteam-coral);
}

/* TABLE ROWS - ALTO MÍNIMO POSIBLE */
.fc-table tbody tr.order-row {
  height: 25px !important;
  max-height: 25px !important;
  transition: var(--transition-fast);
  border-bottom: 1px solid #E2E8F0;
}

.fc-table tbody tr.order-row:hover td {
  background-color: #F1F5F9 !important;
}

.fc-table tbody tr.order-row.expanded {
  background-color: #F8FAFC;
}

.fc-table tbody tr.order-row.expanded:hover td {
  background-color: #F1F5F9 !important;
}

.fc-table tbody td {
  padding: 2px 4px !important;
  height: 25px !important;
  line-height: 1.15;
  font-size: 11px;
  border-bottom: 1px solid #E2E8F0;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.12s ease;
}

/* COLUMNS STYLING */
.col-expander {
  width: 28px !important;
  text-align: center;
  padding: 2px 2px !important;
}

.btn-toggle-expand {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--slate-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-fast);
}

.btn-toggle-expand:hover {
  background: var(--color-devoteam-coral-light);
  border-color: var(--color-devoteam-coral);
  color: var(--color-devoteam-coral);
}

.btn-toggle-expand i {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.order-row.expanded .btn-toggle-expand i {
  transform: rotate(90deg);
}

.badge-order-code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 700;
  font-size: 10.5px;
  line-height: 1;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  padding: 1px 4px;
  border-radius: 3px;
  color: #0F172A;
  display: inline-block;
  white-space: nowrap;
}

.badge-order-code.badge-order-link {
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  transition: all 0.15s ease;
}

.badge-order-code.badge-order-link:hover {
  background: #FFE4E8;
  border-color: var(--color-devoteam-coral, #F8485E);
  color: var(--color-devoteam-coral, #F8485E);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(248, 72, 94, 0.18);
}

.badge-order-code.badge-order-link .icon-open-budget {
  width: 10px;
  height: 10px;
  opacity: 0.55;
  stroke-width: 2.2;
}

.badge-order-code.badge-order-link:hover .icon-open-budget {
  opacity: 1;
  color: var(--color-devoteam-coral, #F8485E);
  stroke: var(--color-devoteam-coral, #F8485E);
}

.cell-ellipsis {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--slate-800);
}

/* OWNER OPERACIONES SELECTOR ULTRA-COMPACTO */
.ops-owner-cell {
  position: relative;
  padding: 1px 2px !important;
}

.select-ops-owner {
  width: 100%;
  height: 20px;
  line-height: 18px;
  padding: 0 10px 0 3px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  background: #ffffff;
  color: var(--slate-800);
  font-size: 10.5px;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition-fast);
}

.select-ops-owner:hover {
  border-color: var(--color-border-hover);
}

.select-ops-owner:focus {
  outline: none;
  border-color: var(--color-devoteam-coral);
  box-shadow: 0 0 0 1.5px rgba(248, 72, 94, 0.15);
}

.select-ops-owner.unassigned {
  color: var(--slate-400);
  font-style: italic;
  background-color: var(--slate-50);
}

.select-ops-owner.saving {
  opacity: 0.6;
  pointer-events: none;
}

/* METRICS AND BREAKDOWNS ULTRA-COMPACT */
.col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-num-val {
  display: block;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--slate-800);
}

.col-metric {
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-content: safe flex-end;
  gap: 2px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

.val-main {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--slate-900);
  white-space: nowrap;
  flex-shrink: 0;
}

.val-emerald {
  color: var(--color-emerald-700);
}

.val-indigo {
  color: var(--color-indigo-600);
}

.val-invoiced {
  color: #0284c7;
  font-weight: 600;
}

.val-amber {
  color: var(--color-amber-600);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
}

.pill-own-mini {
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
  border: 1px solid #BFDBFE !important;
  border-radius: 3px;
  padding: 0px 3px;
  font-size: 9.5px;
  line-height: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-sub-mini {
  background: #FFF7ED !important;
  color: #C2410C !important;
  border: 1px solid #FED7AA !important;
  border-radius: 3px;
  padding: 0px 3px;
  font-size: 9.5px;
  line-height: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================
   COLUMNAS DESTACADAS: MES EN CURSO (% ACUM y €)
   ========================================================== */
.fc-table thead th.col-highlight-current {
  background: #EEF2FF !important;
  color: #312E81 !important;
  border-bottom: 2px solid #4F46E5 !important;
  font-weight: 800 !important;
}

.fc-table thead th.col-highlight-current:hover {
  background: #E0E7FF !important;
  color: #1E1B4B !important;
}

/* ==========================================================
   COLUMNA PRE-CIERRE DE HORAS (MY APPS)
   ========================================================== */
.fc-table thead th.col-precierre-hrs {
  background: #F0F9FF !important;
  color: #0369A1 !important;
  border-bottom: 2px solid #0284C7 !important;
  font-weight: 800 !important;
}

.fc-table thead th.col-precierre-hrs:hover {
  background: #E0F2FE !important;
  color: #075985 !important;
}

.fc-table tbody td.col-precierre-hrs {
  background: rgba(240, 249, 255, 0.35);
  border-left: 1px dashed #BAE6FD;
  border-right: 1px dashed #BAE6FD;
}

.fc-table tbody td.col-precierre-hrs.has-precierre-data {
  cursor: pointer;
}

.fc-table tbody td.col-precierre-hrs.has-precierre-data:hover {
  background: #E0F2FE !important;
}

.precierre-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2.5px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

.pill-cod-scope {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
  border-radius: 3px;
  padding: 0 3px;
  font-size: 8.8px;
  line-height: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.pill-cod-scope.multi-orders {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FDE68A;
}

.pill-cod-scope svg,
.pill-cod-scope i {
  width: 8.5px !important;
  height: 8.5px !important;
}

.val-precierre-hrs {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: #0369A1;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-otras-mini {
  border-radius: 3px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-otras-mini.has-otras {
  background: #FFFBEB !important;
  color: #B45309 !important;
  border: 1px solid #FDE68A !important;
}

.pill-otras-mini.zero-otras {
  background: #F8FAFC !important;
  color: #94A3B8 !important;
  border: 1px solid #E2E8F0 !important;
}

.cell-precierre-empty {
  display: block;
  text-align: center;
  color: #CBD5E1;
  font-size: 10px;
}

.fc-table thead th.col-highlight-current:hover {
  background: #E0E7FF !important;
  color: #1E1B4B !important;
}

.fc-table tbody td.col-highlight-current {
  background-color: rgba(99, 102, 241, 0.04) !important;
}

.fc-table tbody tr.order-row:hover td.col-highlight-current {
  background-color: #E0E7FF !important;
}

/* SEPARACIÓN VISUAL ENTRE BLOQUE ACUMULADO, MES EN CURSO Y PENDIENTE */
.fc-table thead th.col-acum-eur,
.fc-table tbody td.col-acum-eur {
  padding-right: 12px !important;
}

.fc-table thead th.col-current-pct,
.fc-table tbody td.col-current-pct {
  border-left: 2px solid #94A3B8 !important;
  padding-left: 6px !important;
}

.fc-table thead th.col-current-eur,
.fc-table tbody td.col-current-eur {
  border-right: 2px solid #94A3B8 !important;
  padding-right: 4px !important;
}

.fc-table thead th.col-pending-pct,
.fc-table tbody td.col-pending-pct {
  padding-left: 12px !important;
}

/* BOTÓN COPIAR IMPORTE MES */
.btn-copy-eur {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  border-radius: 3px;
  color: #64748B;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-copy-eur:hover {
  background: #EEF2FF;
  border-color: #6366F1;
  color: #4F46E5;
  transform: scale(1.08);
}

.btn-copy-eur i,
.btn-copy-eur svg {
  width: 10px !important;
  height: 10px !important;
}

/* ==========================================================
   POPOVER FLOTANTE: COPIAR IMPORTES MES (€)
   ========================================================== */
.fc-copy-popover {
  position: fixed;
  z-index: 99999;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  width: 230px;
  overflow: hidden;
  animation: popoverFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fc-copy-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.fc-copy-close-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  line-height: 1;
  color: #94A3B8;
  cursor: pointer;
  padding: 0 2px;
}

.fc-copy-close-btn:hover {
  color: #0F172A;
}

.fc-copy-popover-body {
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fc-copy-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 8px;
  background: #FFFFFF;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  color: #1E293B;
  transition: all 0.12s ease;
}

.fc-copy-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fc-copy-item-left i,
.fc-copy-item-left svg {
  width: 12px !important;
  height: 12px !important;
  color: #64748B;
}

.fc-copy-item-btn strong {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10.5px;
  font-weight: 700;
}

.fc-copy-item-btn.btn-total:hover {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: #3730A3;
}
.fc-copy-item-btn.btn-total:hover i,
.fc-copy-item-btn.btn-total:hover svg {
  color: #4F46E5;
}

.fc-copy-item-btn.btn-own:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}
.fc-copy-item-btn.btn-own:hover i,
.fc-copy-item-btn.btn-own:hover svg {
  color: #2563EB;
}

.fc-copy-item-btn.btn-sub:hover {
  background: #FFF7ED;
  border-color: #FED7AA;
  color: #C2410C;
}
.fc-copy-item-btn.btn-sub:hover i,
.fc-copy-item-btn.btn-sub:hover svg {
  color: #EA580C;
}

/* EXPANDABLE ROW — PROYECCIÓN MESES POSTERIORES */
.projection-row {
  background: #F8FAFC !important;
}

.projection-row > td {
  padding: 6px 10px 8px 30px !important;
  border-bottom: 2px solid var(--color-border);
  white-space: normal !important;
  overflow: visible !important;
}

.projection-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.projection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 0.5rem;
}

.projection-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-800);
}

.projection-title i {
  width: 16px;
  height: 16px;
  color: var(--color-devoteam-coral);
}

.projection-timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.month-projection-card {
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

.month-projection-card:hover {
  background: #FFFFFF;
  border-color: var(--color-border-hover);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.month-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-900);
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 0.25rem;
}

.month-card-badge {
  font-size: 0.7rem;
  color: var(--color-devoteam-coral);
  font-weight: 700;
}

.month-card-amounts {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.74rem;
}

.month-card-planned-total {
  font-weight: 700;
  color: var(--slate-800);
  display: flex;
  justify-content: space-between;
}

.month-card-breakdown-full {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin-top: 0.2rem;
}

.pill-own-full {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
  border: 1px solid #BFDBFE !important;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  box-sizing: border-box;
}

.pill-sub-full {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  background: #FFF7ED !important;
  color: #C2410C !important;
  border: 1px solid #FED7AA !important;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  box-sizing: border-box;
}

.month-card-cum-proj {
  font-size: 0.72rem;
  color: var(--slate-600);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  border-top: 1px dashed var(--slate-200);
  padding-top: 0.25rem;
  white-space: nowrap !important;
}

.projection-empty {
  padding: 1rem;
  text-align: center;
  color: var(--slate-500);
  font-size: 0.8rem;
  font-style: italic;
}

/* FOOTER */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #F8FAFC;
  border-top: 1px solid var(--color-border);
  font-size: 0.78rem;
  color: var(--slate-600);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.dot-legend {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-legend.dot-own { background: #1D4ED8; }
.dot-legend.dot-sub { background: #C2410C; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--slate-500);
}

.empty-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
}

.empty-icon-box i {
  width: 28px;
  height: 28px;
}

.empty-state h3 {
  font-size: 1.15rem;
  color: var(--slate-800);
  margin-bottom: 0.35rem;
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 380px;
  margin: 0 auto;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.modal-box {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 760px;
  overflow: hidden;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--color-border);
  background: #FFFFFF;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-logo-glow {
  width: 36px;
  height: 36px;
  background: #FFF1F3;
  border: 1px solid rgba(248, 72, 94, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-devoteam-coral);
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.12);
  flex-shrink: 0;
}

.modal-logo-glow i,
.modal-logo-glow svg {
  width: 18px;
  height: 18px;
  color: var(--color-devoteam-coral);
  stroke: var(--color-devoteam-coral);
}

.modal-title-group h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0;
  line-height: 1.2;
}

.modal-title-group p {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin: 0;
}

.btn-modal-close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--slate-400);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-modal-close:hover {
  background: #FFF1F3;
  color: var(--color-devoteam-coral);
  border-color: rgba(248, 72, 94, 0.2);
}

.btn-modal-close i,
.btn-modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-height: 72vh;
  overflow-y: auto;
  background: #F8FAFC;
}

.info-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.info-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon-badge.coral {
  background: #FFF1F3;
  color: var(--color-devoteam-coral);
  border: 1px solid rgba(248, 72, 94, 0.2);
}
.info-icon-badge.emerald {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.info-icon-badge.purple {
  background: #FAF5FF;
  color: #9333EA;
  border: 1px solid rgba(147, 51, 234, 0.2);
}
.info-icon-badge.slate {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}
.info-icon-badge.indigo {
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid rgba(79, 70, 229, 0.2);
}
.info-icon-badge.amber {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.2);
}
.info-icon-badge.blue {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.info-icon-badge i,
.info-icon-badge svg {
  width: 15px;
  height: 15px;
}

.info-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0;
}

.formula-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

@media (max-width: 680px) {
  .formula-grid {
    grid-template-columns: 1fr;
  }
}

.formula-item {
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.formula-item.highlight-indigo {
  background: #F5F7FF;
  border-color: rgba(99, 102, 241, 0.25);
}

.formula-item.highlight-amber {
  background: #FFFDF5;
  border-color: rgba(217, 119, 6, 0.25);
}

.formula-item.highlight-emerald {
  background: #F0FDF4;
  border-color: rgba(16, 185, 129, 0.25);
}

.formula-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-800);
}

.formula-item p {
  font-size: 0.76rem;
  color: var(--slate-600);
  line-height: 1.45;
  margin: 0;
}

.info-card p {
  font-size: 0.8rem;
  color: var(--slate-600);
  line-height: 1.5;
  margin: 0;
}

.info-card ul {
  margin: 0.6rem 0 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.info-card ul li {
  font-size: 0.8rem;
  color: var(--slate-600);
  line-height: 1.5;
}

.info-card ul li strong {
  color: var(--slate-800);
}

.modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  background: #FFFFFF;
}

.btn-primary-action {
  height: 38px;
  padding: 0 1.5rem;
  background: var(--color-devoteam-coral);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-body);
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-action:hover {
  background: var(--color-devoteam-coral-hover);
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================
   AMBIENT DEVOTEAM GLOW ORBS & SUITE STANDARD LOADER OVERLAY
   ========================================================== */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.orb-indigo {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.4) 0%, rgba(79, 70, 229, 0) 70%);
  top: -100px;
  right: -100px;
}

.orb-gold {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(248, 72, 94, 0.35) 0%, rgba(248, 72, 94, 0) 70%);
  bottom: 5%;
  left: -100px;
}

.orb-violet {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.25) 0%, rgba(147, 51, 234, 0) 70%);
  top: 40%;
  right: 15%;
}

.loader-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.loader-overlay.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.loader-overlay.hidden * {
  animation-play-state: paused !important;
}

.loader-ring {
  width: 56px !important;
  height: 56px !important;
  border: 3.5px solid rgba(248, 72, 94, 0.15) !important;
  border-radius: 50% !important;
  border-top-color: var(--color-devoteam-coral, #F8485E) !important;
  border-bottom-color: var(--color-devoteam-coral, #F8485E) !important;
  animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite !important;
  box-shadow: 0 0 16px rgba(248, 72, 94, 0.2) !important;
  margin-bottom: 1.25rem !important;
}

.loader-text {
  font-family: var(--font-heading, 'Outfit', sans-serif) !important;
  font-size: 1.15rem !important;
  color: var(--color-devoteam-grey, #56555A) !important;
  font-weight: 500 !important;
  animation: pulseText 2s infinite !important;
  letter-spacing: -0.01em !important;
  text-align: center !important;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulseText {
  0%, 100% { opacity: 0.7; transform: scale(0.99); }
  50% { opacity: 1; transform: scale(1); }
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10001;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.success { border-left: 4px solid var(--color-emerald-600); color: var(--slate-800); }
.toast.error { border-left: 4px solid var(--color-devoteam-coral); color: var(--slate-800); }

/* ==========================================================
   COLUMNA VALIDACIÓN / CHECK (RECOGER AVANCE Y BLOQUEAR)
   ========================================================== */
.fc-table thead th.col-validation,
.fc-table tbody td.col-validation {
  width: 38px !important;
  text-align: center !important;
  vertical-align: middle !important;
  padding: 0 4px !important;
}

.header-icon-check {
  width: 14px;
  height: 14px;
  color: #059669;
  display: inline-block;
  vertical-align: middle;
}

.fc-checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  margin: 0 auto;
}

.fc-validation-check {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #059669;
  border-radius: 3px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.fc-validation-check:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 1px 2px rgba(5, 150, 105, 0.35));
}

.fc-validation-check:active {
  transform: scale(0.92);
}

/* FILAS CON CHECK MARCADO (SOMBREADO VERDE SUAVE Y ELEGANTE) */
.fc-table tbody tr.order-row.row-validated td {
  background-color: #F0FDF4 !important;
}

.fc-table tbody tr.order-row.row-validated td.col-highlight-current {
  background-color: #DCFCE7 !important;
}

.fc-table tbody tr.order-row.row-validated:hover td {
  background-color: #DCFCE7 !important;
}

.fc-table tbody tr.order-row.row-validated:hover td.col-highlight-current {
  background-color: #BBF7D0 !important;
}

/* ==========================================================================
   COLUMNA Y BOTÓN DE COMENTARIOS AL PROJECT MANAGER (DEVOTEAM CORPORATE)
   ========================================================================== */

.col-comments {
  width: 44px;
  min-width: 44px;
  max-width: 48px;
  text-align: center;
  padding: 4px 2px !important;
}

.header-icon-comments {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
  vertical-align: middle;
}

.btn-fc-comment {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  padding: 0;
}

.btn-fc-comment i,
.btn-fc-comment svg,
.btn-fc-comment span {
  width: 15px;
  height: 15px;
  transition: transform 0.15s ease;
  pointer-events: none;
}

.btn-fc-comment:hover {
  background: #F1F5F9;
  color: var(--color-primary);
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

/* Estado: Sin comentarios (estado neutro sutil) */
.btn-fc-comment.is-empty {
  color: #CBD5E1;
}
.btn-fc-comment.is-empty:hover {
  color: #64748B;
  background: #F8FAFC;
  border-color: #E2E8F0;
}

/* Estado: Con comentarios pendientes (Coral/Ámbar con badge destacado) */
.btn-fc-comment.has-pending {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(248, 72, 94, 0.18);
}

.btn-fc-comment.has-pending:hover {
  background: #FFE4E6;
  border-color: #FDA4AF;
  color: #E0364C;
  transform: translateY(-1px) scale(1.04);
}

.btn-fc-comment .fc-comment-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  background: #F8485E !important;
  color: #FFFFFF !important;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 10px;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 4px rgba(248, 72, 94, 0.4);
  min-width: 16px;
  text-align: center;
  z-index: 2;
}

/* Estado: Todos los comentarios resueltos (Verde suave) */
.btn-fc-comment.all-resolved {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #16A34A;
}

.btn-fc-comment.all-resolved:hover {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: #15803D;
  transform: translateY(-1px);
}

/* ==========================================================================
   MODAL DE COMENTARIOS Y AVISOS AL PM
   ========================================================================== */

.modal-comments-box {
  max-width: 680px;
  width: 95%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(226, 232, 240, 0.8);
}

.modal-logo-glow.coral {
  background: #FFF1F2;
  color: var(--color-primary);
  border: 1px solid #FECDD3;
}

.fc-modal-order-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.fc-modal-order-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.fc-modal-period-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #4F46E5;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  padding: 2px 8px;
  border-radius: 6px;
}

.modal-comments-body {
  padding: 18px 24px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}

/* Barra de resumen superior */
.fc-comments-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 14px;
}

.fc-summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-stat-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fc-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: #1E293B;
}

.fc-stat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  align-self: flex-start;
  width: fit-content;
}

.fc-stat-badge.pending {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
}

.fc-stat-badge.resolved {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.fc-stat-badge.none {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

/* Feed de conversación */
.fc-comments-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  background: #FAFCFE;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
}

.fc-comments-loading,
.fc-comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  color: #94A3B8;
  font-size: 13px;
  text-align: center;
}

.fc-comments-empty i,
.fc-comments-empty svg {
  width: 32px;
  height: 32px;
  color: #CBD5E1;
}

.fc-spinner {
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  color: var(--color-primary);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Tarjeta de comentario individual */
.fc-comment-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease;
}

.fc-comment-card.status-pending {
  border-left: 4px solid var(--color-primary);
  background: #FFFDFD;
}

.fc-comment-card.status-resolved {
  border-left: 4px solid #10B981;
  opacity: 0.92;
}

.fc-comment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fc-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
}

.fc-author-avatar.role-ops {
  background: linear-gradient(135deg, #F8485E 0%, #E0364C 100%);
}

.fc-author-avatar.role-pm {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
}

.fc-author-avatar.role-other {
  background: linear-gradient(135deg, #64748B 0%, #475569 100%);
}

.fc-author-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.fc-author-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #1E293B;
}

.fc-author-role {
  font-size: 10.5px;
  color: #64748B;
}

.fc-comment-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-comment-date {
  font-size: 11px;
  color: #94A3B8;
  font-family: 'JetBrains Mono', monospace;
}

.fc-comment-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fc-comment-pill.pending {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
}

.fc-comment-pill.resolved {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.fc-comment-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 4px 0 2px 0;
}

.fc-comment-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #F1F5F9;
  padding-top: 8px;
  margin-top: 4px;
}

.fc-resolved-info {
  font-size: 11px;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fc-resolved-info i,
.fc-resolved-info svg {
  width: 14px;
  height: 14px;
}

.btn-resolve-comment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #10B981;
  color: #059669;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: auto;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-resolve-comment i,
.btn-resolve-comment svg {
  width: 14px;
  height: 14px;
  color: #059669;
  pointer-events: none;
  flex-shrink: 0;
}

.btn-resolve-comment span {
  pointer-events: none;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  color: #059669;
}

.btn-resolve-comment:hover {
  background: #ECFDF5;
  border-color: #059669;
  color: #047857;
  transform: translateY(-1px);
}

/* Formulario inline de resolución obligatoria */
.fc-resolution-form {
  margin-top: 8px;
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.fc-resolution-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 5px;
}

.fc-resolution-label i,
.fc-resolution-label svg {
  width: 13px;
  height: 13px;
  color: #059669;
}

.fc-resolution-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 12.5px;
  color: #334155;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
  resize: vertical;
  min-height: 56px;
  line-height: 1.4;
  transition: border-color 0.15s ease;
}

.fc-resolution-textarea:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.fc-resolution-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-cancel-resolve {
  background: transparent;
  border: 1px solid #CBD5E1;
  color: #64748B;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-resolve:hover {
  background: #F1F5F9;
  color: #334155;
}

.btn-confirm-resolve {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #10B981;
  border: 1px solid #059669;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.btn-confirm-resolve i,
.btn-confirm-resolve svg {
  width: 13px;
  height: 13px;
  color: #FFFFFF;
  pointer-events: none;
}

.btn-confirm-resolve:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Detalle visual de comentario resuelto */
.fc-resolved-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.fc-resolution-text-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  color: #14532D;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}

.fc-resolution-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #15803D;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fc-resolution-tag i,
.fc-resolution-tag svg {
  width: 12px;
  height: 12px;
}

.fc-resolution-content {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Banner de Observaciones Pendientes */
.fc-notification-banner {
  background: linear-gradient(135deg, #FFF5F6 0%, #FFFFFF 100%);
  border: 1.5px solid #FECDD3;
  border-left: 5px solid #F8485E;
  border-radius: 12px;
  margin: 12px 0 16px 0;
  box-shadow: 0 4px 12px rgba(248, 72, 94, 0.08);
  overflow: hidden;
  transition: all 0.2s ease;
}

.fc-banner-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}

.fc-banner-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: #FEE2E2;
  color: #E11D48;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-banner-icon i,
.fc-banner-icon svg {
  width: 20px;
  height: 20px;
}

.fc-banner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #9F1239;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-banner-badge {
  background: #F8485E;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.fc-banner-desc {
  font-size: 12.5px;
  color: #475569;
}

.fc-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-banner-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8485E;
  color: #FFFFFF;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(248, 72, 94, 0.25);
  white-space: nowrap;
}

.btn-banner-action:hover {
  background: #E0364C;
  transform: translateY(-1px);
}

.btn-banner-action i,
.btn-banner-action svg {
  width: 14px;
  height: 14px;
}

.btn-banner-action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #CBD5E1;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-banner-action-secondary:hover {
  background: #F1F5F9;
  color: #1E293B;
}

.btn-banner-action-secondary i,
.btn-banner-action-secondary svg {
  width: 14px;
  height: 14px;
}

.fc-banner-dropdown {
  border-top: 1px solid #FECDD3;
  background: #FFFFFF;
  padding: 12px 18px;
  max-height: 280px;
  overflow-y: auto;
}

.fc-banner-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-banner-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fc-banner-item-card:hover {
  background: #FFF1F2;
  border-color: #FECDD3;
}

.fc-banner-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.fc-banner-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-banner-item-order {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  color: #0F172A;
}

.fc-banner-item-proj {
  font-size: 11.5px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-banner-item-text {
  font-size: 12px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-banner-item-author {
  font-size: 10.5px;
  color: #94A3B8;
}

.btn-banner-open-order {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #1E293B;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-banner-open-order:hover {
  background: #F8485E;
  color: #FFFFFF;
  border-color: #F8485E;
}

/* Sección para redactar nuevo comentario */
.fc-new-comment-section {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fc-new-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fc-new-comment-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.fc-new-comment-lbl i,
.fc-new-comment-lbl svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
}

.fc-comment-role-indicator {
  font-size: 10.5px;
  font-weight: 700;
  background: #FFF1F2;
  color: var(--color-primary);
  border: 1px solid #FECDD3;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fc-comment-input {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #1E293B;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 70px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.fc-comment-input:focus {
  background: #FFFFFF;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(248, 72, 94, 0.12);
}

.fc-new-comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fc-checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.fc-checkbox-wrapper input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.fc-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #475569;
}

.fc-checkbox-label i,
.fc-checkbox-label svg {
  width: 13px;
  height: 13px;
  color: var(--color-primary);
}

.fc-checkbox-label span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #1E293B;
}

.btn-send-comment {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn-send-comment i,
.btn-send-comment svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   PESTAÑAS PRINCIPALES (INGRESOS / FACTURACIÓN - ESTILO KPIS & ANALYTICS)
   ========================================================================== */
.module-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.1rem;
  padding: 0.4rem 0.6rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  gap: 1rem;
  flex-wrap: wrap;
}

.module-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.module-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1.15rem;
  border-radius: 7px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #56555a;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.module-nav-btn i,
.module-nav-btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.module-nav-btn:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.module-nav-btn.active {
  color: #f8485e;
  background: #fff1f3;
  border-color: rgba(248, 72, 94, 0.35);
  box-shadow: 0 2px 6px rgba(248, 72, 94, 0.12);
}

.module-nav-btn.active i,
.module-nav-btn.active svg {
  color: #f8485e !important;
  transform: scale(1.08);
}

.fc-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.fc-tab-badge.badge-warn,
.fc-tab-badge.badge-solicitado {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.fc-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}

/* Warning badge on order row in INGRESOS when order has SOLICITADO invoices */
.invoiced-inline-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1;
}

.invoiced-inline-wrap .col-num-val {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.badge-order-solicitado-warn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  padding: 0;
  margin-left: 2px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.12);
}

.badge-order-solicitado-warn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.22);
}

.badge-order-solicitado-warn i,
.badge-order-solicitado-warn svg {
  width: 10px;
  height: 10px;
  stroke: #d97706;
  stroke-width: 2.4;
}

/* Active order filter pill in FACTURACIÓN controls bar */
.active-order-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  height: 26px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.active-order-filter-pill button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #4338ca;
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
}

.active-order-filter-pill button:hover {
  background: rgba(67, 56, 202, 0.12);
}

/* FACTURACIÓN Table Specific Row & Cell Styling */
#fc-billing-table tbody tr.order-row {
  height: 32px !important;
  max-height: 32px !important;
}

#fc-billing-table tbody td {
  height: 32px !important;
  padding: 3px 6px !important;
}

/* Billing Status Badges in FACTURACIÓN table */
.badge-billing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 8px;
  height: 20px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-sizing: border-box;
}

.badge-billing-status i,
.badge-billing-status svg {
  width: 11px;
  height: 11px;
}

.badge-billing-status.status-solicitado {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-billing-status.status-lanzada {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* Action button in FACTURACIÓN table to toggle SOLICITADO <-> LANZADA */
.btn-toggle-lanzada {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 8px;
  height: 22px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-toggle-lanzada i,
.btn-toggle-lanzada svg {
  width: 11px;
  height: 11px;
}

.btn-toggle-lanzada.action-mark-lanzada {
  background: #10b981;
  color: #ffffff;
  border: 1px solid #059669;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.btn-toggle-lanzada.action-mark-lanzada:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.25);
}

.btn-toggle-lanzada.action-revert-solicitado {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.btn-toggle-lanzada.action-revert-solicitado:hover {
  background: #fffbeb;
  color: #b45309;
  border-color: #fcd34d;
}

.fc-row-solicitado td {
  background-color: rgba(254, 243, 199, 0.22);
}

/* KPI icon/card variants for amber & indigo in Facturación strip */
.kpi-icon-box.amber {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.text-amber {
  color: #d97706 !important;
}
.kpi-icon-box.indigo {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}
.text-indigo {
  color: #4f46e5 !important;
}

/* Viewport lock so only the table scrolls, never the page */
html, body {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

.module-nav-bar,
.kpis-strip,
.control-bar,
.fc-notification-banner,
.table-footer {
  flex-shrink: 0 !important;
}

.fc-tab-panel {
  overflow: hidden !important;
}

.table-card {
  min-height: 0 !important;
}

/* Polished empty state for INGRESOS and FACTURACIÓN tables */
.empty-state {
  display: flex;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 3.5rem 2rem !important;
  min-height: 280px;
  flex: 1;
  gap: 4px;
  color: var(--slate-500);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.empty-state .empty-icon-box {
  width: 64px !important;
  height: 64px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 0.85rem auto !important;
  flex-shrink: 0;
}

.empty-state .empty-icon-box i,
.empty-state .empty-icon-box svg {
  width: 28px !important;
  height: 28px !important;
  stroke-width: 1.8;
}

.empty-state h3 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: var(--slate-800) !important;
  margin: 0 0 0.35rem 0 !important;
}

.empty-state p {
  font-size: 0.85rem !important;
  line-height: 1.5;
  color: var(--slate-500) !important;
  max-width: 440px !important;
  margin: 0 auto !important;
}

/* PSF / No-PSF badges and Owner Ops in Facturación table */
.badge-psf-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.2;
}

.badge-psf-indicator i,
.badge-psf-indicator svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.badge-psf-indicator.psf-yes {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.badge-psf-indicator.psf-no {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-ops-owner-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
  max-width: 100%;
}

.badge-ops-owner-cell.unassigned {
  color: #94a3b8;
  font-weight: 500;
  font-style: italic;
}

/* Centered columns in INGRESOS and FACTURACIÓN tables */
.text-center,
.text-center > .cell-ellipsis,
.fc-table th.col-client,
.fc-table td.col-client,
.fc-table td.col-client > .cell-ellipsis,
.fc-table th.col-pm,
.fc-table td.col-pm,
.fc-table td.col-pm > .cell-ellipsis,
#fc-billing-table tbody td.col-client,
#fc-billing-table tbody td.col-client > .cell-ellipsis,
#fc-billing-table tbody td.col-pm,
#fc-billing-table tbody td.col-pm > .cell-ellipsis,
#fc-billing-table tbody td.col-ops,
#fc-billing-table tbody td.col-ops > .cell-ellipsis {
  text-align: center !important;
}
. _unused_Rule_ {
  width: 14px;
  height: 14px;
}


