/* ============================================
   it2go Portal · Estilos principales
   ============================================ */

:root {
  --brand: #00836F;
  --brand-dark: #006e5d;
  --brand-light: #00a085;
  --navy: #012640;
  --navy-light: #013858;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e3e6eb;
  --border-soft: #eef1f4;
  --text: #012640;
  --text-dim: #5a6b7a;
  --text-faint: #8a98a7;
  --success: #00836F;
  --warn: #f59e0b;
  --danger: #dc2626;
  --info: #0284c7;
  --purple: #7c3aed;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  position: relative;
  overflow-x: hidden;
}

.mono { font-family: 'SF Mono', Menlo, monospace; font-feature-settings: 'tnum'; }

/* ===== ANIMATED TECH MESH BACKGROUND ===== */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at top left, rgba(0, 131, 111, 0.04), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(1, 38, 64, 0.03), transparent 50%);
}

#meshCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* ===== LOGIN ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 1px 2px rgba(1, 38, 64, 0.04), 0 24px 60px rgba(1, 38, 64, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.login-brand { text-align: center; margin-bottom: 28px; }
.login-logo-wrap { margin: 0 auto 18px; display: inline-block; }

.login-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--brand), var(--navy));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(0, 131, 111, 0.35);
  position: relative;
  overflow: hidden;
}
.login-logo::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  animation: shine 3s ease-in-out infinite;
}
@keyframes shine {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(50%, 50%); }
}

.login-logo-text {
  color: white;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.login-card h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.7px;
  margin-bottom: 4px;
  color: var(--navy);
}

.login-card .sub { font-size: 14px; color: var(--text-dim); }

.field { margin-bottom: 14px; }

.field input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(250, 251, 252, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}

.field input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(0, 131, 111, 0.12);
}

.checkbox-row {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0; font-size: 13px; color: var(--text-dim);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  box-shadow: 0 8px 20px rgba(0, 131, 111, 0.25);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0, 131, 111, 0.35); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.security-notice {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

/* ===== APP ===== */
.app { position: relative; z-index: 1; }

.topbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(1, 38, 64, 0.06);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left { display: flex; align-items: center; gap: 14px; }

.topbar-logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--brand), var(--navy));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: -0.3px;
  box-shadow: 0 4px 12px rgba(0, 131, 111, 0.25);
}

.topbar-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  letter-spacing: -0.2px;
}

.topbar-status {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 0 rgba(0, 131, 111, 0.4);
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 131, 111, 0.4); }
  50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(0, 131, 111, 0); }
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.select-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}

.date-pill {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'SF Mono', monospace;
  padding: 6px 10px;
  background: var(--surface-2);
  border-radius: 8px;
}

/* ===== AVATAR ===== */
.avatar-wrap {
  position: relative;
  cursor: pointer;
}

.avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--brand), var(--navy));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  border: 2px solid var(--surface);
  box-shadow: 0 2px 8px rgba(1, 38, 64, 0.15);
  transition: all 0.2s;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-wrap:hover .avatar {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 131, 111, 0.3);
}

.avatar-upload-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--brand);
  border: 2px solid var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.avatar-wrap:hover .avatar-upload-icon { opacity: 1; }

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost:hover { color: var(--brand); }

/* ===== MODALS ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(1, 38, 64, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 30px 80px rgba(1, 38, 64, 0.25);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.modal .modal-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.profile-preview {
  width: 120px; height: 120px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 42px;
  font-weight: 700;
  overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow: 0 8px 24px rgba(1, 38, 64, 0.15);
}

.profile-preview img {
  width: 100%; height: 100%; object-fit: cover;
}

.modal-actions { display: flex; gap: 10px; }

.btn-upload {
  flex: 1;
  padding: 12px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-upload:hover { background: var(--brand-dark); }

.btn-remove {
  padding: 12px 18px;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-remove:hover { color: var(--danger); border-color: var(--danger); }

.btn-close-modal {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

/* ===== QUICK NAV ===== */
.quicknav {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(1, 38, 64, 0.06);
  padding: 0 32px;
  display: flex;
  gap: 4px;
  position: sticky;
  top: 63px;
  z-index: 99;
  overflow-x: auto;
}

.qnav-link {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}
.qnav-link:hover { color: var(--brand); }

/* ===== CONTENT ===== */
.main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 60px;
}

.section {
  margin-bottom: 36px;
  scroll-margin-top: 120px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding: 0 4px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--navy);
}

.section-meta { font-size: 13px; color: var(--text-dim); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #ffffff 0%, #f9fbfa 100%);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(1, 38, 64, 0.04);
  border: 1px solid rgba(0, 131, 111, 0.08);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0, 131, 111, 0.08), transparent 70%);
  border-radius: 50%;
}

.hero > * { position: relative; z-index: 1; }

.hero-greeting {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.hero-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
  color: var(--navy);
}

.hero-summary {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.5;
}

.hero-summary strong { color: var(--navy); font-weight: 600; }
.hero-summary .text-brand { color: var(--brand); }

/* ===== KPIS ===== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }

.kpi {
  background: var(--surface);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  transition: all 0.15s;
}
.kpi:hover {
  border-color: rgba(0, 131, 111, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(1, 38, 64, 0.06);
}

.kpi-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
  font-feature-settings: 'tnum';
  color: var(--navy);
}

.kpi-meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(1, 38, 64, 0.03);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--navy);
}

.card-meta { font-size: 12px; color: var(--text-dim); }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }

table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-feature-settings: 'tnum';
}

table.t thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

table.t tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}

table.t tbody tr:last-child td { border-bottom: none; }
table.t tbody tr:hover { background: var(--surface-2); }

.text-right { text-align: right; }
.text-center { text-align: center; }

.folio {
  color: var(--brand);
  font-family: 'SF Mono', monospace;
  font-weight: 600;
  font-size: 12px;
}

.amount { font-weight: 600; font-feature-settings: 'tnum'; }
.amount-lg { font-size: 14px; font-weight: 700; color: var(--navy); }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.b-paid { background: rgba(0, 131, 111, 0.12); color: var(--brand-dark); }
.b-overdue { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.b-sent { background: rgba(2, 132, 199, 0.12); color: #075985; }
.b-void { background: rgba(100, 116, 139, 0.12); color: #475569; }
.b-brand { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.b-brand-ms { background: rgba(2, 132, 199, 0.15); color: #0369a1; }
.b-brand-ks { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.b-brand-generic { background: rgba(100, 116, 139, 0.12); color: #475569; }

/* ===== TWO COL ===== */
.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ===== METAS ===== */
.meta-row {
  display: grid;
  grid-template-columns: 200px 1fr 80px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.meta-row:last-child { border-bottom: none; }

.meta-label-block { font-weight: 600; color: var(--navy); }
.meta-label-block .sub {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
  margin-top: 2px;
}

.meta-progress { display: flex; align-items: center; gap: 12px; }

.meta-track {
  flex: 1;
  background: var(--border-soft);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.meta-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.meta-fill.brand { background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.meta-fill.navy { background: linear-gradient(90deg, var(--navy), var(--navy-light)); }
.meta-fill.purple { background: linear-gradient(90deg, var(--purple), #a855f7); }
.meta-fill.warn { background: linear-gradient(90deg, var(--warn), #fbbf24); }

.meta-numbers {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'SF Mono', monospace;
  white-space: nowrap;
}

.meta-pct {
  text-align: right;
  font-weight: 700;
  font-size: 14px;
}

/* ===== ALERT BAR ===== */
.alert-bar { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

.alert-pill {
  flex: 1;
  min-width: 250px;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid;
  box-shadow: 0 1px 3px rgba(1, 38, 64, 0.03);
}

.alert-pill.danger { border-left-color: var(--danger); }
.alert-pill.warn { border-left-color: var(--warn); }
.alert-pill.brand { border-left-color: var(--brand); }

.alert-icon { font-size: 18px; }

.alert-text { font-size: 13px; flex: 1; color: var(--text); }
.alert-text strong { font-weight: 700; color: var(--navy); }

.alert-num {
  font-weight: 700;
  font-family: 'SF Mono', monospace;
  font-size: 15px;
}

/* ===== DENSE TABLE ===== */
.dense-table th, .dense-table td {
  padding: 10px 14px;
  font-size: 12px;
}

/* ===== BUTTONS ===== */
.btn-action {
  background: var(--brand);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(0, 131, 111, 0.2);
}
.btn-action:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 131, 111, 0.3); }

.btn-link {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

/* ===== UTILITIES ===== */
.text-success, .text-brand { color: var(--brand); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-dim { color: var(--text-dim); }
.text-purple { color: var(--purple); }
.text-navy { color: var(--navy); }
.f-w-7 { font-weight: 700; }

/* Loading spinner */
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  padding: 24px;
  position: relative;
  z-index: 1;
}
/* ============================================
   PANEL LATERAL DE PERFIL - V2.2
   AGREGAR AL FINAL DE app.css
   ============================================ */

/* Overlay oscuro de fondo */
.profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 38, 64, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.profile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Panel lateral derecho */
.profile-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 920px;
  background: var(--bg);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -20px 0 60px rgba(1, 38, 64, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-panel.active {
  transform: translateX(0);
}

/* Header del panel */
.profile-panel-header {
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.btn-back:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.btn-close-x {
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  font-size: 22px;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-close-x:hover {
  background: var(--danger);
  color: white;
}

/* Hero del usuario en el panel */
.profile-hero {
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--navy) 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.profile-hero-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: white;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  z-index: 1;
}

.profile-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero-info {
  flex: 1;
  z-index: 1;
}

.profile-hero-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.profile-hero-email {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.profile-role-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cuerpo del panel: menú + contenido */
.profile-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.profile-menu {
  display: none;
}

/* En pantallas grandes, sidebar de menú a la izquierda */
@media (min-width: 768px) {
  .profile-panel {
    grid-template-rows: auto auto 1fr;
  }

  .profile-panel::after {
    content: '';
    display: grid;
  }

  .profile-content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
    flex: 1;
  }
}

/* Menú interno */
.profile-menu {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  flex-wrap: wrap;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .profile-menu {
    border-bottom: none;
    border-right: 1px solid var(--border-soft);
    overflow-x: visible;
    flex-wrap: nowrap;
    overflow-y: auto;
    min-width: 260px;
  }

  .profile-panel {
    display: grid;
    grid-template-areas:
      "header header"
      "hero hero"
      "menu content";
    grid-template-rows: auto auto 1fr;
    grid-template-columns: 280px 1fr;
  }

  .profile-panel-header { grid-area: header; }
  .profile-hero { grid-area: hero; }
  .profile-menu { grid-area: menu; }
  .profile-content { grid-area: content; }
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
  transition: all 0.15s;
}

.profile-menu-item:hover {
  background: var(--surface-2);
  color: var(--brand);
}

.profile-menu-item.active {
  background: linear-gradient(135deg, rgba(0, 131, 111, 0.12), rgba(0, 131, 111, 0.04));
  color: var(--brand);
}

.profile-menu-item.active::before {
  content: '';
  display: none;
}

@media (min-width: 768px) {
  .profile-menu-item.active {
    border-left: 3px solid var(--brand);
    padding-left: 13px;
  }
}

.profile-menu-item .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.profile-menu-item.logout {
  color: var(--danger);
}

.profile-menu-item.logout:hover {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
}

/* Contenido scrollable */
.profile-content {
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--bg);
}

.profile-section h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--navy);
  margin-bottom: 6px;
}

.profile-section-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.profile-photo-preview {
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  font-weight: 700;
  overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow: 0 8px 24px rgba(1, 38, 64, 0.15);
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.profile-actions .btn-upload {
  flex: 1;
  min-width: 180px;
}

/* Form grid para usuarios */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Card del formulario de usuario */
.user-form-card {
  margin-top: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(1, 38, 64, 0.04);
}

.user-form-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}

/* Sync info card */
.sync-info-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.sync-info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
}

.sync-info-row:last-child { border-bottom: none; }
.sync-info-row span { color: var(--text-dim); }
.sync-info-row strong { color: var(--navy); }

/* Filtro de período */
.periodo-filter {
  display: flex;
  gap: 6px;
  align-items: center;
}

.periodo-filter .select-input {
  font-weight: 600;
}

/* Banner de período */
.periodo-banner {
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--info);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.periodo-banner strong { color: var(--navy); }

/* Header dentro del modal de metas (re-usado en panel) */
.metas-modal-header {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.metas-modal-header > .year-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metas-modal-header > .year-selector label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.metas-modal-header > .year-selector select {
  font-weight: 700;
  font-size: 15px;
  padding: 8px 14px;
  min-width: 110px;
}

.metas-modal-header > .quick-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Tabs metas */
.meta-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 16px;
}

.meta-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  border-radius: 9px;
  transition: all 0.2s;
}

.meta-tab.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 2px 6px rgba(1, 38, 64, 0.08);
}

/* Tabla de metas */
.metas-table-wrap {
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface);
}

.metas-table {
  width: 100%;
  border-collapse: collapse;
}

.metas-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  z-index: 1;
}

.metas-table thead th.text-right { text-align: right; }

.metas-table tbody td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.metas-table tbody td:first-child {
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
}

.metas-table tbody tr.mes-actual td:first-child::before {
  content: '●';
  color: var(--brand);
  margin-right: 6px;
}

.metas-table tbody tr.mes-actual {
  background: rgba(0, 131, 111, 0.04);
}

.metas-table tbody tr:hover { background: var(--surface-2); }

.metas-table .total-row {
  background: linear-gradient(180deg, rgba(0, 131, 111, 0.08), rgba(0, 131, 111, 0.03));
  font-weight: 700;
  border-top: 2px solid var(--brand);
}

.metas-table .total-row td {
  padding: 14px 16px;
  color: var(--navy);
  font-size: 14px;
}

.meta-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'SF Mono', monospace;
  text-align: right;
  font-feature-settings: 'tnum';
  color: var(--navy);
  font-weight: 600;
  transition: all 0.15s;
}

.meta-input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(0, 131, 111, 0.12);
}

.meta-input::-webkit-outer-spin-button,
.meta-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Form labels */
.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.field input,
.field select,
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s;
}

.field input:focus,
.field select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 131, 111, 0.12);
}

.field input:disabled {
  background: var(--border-soft);
  color: var(--text-faint);
  cursor: not-allowed;
}

/* Móvil */
@media (max-width: 767px) {
  .profile-hero {
    padding: 20px;
  }
  .profile-hero-avatar {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  .profile-hero-name {
    font-size: 18px;
  }
  .profile-content {
    padding: 20px;
  }
  .profile-menu {
    flex-direction: row;
    overflow-x: auto;
  }
  .profile-menu-item {
    flex-shrink: 0;
  }
}
.tabla-excel-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.tabla-excel {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-feature-settings: 'tnum';
  min-width: 1100px;
}

.tabla-excel thead th {
  background: #2563eb;
  color: white;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border: 1px solid #1e40af;
  white-space: nowrap;
}

.tabla-excel thead th.th-trim {
  background: #1e3a8a;
}

.tabla-excel tbody td {
  padding: 6px 10px;
  border: 1px solid var(--border-soft);
  text-align: right;
  white-space: nowrap;
  font-family: 'SF Mono', monospace;
}

.tabla-excel tbody td.col-mes {
  text-align: left;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  background: var(--surface-2);
}

.tabla-excel tbody td.col-mes.q1 { border-left: 4px solid #00836F; }
.tabla-excel tbody td.col-mes.q2 { border-left: 4px solid #2563eb; }
.tabla-excel tbody td.col-mes.q3 { border-left: 4px solid #7c3aed; }
.tabla-excel tbody td.col-mes.q4 { border-left: 4px solid #f59e0b; }

.tabla-excel tbody tr.mes-actual td.col-mes::before {
  content: '●';
  color: var(--brand);
  margin-right: 6px;
}

.tabla-excel tbody tr.mes-actual {
  background: rgba(0, 131, 111, 0.04);
}

.tabla-excel tbody tr.row-total {
  background: linear-gradient(180deg, #f0fdf4, #dcfce7);
  font-weight: 700;
  color: var(--navy);
  border-top: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
}

.tabla-excel tbody tr.row-total td {
  padding: 10px;
  font-size: 13px;
}

.tabla-excel .celda-input {
  width: 100%;
  min-width: 100px;
  border: none;
  background: transparent;
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  text-align: right;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--navy);
  font-weight: 600;
}

.tabla-excel .celda-input.ppto {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tabla-excel .celda-input.cm {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tabla-excel .celda-input:focus {
  outline: 2px solid var(--brand);
  background: var(--surface);
}

.tabla-excel .celda-readonly {
  background: var(--surface);
  color: var(--text);
}

.tabla-excel .celda-readonly.suma {
  font-weight: 700;
  color: var(--navy);
  background: rgba(2, 132, 199, 0.05);
}

.tabla-excel .celda-trim {
  background: rgba(124, 58, 237, 0.06);
  font-weight: 600;
  color: var(--navy);
  vertical-align: middle;
  text-align: right;
}


/* ============================================
   V2.3 - TABLA EXCEL DE PRESUPUESTOS
   AGREGAR AL FINAL DE app.css
   ============================================ */

.tabla-excel-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.tabla-excel {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-feature-settings: 'tnum';
  min-width: 1100px;
}

.tabla-excel thead th {
  background: #2563eb;
  color: white;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border: 1px solid #1e40af;
  white-space: nowrap;
}

.tabla-excel thead th.th-trim {
  background: #1e3a8a;
}

.tabla-excel tbody td {
  padding: 6px 10px;
  border: 1px solid var(--border-soft);
  text-align: right;
  white-space: nowrap;
  font-family: 'SF Mono', monospace;
}

.tabla-excel tbody td.col-mes {
  text-align: left;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  background: var(--surface-2);
}

.tabla-excel tbody td.col-mes.q1 { border-left: 4px solid #00836F; }
.tabla-excel tbody td.col-mes.q2 { border-left: 4px solid #2563eb; }
.tabla-excel tbody td.col-mes.q3 { border-left: 4px solid #7c3aed; }
.tabla-excel tbody td.col-mes.q4 { border-left: 4px solid #f59e0b; }

.tabla-excel tbody tr.mes-actual td.col-mes::before {
  content: '●';
  color: var(--brand);
  margin-right: 6px;
}

.tabla-excel tbody tr.mes-actual {
  background: rgba(0, 131, 111, 0.04);
}

.tabla-excel tbody tr.row-total {
  background: linear-gradient(180deg, #f0fdf4, #dcfce7);
  font-weight: 700;
  color: var(--navy);
  border-top: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
}

.tabla-excel tbody tr.row-total td {
  padding: 10px;
  font-size: 13px;
}

.tabla-excel .celda-input {
  width: 100%;
  min-width: 100px;
  border: none;
  background: transparent;
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  text-align: right;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--navy);
  font-weight: 600;
}

.tabla-excel .celda-input.ppto {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tabla-excel .celda-input.cm {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tabla-excel .celda-input:focus {
  outline: 2px solid var(--brand);
  background: var(--surface);
}

.tabla-excel .celda-readonly {
  background: var(--surface);
  color: var(--text);
}

.tabla-excel .celda-readonly.suma {
  font-weight: 700;
  color: var(--navy);
  background: rgba(2, 132, 199, 0.05);
}

.tabla-excel .celda-trim {
  background: rgba(124, 58, 237, 0.06);
  font-weight: 600;
  color: var(--navy);
  vertical-align: middle;
  text-align: right;
}

/* ============================================
   V2.3 - LOGO OFICIAL it2go
   ============================================ */
.topbar-logo {
  display: flex;
  align-items: center;
}
.topbar-logo-img {
  height: 38px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}
.topbar-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.5px;
}

/* ============================================
   V2.3 - TABLA EXCEL DE PRESUPUESTOS
   AGREGAR AL FINAL DE app.css
   ============================================ */

.tabla-excel-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.tabla-excel {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-feature-settings: 'tnum';
  min-width: 1100px;
}

.tabla-excel thead th {
  background: #2563eb;
  color: white;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border: 1px solid #1e40af;
  white-space: nowrap;
}

.tabla-excel thead th.th-trim {
  background: #1e3a8a;
}

.tabla-excel tbody td {
  padding: 6px 10px;
  border: 1px solid var(--border-soft);
  text-align: right;
  white-space: nowrap;
  font-family: 'SF Mono', monospace;
}

.tabla-excel tbody td.col-mes {
  text-align: left;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  background: var(--surface-2);
}

.tabla-excel tbody td.col-mes.q1 { border-left: 4px solid #00836F; }
.tabla-excel tbody td.col-mes.q2 { border-left: 4px solid #2563eb; }
.tabla-excel tbody td.col-mes.q3 { border-left: 4px solid #7c3aed; }
.tabla-excel tbody td.col-mes.q4 { border-left: 4px solid #f59e0b; }

.tabla-excel tbody tr.mes-actual td.col-mes::before {
  content: '●';
  color: var(--brand);
  margin-right: 6px;
}

.tabla-excel tbody tr.mes-actual {
  background: rgba(0, 131, 111, 0.04);
}

.tabla-excel tbody tr.row-total {
  background: linear-gradient(180deg, #f0fdf4, #dcfce7);
  font-weight: 700;
  color: var(--navy);
  border-top: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
}

.tabla-excel tbody tr.row-total td {
  padding: 10px;
  font-size: 13px;
}

.tabla-excel .celda-input {
  width: 100%;
  min-width: 100px;
  border: none;
  background: transparent;
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  text-align: right;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--navy);
  font-weight: 600;
}

.tabla-excel .celda-input.ppto {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tabla-excel .celda-input.cm {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tabla-excel .celda-input:focus {
  outline: 2px solid var(--brand);
  background: var(--surface);
}

.tabla-excel .celda-readonly {
  background: var(--surface);
  color: var(--text);
}

.tabla-excel .celda-readonly.suma {
  font-weight: 700;
  color: var(--navy);
  background: rgba(2, 132, 199, 0.05);
}

.tabla-excel .celda-trim {
  background: rgba(124, 58, 237, 0.06);
  font-weight: 600;
  color: var(--navy);
  vertical-align: middle;
  text-align: right;
}

/* ============================================
   V2.3 - LOGO OFICIAL it2go
   ============================================ */
.topbar-logo {
  display: flex;
  align-items: center;
}
.topbar-logo-img {
  height: 38px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}
.topbar-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.5px;
}

/* ============================================
   V2.3 - TABLA EXCEL DE PRESUPUESTOS
   AGREGAR AL FINAL DE app.css
   ============================================ */

.tabla-excel-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.tabla-excel {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-feature-settings: 'tnum';
  min-width: 1100px;
}

.tabla-excel thead th {
  background: #2563eb;
  color: white;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border: 1px solid #1e40af;
  white-space: nowrap;
}

.tabla-excel thead th.th-trim {
  background: #1e3a8a;
}

.tabla-excel tbody td {
  padding: 6px 10px;
  border: 1px solid var(--border-soft);
  text-align: right;
  white-space: nowrap;
  font-family: 'SF Mono', monospace;
}

.tabla-excel tbody td.col-mes {
  text-align: left;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  background: var(--surface-2);
}

.tabla-excel tbody td.col-mes.q1 { border-left: 4px solid #00836F; }
.tabla-excel tbody td.col-mes.q2 { border-left: 4px solid #2563eb; }
.tabla-excel tbody td.col-mes.q3 { border-left: 4px solid #7c3aed; }
.tabla-excel tbody td.col-mes.q4 { border-left: 4px solid #f59e0b; }

.tabla-excel tbody tr.mes-actual td.col-mes::before {
  content: '●';
  color: var(--brand);
  margin-right: 6px;
}

.tabla-excel tbody tr.mes-actual {
  background: rgba(0, 131, 111, 0.04);
}

.tabla-excel tbody tr.row-total {
  background: linear-gradient(180deg, #f0fdf4, #dcfce7);
  font-weight: 700;
  color: var(--navy);
  border-top: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
}

.tabla-excel tbody tr.row-total td {
  padding: 10px;
  font-size: 13px;
}

.tabla-excel .celda-input {
  width: 100%;
  min-width: 100px;
  border: none;
  background: transparent;
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  text-align: right;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--navy);
  font-weight: 600;
}

.tabla-excel .celda-input.ppto {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tabla-excel .celda-input.cm {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tabla-excel .celda-input:focus {
  outline: 2px solid var(--brand);
  background: var(--surface);
}

.tabla-excel .celda-readonly {
  background: var(--surface);
  color: var(--text);
}

.tabla-excel .celda-readonly.suma {
  font-weight: 700;
  color: var(--navy);
  background: rgba(2, 132, 199, 0.05);
}

.tabla-excel .celda-trim {
  background: rgba(124, 58, 237, 0.06);
  font-weight: 600;
  color: var(--navy);
  vertical-align: middle;
  text-align: right;
}

/* ============================================
   V2.3 - LOGO OFICIAL it2go
   ============================================ */
.topbar-logo {
  display: flex;
  align-items: center;
}
.topbar-logo-img {
  height: 38px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}
.topbar-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.5px;
}


/* V2.5 BI */
.bi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.bi-chart-wrap { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 20px; }
.bi-chart-title { font-size: 13px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-item { display: flex; flex-direction: column; gap: 4px; }
.bar-label { display: flex; justify-content: space-between; font-size: 12px; }
.bar-label-name { color: var(--text); font-weight: 600; max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label-val { color: var(--brand); font-weight: 700; font-family: monospace; }
.bar-track { height: 6px; background: var(--border-soft); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #00a896); }
.bar-fill.danger { background: linear-gradient(90deg, #ef4444, #f97316); }
.bar-fill.blue { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.funnel-wrap { display: flex; flex-direction: column; gap: 6px; }
.funnel-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface-2); border-radius: 8px; border-left: 3px solid var(--brand); }
.funnel-item.won { border-left-color: #22c55e; }
.funnel-item.lost { border-left-color: #ef4444; opacity: 0.6; }
.funnel-etapa { font-size: 12px; font-weight: 600; flex: 1; color: var(--text); }
.funnel-count { font-size: 11px; color: var(--text-dim); min-width: 30px; text-align: right; }
.funnel-monto { font-size: 13px; font-weight: 700; color: var(--brand); font-family: monospace; min-width: 90px; text-align: right; }
.mapa-wrap { position: relative; }
.mapa-wrap svg { width: 100%; height: auto; }
.mapa-tooltip { position: absolute; background: var(--navy); color: white; padding: 8px 12px; border-radius: 8px; font-size: 12px; pointer-events: none; z-index: 10; white-space: nowrap; display: none; }
.bi-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.bi-kpi { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px; text-align: center; }
.bi-kpi-val { font-size: 18px; font-weight: 800; color: var(--navy); margin: 4px 0; }
.bi-kpi-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; }
