/**
 * ECO INNOVA PLATFORM — SISTEMA DE DISEÑO UI/UX PREMIUM
 * Dirección de Arte: Minimalismo editorial contemporáneo, SaaS de alta gama.
 * Paleta exacta de referencia:
 * - Verde profundo: #0D3428
 * - Verde secundario: #173F32
 * - Verde lima de acento: #B8ED50
 * - Fondo general: #F2F3F2
 * - Superficies / Tarjetas: #FFFFFF
 * - Texto principal: #171A18
 * - Texto secundario: #777D79
 * - Bordes discretos: #E5E8E5
 */

:root, [data-theme="eco-lime"] {
  /* PALETA EXACTA DE REFERENCIA */
  --primary: #0D3428;                /* Verde principal profundo */
  --primary-hover: #173F32;          /* Verde secundario */
  --primary-light: #F2F3F2;          /* Fondo gris neutro de apoyo */
  --primary-soft: #E5E8E5;           /* Borde sutil */
  --primary-glow: transparent;
  --primary-shadow: none;
  --accent-lime: #B8ED50;            /* Verde lima de acento quirúrgico */
  --theme-accent: #B8ED50;

  /* TONOS DE ESTRUCTURA Y NEUTROS */
  --navy: #171A18;
  --tech-black: #171A18;
  --tech-charcoal: #173F32;

  /* SUPERFICIES Y FONDOS */
  --bg-main: #F2F3F2;
  --bg-body: #F2F3F2;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFFFF;
  --bg-subtle: #F8F9F8;
  --bg-glass: #FFFFFF;

  /* BORDES DISCRETOS */
  --border-color: #E5E8E5;
  --border-light: #ECEFEC;
  --border-hover: #D5DAD5;
  --border-focus: #0D3428;

  /* ALIAS DE COMPATIBILIDAD */
  --bg-blue-tint: #F2F3F2;
  --bg-blue-soft: #E5E8E5;

  /* ACENTOS FUNCIONALES SOBRIOS */
  --accent-cyan: #0284c7;
  --accent-emerald: #0D3428;
  --accent-emerald-soft: #EAF4EE;
  --accent-amber: #b45309;
  --accent-amber-soft: #fef3c7;
  --accent-rose: #be123c;
  --accent-rose-soft: #ffe4e6;
  --accent-purple: #581c87;
  --accent-purple-soft: #f3e8ff;

  /* TIPOGRAFÍA EDITORIAL (MANROPE / PLUS JAKARTA SANS) */
  --font-family: 'Manrope', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Grotesk', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  --font-numbers: 'Manrope', -apple-system, sans-serif;

  /* JERARQUÍA DE TEXTO */
  --text-main: #171A18;
  --text-muted: #777D79;
  --text-dim: #9AA09C;

  /* ELEVACIÓN Y SOMBRAS PLANAS (ZERO NOISE / FLAT) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.06);

  /* RADIUS EXACTO DE LA REFERENCIA (14px - 18px / PÍLDORAS) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

/* ZERO DECORATIVE BACKGROUND NOISE */
body::before,
body::after {
  display: none !important;
}

/* ==============================================================
   APP SHELL / LAYOUT INTERNO
   ============================================================== */
.platform-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* SIDEBAR BLANCA, MINIMALISTA Y EDITORIAL (236px) */
.platform-sidebar {
  width: 236px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
}

.sidebar-header {
  padding: 1.25rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

.sidebar-logo-big {
  width: 100%;
  max-width: 185px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  display: block;
  filter: none;
}

.sidebar-nav {
  flex: 1;
  padding: 1.15rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0.85rem 0.75rem 0.35rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.nav-item:hover {
  background-color: var(--bg-main);
  color: var(--text-main);
}

.nav-item.active {
  background-color: #0D3428;
  color: #FFFFFF;
  font-weight: 600;
  border-color: #0D3428;
}

.nav-item i {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.nav-item.active i {
  color: #B8ED50;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
}

.user-snippet {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-main);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0D3428;
  border: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #B8ED50;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* MAIN CONTENT */
.platform-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-main);
}

/* TOPBAR HEADER — INSPIRADO EN LA REFERENCIA */
.top-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-search-wrap {
  position: relative;
  width: 320px;
}

.header-search-wrap input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.45rem 2.2rem 0.45rem 2.2rem;
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.header-search-wrap input:focus {
  border-color: #0D3428;
}

.header-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1rem;
}

.header-search-shortcut {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--bg-main);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.header-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0D3428;
  color: #FFFFFF;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.header-action-pill:hover {
  background: #173F32;
}

.header-action-pill i {
  color: #B8ED50;
  font-size: 1rem;
}

.notif-dropdown-wrapper {
  position: relative;
}

.header-bell-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-bell-btn:hover {
  background: var(--bg-main);
  color: var(--navy);
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: notifFadeIn 0.18s ease-out;
}

@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-header {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-dropdown-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.notif-dropdown-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.35rem 0;
}

.notif-item {
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.65rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.notif-item:hover {
  background: #f9fafb;
}

.notif-item.unread {
  background: #f0fdf4;
}

.notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.notif-item-content {
  flex: 1;
}

.notif-item-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.notif-item-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.notif-item-time {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 3px;
}

.header-profile-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.header-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #173F32;
  color: #B8ED50;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
}

.header-profile-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.header-profile-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.page-content {
  flex: 1;
  padding: 2.25rem 2.5rem;
  max-width: 1560px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  max-width: 680px;
}

/* ==============================================================
   CARDS & GRIDS
   ============================================================== */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.85rem;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
  }
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  position: relative;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: #cbd5e1;
}

/* HERO CARD VERDE PROFUNDO (COMO "Total Employers" EN LA REFERENCIA) */
.card-hero-dark {
  background-color: #0D3428 !important;
  color: #FFFFFF !important;
  border-color: #0D3428 !important;
}

.card-hero-dark .stat-label {
  color: #9AA09C !important;
}

.card-hero-dark .stat-value {
  color: #FFFFFF !important;
}

.card-hero-dark .hero-tag-lime {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #B8ED50;
  color: #0D3428;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.35rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease;
}

.stat-card:hover {
  border-color: #cbd5e1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--navy);
  margin: 0.15rem 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F2F3F2;
  color: #0D3428;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  font-size: 1.15rem;
}

/* ==============================================================
   TABLAS CORPORATIVAS
   ============================================================== */
.table-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: none;
  overflow: hidden;
  margin-bottom: 2rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.platform-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.platform-table th {
  background-color: #f8fafc;
  padding: 0.75rem 1.1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.platform-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.platform-table tbody tr {
  transition: background-color 0.12s ease;
}

.platform-table tbody tr:hover {
  background-color: #f8fafc;
}

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

/* ==============================================================
   BADGES & PILLS SOBRIOS
   ============================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-eco { background: var(--primary-light); color: var(--primary); border-color: var(--primary-soft); }
.badge-emerald { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.badge-blue { background: #f0f9ff; color: #075985; border-color: #bae6fd; }
.badge-amber { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-rose { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.badge-purple { background: #faf5ff; color: #581c87; border-color: #e9d5ff; }
.badge-cyan { background: #f0fdfa; color: #115e59; border-color: #99f6e4; }
.badge-subtle { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

/* ==============================================================
   BOTONES CORPORATIVOS (SÓLIDOS Y PLANOS)
   ============================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  line-height: 1.25;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--navy);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: #cbd5e1;
  color: var(--navy);
  transform: none;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

/* ==============================================================
   FORMULARIOS INDUSTRIALES
   ============================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--navy);
  font-family: inherit;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--eco-green);
  box-shadow: 0 0 0 4px rgba(101, 163, 13, 0.16);
  background-color: #ffffff;
}

/* ==============================================================
   BALANZA POS
   ============================================================== */
.balanza-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1080px) {
  .balanza-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
}

/* RUBRO ITEM CARD (MODERNO & PROFESIONAL) */
.rubro-item-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.rubro-item-card:hover {
  border-color: #cbd5e1;
}

.rubro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rubro-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.rubro-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rubro-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.rubro-proc-pill {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: #F2F3F2;
  color: #777D79;
  border: 1px solid var(--border-color);
}

.rubro-rates {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.rate-usd {
  font-weight: 700;
  color: var(--navy);
}

.rate-usd small {
  font-weight: 500;
  color: var(--text-dim);
}

.rate-sep {
  color: var(--border-hover);
}

.rate-bs {
  color: var(--text-muted);
  font-weight: 500;
}

.rubro-inputs-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  align-items: flex-end;
  gap: 0.85rem;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.rubro-field-kg {
  display: flex;
  flex-direction: column;
}

.field-micro-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.input-kg-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.weight-input {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: right;
  color: var(--navy);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  background: #ffffff;
  padding-right: 2rem !important;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.input-unit {
  position: absolute;
  right: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  pointer-events: none;
}

.rubro-field-val {
  display: flex;
  flex-direction: column;
}

.subtotal-display {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: #ffffff;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.subtotal-usd {
  color: #0D3428;
}

.subtotal-bs {
  color: #777D79;
}

@media (max-width: 640px) {
  .rubro-inputs-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
  }

  .rubro-field-val {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .rubro-field-val .field-micro-label {
    margin-bottom: 0;
  }

  .rubro-field-val .subtotal-display {
    height: 40px;
    padding: 0 0.85rem;
    min-width: 130px;
  }
}

/* RESUMEN DE LIQUIDACIÓN */
.summary-total-hero {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.summary-hero-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.summary-hero-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.summary-hero-unit {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: normal;
}

.summary-breakdown-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.summary-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-breakdown-row.sub {
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
}

.breakdown-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.breakdown-val-usd {
  font-size: 1.35rem;
  font-weight: 800;
  color: #059669;
  font-variant-numeric: tabular-nums;
}

.breakdown-val-bs {
  font-size: 1.05rem;
  font-weight: 700;
  color: #d97706;
  font-variant-numeric: tabular-nums;
}

.bcv-rate-tag {
  display: inline-flex;
  align-items: center;
  background: var(--eco-tint);
  color: var(--eco-green-deep);
  border: 1px solid var(--eco-border);
  padding: 0.1rem 0.55rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.badge-subtle {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ==============================================================
   MODALES
   ============================================================== */
dialog.platform-modal {
  margin: auto;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  color: var(--text-main);
  max-width: 600px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==============================================================
   TOASTS
   ============================================================== */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 1000;
}

.toast {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--navy);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-float);
  animation: slideInToast 0.25s ease-out;
}

.toast-success { border-left: 4px solid var(--eco-green); }
.toast-error { border-left: 4px solid var(--accent-rose); }

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==============================================================
   PORTAL NAVBAR & HERO (DIRECCIÓN DE ARTE ECO INNOVA)
   ============================================================== */
.portal-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3.5rem;
  max-width: 1440px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.portal-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.portal-nav-link:hover {
  color: var(--eco-green-deep);
}

.hero-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 3rem 3.5rem 5rem;
  display: grid;
  grid-template-columns: 46% 54%;
  align-items: center;
  gap: 3.5rem;
}

@media (max-width: 1080px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 3rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: var(--eco-tint);
  border: 1px solid var(--eco-border);
  color: var(--eco-green-deep);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, #65a30d 0%, #365314 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  max-width: 520px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* FLOATING DASHBOARD STAGE */
.hero-visual-stage {
  position: relative;
  width: 100%;
}

.floating-dashboard-canvas {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  padding: 2rem;
  position: relative;
  z-index: 10;
  transition: transform 0.3s ease;
}

.floating-satellite {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-float);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: floatSubtle 6s ease-in-out infinite;
}

.satellite-top-right {
  top: -24px;
  right: -20px;
  animation-delay: 0s;
}

.satellite-bottom-left {
  bottom: -28px;
  left: -20px;
  animation-delay: 3s;
}

@keyframes floatSubtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* TRUST BAR */
.trust-bar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2.5rem 3.5rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.trust-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 1.75rem;
}

.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3.5rem;
  flex-wrap: wrap;
  opacity: 0.65;
}

.trust-logo-item {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* STATS BANNER */
.stats-banner-card {
  max-width: 1440px;
  margin: 2rem auto 5rem;
  padding: 0 3.5rem;
}

.stats-banner-inner {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 2.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .stats-banner-inner {
    grid-template-columns: repeat(2, 1fr);
    padding: 2rem;
  }
}

.stat-metric-block {
  display: flex;
  flex-direction: column;
}

.stat-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--eco-tint);
  color: var(--eco-green-deep);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border: 1px solid var(--eco-border);
}

.stat-metric-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-metric-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.stat-metric-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==============================================================
   PALETTE SWITCHER & BRAND VARIANT CONTROLS
   ============================================================== */
.palette-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  padding: 0.25rem 0.4rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.palette-pill {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: 1px solid transparent;
}

.palette-pill:hover {
  transform: scale(1.15);
}

.palette-pill.active {
  outline: 2px solid var(--text-main);
  transform: scale(1.18);
  box-shadow: 0 0 10px var(--primary-glow);
}

.palette-pill[data-theme-btn="eco-lime"] {
  background: linear-gradient(135deg, #84cc16 0%, #4d7c0f 100%);
}

.palette-pill[data-theme-btn="eco-industrial"] {
  background: linear-gradient(135deg, #22c55e 0%, #166534 100%);
}

.palette-pill[data-theme-btn="eco-fintech"] {
  background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
}

.palette-pill[data-theme-btn="eco-circuit"] {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
}

/* PALETTE SHOWCASE TOKEN BAR */
.palette-token-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.palette-token-card {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.palette-token-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--eco-border);
}

.palette-token-color {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.palette-token-meta {
  display: flex;
  flex-direction: column;
}

.palette-token-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
}

.palette-token-hex {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==============================================================
   MOBILE FIRST ARCHITECTURE & APP-LIKE CONTROLS
   ============================================================== */

/* Prevenir zoom accidental en iOS Safari en inputs */
input, select, textarea {
  font-size: 16px;
}

/* Microinteracciones táctiles */
.btn:active,
.nav-item:active,
.card:active,
.demo-pill:active {
  transform: scale(0.98);
}

/* 1. TOP BAR MÓVIL (TIPO APP) */
.mobile-top-bar {
  display: none;
}

@media (max-width: 850px) {
  /* Ocultar sidebar tradicional en móvil */
  .platform-sidebar {
    display: none !important;
  }

  .platform-container {
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
  }

  .platform-main {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 16px));
  }

  .top-bar {
    display: none !important;
  }

  .mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 1rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
  }

  .mobile-top-left {
    display: flex;
    align-items: center;
    text-decoration: none;
  }

  .mobile-top-logo {
    height: 38px;
    max-width: 170px;
    width: auto;
    object-fit: contain;
  }

  .mobile-top-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .mobile-sede-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    background: var(--eco-tint);
    color: var(--eco-green-deep);
    border: 1px solid var(--eco-border);
    border-radius: 9999px;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-drawer-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: grid;
    place-items: center;
    color: var(--navy);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }

  /* 2. PÁGINA Y HEADER EN MÓVIL */
  .page-content {
    padding: 0.85rem 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .page-header > div {
    min-width: 0;
    max-width: 100%;
  }

  .page-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    word-break: break-word;
  }

  .page-subtitle {
    font-size: 0.8rem;
    line-height: 1.45;
    word-break: break-word;
  }

  .page-header .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* Botones táctiles */
  .btn {
    min-height: 44px;
    font-size: 0.88rem;
    padding: 0.65rem 1.15rem;
  }

  .btn-lg {
    min-height: 48px;
    font-size: 0.95rem;
  }

  .form-control {
    min-height: 44px;
    padding: 0.65rem 0.85rem;
  }

  .card {
    padding: 1rem;
    border-radius: var(--radius-md);
  }

  .stat-card {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .stat-value {
    font-size: 1.45rem;
  }

  /* Mobile Rubro Input Stacking on very narrow phones (<380px) */
  @media (max-width: 380px) {
    .rubro-inputs-row {
      grid-template-columns: 1fr 1fr;
      gap: 0.5rem;
    }
    .rubro-field-kg {
      grid-column: 1 / -1;
    }
  }
}

/* 3. NAVEGACIÓN INFERIOR FIJA TIPO APP (BOTTOM NAV BAR) */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 850px) {
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 990;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    height: calc(62px + env(safe-area-inset-bottom, 8px));
  }

  .mobile-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: 6px 0;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s ease;
    position: relative;
  }

  .mobile-nav-tab:active {
    transform: scale(0.92);
  }

  .mobile-nav-tab i {
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text-muted);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-nav-tab svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    transition: stroke 0.2s ease;
  }

  .mobile-nav-tab span {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-muted);
    transition: color 0.18s ease;
  }

  .mobile-nav-tab.active {
    color: #0D3428;
  }

  .mobile-nav-tab.active i {
    color: #0D3428;
    transform: translateY(-1px);
  }

  .mobile-nav-tab.active svg {
    stroke: #0D3428;
    stroke-width: 2.4;
  }

  .mobile-nav-tab.active span {
    color: #0D3428;
    font-weight: 800;
  }

  .mobile-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #0D3428;
  }
}

/* 4. MOBILE DRAWER & BOTTOM SHEET ("MÁS OPCIONES") */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-drawer-backdrop.open {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  z-index: 1010;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 16px));
}

.mobile-drawer.open {
  transform: translateY(0);
}

.mobile-drawer-handle {
  width: 44px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 9999px;
  margin: 0 auto 1.25rem;
}

.mobile-drawer-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mobile-drawer-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.mobile-drawer-card:active {
  transform: scale(0.96);
  background: #EAF4EE;
  border-color: #0D3428;
}

.mobile-drawer-card.active {
  background: #0D3428;
  color: #FFFFFF;
  border-color: #0D3428;
}

.mobile-drawer-card.active .mobile-drawer-card-icon {
  background: #173F32;
  color: #B8ED50;
  border-color: transparent;
}

.mobile-drawer-card.active .mobile-drawer-card-title {
  color: #FFFFFF;
}

.mobile-drawer-card.active .mobile-drawer-card-desc {
  color: #B8ED50;
}

.mobile-drawer-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  color: #0D3428;
}

.mobile-drawer-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-drawer-card-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 5. MODALES COMO BOTTOM SHEETS EN MÓVIL */
@media (max-width: 768px) {
  dialog.platform-modal {
    margin-top: auto;
    margin-bottom: 0;
    max-width: 100%;
    width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 1.5rem 1.25rem calc(1.75rem + env(safe-area-inset-bottom, 16px));
    max-height: 90vh;
    overflow-y: auto;
    animation: bottomSheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes bottomSheetSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

/* 6. TABLAS RESPONSIVAS TRANSFORMADAS A CARDS EN MÓVIL */
@media (max-width: 768px) {
  .table-responsive {
    border: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
  }

  .mobile-card-table thead {
    display: none;
  }

  .mobile-card-table,
  .mobile-card-table tbody,
  .mobile-card-table tr,
  .mobile-card-table td {
    display: block;
    width: 100%;
  }

  .mobile-card-table tr {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
  }

  .mobile-card-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border-light);
    font-size: 0.88rem;
  }

  .mobile-card-table td:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
  }

  .mobile-card-table td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.75rem;
    flex-shrink: 0;
  }
}

/* 7. BARRA STICKY INFERIOR DE PESAJE EN BALANZA (MÓVIL) */
.mobile-balanza-sticky-bar {
  display: none;
}

@media (max-width: 850px) {
  .mobile-balanza-sticky-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: calc(62px + env(safe-area-inset-bottom, 8px));
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 0.75rem 1rem;
    z-index: 980;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-balanza-sticky-bar .sticky-info {
    display: flex;
    flex-direction: column;
  }

  .mobile-balanza-sticky-bar .sticky-kg {
    font-size: 1.15rem;
    font-weight: 800;
    color: #a3e635;
    font-family: var(--font-mono);
  }

  .mobile-balanza-sticky-bar .sticky-usd {
    font-size: 0.78rem;
    color: #94a3b8;
  }

  .mobile-balanza-sticky-bar .btn {
    min-height: 44px;
    padding: 0.55rem 1.25rem;
    font-size: 0.88rem;
    box-shadow: none;
  }
}

/* 8. ACCIONES RÁPIDAS MÓVIL (QUICK ACTIONS CHIPS) */
.mobile-quick-actions {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0 0.85rem;
  margin-bottom: 1rem;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mobile-quick-actions::-webkit-scrollbar {
  display: none;
}

/* PUNTOS DE COMPRA STATUS RESPONSIVE GRID */
.puntos-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.punto-status-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.punto-status-info {
  min-width: 0;
  flex: 1;
}

.punto-status-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.punto-status-name {
  font-size: 0.85rem;
  color: var(--navy);
  word-break: break-word;
}

.punto-status-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  word-break: break-word;
}

.punto-status-btn {
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .puntos-status-grid {
    grid-template-columns: 1fr;
  }
  .punto-status-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .punto-status-btn {
    text-align: center;
    width: 100%;
    display: block;
  }
}

.mobile-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mobile-action-chip:active {
  transform: scale(0.95);
  background: var(--eco-tint);
  border-color: var(--eco-border);
  color: var(--eco-green-deep);
}

.mobile-action-chip svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* 9. PORTAL SHOWCASE EN MÓVILES */
@media (max-width: 850px) {
  .portal-navbar {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .portal-nav-links {
    display: none;
  }

  .portal-navbar .palette-switcher {
    display: none;
  }

  .hero-section {
    padding: 1.5rem 1rem 2.5rem;
    gap: 2rem;
  }

  .hero-title {
    font-size: clamp(2rem, 7.5vw, 2.75rem);
    line-height: 1.15;
  }

  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    min-height: 50px;
  }

  .floating-satellite {
    display: none !important;
  }

  .floating-dashboard-canvas {
    padding: 1rem;
    border-radius: var(--radius-lg);
  }

  .floating-dashboard-canvas > div:nth-child(2) {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .stats-banner-card {
    padding: 0 1rem;
    margin-bottom: 2.5rem;
  }

  .stats-banner-inner {
    grid-template-columns: 1fr;
    padding: 1.25rem;
    gap: 1.25rem;
  }

  #paleta {
    padding: 0 1rem !important;
    margin-bottom: 2.5rem !important;
  }

  #paleta > div {
    padding: 1.25rem !important;
  }

  .trust-bar {
    padding: 2rem 1rem;
  }
}


