/* Calculadora de ahorro por automatización (prefijo au-) — usa mm-tools.css */
.au-head { margin-bottom: 10px; }
.au-global { margin: 4px 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.au-global-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: center; }
.au-global-row .help { margin: 0; line-height: 1.5; }
@media (max-width: 560px) { .au-global-row { grid-template-columns: 1fr; gap: 8px; } }
.au .tl-affix.has-pre.has-suf .pg-input { padding-right: 54px; }
.au .pg-field.invalid .pg-input { box-shadow: inset 0 0 0 1px var(--tl-bad); }
.au input[type="number"] { -moz-appearance: textfield; }
.au input[type="number"]::-webkit-inner-spin-button, .au input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Tareas */
.au-tasks { display: grid; gap: 12px; }
.au-task { padding: 14px 16px 16px; border-radius: 20px; background: var(--glass-bg); box-shadow: inset 0 0 0 1px var(--line); transition: opacity .18s, transform .18s; }
.au-task.new { animation: tlIn .45s cubic-bezier(.16,1,.3,1) both; box-shadow: inset 0 0 0 1px rgba(240,54,225,.45); }
.au-task.out { opacity: 0; transform: scale(.98); }
.au-task-h { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; }
.au-name-w { min-width: 0; }
.au-name { width: 100%; min-height: 44px; font: inherit; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--paper); background: transparent; border: 0; border-radius: 12px; padding: 0 10px; outline: none; text-overflow: ellipsis; transition: background .2s, box-shadow .2s; }
.au-name:hover { box-shadow: inset 0 0 0 1px var(--line); }
.au-name:focus { background: var(--glass-bg-strong); box-shadow: inset 0 0 0 1.5px #f036e1; }
.au-task-sum { font-size: 13px; color: var(--tl-acc); white-space: nowrap; }
.au-del { color: var(--paper-faint); }
.au-del:hover { color: var(--tl-bad); }
.au-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.au-fields .pg-field { gap: 6px; }
.au-fields .pg-field label { font-size: 12.5px; color: var(--paper-dim); font-weight: 500; }
.au-fields .pg-input { height: 46px; min-height: 46px; padding: 0 12px; font-size: 14.5px; }
.au-fields .tl-affix.has-pre .pg-input { padding-left: 28px; }
.au-fields .tl-affix > .pre { left: 12px; }
.au-fields .tl-affix > .suf { right: 12px; font-size: 11.5px; }
.au-fields .tl-affix.has-pre.has-suf .pg-input { padding-right: 46px; }
.au-pct { display: grid; grid-template-columns: auto minmax(0, 1fr) 54px; gap: 14px; align-items: center; margin-top: 10px; }
.au-pct label { font-size: 12.5px; color: var(--paper-dim); font-weight: 500; }
.au-pct output { font-size: 14px; text-align: right; color: var(--paper); }
.au .pg-range { height: 44px; margin: 0; cursor: pointer; }
@media (max-width: 1240px) and (min-width: 1041px), (max-width: 700px) { .au-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .au-task { padding: 12px 12px 14px; }
  .au-task-h { grid-template-columns: 36px minmax(0, 1fr) 44px; }
  .au-task-h .pg-ic { width: 36px; height: 36px; }
  .au-task-sum { grid-column: 2; grid-row: 2; padding-left: 10px; margin-top: -6px; }
  .au-del { grid-column: 3; grid-row: 1; }
  .au-pct { grid-template-columns: minmax(0, 1fr) 54px; gap: 0 10px; }
  .au-pct label { grid-column: 1 / -1; }
}

/* Agregar */
.au-add { margin-top: 24px; }
.au-add .tl-h svg { color: var(--tl-acc); }
.au-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.au-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 0; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--paper-dim); cursor: pointer; text-align: left;
  background: var(--glass-bg); box-shadow: inset 0 0 0 1px var(--line); transition: color .2s, background .2s, box-shadow .2s, transform .2s cubic-bezier(.16,1,.3,1); }
.au-chip svg { flex-shrink: 0; color: var(--paper-faint); transition: color .2s; }
.au-chip:hover { color: var(--paper); background: var(--glass-bg-strong); box-shadow: inset 0 0 0 1px var(--line-strong); }
.au-chip:hover svg { color: var(--tl-acc); }
.au-chip:active { transform: scale(.97); }
.au-chip.dashed { background: transparent; box-shadow: none; outline: 1px dashed var(--line-strong); outline-offset: -1px; }
.au-chip.dashed:focus-visible { outline: 2px solid #f036e1; }
.au-inv { margin-top: 26px; }
.au-inv-note { margin: 12px 0 18px; }
.au-jornada .pg-label small { font-weight: 400; color: var(--paper-faint); margin-left: 6px; }
@media (max-width: 420px) { .au-jornada .tl-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; } .au-jornada .tl-seg button { padding: 0 8px; } }

/* Resultado */
.au-year { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.au-cur { font-family: 'JetBrains Mono', monospace; font-size: max(12px, .3em); letter-spacing: .06em; color: var(--paper-faint); }
.au-net { font-size: 12.5px; color: var(--paper-dim); margin: 10px 0 22px; line-height: 1.5; }
.au-kpis dd small { font-size: 11.5px; }
.au-kpis .is-good dd { color: var(--tl-ok); }
.au-kpis .is-warn dd { color: var(--tl-warn); }
.au-bad { color: var(--tl-bad); font-size: 15px; }
.au-bars-h { margin: 26px 0 14px; }
.au-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.au-bars li { display: grid; gap: 6px; animation: tlIn .4s cubic-bezier(.16,1,.3,1) both; }
.au-bar-l { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--paper-dim); }
.au-bar-l span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-bar-l b { font-weight: 500; color: var(--paper); font-size: 13.5px; white-space: nowrap; }
.au-bar { display: block; height: 8px; border-radius: 99px; background: var(--glass-bg-strong); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.au-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9149ff, #f036e1); transform-origin: left; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.au-bars small { font-size: 11.5px; color: var(--paper-faint); }
.au-actions { margin: 24px 0 14px; }
@media (max-width: 420px) { .au-actions .tl-btn { flex: 1 1 auto; } }
@media (prefers-reduced-motion: reduce) { .au-bar i { transition: none; } .au-bars li, .au-task.new { animation: none; } }

/* Recetas */
.au-recipes { grid-column: 1 / -1; }
.au-rec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 40px; align-items: end; margin-bottom: 24px; }
.au-rec-head .tl-sub { margin: 0; }
.au-rec-title { font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
@media (max-width: 900px) { .au-rec-head { grid-template-columns: 1fr; } }
.au-rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.au-rec { display: flex; flex-direction: column; padding: 20px; border-radius: 20px; background: var(--glass-bg-strong); box-shadow: inset 0 0 0 1px var(--line); animation: tlIn .45s cubic-bezier(.16,1,.3,1) both; }
.au-rec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.au-rec-h h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.au-flow { list-style: none; margin: 0 0 4px; padding: 0; display: grid; }
.au-flow li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 6px 0; font-size: 13.5px; color: var(--paper-dim); line-height: 1.45; }
.au-flow li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--ink); position: relative; z-index: 1; }
.au-flow li:not(:last-child)::before { content: ""; position: absolute; left: 11.5px; top: 30px; bottom: -6px; width: 1px; background: var(--line-strong); }
.au-flow li:first-child span { background: linear-gradient(135deg, #f036e1, #9149ff); color: #fff; box-shadow: none; }
.au-rec-f { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.au-rec-f a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 13.5px; font-weight: 500; color: var(--paper); text-decoration: none; transition: gap .25s, color .2s; }
.au-rec-f a:hover { gap: 10px; color: var(--tl-acc); }
.au-rec .pg-tags span { font-size: 11.5px; }

/* Ajustes */
textarea.au-name { display: block; resize: none; overflow: hidden; line-height: 1.3; padding: 11px 10px; height: 44px; white-space: normal; }
.au-bars li, .au-bar-l { min-width: 0; }
.au-bars { grid-template-columns: minmax(0, 1fr); }
.au-net { font-family: inherit; font-size: 13px; }
.au-jornada .tl-seg { align-self: flex-start; }

/* Barra fija (≤ 1040 px) */
.au-sticky { position: fixed; left: 12px; right: 88px; bottom: 16px; z-index: 60; display: none; align-items: center; gap: 4px 12px; flex-wrap: wrap; min-height: 56px; padding: 8px 16px; border-radius: 18px; text-decoration: none; color: #f4eef6;
  background: rgba(22,16,26,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 40px -16px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.12);
  transform: translateY(140%); transition: transform .4s cubic-bezier(.16,1,.3,1); }
.au-sticky.show { transform: none; }
.au-sticky-l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(244,238,246,.6); width: 100%; }
.au-sticky b { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.au-sticky b small { font-size: 11.5px; color: rgba(244,238,246,.6); letter-spacing: 0; }
.au-sticky-go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #f79bf0; }
@media (max-width: 1040px) { .au-sticky { display: flex; } }
@media (max-width: 1040px) and (min-width: 600px) { .au-sticky { left: 50%; right: auto; width: 440px; margin-left: -220px; } }
@media (prefers-reduced-motion: reduce) { .au-sticky { transition: none; } }
@media print { .au-sticky { display: none !important; } }
