:root {
  --ink: #0f1d16;
  --muted: #5f6f66;
  --surface: #fbfdfa;
  --surface-strong: #f1f6ee;
  --white: #ffffff;
  --deep: #06120b;
  --green: #10924a;
  --green-strong: #0c7a3d;
  --leaf: #7bc24a;
  --leaf-soft: #eaf5e0;
  --mint: #dcefe4;
  --teal: #14726d;
  --line: rgba(15, 29, 22, 0.09);
  --line-strong: rgba(15, 29, 22, 0.14);
  --shadow-sm: 0 1px 2px rgba(15, 29, 22, 0.04);
  --shadow-md: 0 18px 50px rgba(15, 29, 22, 0.08);
  --shadow-lg: 0 30px 80px rgba(6, 18, 11, 0.28);
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --maxw: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.02rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Header / hero ---------- */

.site-header {
  position: relative;
  min-height: 96vh;
  color: var(--white);
  background:
    linear-gradient(102deg, rgba(6, 18, 11, 0.95) 0%, rgba(6, 18, 11, 0.78) 46%, rgba(6, 18, 11, 0.18) 82%),
    url("assets/hero-software.jpg") center / cover no-repeat;
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--maxw), calc(100% - 48px));
  min-height: 104px;
  margin: 0 auto;
  padding-top: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 56px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.brand-name {
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.005em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.nav-links a {
  position: relative;
  transition: color 160ms ease;
}

.nav-links a::after {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--leaf);
  content: "";
  transition: width 200ms ease;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  backdrop-filter: blur(6px);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  width: min(var(--maxw), calc(100% - 48px));
  min-height: calc(96vh - 104px);
  margin: 0 auto;
  padding: 72px 0 84px;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--leaf);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.section-heading .eyebrow {
  color: var(--green);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 26px;
  font-size: clamp(2.7rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.8vw, 3.15rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.16rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.hero-copy {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  font-weight: 350;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button.primary {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 10px 24px rgba(16, 146, 74, 0.28);
}

.button.primary:hover {
  background: var(--green-strong);
  box-shadow: 0 14px 30px rgba(16, 146, 74, 0.34);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.button.secondary:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.button.full {
  width: 100%;
  min-height: 56px;
}

.button.whatsapp-inline {
  color: var(--white);
  background: #1eb457;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.24);
}

.button.whatsapp-inline:hover {
  background: #17a04c;
}

.button.whatsapp-inline svg {
  width: 22px;
  height: 22px;
}

/* ---------- Hero card ---------- */

.hero-card {
  position: absolute;
  right: 0;
  bottom: 46px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  align-items: center;
  width: min(360px, 100%);
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(6, 18, 11, 0.55);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 46px;
}

.hero-card strong {
  display: block;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.hero-card span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ---------- Sections ---------- */

.section {
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
  padding: 108px 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 52px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 72px;
}

.intro .section-heading {
  margin-bottom: 0;
}

.intro-text {
  display: grid;
  gap: 20px;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 350;
}

/* ---------- Services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.service-grid article {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.service-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 146, 74, 0.28);
  box-shadow: var(--shadow-md);
}

.service-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 350;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 26px;
  border-radius: 15px;
  color: var(--green);
  background: var(--leaf-soft);
}

.icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-grid article:nth-child(2) .icon {
  color: var(--teal);
  background: #dcefee;
}

.service-grid article:nth-child(3) .icon {
  color: #b26a12;
  background: #f7ecd9;
}

.service-grid article:nth-child(4) .icon {
  color: var(--green-strong);
  background: var(--mint);
}

/* ---------- Sectors ---------- */

.sectors {
  width: 100%;
  padding-right: max(24px, calc((100% - var(--maxw)) / 2));
  padding-left: max(24px, calc((100% - var(--maxw)) / 2));
  background:
    radial-gradient(circle at 86% 12%, rgba(123, 194, 74, 0.14), transparent 40%),
    var(--surface-strong);
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.sector-grid article {
  min-height: 150px;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.sector-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.sector-grid h3 {
  position: relative;
  padding-top: 20px;
}

.sector-grid h3::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: var(--leaf);
  content: "";
}

.sector-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 350;
}

/* ---------- Method ---------- */

.method {
  width: 100%;
  padding: 116px max(24px, calc((100% - var(--maxw)) / 2));
  color: var(--white);
  background:
    linear-gradient(150deg, rgba(6, 18, 11, 0.97), rgba(11, 48, 29, 0.95)),
    url("assets/hero-software.jpg") center / cover no-repeat;
}

.method-inner {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(360px, 1.15fr);
  gap: 80px;
  align-items: start;
}

.method .section-heading {
  margin-bottom: 0;
}

.method h2 {
  color: var(--white);
}

.method-lead {
  margin-top: 26px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.1rem;
  font-weight: 350;
}

.method-list {
  display: grid;
  counter-reset: step;
}

.method-list article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 26px;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.method-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.method-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(123, 194, 74, 0.4);
  border-radius: 50%;
  color: var(--leaf);
  font-size: 1rem;
  font-weight: 650;
  counter-increment: step;
}

.method-list span::before {
  content: counter(step, decimal-leading-zero);
}

.method-step {
  margin-bottom: 6px;
  color: var(--leaf);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.method-list h3 {
  margin-bottom: 8px;
  color: var(--white);
}

.method-list p {
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 350;
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 72px;
  align-items: start;
}

.contact-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 350;
}

.contact-form {
  display: grid;
  gap: 20px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: #2b4034;
  font-size: 0.9rem;
  font-weight: 600;
}

.field-label {
  display: inline;
}

.label-hint {
  color: var(--muted);
  font-weight: 400;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 13px 15px;
  color: var(--ink);
  background: #fbfdf9;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #9aa79f;
}

.contact-form select {
  appearance: none;
  padding-right: 46px;
  cursor: pointer;
  font-weight: 500;
  color: #31483a;
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  pointer-events: none;
  content: "";
  transform: translateY(-65%) rotate(45deg);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(16, 146, 74, 0.12);
}

.privacy-check {
  display: grid !important;
  grid-template-columns: 20px 1fr;
  gap: 12px !important;
  align-items: start;
  color: var(--muted) !important;
  font-size: 0.86rem !important;
  font-weight: 400 !important;
}

.privacy-check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--green);
}

.privacy-check a,
.legal-links a,
.legal-back {
  color: var(--green);
  font-weight: 600;
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 60px 24px;
  color: rgba(255, 255, 255, 0.66);
  background: var(--deep);
  text-align: center;
}

.footer-brand {
  gap: 13px;
}

.footer-brand .brand-mark {
  width: 48px;
  height: 48px;
}

.footer-brand .brand-name {
  font-size: 1.6rem;
}

.site-footer p {
  margin-bottom: 0;
  font-weight: 350;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 0.9rem;
}

.legal-links a {
  color: rgba(255, 255, 255, 0.82);
}

.legal-links a:hover {
  color: var(--leaf);
}

/* ---------- Legal pages ---------- */

.legal-page {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 100px;
}

.legal-page h1 {
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin-bottom: 18px;
}

.legal-page > p:first-of-type {
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 350;
}

.legal-page h2 {
  margin-top: 40px;
  margin-bottom: 10px;
  font-size: 1.22rem;
  font-weight: 650;
}

.legal-page p {
  color: var(--muted);
  font-weight: 350;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 34px;
  font-size: 0.95rem;
}

.legal-back::before {
  content: "\2190";
  font-weight: 700;
}

.legal-note {
  margin-top: 8px;
  padding: 16px 18px;
  border: 1px dashed rgba(16, 146, 74, 0.4);
  border-radius: 14px;
  background: var(--leaf-soft);
  color: #3c5340 !important;
  font-size: 0.92rem;
}

/* ---------- WhatsApp float ---------- */

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--white);
  background: #25d366;
  box-shadow: 0 14px 34px rgba(6, 18, 11, 0.3);
  transition: transform 180ms ease;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.04);
}

.whatsapp-float svg {
  width: 34px;
  height: 34px;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .site-header {
    min-height: 820px;
    background:
      linear-gradient(180deg, rgba(6, 18, 11, 0.96) 0%, rgba(6, 18, 11, 0.88) 50%, rgba(6, 18, 11, 0.55) 100%),
      url("assets/hero-software.jpg") center / cover no-repeat;
  }

  .nav {
    width: min(100% - 32px, var(--maxw));
    min-height: 88px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(6, 18, 11, 0.97);
    backdrop-filter: blur(12px);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 13px 12px;
  }

  .nav-links a::after {
    display: none;
  }

  .hero {
    width: min(100% - 32px, var(--maxw));
    min-height: 720px;
    padding: 60px 0 40px;
  }

  .hero-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 48px;
  }

  .intro,
  .contact,
  .service-grid,
  .sector-grid,
  .method-inner {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .sector-grid {
    gap: 16px;
  }

  .section {
    width: min(100% - 32px, var(--maxw));
    padding: 80px 0;
  }

  .sectors {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  .method {
    padding: 80px 16px;
  }

  .method-inner {
    gap: 48px;
  }

  .intro,
  .contact {
    gap: 44px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2.7rem;
  }

  .hero-copy,
  .intro-text,
  .contact-copy p:not(.eyebrow) {
    font-size: 1.02rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .service-grid article,
  .sector-grid article,
  .contact-form {
    padding: 24px;
  }
}

/* ==========================================================================
   Showcase de sectores (pestañas + maquetas de producto)
   ========================================================================== */

.showcase-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 34px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.showcase-tabs::-webkit-scrollbar {
  display: none;
}

.stab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.stab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stab:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.stab[aria-selected="true"] {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 8px 20px rgba(16, 146, 74, 0.24);
}

.spanel[hidden] {
  display: none;
}

.spanel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

.spanel-copy .eyebrow {
  color: var(--green);
}

.spanel-copy h3 {
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.sector-lead {
  color: var(--muted);
  font-size: 1.06rem;
  font-weight: 350;
  margin-bottom: 24px;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  color: #33463c;
  font-size: 0.95rem;
  line-height: 1.4;
}

.feature-list li::before {
  position: absolute;
  left: 0;
  top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--leaf-soft);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 900;
  content: "\2713";
}

/* ----- Marco de ventana / app (maquetas) ----- */

.win {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.win-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}

.win-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cdd8cf;
}

.win-dot:nth-child(1) { background: #e6b0a2; }
.win-dot:nth-child(2) { background: #ecd7a6; }
.win-dot:nth-child(3) { background: #bcdcae; }

.win-title {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.win-body {
  padding: 20px;
}

.win-note {
  margin: 12px 20px 18px;
  color: #9aa79f;
  font-size: 0.76rem;
  font-style: italic;
}

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.kpi b {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.kpi span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi.up b { color: var(--green); }

/* Filas tipo grid/listado */
.rows {
  display: grid;
  gap: 8px;
}

.mockrow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.86rem;
}

.mockrow .mr-main {
  font-weight: 600;
  color: var(--ink);
}

.mockrow .mr-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.ok { background: #e2f3e5; color: #14733f; }
.badge.warn { background: #fbeecd; color: #9a6a12; }
.badge.info { background: #dcecef; color: #14726d; }
.badge.mut { background: #eef1ee; color: #61726a; }

/* Barras mini (dentro de maquetas) */
.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding-top: 8px;
}

.mini-bars .mb {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.mini-bars .mb i {
  width: 100%;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--leaf), var(--green));
}

/* Calendario mini */
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal .cd {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.cal .cd.h1 { background: #d9efe0; color: #14733f; }
.cal .cd.h2 { background: #cfe8e6; color: #14726d; }
.cal .cd.h3 { background: #fbe7cf; color: #9a6a12; }
.cal .cd.dim { opacity: 0.4; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 11px; height: 11px; border-radius: 3px; }

/* Teléfono (apps móviles) */
.win-body.phone-wrap {
  display: flex;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(123,194,74,0.12), transparent 60%),
    var(--surface-strong);
}

.phone {
  width: 190px;
  border: 7px solid #0f1d16;
  border-radius: 26px;
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.phone-top {
  height: 22px;
  background: var(--green);
  position: relative;
}

.phone-top::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 44px;
  height: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.5);
  transform: translateX(-50%);
}

.phone-body { padding: 12px; display: grid; gap: 10px; }

.dish {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.dish-img {
  height: 56px;
  background: linear-gradient(135deg, #cfe6bf, #8bbf6a);
}

.dish-img.b { background: linear-gradient(135deg, #f0d9a8, #d8a24d); }

.dish-txt { padding: 8px 10px; }
.dish-txt b { display: block; font-size: 0.78rem; color: var(--ink); }
.dish-txt span { color: var(--muted); font-size: 0.7rem; }

/* Gráfico ilustrativo (SVG) */
.chart {
  margin: 22px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.chart figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chart figcaption b {
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.chart figcaption span {
  color: #9aa79f;
  font-size: 0.74rem;
  font-style: italic;
  white-space: nowrap;
}

.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .grid { stroke: rgba(15,29,22,0.06); stroke-width: 1; }
.chart .bar { fill: var(--green); }
.chart .bar-lbl { fill: var(--muted); font-size: 9px; font-weight: 600; text-anchor: middle; }
.chart .val-lbl { fill: #33463c; font-size: 9px; font-weight: 700; text-anchor: middle; }

@media (max-width: 960px) {
  .spanel-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

@media (max-width: 560px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kpi { padding: 11px; }
  .kpi b { font-size: 1.15rem; }
  .win-body { padding: 16px; }
}

/* Gráfico agrupado: planificado vs real */
.chart .bar-plan { fill: #c6d7cc; }
.chart .bar-real { fill: var(--green); }

.chart-legend {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.chart-legend i.plan { background: #c6d7cc; }
.chart-legend i.real { background: var(--green); }

/* Aviso destacado dentro de un sector (p. ej. novedad normativa) */
.sector-note {
  display: flex;
  gap: 11px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(16, 146, 74, 0.22);
  border-left: 3px solid var(--green);
  border-radius: 12px;
  background: var(--leaf-soft);
  color: #33463c;
  font-size: 0.9rem;
  line-height: 1.45;
}

.sector-note b { color: var(--green-strong); }

.sector-note svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Rejilla de entornos (suite multi-entorno) */
.envs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.env-tile {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.env-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--green);
  background: var(--leaf-soft);
}

.env-ic svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.env-tile b {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.env-tile span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.env-tile:nth-child(2) .env-ic { color: var(--teal); background: #dcefee; }
.env-tile:nth-child(3) .env-ic { color: #b26a12; background: #f7ecd9; }
.env-tile:nth-child(4) .env-ic { color: var(--green-strong); background: var(--mint); }
.env-tile:nth-child(5) .env-ic { color: var(--teal); background: #dcefee; }
.env-tile:nth-child(6) .env-ic { color: #b26a12; background: #f7ecd9; }

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

/* ==========================================================================
   Entornos / módulos genéricos (transversales a cualquier sector)
   ========================================================================== */
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.module {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.module:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 146, 74, 0.28);
  box-shadow: var(--shadow-md);
}

.module .icon {
  margin-bottom: 18px;
}

.module h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.module p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 350;
  font-size: 0.9rem;
}

.module:nth-child(2) .icon { color: var(--teal); background: #dcefee; }
.module:nth-child(3) .icon { color: #b26a12; background: #f7ecd9; }
.module:nth-child(4) .icon { color: var(--green-strong); background: var(--mint); }
.module:nth-child(6) .icon { color: var(--teal); background: #dcefee; }
.module:nth-child(7) .icon { color: #b26a12; background: #f7ecd9; }
.module:nth-child(8) .icon { color: var(--green-strong); background: var(--mint); }

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

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

/* Bloque de valores (potencia + adaptación + precio) en la intro */
.intro .values {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 20px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.value b {
  position: relative;
  display: block;
  padding-top: 18px;
  margin-bottom: 8px;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.value b::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: var(--leaf);
  content: "";
}

.value p {
  margin: 0;
  color: var(--muted);
  font-weight: 350;
  font-size: 0.98rem;
}

@media (max-width: 760px) {
  .intro .values {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   Sectores como acordeón (desplegables) — reemplaza las pestañas
   ========================================================================== */
.sacc {
  border-top: 1px solid var(--line);
}

.sacc:last-of-type {
  border-bottom: 1px solid var(--line);
}

.sacc-head {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 6px;
  cursor: pointer;
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 160ms ease;
}

.sacc-head::-webkit-details-marker { display: none; }

.sacc-head:hover { color: var(--green); }

.sacc-chev {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 220ms ease, color 160ms ease;
}

.sacc[open] > .sacc-head { color: var(--green); }
.sacc[open] > .sacc-head .sacc-chev { transform: rotate(180deg); color: var(--green); }

.sacc .spanel-grid { padding: 4px 0 40px; }

/* la etiqueta ya la da el título del desplegable */
.sacc .spanel-copy .eyebrow { display: none; }

/* Logo un poco más contenido */
.brand-mark { width: 36px; height: 36px; }
.brand-name { font-size: 1.3rem; }
.footer-brand .brand-mark { width: 44px; height: 44px; }
.footer-brand .brand-name { font-size: 1.45rem; }

/* Nota de sector sin depender del icono para su tamaño */
.sector-note svg { width: 20px; height: 20px; }

/* ==========================================================================
   Menú desplegable "Entornos" en la navegación
   ========================================================================== */
.nav-dd {
  position: relative;
}

.nav-dd > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 550;
  letter-spacing: -0.01em;
  transition: color 160ms ease;
}

.nav-dd > summary::-webkit-details-marker { display: none; }

.nav-dd > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 200ms ease;
}

.nav-dd > summary:hover,
.nav-dd[open] > summary { color: var(--white); }
.nav-dd[open] > summary::after { transform: rotate(-135deg); }

.nav-dd-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  min-width: 236px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(6, 18, 11, 0.97);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  z-index: 6;
}

.nav-dd-menu a {
  padding: 10px 12px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-dd-menu a::after { display: none; }
.nav-dd-menu a:hover { background: rgba(255, 255, 255, 0.09); color: var(--white); }

/* Resaltar el entorno al que se navega desde el menú */
.module { scroll-margin-top: 96px; }
.module:target {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 146, 74, 0.16), var(--shadow-md);
}

@media (max-width: 960px) {
  .nav-dd { width: 100%; }
  .nav-dd > summary {
    justify-content: space-between;
    width: 100%;
    padding: 13px 12px;
    color: rgba(255, 255, 255, 0.82);
  }
  .nav-dd-menu {
    position: static;
    transform: none;
    min-width: 0;
    margin: 2px 0 6px;
    padding: 0 0 0 10px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
}

/* ==========================================================================
   Entornos clicables: cada tarjeta despliega un mini ejemplo (táctil)
   ========================================================================== */
.module-grid { align-items: start; }

.module { padding: 0; }

.module-head {
  list-style: none;
  cursor: pointer;
  display: block;
  padding: 26px 24px 22px;
}

.module-head::-webkit-details-marker { display: none; }

.module-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.module-more::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 200ms ease;
}

.module[open] .module-more::after { transform: rotate(-135deg); }

.module-ex {
  padding: 2px 24px 24px;
  animation: exIn 220ms ease;
}

.module-ex .mini-bars { height: 96px; }

.ex-mini-title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

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

/* Fix: que las mini-barras tengan altura de referencia */
.mini-bars .mb { height: 100%; justify-content: flex-end; }

/* ==========================================================================
   Fix Safari: al fijar 'display' en el contenido de un <details>, Safari deja
   de plegarlo. Se controla el display explícitamente por estado abierto/cerrado.
   ========================================================================== */
.nav-dd-menu { display: none; }
.nav-dd[open] > .nav-dd-menu { display: grid; }

.sacc > .spanel-grid { display: none; }
.sacc[open] > .spanel-grid { display: grid; }

.module > .module-ex { display: none; }
.module[open] > .module-ex { display: block; }

/* ==========================================================================
   Entornos: tarjeta-enlace + captura grande del ERP (se muestra con :target)
   ========================================================================== */
.module-grid { align-items: stretch; }

.module {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
}

.module-more { margin-top: auto; padding-top: 16px; }

.module-more::after {
  content: "→";
  width: auto;
  height: auto;
  border: none;
  transform: none;
  transition: transform 180ms ease;
}

.module:hover { border-color: rgba(16, 146, 74, 0.32); }
.module:hover .module-more::after { transform: translateX(4px); }

.erp-demos { margin-top: 10px; }

.erp-demo { display: none; scroll-margin-top: 96px; }
.erp-demo:target { display: block; animation: exIn 260ms ease; }

.erp {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.erp-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
}

.erp-dot { width: 10px; height: 10px; border-radius: 50%; }
.erp-dot:nth-child(1) { background: #e6b0a2; }
.erp-dot:nth-child(2) { background: #ecd7a6; }
.erp-dot:nth-child(3) { background: #bcdcae; }

.erp-title { margin-left: 8px; color: var(--ink); font-size: 0.88rem; font-weight: 650; }

.erp-close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 700;
}
.erp-close:hover { background: rgba(15, 29, 22, 0.06); color: var(--ink); }

.erp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.erp-crumb { color: var(--muted); font-size: 0.82rem; font-weight: 650; }
.erp-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.erp-btn {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  color: #33463c;
  font-size: 0.8rem;
  font-weight: 650;
}
.erp-btn.primary { background: var(--green); border-color: var(--green); color: var(--white); }

.erp-content { padding: 22px; display: grid; gap: 18px; }

.erp-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.erp-field { display: grid; gap: 5px; }
.erp-col2 { grid-column: span 2; }
.erp-col3 { grid-column: span 3; }
.erp-col4 { grid-column: span 4; }
.erp-field label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.erp-input {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fbfdf9;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
}

.erp-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.erp-table th, .erp-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.erp-table thead th {
  background: var(--surface-strong);
  color: #33463c;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.erp-table td { color: var(--ink); }
.erp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.erp-table .num.pos { color: #14733f; font-weight: 650; }
.erp-table .num.neg { color: #b4453a; font-weight: 650; }
.erp-table tbody tr:hover { background: rgba(16, 146, 74, 0.035); }
.erp-table tfoot td { font-weight: 700; background: var(--surface); border-bottom: none; }

.erp-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.erp-tab {
  padding: 9px 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.erp-tab.active { color: var(--green); border-bottom-color: var(--green); }

.erp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.erp-card { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.erp-card b { display: block; font-size: 0.9rem; margin-bottom: 6px; }
.erp-muted2 { display: block; color: var(--muted); font-size: 0.82rem; margin-bottom: 12px; }
.erp-chip {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--leaf-soft);
  color: var(--green-strong);
  font-size: 0.78rem;
  font-weight: 650;
}

.erp-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.erp-muted { color: #9aa79f; font-size: 0.78rem; font-style: italic; }

@media (max-width: 760px) {
  .erp-form { grid-template-columns: 1fr 1fr; }
  .erp-col2, .erp-col3, .erp-col4 { grid-column: span 2; }
  .erp-cards { grid-template-columns: 1fr; }
  .erp-content { padding: 16px; }
  .erp-table { font-size: 0.78rem; }
  .erp-table th, .erp-table td { padding: 8px 9px; }
}

@media (max-width: 520px) {
  .erp-form { grid-template-columns: 1fr; }
  .erp-col2, .erp-col3, .erp-col4 { grid-column: 1; }
  .erp-table .hide-xs { display: none; }
}

/* Gráfico Tesorería (facturado vs gastos) */
.chart .bar-fact { fill: var(--green); }
.chart .bar-gasto { fill: #d8a24d; }
.chart-legend i.fact { background: var(--green); }
.chart-legend i.gasto { background: #d8a24d; }

/* ==========================================================================
   GANTT (Operativa)
   ========================================================================== */
.gantt {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}

.gantt-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
}

.gantt-corner {
  padding: 10px 14px;
  color: #33463c;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gantt-days { display: grid; grid-template-columns: repeat(7, 1fr); }

.gantt-days span {
  padding: 10px 4px;
  text-align: center;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.gantt-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.gantt-row:last-child { border-bottom: none; }

.gantt-task {
  padding: 12px 14px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.gantt-track {
  position: relative;
  height: 46px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 7 - 1px),
      var(--line) calc(100% / 7 - 1px), var(--line) calc(100% / 7));
}

.gantt-bar {
  position: absolute;
  top: 10px;
  height: 26px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(6, 18, 11, 0.14);
}

.gantt-bar.g1 { background: var(--green); }
.gantt-bar.g2 { background: var(--teal); }
.gantt-bar.g3 { background: #c8842f; }

.gantt-key { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.78rem; }
.gantt-key i { width: 11px; height: 11px; border-radius: 3px; }
.gantt-key:nth-child(1) i { background: var(--green); }
.gantt-key:nth-child(2) i { background: var(--teal); }
.gantt-key:nth-child(3) i { background: #c8842f; }

@media (max-width: 560px) {
  .gantt-head, .gantt-row { grid-template-columns: 108px 1fr; }
  .gantt-task { font-size: 0.76rem; padding: 10px; }
  .gantt-bar { font-size: 0.64rem; padding: 0 6px; }
}

/* Enlace a la demo del DeCA (https://deca.natursoft.es/demo) en el sector de transporte */
.sector-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 18px 0 0;
}

.sector-cta span {
  flex: 1 1 220px;
  font-size: 0.92rem;
  opacity: 0.8;
}

/* ----- Apartado DeCA ----- */
.deca-doc {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 2px 2px 4px;
}
.deca-doc-main { display: grid; gap: 9px; min-width: 0; }
.deca-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}
.deca-row:last-child { border-bottom: 0; padding-bottom: 0; }
.deca-k { color: var(--muted); white-space: nowrap; }
.deca-v { color: #1f2e26; font-weight: 600; text-align: right; }
.deca-doc-qr { display: grid; justify-items: center; gap: 7px; }
.deca-qr {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 29, 22, 0.08);
}
.deca-doc-qr span { font-size: 0.72rem; color: var(--muted); text-align: center; }
.deca-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 560px) {
  .deca-doc { grid-template-columns: 1fr; gap: 16px; }
  .deca-doc-qr { justify-items: start; }
  .deca-doc-qr span { text-align: left; }
}
