
    :root {
      --petrol: #0E6E78;
      --petrol-dark: #0A4F57;
      --petrol-soft: #E3F1F2;
      --ink: #1C2B2D;
      --muted: #5E7477;
      --line: #D8E2E3;
      --bg: #F4F7F7;
      --white: #FFFFFF;
      --ok: #1E8E5A;
      --warn: #B7791F;
      --done: #8A9A9C;
      --danger: #C0392B;
      --radius: 10px;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    body {
      font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
      background: var(--bg);
      color: var(--ink);
      font-size: 14px
    }

    button {
      font-family: inherit;
      cursor: pointer
    }

    input,
    select,
    textarea {
      font-family: inherit;
      font-size: 14px;
      color: var(--ink)
    }

    /* ===== App shell ===== */
    .topbar {
      background: var(--petrol);
      color: #fff;
      padding: 14px 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px
    }

    .brand-mark {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: #fff;
      color: var(--petrol);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 16px
    }

    .brand h1 {
      font-size: 17px;
      font-weight: 700;
      letter-spacing: .3px
    }

    .brand small {
      display: block;
      font-size: 11px;
      font-weight: 400;
      opacity: .85;
      letter-spacing: 1.5px;
      text-transform: uppercase
    }

    .topbar .actions {
      display: flex;
      gap: 8px
    }

    .btn {
      border: none;
      border-radius: 8px;
      padding: 9px 16px;
      font-size: 13.5px;
      font-weight: 600
    }

    .btn-primary {
      background: #fff;
      color: var(--petrol)
    }

    .btn-primary:hover {
      background: var(--petrol-soft)
    }

    .btn-ghost {
      background: transparent;
      color: #fff;
      border: 1px solid rgba(255, 255, 255, .5)
    }

    .btn-ghost:hover {
      background: rgba(255, 255, 255, .12)
    }

    .btn-teal {
      background: var(--petrol);
      color: #fff
    }

    .btn-teal:hover {
      background: var(--petrol-dark)
    }

    .btn-outline {
      background: #fff;
      color: var(--petrol);
      border: 1px solid var(--petrol)
    }

    .btn-outline:hover {
      background: var(--petrol-soft)
    }

    .btn-danger {
      background: #fff;
      color: var(--danger);
      border: 1px solid var(--danger)
    }

    .btn-sm {
      padding: 6px 11px;
      font-size: 12.5px
    }

    .paso {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 17px;
      height: 17px;
      border-radius: 50%;
      background: rgba(255, 255, 255, .22);
      font-size: 10.5px;
      font-weight: 800;
      margin-right: 5px;
      vertical-align: middle
    }

    .wrap {
      max-width: 1080px;
      margin: 0 auto;
      padding: 22px 18px 60px
    }

    /* Aislamiento estricto de vistas: solo se despliega la vista activa */
    .wrap > div[id^="view"] {
      display: none;
    }

    /* ===== Lista ===== */
    .filters {
      display: flex;
      gap: 10px;
      align-items: end;
      flex-wrap: wrap;
      margin-bottom: 16px
    }

    .filters .fld {
      display: flex;
      flex-direction: column;
      gap: 4px
    }

    .filters label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .8px;
      color: var(--muted);
      font-weight: 700
    }

    .filters select {
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff
    }

    .stats {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 18px
    }

    .stat {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 12px 18px;
      min-width: 130px
    }

    .stat .n {
      font-size: 22px;
      font-weight: 800;
      color: var(--petrol)
    }

    .stat .l {
      font-size: 11.5px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .6px;
      font-weight: 600
    }

    .card {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow: hidden
    }

    table {
      width: 100%;
      border-collapse: collapse
    }

    th {
      background: var(--petrol-soft);
      color: var(--petrol-dark);
      font-size: 11.5px;
      text-transform: uppercase;
      letter-spacing: .7px;
      text-align: left;
      padding: 10px 12px
    }

    td {
      padding: 11px 12px;
      border-top: 1px solid var(--line);
      vertical-align: middle
    }

    tr.row:hover td {
      background: #F7FBFB
    }

    .folio {
      font-weight: 700;
      color: var(--petrol)
    }

    .badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 20px;
      font-size: 11.5px;
      font-weight: 700
    }

    .b-ficha {
      background: #FCF3E3;
      color: var(--warn)
    }

    .b-aprob {
      background: #E5F5EC;
      color: var(--ok)
    }

    .b-fin {
      background: #EEF1F1;
      color: var(--done)
    }

    .empty {
      padding: 46px 20px;
      text-align: center;
      color: var(--muted)
    }

    .empty b {
      display: block;
      font-size: 15px;
      color: var(--ink);
      margin-bottom: 6px
    }

    /* ===== Formulario ===== */
    .form-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 16px
    }

    .form-head h2 {
      font-size: 19px;
      color: var(--petrol-dark)
    }

    .section {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      margin-bottom: 16px;
      overflow: hidden
    }

    .section>h3 {
      background: var(--petrol-soft);
      color: var(--petrol-dark);
      font-size: 12.5px;
      text-transform: uppercase;
      letter-spacing: .9px;
      padding: 10px 16px
    }

    .section .body {
      padding: 16px
    }

    .grid {
      display: grid;
      gap: 12px
    }

    .g2 {
      grid-template-columns: 1fr 1fr
    }

    .g3 {
      grid-template-columns: 1fr 1fr 1fr
    }

    .fld {
      display: flex;
      flex-direction: column;
      gap: 5px
    }

    .fld label {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .5px
    }

    .fld input,
    .fld select,
    .fld textarea {
      padding: 9px 11px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff
    }

    .fld input:focus,
    .fld select:focus,
    .fld textarea:focus {
      outline: 2px solid var(--petrol);
      outline-offset: -1px;
      border-color: var(--petrol)
    }

    .units {
      display: flex;
      flex-wrap: wrap;
      gap: 8px
    }

    .unit-chip {
      display: flex;
      align-items: center;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 7px 13px;
      font-size: 13px;
      user-select: none;
      background: #fff
    }

    .unit-chip input {
      accent-color: var(--petrol)
    }

    .unit-chip.on {
      background: var(--petrol-soft);
      border-color: var(--petrol);
      color: var(--petrol-dark);
      font-weight: 600
    }

    .radio-row {
      display: flex;
      gap: 16px;
      align-items: center;
      padding-top: 6px
    }

    .radio-row label {
      font-size: 13.5px;
      display: flex;
      gap: 6px;
      align-items: center;
      text-transform: none;
      letter-spacing: 0;
      font-weight: 500;
      color: var(--ink)
    }

    .items-table {
      width: 100%
    }

    .items-table th {
      font-size: 11px;
      padding: 8px 8px
    }

    .items-table td {
      padding: 6px 6px;
      border-top: none
    }

    .items-table input {
      width: 100%;
      padding: 8px 9px;
      border: 1px solid var(--line);
      border-radius: 7px
    }

    .items-table .num {
      text-align: right
    }

    .items-table .rm {
      background: none;
      border: none;
      color: var(--danger);
      font-size: 16px;
      font-weight: 700;
      padding: 4px 8px
    }

    .add-row {
      margin: 10px 0 0;
      background: none;
      border: 1px dashed var(--petrol);
      color: var(--petrol);
      border-radius: 8px;
      padding: 8px 14px;
      font-weight: 600;
      font-size: 13px;
      width: 100%
    }

    .add-row:hover {
      background: var(--petrol-soft)
    }

    .subtotal {
      display: flex;
      justify-content: flex-end;
      gap: 14px;
      align-items: center;
      padding: 10px 6px 0;
      font-size: 14px
    }

    .subtotal b {
      font-size: 16px;
      color: var(--petrol-dark)
    }

    .hint {
      font-size: 12px;
      color: var(--muted);
      margin-top: 6px
    }

    .form-foot {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 4px
    }

    .form-foot .right {
      display: flex;
      gap: 10px;
      flex-wrap: wrap
    }

    /* ===== Ficha imprimible (diseño moderno) ===== */
    #printArea {
      display: none
    }

    @media print {
      body {
        background: #fff
      }

      .app {
        display: none !important
      }

      #printArea {
        display: block
      }

      @page {
        size: letter;
        margin: 12mm
      }

      * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact
      }
    }

    .pf {
      font-family: "Segoe UI", Arial, sans-serif;
      color: #1C2B2D;
      font-size: 11.5px;
      line-height: 1.4
    }

    .pf-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 3px solid #0E6E78;
      padding-bottom: 12px;
      margin-bottom: 16px
    }

    .pf-head img {
      height: 44px
    }

    .pf-head .doc {
      text-align: right
    }

    .pf-head .doc h1 {
      font-size: 15px;
      letter-spacing: 2px;
      color: #0E6E78;
      font-weight: 800;
      text-transform: uppercase
    }

    .pf-head .doc .folio {
      display: inline-block;
      margin-top: 5px;
      background: #0E6E78;
      color: #fff;
      font-weight: 700;
      font-size: 13px;
      padding: 4px 16px;
      border-radius: 16px;
      letter-spacing: 1px
    }

    .pf-meta {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px 20px;
      margin-bottom: 14px
    }

    .pf-meta .m {
      border-bottom: 1px solid #D8E2E3;
      padding: 4px 0 5px
    }

    .pf-meta .m.full {
      grid-column: 1/-1
    }

    .pf-meta .k {
      font-size: 8.5px;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      color: #5E7477;
      font-weight: 700
    }

    .pf-meta .v {
      font-size: 12.5px;
      font-weight: 600;
      margin-top: 1px
    }

    .pf-chips {
      margin-bottom: 14px
    }

    .pf-chips .k {
      font-size: 8.5px;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      color: #5E7477;
      font-weight: 700;
      margin-bottom: 5px
    }

    .pf-chips .chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px
    }

    .pf-chip {
      background: #E3F1F2;
      color: #0A4F57;
      border: 1px solid #0E6E78;
      border-radius: 14px;
      padding: 3px 12px;
      font-size: 10.5px;
      font-weight: 700
    }

    .pf-sec {
      margin-bottom: 13px
    }

    .pf-sec h3 {
      font-size: 10px;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: #fff;
      background: #0E6E78;
      padding: 5px 10px;
      border-radius: 6px 6px 0 0;
      font-weight: 700
    }

    .pf-sec h3.gray {
      background: #5E7477
    }

    .pf-tab {
      width: 100%;
      border-collapse: collapse
    }

    .pf-tab th {
      background: #F0F5F5;
      color: #0A4F57;
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: .8px;
      text-align: left;
      padding: 5px 9px;
      border-bottom: 1px solid #C9D8D9
    }

    .pf-tab td {
      padding: 5px 9px;
      border-bottom: 1px solid #E4ECEC;
      font-size: 11px
    }

    .pf-tab .r {
      text-align: right
    }

    .pf-tab tfoot td {
      background: #F7FAFA;
      font-weight: 800;
      color: #0A4F57;
      border-bottom: none;
      font-size: 11.5px
    }

    .pf-cuadre {
      display: flex;
      gap: 10px;
      margin: 14px 0
    }

    .pf-cuadre .c {
      flex: 1;
      border: 1px solid #D8E2E3;
      border-radius: 8px;
      padding: 8px 12px;
      text-align: center
    }

    .pf-cuadre .c.main {
      background: #0E6E78;
      color: #fff;
      border-color: #0E6E78
    }

    .pf-cuadre .l {
      font-size: 8.5px;
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 700;
      opacity: .8
    }

    .pf-cuadre .n {
      font-size: 15px;
      font-weight: 800;
      margin-top: 2px
    }

    .pf-firmas {
      display: flex;
      justify-content: space-between;
      margin-top: 52px;
      gap: 22px
    }

    /* Parrilla de conceptos (editor) */
    .pauta-grid {
      border-collapse: collapse;
      min-width: 100%;
      font-size: 13px
    }

    .pauta-grid th {
      background: var(--petrol-soft);
      color: var(--petrol-dark);
      font-size: 11px;
      padding: 8px 6px;
      text-align: center;
      border: 1px solid var(--line);
      white-space: nowrap
    }

    .pauta-grid th.lft {
      text-align: left
    }

    .pauta-grid td {
      border: 1px solid var(--line);
      padding: 2px
    }

    .pauta-grid input,
    .pauta-grid select {
      border: none;
      padding: 8px 6px;
      width: 100%;
      font-size: 13px;
      background: transparent
    }

    .pauta-grid select {
      max-width: 250px
    }

    .pauta-grid input:focus,
    .pauta-grid select:focus {
      outline: 2px solid var(--petrol);
      outline-offset: -2px;
      background: #fff
    }

    .pauta-grid .tot {
      background: #F2F6F6;
      text-align: center;
      font-weight: 700;
      color: var(--petrol-dark);
      padding: 8px 10px;
      white-space: nowrap
    }

    .pauta-grid tfoot td {
      background: var(--petrol);
      color: #fff;
      font-weight: 700;
      text-align: center;
      border-color: var(--petrol);
      padding: 8px 4px
    }

    .pauta-grid tfoot td.lft {
      text-align: left;
      padding-left: 10px
    }

    /* Calendario por mes (editor) */
    .cal-mes {
      margin-bottom: 16px;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden
    }

    .cal-t {
      background: var(--petrol);
      color: #fff;
      font-weight: 700;
      font-size: 13px;
      padding: 8px 12px;
      letter-spacing: .5px
    }

    .cal-tab {
      border-collapse: collapse;
      font-size: 12.5px;
      width: 100%
    }

    .cal-tab th {
      background: var(--petrol-soft);
      color: var(--petrol-dark);
      padding: 5px 3px;
      border: 1px solid var(--line);
      font-size: 12px;
      font-weight: 700;
      min-width: 32px
    }

    .cal-tab th.lft {
      text-align: left;
      padding-left: 10px;
      min-width: 180px
    }

    .cal-tab th.dow {
      font-size: 10px;
      font-weight: 400;
      color: var(--muted);
      padding: 2px
    }

    .cal-tab td {
      border: 1px solid var(--line);
      padding: 0;
      text-align: center
    }

    .cal-tab td.lft {
      text-align: left;
      padding: 6px 10px;
      font-size: 12px
    }

    .cal-tab td.cpt {
      font-weight: 600;
      line-height: 1.3
    }

    .cal-tab .sub2 {
      font-weight: 400;
      color: var(--muted);
      font-size: 11px
    }

    .cal-tab input {
      border: none;
      width: 36px;
      padding: 8px 2px;
      text-align: center;
      font-size: 13px;
      font-weight: 700;
      color: var(--petrol);
      background: transparent
    }

    .cal-tab input:focus {
      outline: 2px solid var(--petrol);
      outline-offset: -2px;
      background: #fff
    }

    .cal-tab .tot {
      background: #F2F6F6;
      font-weight: 700;
      color: var(--petrol-dark);
      padding: 6px 10px
    }

    .cal-tab tfoot td {
      background: #EEF4F4;
      font-weight: 700;
      color: var(--petrol-dark);
      font-size: 12px;
      padding: 6px 2px
    }

    .cal-tab tfoot td.lft {
      text-align: left;
      padding-left: 10px
    }

    /* Pauta impresa */
    .pm {
      font-family: "Segoe UI", Arial, sans-serif;
      color: #1C2B2D
    }

    .pm-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 14px
    }

    .pm-head img {
      height: 42px
    }

    .pm-title {
      text-align: right
    }

    .pm-title h1 {
      font-size: 17px;
      font-weight: 800;
      letter-spacing: 1px;
      text-transform: uppercase
    }

    .pm-title .sub {
      font-size: 10.5px;
      font-weight: 700;
      color: #0E6E78;
      margin-top: 2px
    }

    .pm-title .meta {
      font-size: 9px;
      color: #5E7477;
      margin-top: 3px;
      line-height: 1.5
    }

    .cal-blq {
      margin-bottom: 13px;
      break-inside: avoid;
      page-break-inside: avoid
    }

    .cal-blq-t {
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      color: #fff;
      background: #0E6E78;
      padding: 5px 10px;
      border-radius: 5px 5px 0 0
    }

    .pm-tab {
      width: 100%;
      border-collapse: collapse;
      font-size: 10px
    }

    .pm-tab th {
      background: #5E7477;
      color: #fff;
      padding: 6px 4px;
      text-align: center;
      border: .5px solid #fff;
      font-size: 9px;
      text-transform: uppercase
    }

    .pm-tab th.lft {
      text-align: left;
      padding-left: 8px
    }

    .pm-tab td {
      border: .5px solid #D8E2E3;
      padding: 6px 4px;
      text-align: center
    }

    .pm-tab td.lft {
      text-align: left;
      padding-left: 8px
    }

    .pm-tab td.cpt {
      font-weight: 700;
      font-size: 9.5px
    }

    .pm-tab td.med {
      color: #5E7477;
      font-size: 8.5px
    }

    .pm-tab td.imp {
      color: #0E6E78;
      font-weight: 800;
      font-size: 11px
    }

    .pm-tab td.num {
      text-align: right;
      padding-right: 8px;
      white-space: nowrap;
      font-size: 9.5px
    }

    .pm-tab tfoot td {
      background: #5E7477;
      color: #fff;
      font-weight: 800;
      border-color: #fff;
      font-size: 10.5px
    }

    .cal-print {
      width: 100%;
      border-collapse: collapse;
      font-size: 9.5px;
      table-layout: fixed
    }

    .cal-print th {
      background: #5E7477;
      color: #fff;
      padding: 3px 1px;
      text-align: center;
      border: .5px solid #fff;
      font-size: 9px;
      font-weight: 700
    }

    .cal-print th.lft {
      text-align: left;
      padding-left: 8px;
      width: 150px;
      font-size: 9px
    }

    .cal-print th.dow {
      font-size: 7.5px;
      font-weight: 400;
      opacity: .85;
      padding: 1px
    }

    .cal-print td {
      border: .5px solid #D8E2E3;
      padding: 4px 1px;
      text-align: center;
      font-size: 10px
    }

    .cal-print td.lft {
      text-align: left;
      padding-left: 8px;
      font-size: 8.5px;
      line-height: 1.25
    }

    .cal-print td.cpt {
      font-weight: 700
    }

    .cal-print .sub2 {
      font-weight: 400;
      color: #5E7477;
      font-size: 7.5px
    }

    .cal-print td.on {
      background: #E3F1F2;
      color: #0A4F57;
      font-weight: 800
    }

    .cal-print td.sub {
      background: #F0F5F5;
      color: #0A4F57;
      font-weight: 800
    }

    .cal-print tfoot td {
      background: #EEF2F2;
      font-weight: 800;
      color: #3A4D4F;
      font-size: 9px
    }

    .pm-notas {
      font-size: 8.5px;
      color: #5E7477;
      margin-top: 10px;
      line-height: 1.55;
      font-style: italic
    }

    .pf-firma {
      flex: 1;
      text-align: center
    }

    .pf-firma .line {
      border-top: 1.5px solid #1C2B2D;
      margin: 0 8px 6px
    }

    .pf-firma .name {
      font-size: 10.5px;
      font-weight: 800;
      text-transform: uppercase;
      line-height: 1.35
    }

    .pf-firma .role {
      font-size: 8.5px;
      letter-spacing: 1px;
      color: #5E7477;
      text-transform: uppercase;
      margin-top: 2px
    }

    table.mini {
      font-size: 13px
    }

    table.mini th {
      background: var(--petrol-soft);
      color: var(--petrol-dark);
      font-size: 10.5px;
      text-transform: uppercase;
      letter-spacing: .6px;
      padding: 7px 9px;
      text-align: left
    }

    table.mini td {
      padding: 8px 9px;
      border-top: 1px solid var(--line)
    }

    /* ===== Manual ===== */
    .ay-hero {
      background: var(--petrol);
      color: #fff;
      border-radius: 10px;
      padding: 18px 20px;
      margin-bottom: 16px
    }

    .ay-hero h3 {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 6px
    }

    .ay-hero p {
      font-size: 13.5px;
      line-height: 1.6;
      opacity: .95
    }

    .ay-flow {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 18px
    }

    .ay-flow i {
      color: var(--petrol);
      font-style: normal;
      font-size: 20px;
      font-weight: 700
    }

    .ay-step {
      flex: 1;
      min-width: 130px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 12px;
      text-align: center;
      font-size: 12.5px;
      line-height: 1.5;
      color: var(--muted)
    }

    .ay-step span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: var(--petrol);
      color: #fff;
      font-weight: 800;
      font-size: 12px;
      margin-bottom: 6px
    }

    .ay-step b {
      color: var(--ink);
      font-size: 13.5px
    }

    .body.ay p {
      font-size: 13.5px;
      line-height: 1.65;
      margin-bottom: 9px
    }

    .body.ay ul {
      margin: 0 0 10px 20px
    }

    .body.ay li {
      font-size: 13.5px;
      line-height: 1.6;
      margin-bottom: 5px
    }

    .ay-tip {
      background: #F0F7F7;
      border-left: 3px solid var(--petrol);
      border-radius: 0 7px 7px 0;
      padding: 9px 13px;
      font-size: 13px;
      line-height: 1.55;
      margin: 10px 0
    }

    .ay-warn {
      background: #FDF6E9;
      border-left: 3px solid var(--warn);
      border-radius: 0 7px 7px 0;
      padding: 9px 13px;
      font-size: 13px;
      line-height: 1.55;
      margin: 10px 0
    }

    .ay-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 10px;
      margin: 12px 0
    }

    .ay-cards>div {
      background: #F7FAFA;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 11px 13px;
      font-size: 12.5px;
      line-height: 1.55
    }

    .ay-sem>div {
      display: flex;
      align-items: center;
      gap: 9px;
      font-size: 13.5px;
      padding: 5px 0;
      line-height: 1.5
    }

    .ay-sem span {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      flex-shrink: 0
    }

    @media print {
      .app {
        display: none
      }

      #viewAyuda {
        display: block !important;
        padding: 0
      }

      .topbar,
      .form-head button,
      .filters {
        display: none !important
      }
    }

    /* ===== Formato dinámica de regalos ===== */
    .dn {
      font-family: "Segoe UI", Arial, sans-serif;
      color: #1C2B2D;
      font-size: 11.5px;
      line-height: 1.55
    }

    .dn-head {
      display: flex;
      align-items: center;
      gap: 18px;
      margin-bottom: 16px
    }

    .dn-head img {
      height: 44px;
      max-width: 190px;
      object-fit: contain
    }

    .dn-tit {
      flex: 1;
      text-align: right
    }

    .dn-tit h1 {
      font-size: 17px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .8px
    }

    .dn-fec {
      font-size: 10.5px;
      color: #5E7477;
      margin-top: 3px
    }

    .dn-tab {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 12px
    }

    .dn-tab td {
      border: 1px solid #1C2B2D;
      padding: 6px 10px
    }

    .dn-tab td.k {
      width: 210px;
      font-size: 10.5px;
      font-weight: 700
    }

    .dn-tab td.v {
      font-size: 11.5px
    }

    .dn-reg {
      border: 1px solid #1C2B2D;
      padding: 8px 12px 10px;
      margin-bottom: 14px
    }

    .dn-reg-t {
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 4px
    }

    .dn-reg ul {
      margin: 0 0 0 22px
    }

    .dn-reg li {
      font-size: 12px;
      margin-bottom: 3px
    }

    .dn-mec {
      text-align: justify;
      margin-bottom: 10px
    }

    .dn-mec p {
      margin-bottom: 7px
    }

    .dn-firmas {
      display: flex;
      gap: 26px;
      margin-top: 56px;
      page-break-inside: avoid
    }

    .dn-firmas>div {
      flex: 1;
      text-align: center
    }

    .dn-firmas .rol {
      font-size: 11px;
      margin-bottom: 46px
    }

    .dn-firmas .ln {
      border-top: 1px solid #1C2B2D;
      margin: 0 8px 5px
    }

    .dn-firmas .nm {
      font-size: 10.5px;
      font-weight: 700
    }

    .dn-firmas .cg {
      font-size: 10px;
      color: #3A4D4F
    }

    /* ===== Orden de anuncio imprimible ===== */
    .oa {
      font-family: "Segoe UI", Arial, sans-serif;
      color: #1C2B2D;
      font-size: 12px;
      line-height: 1.45
    }

    .oa-head {
      display: flex;
      align-items: center;
      gap: 14px;
      border-bottom: 2.5px solid #0E6E78;
      padding-bottom: 9px;
      margin-bottom: 10px
    }

    .oa-head img {
      height: 44px;
      max-width: 200px;
      object-fit: contain
    }

    .oa-tit {
      flex: 1;
      text-align: center
    }

    .oa-tit h1 {
      font-size: 19px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1px
    }

    .oa-sub {
      font-size: 10px;
      color: #5E7477;
      letter-spacing: 2px;
      margin-top: 2px
    }

    /* Globos del encabezado: orden, convenio (INEP) y CTO */
    .oa-globos {
      display: flex;
      gap: 8px;
      flex-shrink: 0
    }

    .oa-globo {
      border: 2px solid #0E6E78;
      border-radius: 12px;
      padding: 5px 14px;
      text-align: center;
      min-width: 112px;
      background: #fff
    }

    .oa-globo .lbl {
      font-size: 8.5px;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      color: #5E7477;
      font-weight: 700;
      line-height: 1.2
    }

    .oa-globo .val {
      font-size: 19px;
      font-weight: 800;
      color: #0E6E78;
      line-height: 1.15;
      white-space: nowrap
    }

    .oa-globo.inep {
      background: #0E6E78;
      border-color: #0E6E78
    }

    .oa-globo.inep .lbl {
      color: rgba(255, 255, 255, .85)
    }

    .oa-globo.inep .val {
      color: #fff
    }

    .oa-emisora {
      font-size: 10.5px;
      color: #3A4D4F;
      line-height: 1.5;
      border-left: 3px solid #0E6E78;
      padding: 6px 11px;
      margin-bottom: 9px;
      background: #F7FAFA
    }

    .oa-pie {
      font-size: 9.5px;
      color: #5E7477;
      text-align: center;
      margin-top: 12px;
      padding-top: 7px;
      border-top: 1px solid #D8E2E3
    }

    .oa-bar {
      display: flex;
      gap: 8px;
      margin-bottom: 9px
    }

    .oa-bar>div {
      flex: 1;
      border: 1px solid #D8E2E3;
      border-radius: 6px;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 700
    }

    .oa-bar span {
      font-size: 8.5px;
      color: #5E7477;
      letter-spacing: .8px;
      display: block;
      text-transform: uppercase;
      font-weight: 700
    }

    .oa-tab {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 9px
    }

    .oa-tab td {
      border: 1px solid #D8E2E3;
      padding: 5px 10px
    }

    .oa-tab td.k {
      width: 135px;
      background: #F4F8F8;
      font-size: 9px;
      letter-spacing: .5px;
      text-transform: uppercase;
      color: #5E7477;
      font-weight: 700
    }

    .oa-tab td.v {
      font-size: 12.5px;
      font-weight: 700
    }

    .oa-carta {
      font-size: 11.5px;
      line-height: 1.55;
      text-align: justify;
      border-left: 3px solid #0E6E78;
      padding: 8px 12px;
      margin-bottom: 9px;
      background: #F7FAFA
    }

    .oa-blk {
      border: 1px solid #D8E2E3;
      border-radius: 6px;
      margin-bottom: 9px;
      overflow: hidden
    }

    .oa-blk-t {
      background: #0E6E78;
      color: #fff;
      font-size: 9.5px;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      padding: 5px 10px;
      font-weight: 700
    }

    .oa-line {
      padding: 5px 11px;
      border-bottom: 1px solid #EEF2F2;
      font-size: 12px
    }

    .oa-line:last-child {
      border-bottom: none
    }

    .oa-det {
      width: 100%;
      border-collapse: collapse;
      font-size: 11.5px
    }

    .oa-det th {
      background: #F0F5F5;
      color: #0A4F57;
      font-size: 9px;
      text-transform: uppercase;
      padding: 5px 8px;
      text-align: center;
      letter-spacing: .4px
    }

    .oa-det th.lft,
    .oa-det td.lft {
      text-align: left
    }

    .oa-det td {
      padding: 5px 8px;
      text-align: center;
      border-top: 1px solid #EEF2F2
    }

    .oa-det td.num {
      text-align: right;
      white-space: nowrap
    }

    .oa-det tfoot td {
      background: #F4F8F8;
      font-weight: 800;
      color: #0A4F57;
      font-size: 12px
    }

    .oa-saldo {
      font-size: 11px;
      background: #F4F8F8;
      border-top: 1px solid #D8E2E3;
      padding: 7px 10px;
      color: #1C2B2D
    }

    .oa-firmas {
      display: flex;
      gap: 22px;
      margin-top: 34px
    }

    .oa-firmas>div {
      flex: 1;
      text-align: center
    }

    .oa-firmas .ln {
      border-top: 1.2px solid #1C2B2D;
      margin: 0 6px 5px
    }

    .oa-firmas .nm {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      line-height: 1.35;
      color: #3A4D4F
    }

    /* ===== Convenio legal imprimible ===== */
    .lg {
      font-family: "Aptos", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
      color: #1C2B2D;
      font-size: 10.5pt;
      line-height: 1.65;
      text-align: justify;
      text-justify: inter-word
    }

    .lg .lg-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 2.5px solid #0E6E78;
      padding-bottom: 10px;
      margin-bottom: 20px
    }

    .lg .lg-head img {
      height: 40px
    }

    .lg .lg-folio {
      font-weight: 800;
      font-size: 11.5pt;
      letter-spacing: 1px;
      background: #0E6E78;
      color: #fff;
      padding: 4px 18px;
      border-radius: 16px
    }

    .lg p {
      margin-bottom: 11px;
      orphans: 3;
      widows: 3
    }

    .lg>p {
      break-inside: avoid;
      page-break-inside: avoid
    }

    .lg .clau {
      break-inside: avoid;
      page-break-inside: avoid
    }

    .lg h2 {
      break-after: avoid;
      page-break-after: avoid
    }

    .lg .lg-blq {
      break-inside: avoid;
      page-break-inside: avoid
    }

    .lg .lg-blq p:last-child {
      margin-bottom: 0
    }

    .lg ul {
      break-inside: avoid;
      page-break-inside: avoid
    }

    .lg .lg-cierre {
      break-inside: avoid;
      page-break-inside: avoid;
      break-after: avoid;
      page-break-after: avoid
    }

    .lg h2 {
      text-align: center;
      font-size: 11.5pt;
      letter-spacing: 4px;
      margin: 22px 0 13px;
      font-weight: 800;
      color: #0E6E78;
      text-transform: uppercase
    }

    .lg ul {
      margin: 0 0 11px 0;
      padding-left: 22px
    }

    .lg li {
      margin-bottom: 7px;
      text-align: justify
    }

    .lg .cu {
      margin: -3px 0 11px 22px;
      font-weight: 700;
      color: #0A4F57
    }

    .lg .clau b:first-child {
      color: #0A4F57
    }

    .lg .lg-cierre {
      margin-top: 18px
    }

    .lg .lg-firmas {
      display: flex;
      justify-content: space-between;
      gap: 26px;
      margin-top: 76px;
      page-break-inside: avoid
    }

    .lg .lg-firma {
      flex: 1;
      text-align: center
    }

    .lg .lg-firma .line {
      border-top: 1.3pt solid #1C2B2D;
      margin-bottom: 7px
    }

    .lg .lg-firma .por {
      font-size: 8pt;
      letter-spacing: 1px;
      margin-bottom: 3px;
      color: #5E7477;
      text-transform: uppercase;
      font-weight: 700
    }

    .lg .lg-firma .nm {
      font-weight: 800;
      font-size: 10pt;
      text-transform: uppercase;
      line-height: 1.3
    }

    .lg .lg-firma .cg {
      font-size: 8.5pt;
      color: #3A4D4F;
      margin-top: 1px
    }

    /* ============================================================
       MODALES Y TOASTS PERSONALIZADOS
       ============================================================ */
    .custom-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(14, 28, 30, 0.65);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      z-index: 999999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.22s ease, visibility 0.22s ease;
    }

    .custom-modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }

    .custom-modal-box {
      background: #FFFFFF;
      width: 100%;
      max-width: 440px;
      border-radius: 16px;
      padding: 28px 24px 22px;
      box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.08);
      text-align: center;
      transform: scale(0.92) translateY(8px);
      transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      position: relative;
    }

    .custom-modal-overlay.active .custom-modal-box {
      transform: scale(1) translateY(0);
    }

    .custom-modal-icon-wrap {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 16px;
    }

    .custom-modal-icon-wrap svg {
      width: 28px;
      height: 28px;
    }

    .custom-modal-icon-wrap.type-danger {
      background: #FEE2E2;
      color: #DC2626;
    }

    .custom-modal-icon-wrap.type-warning {
      background: #FEF3C7;
      color: #D97706;
    }

    .custom-modal-icon-wrap.type-success {
      background: #D1FAE5;
      color: #059669;
    }

    .custom-modal-icon-wrap.type-info {
      background: #E0F2FE;
      color: #0284C7;
    }

    .custom-modal-title {
      font-size: 18px;
      font-weight: 700;
      color: #1C2B2D;
      margin-bottom: 10px;
      line-height: 1.3;
    }

    .custom-modal-body {
      font-size: 14.5px;
      color: #4A5D60;
      line-height: 1.55;
      margin-bottom: 24px;
      word-break: break-word;
      text-align: center;
    }

    .custom-modal-body p {
      margin: 0 0 8px;
    }

    .custom-modal-body p:last-child {
      margin-bottom: 0;
    }

    .modal-bullet-list {
      text-align: left;
      background: #F8FAFA;
      border: 1px solid #E2E8F0;
      border-radius: 8px;
      padding: 10px 14px 10px 28px;
      margin: 10px 0 0;
      font-size: 13.5px;
      color: #334155;
    }

    .modal-bullet-list li {
      margin-bottom: 4px;
    }

    .modal-bullet-list li:last-child {
      margin-bottom: 0;
    }

    .custom-modal-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
    }

    .custom-modal-btn {
      flex: 1;
      padding: 11px 18px;
      font-size: 14px;
      font-weight: 600;
      border-radius: 9px;
      border: 1px solid transparent;
      cursor: pointer;
      transition: all 0.18s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .custom-modal-btn-cancel {
      background: #F1F5F9;
      color: #475569;
      border-color: #E2E8F0;
    }

    .custom-modal-btn-cancel:hover {
      background: #E2E8F0;
      color: #1E293B;
    }

    .custom-modal-btn-confirm {
      background: var(--petrol, #0E6E78);
      color: #FFFFFF;
      box-shadow: 0 2px 6px rgba(14, 110, 120, 0.25);
    }

    .custom-modal-btn-confirm:hover {
      background: var(--petrol-dark, #0A4F57);
      box-shadow: 0 4px 10px rgba(14, 110, 120, 0.35);
    }

    .custom-modal-btn-confirm.btn-danger {
      background: #DC2626;
      box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
    }

    .custom-modal-btn-confirm.btn-danger:hover {
      background: #B91C1C;
      box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
    }

    .custom-modal-btn-confirm.btn-warning {
      background: #D97706;
      box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
    }

    .custom-modal-btn-confirm.btn-warning:hover {
      background: #B45309;
      box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
    }

    .custom-modal-btn-confirm.btn-success {
      background: #059669;
      box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
    }

    .custom-modal-btn-confirm.btn-success:hover {
      background: #047857;
      box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
    }

    /* Toasts */
    .custom-toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 9999999;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: none;
    }

    .custom-toast {
      pointer-events: auto;
      min-width: 280px;
      max-width: 420px;
      background: #1C2B2D;
      color: #FFFFFF;
      padding: 13px 18px;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
      transform: translateY(20px);
      opacity: 0;
      transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .custom-toast.active {
      transform: translateY(0);
      opacity: 1;
    }

    .custom-toast.success {
      background: #064E3B;
      border-left: 4px solid #34D399;
    }

    .custom-toast.danger {
      background: #7F1D1D;
      border-left: 4px solid #F87171;
    }

    .custom-toast.warning {
      background: #78350F;
      border-left: 4px solid #FBBF24;
    }

    .custom-toast.info {
      background: #0C4A6E;
      border-left: 4px solid #38BDF8;
    }

    .custom-toast-icon {
      font-size: 16px;
      line-height: 1;
    }

    .custom-toast-msg {
      flex: 1;
    }

  