/* Estilos compartidos por todos los paneles: colores, textos, botones, campos, tablas y tarjetas. */

:root {
  /* Paleta de colores de la demostración de flujo completo */
  --ink: #123d2b;
  --ink-2: #526b5b;
  --ink-3: #6f877a;
  --ink-4: #8a9d90;
  --forest: #103c2b;
  --forest-2: #174a30;
  --brand: #087847;
  --brand-2: #065f39;
  --brand-3: #26a45b;
  --leaf: #58b979;
  --lime: #d1f0d8;
  --mint: #eaf4ec;
  --mint-2: #d7efdd;
  --bg: #f2f8f4;
  --card: #ffffff;
  --line: #dce9df;
  --line-2: #c8dccd;
  --line-soft: #edf1eb;
  --track: #e7eee5;
  --amber-bg: #fbf0d9;
  --amber: #805c1c;
  --blue-bg: #e1f2e5;
  --blue: #17653b;
  --gray-bg: #edf2ed;
  --gray: #586b5d;
  --red-bg: #f8e6e0;
  --red: #984538;
  --violet-bg: #eee9f2;
  --violet: #68567a;
  --shadow: 0 8px 26px rgba(18, 61, 43, 0.055);
  --grad-brand: linear-gradient(135deg, #087847, #26a45b);
  --grad-hero: linear-gradient(120deg, #103c2b, #087847 70%, #168b53);
  --grad-bar: linear-gradient(90deg, #58b979, #087847);
  --side: 248px;
  --r: 19px;
  --r-sm: 10px;
  --font: "DM Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-head: "Manrope", "DM Sans", "Segoe UI", system-ui, Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font-head);
}
h1 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--forest-2);
  letter-spacing: -0.01em;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}
.muted {
  color: var(--ink-2);
}
.loading {
  display: grid;
  place-items: center;
  min-height: 100vh;
  color: var(--ink-2);
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(8, 120, 71, 0.18);
  transition:
    filter 0.15s,
    background 0.15s,
    border-color 0.15s;
}
button:hover,
.button:hover {
  filter: brightness(1.07);
  text-decoration: none;
}
button.small {
  padding: 7px 12px;
  font-size: 13px;
}
.button.ghost,
button.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.button.ghost:hover,
button.ghost:hover {
  background: var(--mint);
  filter: none;
}
.link-button {
  background: none;
  border: 0;
  color: var(--ink-2);
  padding: 4px;
  font-weight: 500;
  box-shadow: none;
}
.link-button:hover {
  background: none;
  color: var(--brand);
  filter: none;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
input,
select,
textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 400;
}
textarea {
  resize: vertical;
  min-height: 70px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent);
  border-color: var(--brand);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237b8b84' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
form.inline {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 14px;
}
form.inline label {
  flex: 1;
  min-width: 160px;
}
form.inline select {
  min-width: 200px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--gray-bg);
  color: var(--gray);
  transition:
    background 0.3s,
    color 0.3s;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.green {
  background: var(--mint-2);
  color: var(--brand-2);
}
.badge.blue {
  background: var(--blue-bg);
  color: var(--blue);
}
.badge.amber {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge.red {
  background: var(--red-bg);
  color: var(--red);
}
.badge.purple {
  background: var(--violet-bg);
  color: var(--violet);
}
.badge.gray {
  background: var(--gray-bg);
  color: var(--gray);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mint-2);
  color: var(--brand-2);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12px;
  flex: none;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.panel,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 26px;
  box-shadow: var(--shadow);
}
.panel > h2,
.card > h2 {
  margin-bottom: 4px;
}
.sub {
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 16px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 22px;
}
.track {
  height: 8px;
  border-radius: 20px;
  background: var(--track);
  overflow: hidden;
}
.track i {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--grad-bar);
  border-radius: inherit;
  transition: width 0.8s ease;
}
.track.amber i {
  background: linear-gradient(90deg, #d9b45f, #a8751c);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  background: var(--bg);
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  padding: 10px 14px;
}
thead th:first-child {
  border-radius: 8px 0 0 8px;
}
thead th:last-child {
  border-radius: 0 8px 8px 0;
}
tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #f5faf6;
}
td small {
  display: block;
  color: var(--ink-3);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-grid > button {
  justify-self: start;
}
.callout {
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  background: var(--blue-bg);
  color: var(--blue);
}
.callout b {
  display: block;
  margin-bottom: 2px;
}
.callout svg {
  flex: none;
  margin-top: 2px;
}
.empty {
  color: var(--ink-3);
  padding: 10px 0;
}
.button.small {
  padding: 7px 12px;
  font-size: 13px;
}

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

@media (max-width: 900px) {
  h1 {
    font-size: 26px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Entrada de cada panel: los recuadros suben suavemente, uno tras otro. */
#contenido.entrando :is(.page-head, .feature, .stat, .panel, .soft, .tabs, .obs-list) {
  animation: subirSuave 0.65s cubic-bezier(0.22, 0.61, 0.36, 1) var(--retraso, 0ms) backwards;
}
@keyframes subirSuave {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
