 body {
            background: #f4f6f8
        }

        .card {
            border: 0;
            box-shadow: 0 8px 25px rgba(0, 0, 0, .08)
        }

        .form-control,
        .form-select {
            border-radius: .75rem
        }

        .sticky {
            position: sticky;
            top: 1rem
        }

        .currency:before {
            content: "₡ "
        }

        .ticket {
            width: 100%;
            max-width: 320px;
            margin: auto;
            font-family: monospace;
          	font-size: 13px;
            line-height: 1.4;
        }

        .ticket-row {
            display: flex;
            justify-content: space-between;
            font-size: 13px
        }

        .ticket-row.total {
            font-weight: bold;
            margin-top: 6px
        }

        .ticket hr {
            margin: 6px 0;
            border-top: 1px dashed #999
        }

        .btn-success {
            border-radius: .75rem;
            font-weight: 500;
            padding: .6rem 1rem;
        }

        .card-filamento {
            border-left: 6px solid #0d6efd;
        }

        .card-electricidad {
            border-left: 6px solid #ffc107;
        }

        .card-manoobra {
            border-left: 6px solid #198754;
        }

        .card-otros {
            border-left: 6px solid #6f42c1;
        }

        .card-depreciacion {
            border-left: 6px solid #fd7e14;
        }


        .card-resumen {
            border-left: 6px solid #212529;
        }

        .form-select {
            appearance: none;
            background-image:
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23999' d='M1.5 5.5l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 12px;
        }


        .is-invalid-custom {
            border: 2px solid #dc3545 !important;
            background-color: #fff5f5;
        }

        .invalid-hint {
            font-size: 0.8rem;
            color: #dc3545;
            margin-top: 4px;
        }

        .money-wrapper {
            position: relative;
        }

        .money-wrapper::before {
            content: "₡";
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: #6c757d;
            font-weight: 500;
            z-index: 2;
            pointer-events: none;
        }

        .money-wrapper input.money-cr {
            padding-left: 2rem;
            position: relative;
            z-index: 1;
        }

        #simulacion_wrapper {
            overflow: hidden;
            transition:
                opacity .25s ease,
                max-height .35s ease,
                transform .25s ease;
            max-height: 1000px;
            /* suficientemente grande */
            opacity: 1;
            transform: translateY(0);
        }

        #simulacion_wrapper.hidden {
            max-height: 0;
            opacity: 0;
            transform: translateY(-6px);
            pointer-events: none;
        }


        .welcome-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .55);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            animation: fadeIn .4s ease;
        }

        .welcome-modal {
            background: #fff;
            border-radius: 1rem;
            padding: 1.5rem;
            width: 100%;
            max-width: 520px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
            animation: slideUp .45s ease;
        }

        .welcome-title {
            text-align: center;
            font-weight: 800;
            font-size: 1.6rem;
            margin-bottom: 1rem;
        }

        .welcome-modal h4 {
            font-weight: 700;
            margin-bottom: .75rem;
        }

        .welcome-modal .intro {
            font-size: .95rem;
            margin-bottom: .75rem;
        }

        .disclaimer {
            background: #fff3cd;
            border-left: 4px solid #ffc107;
            padding: .75rem;
            font-size: .85rem;
            margin-bottom: 1rem;
        }

        .welcome-modal ul {
            padding-left: 1.2rem;
            font-size: .85rem;
        }

        .accept-box {
            display: flex;
            gap: .5rem;
            font-size: .85rem;
            margin: 1rem 0;
        }

        .accept-box input {
            margin-top: .25rem;
        }

        @keyframes slideUp {
            from {
                transform: translateY(40px);
                opacity: 0
            }

            to {
                transform: translateY(0);
                opacity: 1
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0
            }

            to {
                opacity: 1
            }
        }

        .welcome-overlay.hide {
            animation: fadeOut .3s ease forwards;
        }

        @keyframes fadeOut {
            to {
                opacity: 0
            }
        }

        #btnStart {
            transition: transform .2s ease, opacity .2s ease;
        }

        #btnStart:not(:disabled):hover {
            transform: scale(1.02);
        }

        .alpha-badge {
            position: sticky;
            top: 0;
            background: linear-gradient(135deg, #ffc107, #ff9800);
            color: #212529;
            font-weight: 700;
            font-size: 0.7rem;
            letter-spacing: .08em;
            text-align: center;
            padding: .35rem;
            border-radius: .75rem .75rem 0 0;
            margin: -1.5rem -1.5rem 1rem -1.5rem;
            z-index: 5;
        }

        .no-scroll {
          overflow: hidden;
          height: 100vh;
        }




       /* @media print {
            @page {
                size: 210mm auto;
                margin: 0
            }

            .container-fluid * {
                display: none !important
            }

            #ticket {
                display: block !important;
                width: 200mm;
                margin: 0 auto
            }
        }*/

@media print {

  @page {
    size: 320mm auto;
    margin: 0;
  }

 .container-fluid * {
                display: none !important
            }
  
   /* 🖨️ Mostrar SOLO el ticket */
  .print-only,
  .print-only * {
    visibility: visible !important;
  }
  
  .print-only {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  
  

  /* 🎫 Ticket en una sola página */
  #ticket {
    display: block !important;
    width: 100%;
    max-width: 320px; /* 🔑 CLAVE mobile */
    margin: 0 auto;
    margin-top: 5%;
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-after: avoid;
    break-after: avoid;
  }
}



@media (min-width: 992px) {
  select {
    appearance: none;
    -webkit-appearance: none;

    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='gray' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<polyline points='6 9 12 15 18 9'/></svg>");

    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 2.5rem;
  }
}
