@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
    --ag-font: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --ag-50: #f1f5f2;
    --ag-100: #e2ebe5;
    --ag-200: #c6d8cc;
    --ag-300: #9fbfaa;
    --ag-500: #3f7a5c;
    --ag-600: #2f6649;
    --ag-700: #26543c;
    --ag-800: #1d3f2e;
    --ag-900: #15261f;

    --tierra: #b4643c;
    --tierra-50: #f7ece5;

    --tinta: #1d2a24;
    --tinta-2: #3f4d46;
    --gris: #74827b;
    --gris-2: #9aa59f;
    --linea: #e2e8e4;
    --linea-suave: #edf1ee;
    --fondo: #f4f6f4;
    --superficie: #ffffff;
    --superficie-2: #f8faf8;

    --exito: #2f7a52;
    --exito-50: #e7f2eb;
    --peligro: #b4483f;
    --peligro-50: #f8ebe9;
    --aviso: #a87a24;
    --aviso-50: #f7f0e1;
    --info: #3c6a85;
    --info-50: #e8eff4;

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-pill: 999px;

    --sombra-1: 0 1px 2px rgba(21, 38, 31, .05);
    --sombra-2: 0 6px 18px -6px rgba(21, 38, 31, .12);
    --sombra-3: 0 24px 60px -18px rgba(21, 38, 31, .32);
    --anillo: 0 0 0 4px rgba(63, 122, 92, .14);

    --primary: var(--ag-600);
    --primary-hover: var(--ag-700);
    --navy: var(--ag-900);
    --background: var(--fondo);
    --white: #ffffff;
    --text: var(--tinta);
    --muted: var(--gris);
    --border: var(--linea);
    --danger: var(--peligro);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--ag-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--tinta);
    background: var(--fondo);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

button {
    cursor: pointer;
}

table {
    font-variant-numeric: tabular-nums;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--ag-200);
    color: var(--ag-900);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
select {
    border-radius: var(--r-pill) !important;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select) {
    padding-left: 16px;
}

textarea {
    border-radius: var(--r-md) !important;
}

:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

input:not([type="checkbox"]):not([type="radio"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--ag-500) !important;
    box-shadow: var(--anillo) !important;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--ag-600);
}

* {
    scrollbar-width: thin;
    scrollbar-color: #cdd6d0 transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-thumb {
    background: #cdd6d0;
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: content-box;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

@keyframes agFondoEntrar {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes agTarjetaEntrar {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes agTextoEntrar {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes agIconoEntrar {
    0% { transform: scale(.6); opacity: 0; }
    60% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes agTrazo {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

@keyframes agOnda {
    from { transform: scale(1); opacity: .55; }
    to { transform: scale(1.55); opacity: 0; }
}

@keyframes agAvisoEntrar {
    from { opacity: 0; transform: translateX(28px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes agAvisoSalir {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(28px); }
}

@keyframes agProgreso {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes agGirar {
    to { transform: rotate(360deg); }
}

:root {
    --ic-check: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.3 4.3L19 7.2'/></svg>");
    --ic-alerta: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'><path d='M12 6.5v7'/><path d='M12 17.6v.1'/></svg>");
    --ic-info: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'><path d='M12 10.5v7'/><path d='M12 6.4v.1'/></svg>");
    --ic-reiniciar: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 12a8.5 8.5 0 1 0 2.6-6.1L3.5 8.5'/><path d='M3.5 3.5v5h5'/></svg>");
    --ic-cerrar: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><path d='M7 7l10 10M17 7L7 17'/></svg>");
    --ic-menu: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M4 7h16M4 12h10M4 17h16'/></svg>");
}

body .agro-toast-contenedor,
body .ga-toast-area,
body .agv-toast-wrap {
    top: 22px !important;
    right: 22px !important;
    gap: 12px !important;
    z-index: 30000 !important;
}

body .agro-toast,
body .ga-toast,
body .agv-toast {
    --tono: var(--exito);
    --tono-50: var(--exito-50);
    --duracion: 4.2s;
    position: relative;
    overflow: hidden;
    align-items: flex-start !important;
    gap: 13px !important;
    width: min(380px, calc(100vw - 32px)) !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 15px 16px 17px !important;
    border: 1px solid var(--linea) !important;
    border-left: 1px solid var(--linea) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    color: var(--tinta) !important;
    box-shadow: var(--sombra-3) !important;
    font-family: var(--ag-font) !important;
    animation: agAvisoEntrar .38s cubic-bezier(.2, .8, .2, 1) backwards !important;
}

body .agro-toast::after,
body .ga-toast::after,
body .agv-toast::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--tono);
    opacity: .55;
    transform-origin: left;
    animation: agProgreso var(--duracion) linear forwards;
}

body .agro-toast,
body .ga-toast {
    display: flex !important;
}

body .agro-toast { --duracion: 5.5s; }
body .ga-toast { --duracion: 3.5s; }

body .agro-toast.error,
body .ga-toast-error,
body .agv-toast.error {
    --tono: var(--peligro);
    --tono-50: var(--peligro-50);
}

body .ga-toast-warning {
    --tono: var(--aviso);
    --tono-50: var(--aviso-50);
}

body .agro-toast.info,
body .ga-toast-info,
body .agv-toast.info {
    --tono: var(--info);
    --tono-50: var(--info-50);
}

body .agv-toast {
    display: grid !important;
    grid-template-columns: 34px 1fr;
    column-gap: 13px !important;
    row-gap: 2px !important;
}

body .agv-toast::before {
    content: "";
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--tono) 0 4px, var(--tono-50) 4.6px);
    animation: agIconoEntrar .45s .1s cubic-bezier(.2, .8, .2, 1) backwards;
}

body .agv-toast strong,
body .agv-toast > div {
    grid-column: 2;
    animation: agTextoEntrar .35s .12s ease backwards;
}

body .agv-toast strong {
    margin: 0 !important;
    font-size: 13.5px !important;
    font-weight: 600;
    color: var(--tinta);
}

body .agv-toast > div {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--gris);
}

body .agro-toast-icono,
body .ga-toast-icono {
    position: relative;
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: var(--tono-50) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden;
    animation: agIconoEntrar .45s .1s cubic-bezier(.2, .8, .2, 1) backwards;
}

body .agro-toast-icono::before,
body .ga-toast-icono::before {
    content: "";
    position: absolute;
    inset: 8px;
    background: var(--tono);
    -webkit-mask: var(--ic-check) center / contain no-repeat;
    mask: var(--ic-check) center / contain no-repeat;
    animation: agTrazo .4s .32s ease-out backwards;
}

body .agro-toast.error .agro-toast-icono::before,
body .ga-toast-error .ga-toast-icono::before,
body .ga-toast-warning .ga-toast-icono::before {
    -webkit-mask-image: var(--ic-alerta);
    mask-image: var(--ic-alerta);
}

body .agro-toast.info .agro-toast-icono::before,
body .ga-toast-info .ga-toast-icono::before {
    -webkit-mask-image: var(--ic-info);
    mask-image: var(--ic-info);
}

body .agro-toast-contenido,
body .ga-toast-contenido {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
    animation: agTextoEntrar .35s .12s ease backwards;
}

body .agro-toast-contenido strong,
body .ga-toast-contenido strong {
    display: block;
    margin: 0 0 3px !important;
    color: var(--tinta) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.35;
}

body .agro-toast-contenido p,
body .ga-toast-contenido p {
    margin: 0 !important;
    color: var(--gris) !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
}

body .agro-toast-contenido p:empty,
body .ga-toast-contenido p:empty {
    display: none;
}

body .ga-toast-cerrar {
    position: relative;
    flex: 0 0 28px;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
}

body .ga-toast-cerrar::before {
    content: "";
    position: absolute;
    inset: 7px;
    background: var(--gris-2);
    -webkit-mask: var(--ic-cerrar) center / contain no-repeat;
    mask: var(--ic-cerrar) center / contain no-repeat;
}

body .ga-toast-cerrar:hover {
    background: var(--fondo) !important;
}

body .ga-toast-cerrar:hover::before {
    background: var(--tinta);
}

body .ga-toast.ga-toast-salida {
    animation: agAvisoSalir .24s ease forwards !important;
}

body .agro-confirmacion-fondo,
body .ga-confirmacion-fondo {
    background: rgba(17, 30, 24, .46) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    animation: agFondoEntrar .22s ease backwards !important;
}

body .agro-confirmacion-tarjeta,
body .ga-confirmacion {
    --tono: var(--ag-600);
    --tono-50: var(--ag-50);
    width: min(440px, 100%) !important;
    padding: 30px 28px 24px !important;
    border: 1px solid var(--linea) !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    box-shadow: var(--sombra-3) !important;
    text-align: center !important;
    font-family: var(--ag-font) !important;
    animation: agTarjetaEntrar .34s cubic-bezier(.2, .8, .2, 1) backwards !important;
}

body .agro-confirmacion-icono,
body .ga-confirmacion-icono {
    --tono: var(--ag-600);
    --tono-50: var(--ag-50);
    position: relative;
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto 18px !important;
    border-radius: 50% !important;
    background: var(--tono-50) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    animation: agIconoEntrar .5s .12s cubic-bezier(.2, .8, .2, 1) backwards;
}

body .agro-confirmacion-icono.limpiar {
    --tono: var(--aviso);
    --tono-50: var(--aviso-50);
}

body .ga-confirmacion-icono.peligro {
    --tono: var(--peligro);
    --tono-50: var(--peligro-50);
}

body .agro-confirmacion-icono::before,
body .ga-confirmacion-icono::before {
    content: "";
    position: absolute;
    inset: 18px;
    background: var(--tono);
    -webkit-mask: var(--ic-check) center / contain no-repeat;
    mask: var(--ic-check) center / contain no-repeat;
    animation: agTrazo .45s .4s ease-out backwards;
}

body .agro-confirmacion-icono::after,
body .ga-confirmacion-icono::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--tono);
    opacity: 0;
    animation: agOnda 1s .45s ease-out;
}

body .agro-confirmacion-icono.limpiar::before {
    -webkit-mask-image: var(--ic-reiniciar);
    mask-image: var(--ic-reiniciar);
}

body .ga-confirmacion-icono.peligro::before {
    -webkit-mask-image: var(--ic-alerta);
    mask-image: var(--ic-alerta);
}

body .agro-confirmacion-tarjeta h2,
body .ga-confirmacion h2 {
    margin: 0 0 8px !important;
    color: var(--tinta) !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: -.01em;
    animation: agTextoEntrar .35s .18s ease backwards;
}

body .agro-confirmacion-descripcion,
body .ga-confirmacion-texto {
    margin: 0 auto 18px !important;
    max-width: 340px;
    color: var(--gris) !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    animation: agTextoEntrar .35s .24s ease backwards;
}

body .agro-confirmacion-resumen,
body .ga-confirmacion-detalles {
    padding: 6px 16px !important;
    border: 1px solid var(--linea-suave) !important;
    border-radius: 16px !important;
    background: var(--superficie-2) !important;
    text-align: left;
    animation: agTextoEntrar .35s .3s ease backwards;
}

body .agro-confirmacion-fila {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 14px !important;
    padding: 9px 0 !important;
    color: var(--gris) !important;
    font-size: 13px !important;
    border-bottom: 1px dashed var(--linea);
}

body .agro-confirmacion-fila:last-child,
body .agro-confirmacion-fila:has(+ .agro-confirmacion-fila.total) {
    border-bottom: 0;
}

body .agro-confirmacion-fila strong {
    color: var(--tinta) !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

body .agro-confirmacion-fila.total {
    margin-top: 2px !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--linea) !important;
    border-bottom: 0;
}

body .agro-confirmacion-fila.total strong {
    color: var(--ag-700) !important;
    font-size: 20px !important;
}

body .agro-confirmacion-botones,
body .ga-confirmacion-botones {
    display: flex !important;
    gap: 10px !important;
    margin-top: 22px !important;
    animation: agTextoEntrar .35s .34s ease backwards;
}

body .agro-confirmacion-botones button,
body .ga-confirmacion-botones button {
    flex: 1;
    min-height: 44px;
    padding: 0 18px !important;
    border-radius: var(--r-pill) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    transition: background-color .18s ease, border-color .18s ease, transform .12s ease;
}

body .agro-confirmacion-botones button:active,
body .ga-confirmacion-botones button:active {
    transform: scale(.98);
}

body .agro-confirmacion-cancelar,
body .ga-confirmacion-botones .ga-btn-secundario {
    background: #ffffff !important;
    border: 1px solid var(--linea) !important;
    color: var(--tinta-2) !important;
}

body .agro-confirmacion-cancelar:hover,
body .ga-confirmacion-botones .ga-btn-secundario:hover {
    background: var(--fondo) !important;
}

body .agro-confirmacion-aceptar,
body .ga-confirmacion-botones .ga-btn-primario {
    background: var(--ag-600) !important;
    border: 1px solid var(--ag-600) !important;
    color: #ffffff !important;
}

body .agro-confirmacion-aceptar:hover,
body .ga-confirmacion-botones .ga-btn-primario:hover {
    background: var(--ag-700) !important;
    border-color: var(--ag-700) !important;
}

body .agro-confirmacion-aceptar.limpiar {
    background: var(--aviso) !important;
    border-color: var(--aviso) !important;
}

body .ga-confirmacion-botones .ga-btn-peligro-solido {
    background: var(--peligro) !important;
    border: 1px solid var(--peligro) !important;
    color: #ffffff !important;
}

@media (max-width: 520px) {
    body .agro-toast-contenedor,
    body .ga-toast-area,
    body .agv-toast-wrap {
        top: 14px !important;
        left: 14px !important;
        right: 14px !important;
    }

    body .agro-toast,
    body .ga-toast,
    body .agv-toast {
        width: 100% !important;
    }

    body .agro-confirmacion-botones,
    body .ga-confirmacion-botones {
        flex-direction: column-reverse;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
    }
}

#menuButton {
    position: relative;
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border: 1px solid var(--linea) !important;
    border-radius: 50% !important;
    background: var(--superficie) !important;
    color: transparent !important;
    font-size: 0 !important;
    transition: background-color .18s ease, border-color .18s ease;
}

#menuButton::before {
    content: "";
    position: absolute;
    inset: 10px;
    background: var(--tinta-2);
    -webkit-mask: var(--ic-menu) center / contain no-repeat;
    mask: var(--ic-menu) center / contain no-repeat;
}

#menuButton:hover {
    border-color: var(--ag-200) !important;
    background: var(--ag-50) !important;
}
