/* ==========================================================================
   MarcaOne — capa de armonización para plantillas heredadas
   Se carga DESPUÉS del <style> de cada página, así que gana en cascada.
   Solo toca tipografía, superficies, radios, foco y detalles; no layout.
   ========================================================================== */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  background: #F3F6F4;
  color: #1F2D26;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  letter-spacing: -.02em;
  color: #0B1511;
}

/* ---------- Header del portal: grafito con acento verde ---------- */
.portal-header {
  background: linear-gradient(135deg, #0B1511 0%, #12301F 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 6px 20px rgba(11, 21, 17, .14);
}

.portal-nav-link { border-radius: 9px !important; }
.portal-nav-link:hover { background: rgba(255, 255, 255, .08) !important; }
.portal-nav-link.active { background: rgba(34, 197, 94, .22) !important; color: #FFFFFF !important; }

.btn-logout { border-radius: 9px !important; }
.btn-logout:hover { background: rgba(255, 255, 255, .16) !important; }

/* ---------- Headers de páginas públicas ---------- */
.top-bar,
.header {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E4EAE6 !important;
  box-shadow: 0 1px 2px rgba(11, 21, 17, .04) !important;
}

/* ---------- Superficies ---------- */
.stat-card,
.table-wrap,
.card,
.modal-box,
.invoice-detail,
.panel {
  border: 1px solid #E4EAE6 !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(11, 21, 17, .05) !important;
}

.stat-card { transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(11, 21, 17, .09) !important;
  border-color: #D3DDD7 !important;
}

/* ---------- Botones ---------- */
.btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
  transition: background .16s ease, box-shadow .16s ease, border-color .16s ease, transform .06s ease !important;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none !important; box-shadow: 0 0 0 3px rgba(26, 107, 60, .18) !important; }

.btn-primary { background: #1A6B3C !important; color: #FFFFFF !important; }
.btn-primary:hover { background: #14532D !important; color: #FFFFFF !important; }

.btn-secondary {
  background: #FFFFFF !important;
  color: #1F2D26 !important;
  border: 1px solid #D3DDD7 !important;
}
.btn-secondary:hover { background: #F7FAF8 !important; }

.btn-success { background: #16A34A !important; color: #FFFFFF !important; }
.btn-success:hover { background: #15803D !important; }

.btn-danger { background: #DC2626 !important; color: #FFFFFF !important; }
.btn-danger:hover { background: #B91C1C !important; }

/* ---------- Formularios ---------- */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-radius: 10px !important;
  border-color: #D3DDD7 !important;
  font-family: inherit !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: #1A6B3C !important;
  box-shadow: 0 0 0 3px rgba(26, 107, 60, .16) !important;
}

/* ---------- Tablas ---------- */
thead th {
  background: #F7FAF8 !important;
  color: #5C6F65 !important;
  letter-spacing: .06em !important;
  border-bottom: 1px solid #E4EAE6 !important;
}
tbody tr:hover td { background: #F7FAF8 !important; }

/* ---------- Badges ---------- */
.badge { border-radius: 999px !important; }

/* ---------- Spinner ---------- */
.spinner {
  border-color: rgba(26, 107, 60, .18) !important;
  border-top-color: #1A6B3C !important;
}

/* ---------- Scrollbars ---------- */
* { scrollbar-width: thin; scrollbar-color: #C6D2CB transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #C6D2CB;
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: #A9B8AF; background-clip: content-box; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
