@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* TD Consultores CRM — Main Stylesheet */
:root {
  --navy: #1a1a2e;
  --td-red: #C8102E;
  --td-red-bright: #F5173D;
  --navy-light: #16213e;
  --blue: #F26522;
  --blue-light: #F5874B;
  --blue-pale: #FEF3EB;
  --success: #28a745;
  --success-light: #d4edda;
  --warning: #ffc107;
  --warning-light: #fff3cd;
  --danger: #dc3545;
  --danger-light: #f8d7da;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --sidebar-width: 240px;
  --header-height: 56px;
  --border-radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.16);
}

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

html { font-size: 16px; }

body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-100);
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-brand .brand-logo {
  height: 32px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-brand .brand-logo img {
  height: 100%;
  width: auto;
}

.sidebar-brand .brand-text {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.sidebar-brand .brand-text small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.65;
  font-weight: 400;
}

.sidebar-nav {
  padding: 0.75rem 0;
  flex: 1;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0.75rem 1rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6rem 1rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

.nav-item.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.nav-item .nav-icon {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-style: normal;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar-logo {
  height: 30px;
  width: auto;
  display: block;
}

.topbar-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-800);
  padding-left: 0.75rem;
  border-left: 2px solid var(--td-red-bright);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--gray-700);
  font-size: 1.25rem;
  line-height: 1;
}

.page-content {
  padding: 1.5rem;
  flex: 1;
}

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
}

.card-body {
  padding: 1.25rem;
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--blue-pale); }
.stat-icon.green { background: var(--success-light); }
.stat-icon.warning { background: var(--warning-light); }
.stat-icon.navy { background: rgba(26,26,46,0.08); }

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gray-900);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:hover { opacity: 0.88; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-secondary { background: var(--gray-200); color: var(--gray-800); }
.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.btn-ghost { background: transparent; color: var(--blue); padding: 0.3rem 0.5rem; }

/* ── Tables ── */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

table th {
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

table tr:last-child td { border-bottom: none; }

table tbody tr:hover { background: var(--gray-100); }

.checkbox-col { width: 36px; text-align: center; padding: 0.5rem !important; }

.td-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-activo, .badge-success { background: var(--success-light); color: #155724; }
.badge-inactivo, .badge-cancelado, .badge-perdido { background: var(--gray-200); color: var(--gray-600); }
.badge-completado { background: var(--blue-pale); color: #B8471A; }
.badge-propuesta, .badge-warning { background: var(--warning-light); color: #856404; }
.badge-prospecto { background: #e2d9f3; color: #512da8; }
.badge-contacto { background: #d1ecf1; color: #0c5460; }
.badge-negociacion { background: #fff3e0; color: #e65100; }
.badge-cierre { background: var(--success-light); color: #155724; }
.badge-danger { background: var(--danger-light); color: #721c24; }
.badge-prospeccion        { background: #e2d9f3; color: #512da8; }
.badge-contactado         { background: #e0f2fe; color: #075985; }
.badge-calificado         { background: #ccfbf1; color: #134e4a; }
.badge-oferta_enviada     { background: var(--warning-light); color: #856404; }
.badge-analisis_propuesta { background: #fff3e0; color: #e65100; }
.badge-cierre_ganado      { background: var(--success-light); color: #155724; }
.badge-cierre_desestimado { background: var(--gray-200); color: var(--gray-600); }
.badge-generacion_oc      { background: #dbeafe; color: #1d4ed8; }
.badge-generacion_factura { background: #ccfbf1; color: #0f766e; }

/* Tipo de interacción */
.tipo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
}

.tipo-reunion { color: #0066cc; }
.tipo-llamada { color: #28a745; }
.tipo-email { color: #6f42c1; }
.tipo-nota { color: #fd7e14; }

/* ── Forms ── */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.3rem;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.87rem;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(242,101,34,0.12);
}

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

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.87rem;
}

.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 1rem;
}

.form-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
}

.form-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-header-left h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.page-header-left .breadcrumb {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

.page-header-left .breadcrumb a {
  color: var(--gray-500);
}

.page-header-left .breadcrumb a:hover {
  color: var(--blue);
}

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

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-bar select, .filter-bar input[type="text"] {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fff;
  color: var(--gray-800);
  appearance: none;
}

/* ── Detail Page ── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  font-size: 0.875rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.detail-item .detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

.detail-item .detail-value {
  color: var(--gray-900);
}

/* ── Section tabs ── */
.section-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.section-tab {
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
  display: inline-block;
}

.section-tab:hover {
  color: var(--blue);
  text-decoration: none;
}

.section-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}

/* ── Pipeline ── */
.pipeline-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.pipeline-stage {
  flex: 0 0 220px;
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pipeline-stage.drag-over {
  background: var(--gray-200);
  outline: 2px dashed var(--gray-400);
  outline-offset: -2px;
}

.pipeline-stage-header {
  position: relative;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid currentColor;
}

.stage-prospecto .pipeline-stage-header { color: #7c3aed; border-bottom-color: #7c3aed; background: #f5f3ff; }
.stage-contacto .pipeline-stage-header { color: #0891b2; border-bottom-color: #0891b2; background: #ecfeff; }
.stage-propuesta .pipeline-stage-header { color: #d97706; border-bottom-color: #d97706; background: #fffbeb; }
.stage-negociacion .pipeline-stage-header { color: #ea580c; border-bottom-color: #ea580c; background: #fff7ed; }
.stage-cierre .pipeline-stage-header { color: #16a34a; border-bottom-color: #16a34a; background: #f0fdf4; }
.stage-perdido .pipeline-stage-header { color: #dc2626; border-bottom-color: #dc2626; background: #fef2f2; }
.stage-prospeccion .pipeline-stage-header    { color: #7c3aed; border-bottom-color: #7c3aed; background: #f5f3ff; }
.stage-contactado .pipeline-stage-header     { color: #0284c7; border-bottom-color: #0284c7; background: #e0f2fe; }
.stage-calificado .pipeline-stage-header     { color: #0d9488; border-bottom-color: #0d9488; background: #ccfbf1; }
.stage-oferta_enviada .pipeline-stage-header { color: #d97706; border-bottom-color: #d97706; background: #fffbeb; }
.stage-analisis_propuesta .pipeline-stage-header { color: #ea580c; border-bottom-color: #ea580c; background: #fff7ed; }
.stage-cierre_ganado .pipeline-stage-header  { color: #16a34a; border-bottom-color: #16a34a; background: #f0fdf4; }
.stage-cierre_desestimado .pipeline-stage-header { color: #dc2626; border-bottom-color: #dc2626; background: #fef2f2; }
.stage-generacion_oc .pipeline-stage-header      { color: #1d4ed8; border-bottom-color: #1d4ed8; background: #eff6ff; }
.stage-generacion_factura .pipeline-stage-header  { color: #0f766e; border-bottom-color: #0f766e; background: #f0fdfa; }

.pipeline-deals {
  padding: 0.5rem;
  min-height: 60px;
  flex: 1 1 auto;
}

.pipeline-deal-card {
  position: relative;
  background: var(--gray-100);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

/* PWXCT-66: menú contextual (kebab) por tarjeta del Pipeline */
.deal-card-menu {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
}

.deal-menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--gray-500);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.deal-menu-btn:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.deal-submenu {
  position: absolute;
  right: 0;
  top: 1.6rem;
  z-index: 20;
  min-width: 150px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 0.25rem 0;
}

.deal-submenu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: var(--gray-700);
  cursor: pointer;
  text-decoration: none;
}

.deal-submenu-item:hover {
  background: var(--gray-100);
}

.deal-submenu-item--danger {
  color: var(--danger);
}

.pipeline-deal-card:hover {
  box-shadow: var(--shadow);
}

.pipeline-deal-card:last-child {
  margin-bottom: 0;
}

.pipeline-deal-card[draggable="true"] {
  cursor: grab;
}

.pipeline-deal-card.dragging {
  opacity: 0.4;
}

.deal-name {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.2rem;
}

.deal-empresa {
  color: var(--gray-500);
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}

.deal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deal-valor {
  font-weight: 700;
  color: var(--success);
}

.deal-prob {
  color: var(--gray-500);
  font-size: 0.75rem;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--gray-500);
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ── Alert / Flash ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-success { background: var(--success-light); color: #155724; border: 1px solid #b7dfbc; }
.alert-danger { background: var(--danger-light); color: #721c24; border: 1px solid #f1b0b7; }

/* ── Delete form button ── */
.delete-btn-form { display: inline; margin: 0; padding: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle { display: flex; }

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

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

  .detail-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: 1fr 1fr; }

  .pipeline-grid { flex-direction: column; overflow-x: hidden; }
  .pipeline-stage { flex: 1 1 auto; }

  .page-content { padding: 1rem; }

  .page-header { flex-direction: column; }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }

  .sidebar-overlay.show { display: block; }

  .topbar-logo { height: 24px; }

  .topbar-title { font-size: 0.9rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

/* ─── Badges (additional) ─────────────────────────────────────────────────── */
.badge-primary { background: var(--blue-pale); color: #B8471A; }
.badge-secondary { background: var(--gray-200); color: var(--gray-700); }

/* ─── Topbar user info ────────────────────────────────────────────────────── */
.topbar-user {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-right: 0.5rem;
}

/* ─── Table action cell ───────────────────────────────────────────────────── */
.actions-cell { white-space: nowrap; }

/* ─── Checkbox label ──────────────────────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.9rem;
}

/* ─── Text muted ──────────────────────────────────────────────────────────── */
.text-muted { color: var(--gray-600); font-size: 0.85rem; }

/* ─── Login Page ──────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--td-red);
}

.login-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Brand panel (left) */
.login-panel-brand {
  flex: 0 0 45%;
  background: linear-gradient(160deg, var(--td-red) 0%, #a00d24 60%, #8b0b1f 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  color: #fff;
}

.login-brand-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding-top: 4rem;
}

.login-brand-logo img {
  max-width: 180px;
  height: auto;
  margin-bottom: 2rem;
}

.login-brand-tagline {
  font-size: 1.35rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 2.5rem;
  line-height: 1.4;
}

.brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.brand-feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.brand-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.brand-feature-item span:last-child {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.login-brand-footer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  padding-top: 2rem;
}

/* Form panel (right) */
.login-panel-form {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 4rem;
  animation: fadeInUp 0.4s ease-out;
}

.login-mobile-logo {
  display: none;
  margin-bottom: 1.5rem;
}

.login-mobile-logo img {
  max-width: 160px;
  height: auto;
}

.login-form-inner {
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.4rem;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin: 0 0 2rem;
  line-height: 1.5;
}

/* Input groups with icons */
.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.login-input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.75rem;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: #F26522;
  box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.15);
}

.login-input::placeholder { color: var(--gray-400); }

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  display: flex;
  align-items: center;
  line-height: 1;
}

.password-toggle:hover { color: var(--gray-600); }

/* Error alert */
.login-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Submit button */
.login-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  background: #F26522;
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}

.login-btn:hover { background: #d4541a; }
.login-btn:active { transform: scale(0.98); }

.login-form-footer {
  margin-top: 2rem;
  font-size: 0.78rem;
  color: var(--gray-400);
  text-align: center;
}

.login-form .form-group { margin-bottom: 1.25rem; }

/* Animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 768px) {
  .login-container { flex-direction: column; }
  .login-panel-brand { display: none; }
  .login-panel-form { width: 100%; padding: 2rem 1.5rem; }
  .login-mobile-logo { display: block; }
}

/* ─── PWXCT-5: New Module Styles ─────────────────────────────────────────────── */

/* Nav group collapsible sections */
.nav-group { border-bottom: 1px solid rgba(255,255,255,0.06); }

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.nav-group-header:hover { background: rgba(255,255,255,0.06); }

.nav-group-header span { display: flex; align-items: center; gap: 0.5rem; }

.nav-chevron {
  font-size: 0.6rem;
  transition: transform 0.2s;
  opacity: 0.6;
}

.nav-group-header.expanded .nav-chevron { transform: rotate(180deg); }

.nav-group-items {
  display: none;
  background: rgba(0,0,0,0.15);
}

.nav-group-items.open { display: block; }

.nav-item.nav-sub {
  padding-left: 2rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
}

.nav-item.nav-sub:hover { color: #fff; }
.nav-item.nav-sub.active { background: var(--blue); color: #fff; }

/* Module landing page cards */
.module-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.module-card {
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  display: block;
}

.module-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--blue);
  text-decoration: none;
}

.module-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.module-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}

.module-card-desc {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.module-card-stats {
  display: flex;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-200);
}

.module-stat {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.module-stat strong {
  display: block;
  font-size: 1.1rem;
  color: var(--gray-900);
  font-weight: 700;
}

/* Module description banner */
.module-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #2d2d52 100%);
  color: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.module-banner h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.module-banner p {
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.6;
  margin: 0;
}

/* Health score indicators */
.health-score-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.health-score-alto { background: var(--success); }
.health-score-medio { background: var(--warning); color: var(--gray-800); }
.health-score-bajo { background: var(--danger); }

.health-score-bar-wrap {
  background: var(--gray-200);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.health-score-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s;
}

/* Onboarding progress */
.onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.onboarding-step:last-child { border-bottom: none; }

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-number.done { background: var(--success); color: #fff; }
.step-number.in-progress { background: var(--blue); color: #fff; }

/* CPQ calculator */
.cpq-total-box {
  background: var(--navy);
  color: #fff;
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cpq-total-label {
  font-size: 0.85rem;
  opacity: 0.75;
}

.cpq-total-value {
  font-size: 1.8rem;
  font-weight: 700;
}

/* Renewal alert badges */
.badge-vigente { background: var(--success-light); color: #155724; }
.badge-proximo { background: var(--warning-light); color: #856404; }
.badge-vencido { background: var(--danger-light); color: #721c24; }
.badge-renovado { background: var(--blue-pale); color: #B8471A; }

/* Pipeline type tabs */
.pipeline-type-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pipeline-tab {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-600);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pipeline-tab:hover { text-decoration: none; color: var(--blue); border-color: var(--blue); }
.pipeline-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Score bar */
.score-bar-wrap { display: flex; align-items: center; gap: 0.5rem; }
.score-bar { background: var(--gray-200); border-radius: 8px; height: 6px; flex: 1; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 8px; background: var(--blue); }

/* Fact tags */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--blue-pale);
  color: #B8471A;
  margin: 0.15rem;
}

/* Print styles for quotations */
@media print {
  .sidebar, .topbar, .btn, form { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* Responsive adjustments for module cards */
@media (max-width: 768px) {
  .module-cards { grid-template-columns: 1fr; }
  .cpq-total-box { flex-direction: column; text-align: center; }
  .pipeline-type-tabs { gap: 0.25rem; }
}

/* Pipeline partner badge */
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #e0f2f1;
  color: #00695c;
}

/* Info box */
.info-box {
  background: var(--blue-pale);
  border-left: 3px solid var(--blue);
  border-radius: 0 6px 6px 0;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--gray-800);
  margin-bottom: 1rem;
}


/* Comunicaciones — type and status badges */
.tipo-badge.tipo-correo { background: #e8f0fe; color: #1a73e8; }
.tipo-badge.tipo-whatsapp { background: #e6f9e6; color: #25d366; }
.tipo-badge.tipo-llamada_tel { background: #fff3e0; color: #e65100; }

.estado-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 0.75rem; font-size: 0.78rem; font-weight: 500; }
.estado-borrador { background: #fff3e0; color: #e65100; }
.estado-enviado { background: #e8f0fe; color: #1a73e8; }
.estado-fallido { background: #fce4ec; color: #c62828; }
.estado-respondido { background: #e8f5e9; color: #2e7d32; }
.estado-sin_respuesta { background: #f3e5f5; color: #7b1fa2; }

.resultado-contesto { background: #e8f5e9; color: #2e7d32; }
.resultado-no_contesto { background: #fce4ec; color: #c62828; }
.resultado-buzon { background: #fff3e0; color: #e65100; }

.gmail-notice { font-size: 0.82rem; color: var(--gray-500); margin-top: 0.75rem; font-style: italic; }

/* ── Modal Comercial (PWXCT-17) ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-container {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  min-width: 320px;
  max-width: 420px;
  width: 100%;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.modal-title { font-weight: 600; font-size: 1rem; }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray-500);
  padding: 0.25rem 0.5rem;
  line-height: 1;
}
.modal-close:hover { color: var(--gray-900); }
.modal-list { overflow-y: auto; flex: 1; }
.modal-list-item {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
}
.modal-list-item:last-child { border-bottom: none; }
.modal-list-item:hover { background: var(--gray-50, #f9fafb); }
.comercial-cell { cursor: pointer; text-decoration: underline dotted; color: var(--primary); }
.comercial-cell:hover { opacity: 0.8; }

/* ── Comunicados: pop-up y navbar (PWXCT-68) ──────────────────────────────── */
.comunicado-modal-container { max-width: 520px; max-height: 80vh; }
.comunicado-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  white-space: pre-wrap;
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.5;
}
.comunicado-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.comunicado-historial-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--gray-600);
}
.comunicado-historial-link:hover { color: var(--gray-900); }
.comunicado-badge-count {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}
.comunicado-contenido { white-space: pre-wrap; }

/* PWXCT-20 — inline etapa dropdown in empresas list */
.etapa-inline-select {
  border: none;
  background: transparent;
  font-size: 0.82rem;
  color: var(--gray-700);
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  border-radius: 4px;
  max-width: 180px;
  width: 100%;
}
.etapa-inline-select:hover,
.etapa-inline-select:focus {
  background: var(--gray-100);
  outline: none;
}

/* ── PWXCT-28 / PWXCT-67: Pipeline stage column header actions ─────────── */
.pipeline-stage-header-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.pipeline-stage-total-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.3rem;
  text-transform: none;
  letter-spacing: normal;
}

.stage-total-sep {
  color: var(--gray-400);
}

.pipeline-stage-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-700);
}

.stage-count {
  color: var(--gray-500);
  font-weight: 400;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* PWXCT-55: wrap long stage names instead of truncating with ellipsis */
.stage-label {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.25;
  min-width: 0;
  text-transform: none;
  letter-spacing: normal;
}

.stage-actions {
  margin-left: auto;
  display: flex;
  gap: 0.15rem;
  align-items: center;
  flex-shrink: 0;
}

.stage-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.stage-action-btn:hover {
  background: rgba(0,0,0,0.06);
  color: var(--gray-800);
}

.stage-submenu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}

.stage-submenu-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.84rem;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  color: var(--gray-700);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

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

.stage-submenu-item:hover:not([disabled]) {
  background: var(--gray-50);
  color: var(--primary);
}

.stage-submenu-item[disabled] {
  color: var(--gray-400);
  cursor: not-allowed;
  font-style: italic;
}

.stage-label-input {
  font-size: 0.88rem;
  font-weight: 600;
  border: 2px solid var(--primary);
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
  min-width: 60px;
  max-width: 140px;
  width: 100%;
  color: var(--gray-800);
  outline: none;
  background: #fff;
}

.stage-label-input--error { border-color: var(--danger, #dc3545); }

/* ===== PWXCT-29: Customer Experience (CX) ===== */

/* Stepper */
.cx-stepper {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  overflow-x: auto;
}

.cx-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.cx-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gray-300, #d1d5db);
  color: var(--gray-400, #9ca3af);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cx-step-label {
  font-size: 0.72rem;
  color: var(--gray-400, #9ca3af);
  white-space: nowrap;
  transition: color 0.2s;
}

.cx-step-indicator.active .cx-step-num {
  border-color: var(--td-red, #E53E3E);
  background: var(--td-red, #E53E3E);
  color: #fff;
}

.cx-step-indicator.active .cx-step-label {
  color: var(--td-red, #E53E3E);
  font-weight: 600;
}

.cx-step-indicator.done .cx-step-num {
  border-color: #38a169;
  background: #38a169;
  color: #fff;
}

.cx-step-indicator.done .cx-step-label {
  color: #38a169;
}

.cx-step-connector {
  flex: 1;
  height: 2px;
  background: var(--gray-200, #e5e7eb);
  min-width: 24px;
  margin-bottom: 1.2rem;
}

/* Cards de selección */
.cx-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .cx-cards { grid-template-columns: repeat(2, 1fr); }
  .cx-cards-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .cx-cards-4 { grid-template-columns: repeat(4, 1fr); }
}

.cx-card {
  border: 2px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  text-align: center;
  user-select: none;
}

.cx-card:hover {
  border-color: var(--td-red, #E53E3E);
  box-shadow: 0 2px 8px rgba(229,62,62,0.12);
}

.cx-card.selected {
  border-color: var(--td-red, #E53E3E);
  background: #fff5f5;
  box-shadow: 0 2px 12px rgba(229,62,62,0.18);
}

.cx-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.cx-card-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.35rem; }
.cx-card-desc { font-size: 0.82rem; color: var(--gray-500, #6b7280); line-height: 1.4; }

/* Wizard steps */
.cx-step { display: block; }
.cx-step.hidden { display: none; }

/* Preguntas editor */
.cx-pregunta-item {
  background: #f9fafb;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}

/* Destinatarios */
.cx-recipient-list { background: #fff; }
.cx-recipient-item { transition: background 0.15s; }
.cx-recipient-item:hover { background: #fef2f2; }
.cx-recipient-item.selected { background: #f0fff4; }

.cx-count-badge {
  display: inline-block;
  background: var(--td-red, #E53E3E);
  color: #fff;
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

/* Resumen */
.cx-resumen { background: #f9fafb; border-radius: 8px; padding: 1rem; }

/* Badge info */
.badge-info {
  background: #ebf8ff;
  color: #2b6cb0;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─── PWXCT-31: Filtros avanzados y paginación ─────────────────────────────── */

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

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600, #4b5563);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #0369a1;
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #0369a1;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
  font-weight: 700;
}

.chip-remove:hover { color: #c8102e; }

.filter-chips-total {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--gray-500, #6b7280);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.5rem 0;
}

.pagination-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: 6px;
  background: #fff;
  color: var(--gray-700, #374151);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s;
}

.pagination-btn:hover { background: #f3f4f6; }

.pagination-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--gray-600, #4b5563);
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
  border: 1px solid #d97706;
}

/* PWXCT-60: saludo personalizado y agenda de actividades comerciales */
.dashboard-greeting { margin-bottom: 1rem; }
.dashboard-greeting h1 { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); margin: 0; }
.dashboard-greeting p { color: var(--gray-500); margin: .15rem 0 0; font-size: .9rem; }
.agenda-card { margin-bottom: 1rem; }
.agenda-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .5rem; border-bottom: 1px solid var(--gray-100); }
.agenda-item:last-child { border-bottom: 0; }
.agenda-body { flex: 1; min-width: 0; }
.agenda-title { font-weight: 600; font-size: .875rem; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-meta { font-size: .78rem; color: var(--gray-500); }
.agenda-fecha { white-space: nowrap; font-size: .8rem; color: var(--gray-500); text-align: right; }
.agenda-item.vencida { background: rgba(220, 38, 38, .06); border-left: 3px solid var(--danger); }
.badge-vencida { display: inline-block; margin-left: .4rem; padding: .1rem .4rem; border-radius: 4px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 600; }

.btn-warning:hover { background: #d97706; }
