﻿/* ==========================================================================
   NeithCore — Design tokens
   Paleta aproximada a partir de la referencia visual (landing/login/dashboard).
   Ajustar estos valores si el Figma define hex exactos distintos.
   ========================================================================== */

/* Sin esto, el padding y el borde de inputs/selects/textareas se SUMAN al 100%
   de ancho declarado en vez de incluirse en él — por eso se salían de los
   contenedores. Con border-box, "width: 100%" significa 100% de verdad. */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  /* Verdes de marca */
  --nc-bg-dark: #0e3b2e;
  --nc-bg-dark-2: #0a2e24;
  --nc-bg-dark-3: #133f31;
  /* Acento: verde salvia (antes #22c55e, demasiado brillante). Se usa sobre todo
     sobre el fondo oscuro; los botones tienen su propio token más sobrio. */
  --nc-accent: #5fae84;
  --nc-accent-strong: #2a7a52;
  --nc-accent-soft: rgba(42, 122, 82, 0.12);

  /* Botón principal: verde bosque con texto blanco. */
  --nc-btn-primary: #24684a;
  --nc-btn-primary-hover: #1c5539;

  /* Superficie clara (plataforma admin) */
  --nc-bg-light: #f7f5f0;
  --nc-surface: #ffffff;
  --nc-border: #e7e4da;
  --nc-border-strong: #d7d3c6;

  /* Texto */
  --nc-text: #1a231f;
  --nc-text-muted: #6b7568;
  --nc-text-on-dark: #ffffff;
  --nc-text-on-dark-muted: #9fc4b3;

  /* Estados — fondos con transparencia real (alpha), no hex planos */
  --nc-warning: #b7791f;
  --nc-warning-bg: rgba(183, 121, 31, 0.14);
  --nc-danger: #c0392b;
  --nc-danger-bg: rgba(192, 57, 43, 0.12);
  --nc-success: #1f8b4c;
  --nc-success-bg: rgba(31, 139, 76, 0.13);
  --nc-muted-bg: rgba(26, 35, 31, 0.06);
  /* Acento cálido complementario al verde (antes "lavanda" #6d5adf, que se
     veía azul y salía de la paleta). */
  --nc-clay: #9a5b3c;
  --nc-clay-bg: rgba(154, 91, 60, 0.12);

  /* Enlaces: verde oscuro con contraste AA sobre blanco y sobre el fondo arena. */
  --nc-link: #157a3d;
  --nc-link-hover: var(--nc-bg-dark);
  --nc-focus-ring: 0 0 0 3px var(--nc-accent-soft);

  /* Layout */
  --nc-sidebar-w: 216px;
  --nc-radius-sm: 8px;
  --nc-radius-md: 12px;
  --nc-radius-lg: 16px;
  --nc-shadow-card: 0 1px 2px rgba(16, 24, 20, 0.06), 0 1px 1px rgba(16, 24, 20, 0.04);

  --nc-font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --nc-font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

body {
  font-family: var(--nc-font-body);
  color: var(--nc-text);
  background: var(--nc-bg-light);
}

h1, h2, h3, h4, .nc-display {
  font-family: var(--nc-font-display);
  letter-spacing: -0.01em;
}

/* Los layouts de NeithCore no cargan Bootstrap: sin estas reglas el navegador
   pinta enlaces, checkboxes, radios y el foco con su azul/morado por defecto. */
:root { color-scheme: light; }

/* :where() deja la especificidad en 0, así cualquier clase (botones, menú)
   manda sobre este color base. */
:where(a) { text-decoration: none; color: var(--nc-link); }
:where(a:hover) { color: var(--nc-link-hover); }

input[type="checkbox"], input[type="radio"], input[type="range"], progress {
  accent-color: var(--nc-accent-strong);
}

:where(:focus-visible) { outline: 2px solid var(--nc-accent-strong); outline-offset: 2px; }
.nc-input:focus-visible { outline: none; }

::selection { background: var(--nc-accent-soft); color: var(--nc-text); }

/* Equivalentes mínimos de las utilidades de Bootstrap que usan las vistas
   (validaciones de formularios). */
.text-danger { color: var(--nc-danger); }
.text-muted { color: var(--nc-text-muted); }
.text-dark { color: var(--nc-text); }
.small, small { font-size: 0.8rem; }
.mb-3 { margin-bottom: 1rem; }
.validation-summary-valid { display: none; }
.validation-summary-errors {
  background: var(--nc-danger-bg);
  border-radius: var(--nc-radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
}
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.field-validation-error { display: block; margin-top: 4px; }
.nc-input.input-validation-error { border-color: var(--nc-danger); }

/* ==========================================================================
   Shell: sidebar + topbar + content
   ========================================================================== */
.nc-shell {
  min-height: 100vh;
  background: var(--nc-bg-light);
  font-size: 0.94rem;
}

/* Fijo de verdad: position:fixed en vez de sticky, así nunca se estira más
   que la altura de la pantalla sin importar qué tan largo sea el contenido. */
.nc-sidebar {
  width: var(--nc-sidebar-w);
  background: var(--nc-bg-dark);
  color: var(--nc-text-on-dark);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

.nc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 20px;
  font-family: var(--nc-font-display);
  font-weight: 800;
  font-size: 0.98rem;
}

.nc-sidebar-brand img { width: 28px; height: 28px; }

/* Específicamente en el menú lateral del admin (no en login) el logo se veía
   chico — más grande solo ahí. */
.nc-sidebar .nc-sidebar-brand img { width: 38px; height: 38px; }
.nc-auth-side .nc-sidebar-brand img { width: 38px; height: 38px; }
.nc-sidebar .nc-sidebar-brand { padding-bottom: 24px; }

.nc-nav { list-style: none; margin: 0; padding: 0; flex: 1; }

.nc-nav-item + .nc-nav-item { margin-top: 2px; }

.nc-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--nc-radius-sm);
  color: var(--nc-text-on-dark-muted);
  font-size: 0.87rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.nc-nav-link i { font-size: 1rem; width: 18px; text-align: center; }

.nc-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--nc-text-on-dark);
}

.nc-nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--nc-text-on-dark);
}

.nc-nav-link.active::after {
  content: "";
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nc-accent);
}

.nc-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 14px;
  margin-top: 10px;
}

.nc-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}

.nc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--nc-accent);
  color: #06281e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.nc-user-chip .nc-user-name { font-size: 0.88rem; font-weight: 600; color: var(--nc-text-on-dark); }
.nc-user-chip .nc-user-email { font-size: 0.76rem; color: var(--nc-text-on-dark-muted); }

.nc-sidebar-footer-link {
  display: block;
  padding: 8px;
  font-size: 0.82rem;
  color: var(--nc-text-on-dark-muted);
}

.nc-sidebar-footer-link:hover { color: var(--nc-text-on-dark); }

/* Content area — margen izquierdo = ancho del sidebar, ya que este es fixed */
.nc-content { margin-left: var(--nc-sidebar-w); min-width: 0; padding: 22px 30px 48px; }

/* Móvil: barra superior + menú lateral deslizable (antes el menú solo se
   ocultaba y no había forma de navegar desde el celular). */
.nc-mobile-bar { display: none; }
.nc-sidebar-backdrop { display: none; }

@media (max-width: 768px) {
  .nc-mobile-bar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 30;
    height: 54px; padding: 0 12px;
    background: var(--nc-bg-dark); color: var(--nc-text-on-dark);
  }
  .nc-mobile-menu-btn {
    width: 38px; height: 38px; border-radius: var(--nc-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.18); background: transparent;
    color: var(--nc-text-on-dark); font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .nc-mobile-brand {
    display: flex; align-items: center; gap: 8px;
    color: var(--nc-text-on-dark); font-family: var(--nc-font-display); font-weight: 800;
  }
  .nc-mobile-brand img { width: 28px; height: 28px; }

  .nc-sidebar {
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }
  .nc-sidebar.is-open { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, 0.35); }
  .nc-sidebar-backdrop:not([hidden]) {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(10, 46, 36, 0.45);
  }

  .nc-content { margin-left: 0; padding: 16px 14px 40px; }
  .nc-detail-header, .nc-page-head { flex-direction: column; align-items: stretch; }
  .nc-detail-actions { width: 100%; }
}

.nc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.nc-topbar .nc-date { font-size: 0.8rem; color: var(--nc-text-muted); margin-bottom: 2px; }
.nc-topbar h1 { font-size: 1.3rem; font-weight: 800; margin: 0; }

.nc-topbar-actions { display: flex; align-items: center; gap: 10px; }

.nc-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--nc-border-strong);
  background: var(--nc-surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--nc-text);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.nc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: var(--nc-radius-sm);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}

.nc-btn-primary {
  background: color-mix(in srgb, var(--nc-btn-primary) 94%, transparent);
  color: #ffffff;
  border: 1px solid var(--nc-btn-primary);
}
.nc-btn-primary:hover { background: var(--nc-btn-primary-hover); border-color: var(--nc-btn-primary-hover); color: #ffffff; filter: none; }
.nc-btn-dark {
  background: color-mix(in srgb, var(--nc-bg-dark) 88%, transparent);
  color: #fff;
  border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
}
.nc-btn-dark:hover { filter: brightness(1.15); }
.nc-btn-block { width: 100%; justify-content: center; }

/* ==========================================================================
   Cards / KPIs
   ========================================================================== */
.nc-card {
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-md);
  box-shadow: var(--nc-shadow-card);
}

.nc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 992px) { .nc-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .nc-kpi-grid { grid-template-columns: 1fr; } }

.nc-kpi {
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.nc-kpi-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--nc-accent-soft);
  color: var(--nc-accent-strong);
  flex-shrink: 0;
}

.nc-kpi-value { font-size: 1.2rem; font-weight: 800; line-height: 1.1; }
.nc-kpi-label { font-size: 0.8rem; font-weight: 600; margin-top: 2px; }
.nc-kpi-sub { font-size: 0.74rem; color: var(--nc-text-muted); margin-top: 2px; }

/* ==========================================================================
   Table
   ========================================================================== */
.nc-table-card { padding: 4px 0 8px; margin-bottom: 20px; }
.nc-table-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 4px; }
.nc-table-head h2 { font-size: 1rem; font-weight: 800; margin: 0; }
.nc-table-head p { font-size: 0.78rem; color: var(--nc-text-muted); margin: 2px 0 0; }
.nc-table-head a { font-size: 0.85rem; font-weight: 700; color: var(--nc-link); }

.nc-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.nc-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nc-text-muted);
  padding: 10px 20px;
  border-bottom: 1px solid var(--nc-border);
}
.nc-table td { padding: 12px 20px; border-bottom: 1px solid var(--nc-border); vertical-align: middle; }
.nc-table tr:last-child td { border-bottom: none; }
.nc-table .nc-cell-strong { font-weight: 700; }
.nc-table .nc-cell-muted { color: var(--nc-text-muted); font-size: 0.85rem; }

.nc-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}
.nc-pill-warning { background: var(--nc-warning-bg); color: var(--nc-warning); }
.nc-pill-danger { background: var(--nc-danger-bg); color: var(--nc-danger); }
.nc-pill-success { background: var(--nc-success-bg); color: var(--nc-success); }
.nc-pill-muted { background: var(--nc-muted-bg); color: var(--nc-text-muted); }

.nc-progress { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.nc-progress-track { flex: 1; height: 6px; border-radius: 999px; background: var(--nc-muted-bg); overflow: hidden; }
.nc-progress-fill { height: 100%; border-radius: 999px; background: var(--nc-accent-strong); }
.nc-progress-fill.is-low { background: var(--nc-warning); }
.nc-progress-fill.is-behind { background: var(--nc-danger); }
.nc-progress span { font-size: 0.78rem; color: var(--nc-text-muted); font-weight: 600; }

/* ==========================================================================
   Bottom row: chart + activity
   ========================================================================== */
.nc-bottom-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 992px) { .nc-bottom-grid { grid-template-columns: 1fr; } }

.nc-chart-card, .nc-activity-card { padding: 18px 20px; }
.nc-chart-card h2, .nc-activity-card h2 { font-size: 1rem; font-weight: 800; margin: 0 0 2px; }
.nc-chart-card p, .nc-activity-card p { font-size: 0.78rem; color: var(--nc-text-muted); margin: 0 0 12px; }

.nc-activity-list { list-style: none; margin: 0; padding: 0; }
.nc-activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--nc-border); }
.nc-activity-item:last-child { border-bottom: none; }
.nc-activity-item .nc-avatar { width: 30px; height: 30px; font-size: 0.72rem; }
.nc-activity-item .nc-activity-text { font-size: 0.85rem; }
.nc-activity-item .nc-activity-text strong { font-weight: 700; }
.nc-activity-item .nc-activity-time { font-size: 0.74rem; color: var(--nc-text-muted); }

/* ==========================================================================
   Auth screen (login)
   ========================================================================== */
.nc-auth-shell { display: flex; min-height: 100vh; background: var(--nc-surface); }

.nc-auth-side {
  width: 42%;
  background: var(--nc-bg-dark);
  color: var(--nc-text-on-dark);
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.nc-auth-side .nc-sidebar-brand { padding-bottom: 60px; }

.nc-auth-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--nc-accent);
  margin-bottom: 10px;
}

.nc-auth-side h1 { font-size: 2.1rem; font-weight: 800; line-height: 1.15; margin-bottom: 24px; }

.nc-auth-features { list-style: none; margin: 0 0 auto; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.nc-auth-features li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.nc-auth-features .nc-feature-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--nc-accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.nc-auth-side .nc-auth-copy { font-size: 0.76rem; color: var(--nc-text-on-dark-muted); margin-top: 40px; }

.nc-auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.nc-auth-form { width: 100%; max-width: 360px; }
.nc-auth-form h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 4px; }
.nc-auth-form .nc-auth-sub { font-size: 0.88rem; color: var(--nc-text-muted); margin-bottom: 26px; }

.nc-field { margin-bottom: 16px; }
.nc-field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.nc-field label { font-size: 0.85rem; font-weight: 700; }
.nc-field a { font-size: 0.78rem; font-weight: 600; color: var(--nc-link); }

.nc-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--nc-radius-sm);
  border: 1px solid var(--nc-border-strong);
  font-size: 0.92rem;
  background: var(--nc-surface);
}
.nc-input:focus {
  outline: none;
  border-color: var(--nc-accent-strong);
  box-shadow: 0 0 0 3px var(--nc-accent-soft);
}

.nc-auth-hint { text-align: center; font-size: 0.8rem; color: var(--nc-text-muted); margin-top: 18px; }
.nc-auth-hint code { background: var(--nc-muted-bg); padding: 1px 6px; border-radius: 4px; }
.nc-auth-back { display: block; text-align: center; font-size: 0.82rem; margin-top: 10px; color: var(--nc-text-muted); }

.nc-auth-divider {
  max-width: 360px;
  margin: 18px auto;
  text-align: center;
  font-size: 0.78rem;
  color: var(--nc-text-muted);
  position: relative;
}
.nc-auth-divider::before, .nc-auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--nc-border);
}
.nc-auth-divider::before { left: 0; }
.nc-auth-divider::after { right: 0; }

@media (max-width: 860px) {
  .nc-auth-side { display: none; }
  .nc-auth-shell { background: var(--nc-bg-light); }
}

/* ==========================================================================
   Landing pública
   ========================================================================== */
.nc-hero {
  background: var(--nc-bg-dark);
  color: var(--nc-text-on-dark);
}

.nc-public-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nc-public-nav .nc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--nc-font-display);
  font-weight: 800;
  font-size: 1.1rem;
}

.nc-public-nav .nc-brand img { width: 38px; height: 38px; }

.nc-btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.nc-btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); }

.nc-hero-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 32px 0;
  text-align: center;
}

.nc-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(95, 174, 132, 0.16);
  color: var(--nc-accent);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 22px;
}
.nc-badge-pill .nc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--nc-accent); }

.nc-hero-content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
}
.nc-hero-content h1 .nc-accent-text { color: var(--nc-accent); }

.nc-hero-content .nc-hero-sub {
  font-size: 1.02rem;
  color: var(--nc-text-on-dark-muted);
  max-width: 560px;
  margin: 0 auto 30px;
  line-height: 1.55;
}

.nc-cycle-strip {
  margin-top: 56px;
  padding: 26px 32px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nc-cycle-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--nc-text-on-dark-muted);
  margin-bottom: 22px;
}

.nc-cycle-row {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nc-cycle-item { display: flex; align-items: flex-start; gap: 4px; }

.nc-cycle-node { width: 108px; text-align: center; }

.nc-cycle-icon {
  width: 46px; height: 46px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--nc-text-on-dark-muted);
}
.nc-cycle-item.is-current .nc-cycle-icon {
  background: var(--nc-warning);
  color: #3a2705;
}

.nc-cycle-node .nc-cycle-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 2px; }
.nc-cycle-item.is-current .nc-cycle-title { color: var(--nc-accent); }
.nc-cycle-node .nc-cycle-desc { font-size: 0.68rem; color: var(--nc-text-on-dark-muted); line-height: 1.3; }

.nc-cycle-arrow { color: rgba(255, 255, 255, 0.25); padding-top: 20px; font-size: 0.9rem; }

@media (max-width: 992px) {
  .nc-cycle-arrow { display: none; }
  .nc-cycle-row { gap: 20px 12px; }
}

/* Sección de features en blanco */
.nc-features-section { background: var(--nc-bg-light); padding: 60px 32px 0; }

.nc-features-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--nc-text-muted);
  margin-bottom: 26px;
}

.nc-features-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 56px;
}
@media (max-width: 900px) { .nc-features-grid { grid-template-columns: 1fr; } }

.nc-feature-card { padding: 26px; }

.nc-feature-card .nc-feature-icon-lg {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 1.15rem;
}
.nc-feature-icon-lg.is-clay { background: var(--nc-clay-bg); color: var(--nc-clay); }
.nc-feature-icon-lg.is-amber { background: var(--nc-warning-bg); color: var(--nc-warning); }
.nc-feature-icon-lg.is-green { background: var(--nc-success-bg); color: var(--nc-success); }

.nc-feature-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.nc-feature-card p { font-size: 0.88rem; color: var(--nc-text-muted); line-height: 1.55; margin: 0; }

.nc-public-footer {
  border-top: 1px solid var(--nc-border);
  background: var(--nc-bg-light);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.nc-public-footer .nc-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.92rem; }
.nc-public-footer .nc-brand img { width: 38px; height: 38px; }
.nc-public-footer .nc-footer-copy { font-size: 0.78rem; color: var(--nc-text-muted); }

/* ==========================================================================
   Toolbar de listado: tabs de filtro + buscador (Hojas de trabajo, Servicios)
   ========================================================================== */
.nc-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.nc-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.nc-tab {
  border: 1px solid var(--nc-border-strong);
  background: var(--nc-surface);
  color: var(--nc-text-muted);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.nc-tab.is-active { background: var(--nc-bg-dark); border-color: var(--nc-bg-dark); color: #fff; }

.nc-search {
  position: relative;
  min-width: 240px;
}

.nc-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nc-text-muted);
  font-size: 0.85rem;
}

.nc-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: var(--nc-radius-sm);
  border: 1px solid var(--nc-border-strong);
  font-size: 0.85rem;
  background: var(--nc-surface);
}
.nc-search input:focus {
  outline: none;
  border-color: var(--nc-accent-strong);
  box-shadow: 0 0 0 3px var(--nc-accent-soft);
}

.nc-btn-outline {
  background: var(--nc-surface);
  color: var(--nc-text);
  border: 1px solid var(--nc-border-strong);
}
.nc-btn-outline:hover { background: var(--nc-bg-light); }

.nc-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.nc-page-head h1 { font-size: 1.3rem; font-weight: 800; margin: 0 0 3px; }
.nc-page-head p { font-size: 0.85rem; color: var(--nc-text-muted); margin: 0; }

/* ==========================================================================
   Stack de avatares (usuarios asignados a un servicio)
   ========================================================================== */
.nc-avatar-stack { display: flex; align-items: center; }
.nc-avatar-sm {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--nc-accent-soft);
  color: var(--nc-accent-strong);
  border: 2px solid var(--nc-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  flex-shrink: 0;
}
.nc-avatar-stack .nc-avatar-sm { margin-left: -8px; }
.nc-avatar-stack .nc-avatar-sm:first-child { margin-left: 0; }
.nc-avatar-sm.is-extra { background: var(--nc-muted-bg); color: var(--nc-text-muted); }

/* ==========================================================================
   Acciones de fila visibles solo al pasar el mouse (tabla Servicios)
   ========================================================================== */
.nc-row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.nc-table tr:hover .nc-row-actions,
.nc-table tr:focus-within .nc-row-actions { opacity: 1; }

.nc-row-actions button, .nc-row-actions a {
  width: 28px; height: 28px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--nc-text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}
.nc-row-actions button:hover, .nc-row-actions a:hover { background: var(--nc-muted-bg); color: var(--nc-text); }

.nc-cell-title { font-weight: 700; }
.nc-cell-desc { font-size: 0.78rem; color: var(--nc-text-muted); margin-top: 1px; }

/* ==========================================================================
   Encabezado de detalle con breadcrumb (Nueva orden, detalle de actividad)
   ========================================================================== */
.nc-breadcrumb { font-size: 0.8rem; color: var(--nc-text-muted); margin-bottom: 4px; }
.nc-breadcrumb a { color: var(--nc-text-muted); }
.nc-breadcrumb .nc-crumb-current { color: var(--nc-text); font-weight: 600; }

.nc-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.nc-detail-header h1 { font-size: 1.25rem; font-weight: 800; margin: 2px 0 2px; }
.nc-detail-header .nc-detail-sub { font-size: 0.82rem; color: var(--nc-text-muted); }
.nc-detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Layout de dos columnas: contenido principal + panel lateral */
.nc-split { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: flex-start; }
@media (max-width: 992px) { .nc-split { grid-template-columns: 1fr; } }

.nc-panel { padding: 18px 20px; }
.nc-panel h2 { font-size: 0.95rem; font-weight: 800; margin: 0 0 2px; }
.nc-panel .nc-panel-sub { font-size: 0.76rem; color: var(--nc-text-muted); margin: 0 0 14px; }

/* ==========================================================================
   Formularios de creación (Nuevo cliente / Nueva orden / Nueva actividad)
   ========================================================================== */
.nc-form-section { padding: 20px 22px; margin-bottom: 16px; }
.nc-form-section h2 { font-size: 0.98rem; font-weight: 800; margin: 0 0 14px; }
.nc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nc-form-grid.is-single { grid-template-columns: 1fr; }
@media (max-width: 700px) { .nc-form-grid { grid-template-columns: 1fr; } }
.nc-field-full { grid-column: 1 / -1; }
.nc-field textarea.nc-input { resize: vertical; min-height: 84px; }
.nc-field-hint { font-size: 0.76rem; color: var(--nc-text-muted); margin-top: 4px; }

.nc-checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 700px) { .nc-checkbox-grid { grid-template-columns: 1fr; } }
.nc-checkbox-card {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--nc-border-strong);
  border-radius: var(--nc-radius-sm);
  padding: 10px 12px;
  font-size: 0.86rem;
  cursor: pointer;
}
.nc-checkbox-card input { accent-color: var(--nc-accent-strong); width: 16px; height: 16px; }
.nc-checkbox-card:has(input:checked) { border-color: var(--nc-accent-strong); background: var(--nc-accent-soft); }

.nc-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.nc-mini-activity-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 0.86rem;
}
.nc-mini-activity-row .nc-cell-desc { margin-top: 0; }
.nc-mini-activity-row { gap: 8px; }
.nc-mini-activity-row .nc-input { flex: 1; min-width: 0; padding: 7px 10px; }

/* Los hijos de un grid no se encogen por debajo de su ancho mínimo de contenido
   (min-width:auto), por eso inputs de fecha/select se salían de su columna en
   pantallas angostas. min-width:0 los deja ajustarse al contenedor. */
.nc-form-grid > *, .nc-field { min-width: 0; }
.nc-input { max-width: 100%; }

/* ==========================================================================
   Tabs subrayadas (Configuración)
   ========================================================================== */
.nc-tabs-underline { display: flex; gap: 22px; border-bottom: 1px solid var(--nc-border); margin-bottom: 22px; }
.nc-tab-underline {
  background: none; border: none; padding: 10px 2px 12px;
  font-size: 0.88rem; font-weight: 600; color: var(--nc-text-muted);
  border-bottom: 2px solid transparent; cursor: pointer;
}
.nc-tab-underline.is-active { color: var(--nc-accent-strong); border-bottom-color: var(--nc-accent-strong); font-weight: 700; }

/* ==========================================================================
   Línea de tiempo y galería (Evidencias)
   ========================================================================== */
.nc-timeline { list-style: none; margin: 0; padding: 0; }
.nc-timeline li { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.nc-timeline li::before {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 0;
  width: 1px; background: var(--nc-border);
}
.nc-timeline li:last-child::before { display: none; }
.nc-timeline .nc-timeline-text { font-size: 0.87rem; }
.nc-timeline .nc-timeline-text strong { font-weight: 700; }
.nc-timeline .nc-timeline-time { font-size: 0.76rem; color: var(--nc-text-muted); margin-top: 1px; }

.nc-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 700px) { .nc-gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.nc-gallery-item {
  aspect-ratio: 1.3; border-radius: var(--nc-radius-md);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.28); font-size: 1.4rem;
}

.nc-doc-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-sm);
  padding: 10px 14px;
}
.nc-doc-row .nc-doc-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--nc-danger-bg); color: var(--nc-danger);
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800;
}
.nc-doc-row .nc-doc-name { font-weight: 700; font-size: 0.86rem; }
.nc-doc-row .nc-doc-meta { font-size: 0.76rem; color: var(--nc-text-muted); }
.nc-doc-row .nc-doc-dl { margin-left: auto; color: var(--nc-text-muted); }

/* ==========================================================================
   Constructor de formularios (Formularios → Nuevo formulario)
   ========================================================================== */
.nc-builder-shell { display: grid; grid-template-columns: 200px 1fr 260px; gap: 16px; align-items: flex-start; }
@media (max-width: 1100px) { .nc-builder-shell { grid-template-columns: 1fr; } }

.nc-component-list { display: flex; flex-direction: column; gap: 4px; }
.nc-component-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--nc-radius-sm);
  font-size: 0.85rem; color: var(--nc-text);
  border: 1px solid transparent;
  cursor: pointer;
}
.nc-component-item:hover { background: var(--nc-muted-bg); }
.nc-component-item i { color: var(--nc-text-muted); width: 16px; text-align: center; }

.nc-builder-canvas-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nc-builder-canvas-head h2 { font-size: 1rem; font-weight: 800; margin: 0; }
.nc-builder-canvas-head p { font-size: 0.78rem; color: var(--nc-text-muted); margin: 2px 0 0; }

.nc-field-card {
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  position: relative;
}
.nc-field-card.is-selected { border-color: var(--nc-accent-strong); box-shadow: 0 0 0 3px var(--nc-accent-soft); }
.nc-field-card .nc-field-type {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--nc-text-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.nc-field-card .nc-field-type .nc-required { color: var(--nc-danger); }
.nc-field-card .nc-field-label { font-weight: 700; margin-bottom: 8px; }
.nc-field-card .nc-field-remove {
  position: absolute; top: 12px; right: 12px; border: none; background: none;
  color: var(--nc-text-muted); cursor: pointer; font-size: 0.95rem;
}
.nc-field-dropzone { border: 2px dashed var(--nc-border-strong); border-radius: var(--nc-radius-md); padding: 34px; text-align: center; color: var(--nc-text-muted); font-size: 0.85rem; }
.nc-field-dropzone i { font-size: 1.5rem; display: block; margin-bottom: 6px; }

.nc-props-panel-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nc-text-muted); margin-bottom: 14px; }
.nc-toggle-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.nc-toggle {
  width: 38px; height: 22px; border-radius: 999px; background: var(--nc-muted-bg);
  position: relative; cursor: pointer; border: none; flex-shrink: 0;
}
.nc-toggle.is-on { background: var(--nc-accent); }
.nc-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left 0.15s ease; }
.nc-toggle.is-on::after { left: 18px; }

/* ==========================================================================
   Vista previa de reporte
   ========================================================================== */
.nc-report-preview { padding: 0; overflow: hidden; }
.nc-report-preview-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--nc-border);
  font-size: 0.78rem; color: var(--nc-text-muted); font-weight: 600;
}
.nc-report-preview-bar .nc-dot-lg { width: 9px; height: 9px; border-radius: 50%; }
.nc-report-preview-body { padding: 26px 30px; }
.nc-report-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 18px; }
.nc-report-stat { background: var(--nc-success-bg); border-radius: var(--nc-radius-sm); padding: 10px; text-align: center; }
.nc-report-stat .nc-report-stat-value { font-size: 1.2rem; font-weight: 800; color: var(--nc-success); }
.nc-report-stat .nc-report-stat-label { font-size: 0.7rem; color: var(--nc-text-muted); margin-top: 2px; }
.nc-report-activity-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 0.85rem; border-bottom: 1px solid var(--nc-border); }
.nc-report-activity-row:last-child { border-bottom: none; }

/* ==========================================================================
   Editor de plantilla de actividades (Servicios > Editar)
   ========================================================================== */
.nc-plantilla-head { display: flex; align-items: center; gap: 8px; }
.nc-plantilla-head .nc-input { flex: 1; min-width: 0; }
.nc-plantilla-evidencias {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  margin-top: 10px; font-size: 0.84rem;
}
.nc-plantilla-evidencias label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.nc-plantilla-evidencias input { accent-color: var(--nc-accent-strong); }

/* ==========================================================================
   Registro y planes
   ========================================================================== */
.nc-auth-form.nc-register-form { max-width: 460px; }
.nc-plan-options { display: grid; gap: 8px; }
.nc-plan-option { align-items: flex-start; }
.nc-plan-option input { margin-top: 3px; }

.nc-planes-page { max-width: 1120px; margin: 0 auto; padding: 40px 24px 80px; }
.nc-planes-head { text-align: center; margin-bottom: 32px; }
.nc-planes-head h1 { font-size: 1.8rem; font-weight: 800; margin: 0 0 8px; }
.nc-planes-head p { color: var(--nc-text-muted); font-size: 0.92rem; max-width: 620px; margin: 0 auto; }
.nc-planes-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
@media (max-width: 960px) { .nc-planes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .nc-planes-grid { grid-template-columns: 1fr; } }
.nc-plan-card { position: relative; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.nc-plan-card.is-featured { border-color: var(--nc-accent-strong); box-shadow: 0 0 0 3px var(--nc-accent-soft); }
.nc-plan-card h2 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.nc-plan-badge {
  position: absolute; top: -11px; left: 20px;
  background: var(--nc-accent-strong); color: #fff;
  font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.nc-plan-price { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.nc-plan-price span { font-size: 0.85rem; font-weight: 600; color: var(--nc-text-muted); }
.nc-plan-highlights { list-style: none; padding: 0; margin: 0 0 4px; flex: 1; font-size: 0.86rem; }
.nc-plan-highlights li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; }
.nc-plan-highlights i { color: var(--nc-accent-strong); }
.nc-planes-subtitle { font-size: 1.1rem; font-weight: 800; margin: 0 0 12px; }
.nc-planes-table td, .nc-planes-table th { text-align: center; }
.nc-planes-table td:first-child, .nc-planes-table th:first-child { text-align: left; }
.nc-plan-yes { color: var(--nc-accent-strong); font-size: 1.1rem; }
.nc-plan-no { color: var(--nc-text-muted); }

/* ==========================================================================
   Páginas legales (Privacidad)
   ========================================================================== */
.nc-legal { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; line-height: 1.6; }
.nc-legal h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 4px; }
.nc-legal h2 { font-size: 1.02rem; font-weight: 800; margin: 28px 0 6px; }
.nc-legal p { font-size: 0.92rem; margin: 0 0 10px; }


/* ==========================================================================
   Ejecución de hojas de trabajo (detalle de hoja y de actividad)
   ========================================================================== */
.nc-detail-actions form { display: contents; }
.nc-btn[disabled] { opacity: 0.5; cursor: not-allowed; filter: none; }

.nc-hoja-resumen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 992px) { .nc-hoja-resumen { grid-template-columns: 1fr; } }
.nc-hoja-split, .nc-actividad-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 992px) { .nc-hoja-split, .nc-actividad-split { grid-template-columns: 1fr; } }

.nc-hoja-actividades { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.nc-hoja-actividad {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--nc-border); border-radius: var(--nc-radius-sm);
  padding: 12px 14px; color: var(--nc-text);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.nc-hoja-actividad:hover { border-color: var(--nc-accent-strong); background: var(--nc-accent-soft); color: var(--nc-text); }
.nc-hoja-faltantes { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 0.75rem; color: var(--nc-warning); }
.nc-hoja-agregar { display: flex; gap: 8px; }
.nc-hoja-agregar .nc-input { flex: 1; min-width: 0; }

.nc-evidencias-requeridas { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 16px; }
.nc-evidencia-tabs { margin-bottom: 12px; overflow-x: auto; flex-wrap: nowrap; }
.nc-evidencia-tabs .nc-tab { white-space: nowrap; }
.nc-evidencia-form { display: grid; gap: 10px; margin-bottom: 18px; }
.nc-evidencia-form[hidden] { display: none; }
.nc-dropzone-input { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 24px; }
.nc-dropzone-input input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.nc-dropzone-input { position: relative; }
.nc-dropzone-input:hover { border-color: var(--nc-accent-strong); color: var(--nc-text); }
.nc-firma-canvas {
  width: 100%; height: auto; aspect-ratio: 600 / 220;
  background: #fff; border: 1px dashed var(--nc-border-strong); border-radius: var(--nc-radius-sm);
  touch-action: none; cursor: crosshair;
}

.nc-evidencias-titulo { font-size: 0.85rem; font-weight: 800; margin: 6px 0 10px; }
.nc-evidencias-lista { display: grid; gap: 8px; }
.nc-evidencia-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--nc-border); border-radius: var(--nc-radius-sm); padding: 8px 10px;
}
.nc-evidencia-item[hidden] { display: none; }
.nc-evidencia-thumb { flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--nc-muted-bg); }
.nc-evidencia-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nc-evidencia-icono {
  flex: none; width: 56px; height: 56px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: var(--nc-success-bg); color: var(--nc-success);
}
.nc-comentario-texto { font-size: 0.86rem; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }

@media (max-width: 768px) {
  .nc-list-toolbar { flex-direction: column; align-items: stretch; }
  .nc-search { min-width: 0; width: 100%; }
}

/* Documento de cierre (garantía / certificado) en el detalle de la hoja */
.nc-documento-cierre { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.nc-documento-icono {
  flex: none; width: 44px; height: 44px; border-radius: 10px; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--nc-accent-soft); color: var(--nc-accent-strong);
}
.nc-documento-codigo { font-family: Consolas, monospace; font-size: 0.85rem; color: var(--nc-text-muted); margin-left: 6px; }
.nc-documento-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.nc-documento-acciones form { display: contents; }
.nc-documento-cierre code { font-size: 0.8rem; background: var(--nc-muted-bg); padding: 1px 6px; border-radius: 4px; }

/* Login: los bloques (formulario, Google, pie) van apilados en una sola columna.
   Antes eran hijos directos de .nc-auth-main (flex en fila) y quedaban lado a lado. */
.nc-auth-stack { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.nc-auth-stack .nc-auth-form { max-width: none; }
.nc-auth-stack .nc-auth-divider { margin: 6px 0; max-width: none; width: 100%; }
.nc-auth-footer .nc-auth-hint { margin-top: 6px; }
.nc-auth-footer .nc-auth-back { margin-top: 4px; }
.nc-field-head a { white-space: nowrap; }

/* Campos de formularios dinámicos */
.nc-campo-evidencia { font-size: 0.82rem; color: var(--nc-text-muted); padding: 10px 12px; border: 1px dashed var(--nc-border-strong); border-radius: var(--nc-radius-sm); }
.nc-campo-valor { font-size: 0.9rem; padding: 6px 0; overflow-wrap: anywhere; }

/* Constructor de formularios (campos editables) */
button.nc-component-item { background: none; width: 100%; text-align: left; cursor: pointer; font: inherit; }
.nc-campo { position: relative; padding: 12px 14px; }
.nc-campo-head { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
@media (max-width: 600px) { .nc-campo-head { grid-template-columns: 1fr; } }
.nc-campo-props { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 10px; font-size: 0.83rem; }
.nc-campo-check { display: inline-flex; align-items: center; gap: 6px; }
.nc-campo-check[hidden], .nc-campo-opciones[hidden] { display: none; }
.nc-input-sm { padding: 5px 8px; font-size: 0.82rem; width: auto; }
.nc-campo-opciones { margin-top: 10px; resize: vertical; }

.nc-reporte-periodo { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Configuración */
.nc-fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
.nc-btn-sm { padding: 6px 10px; font-size: 0.8rem; }
.nc-logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nc-logo-preview {
  width: 72px; height: 72px; border-radius: 10px; background: var(--nc-muted-bg); flex: none;
  display: flex; align-items: center; justify-content: center; color: var(--nc-text-muted); font-size: 1.4rem; overflow: hidden;
}
.nc-logo-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.nc-logo-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nc-logo-form .nc-input { max-width: 280px; padding: 7px 10px; }
.nc-alerta-fila { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--nc-border); flex-wrap: wrap; }
.nc-alerta-fila:last-of-type { border-bottom: none; }
.nc-alerta-opciones { display: flex; gap: 16px; font-size: 0.85rem; }
.nc-integracion { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--nc-border); flex-wrap: wrap; }
.nc-integracion:last-child { border-bottom: none; }
.nc-integracion-icono {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--nc-accent-soft); color: var(--nc-accent-strong);
}

/* Validación en vivo de cédula / RUC */
.nc-ec-aviso:empty { display: none; }
.nc-ec-aviso.is-error { color: var(--nc-danger); }
.nc-ec-aviso.is-ok { color: var(--nc-success); }

/* ===== Selector de cuenta en el login ===== */
.nc-cuentas-lista { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 14px; }
.nc-cuenta-opcion {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--nc-border-strong); border-radius: var(--nc-radius-sm);
  background: var(--nc-surface); color: var(--nc-text); font: inherit; cursor: pointer;
}
.nc-cuenta-opcion:hover { border-color: var(--nc-accent-strong); background: var(--nc-accent-soft); }
.nc-cuenta-opcion > .bi:first-child { font-size: 1.2rem; color: var(--nc-accent-strong); }
.nc-cuenta-opcion span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nc-cuenta-opcion small { color: var(--nc-text-muted); font-size: 0.8rem; }

/* ===== Portal de clientes ===== */
.nc-portal-brand { flex-direction: column; align-items: flex-start; gap: 2px; }
.nc-portal-empresa { font-size: 1rem; line-height: 1.25; }
.nc-portal-etiqueta { font-family: var(--nc-font-body, inherit); font-weight: 600; font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--nc-text-on-dark-muted); }
.nc-portal-powered { font-size: 0.7rem; color: var(--nc-text-on-dark-muted); padding: 8px 8px 0; }
.nc-portal-kpis { margin-bottom: 20px; }
.nc-portal-hojas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.nc-portal-hoja { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; color: var(--nc-text); transition: border-color .15s; }
.nc-portal-hoja:hover { border-color: var(--nc-accent-strong); color: var(--nc-text); }
.nc-portal-hoja[hidden] { display: none !important; }
.nc-portal-hoja-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.nc-portal-actividades { display: flex; flex-direction: column; }
.nc-portal-actividad { padding: 12px 0; border-top: 1px solid var(--nc-border); }
.nc-portal-actividad:first-child { border-top: none; }
.nc-portal-actividad-head { display: flex; align-items: center; gap: 10px; }
.nc-portal-evidencias { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 26px; }
.nc-portal-evidencia-link {
  display: inline-flex; align-items: center; gap: 6px; height: 56px; padding: 0 12px;
  border: 1px solid var(--nc-border-strong); border-radius: 8px; font-size: 0.82rem;
}
.nc-portal-datos { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 12px 0 0; font-size: 0.9rem; }
.nc-portal-datos dt { color: var(--nc-text-muted); font-weight: 500; }
.nc-portal-datos dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ===== Manual y soporte ===== */
.nc-manual-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.nc-manual-indice { padding: 16px; position: sticky; top: 16px; }
.nc-manual-indice-titulo { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nc-text-muted); margin-bottom: 10px; }
.nc-manual-indice .nc-search { width: 100%; }
.nc-manual-indice .nc-search input { width: 100%; }
.nc-manual-indice ol { margin: 0; padding-left: 20px; font-size: 0.88rem; line-height: 1.9; }
.nc-manual { font-size: 0.93rem; line-height: 1.65; }
.nc-manual section + section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--nc-border); }
.nc-manual section { scroll-margin-top: 16px; }
.nc-manual h2 { font-size: 1.25rem; margin: 0 0 10px; }
.nc-manual h3 { font-size: 1rem; margin: 18px 0 6px; }
.nc-manual p { margin: 0 0 10px; }
.nc-manual ul, .nc-manual ol { margin: 0 0 10px; padding-left: 22px; }
.nc-manual li + li { margin-top: 4px; }
.nc-manual-tabla { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 0.86rem; display: block; overflow-x: auto; }
.nc-manual-tabla th, .nc-manual-tabla td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--nc-border); }
.nc-manual-tabla th { background: var(--nc-muted-bg); font-weight: 600; }
.nc-soporte-texto { white-space: pre-line; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.nc-soporte-respuesta { margin-top: 8px; padding: 10px 12px; border-radius: var(--nc-radius-sm); background: var(--nc-accent-soft); font-size: 0.86rem; }
textarea.nc-input { resize: vertical; min-height: 110px; font: inherit; }

@media (max-width: 900px) {
  .nc-manual-shell { grid-template-columns: 1fr; }
  .nc-manual-indice { position: static; }
}
