/* ============================================================
   AUTH MODALS — aligned with login.html landing design
   ============================================================ */

.auth-modal .modal-dialog {
    max-width: 440px;
}

.auth-modal.auth-modal--wide .modal-dialog {
    max-width: 640px;
}

.auth-modal .modal-content {
    border: 1px solid var(--line, #E5DFD2);
    border-radius: var(--radius, 14px);
    overflow: hidden;
    box-shadow: var(--shadow, 0 18px 50px -24px rgba(20, 20, 25, .35));
    background: var(--paper, #FAF8F3);
}

.auth-modal__header {
    position: relative;
    background: var(--ink, #24242A);
    color: var(--white, #FFFFFF);
    border-bottom: 1px solid var(--line-dark, #33333B);
    padding: 1.15rem 1.25rem;
    justify-content: center;
}

.auth-modal__title {
    font-family: var(--f-display, "Archivo", system-ui, sans-serif);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 0;
    color: var(--white, #FFFFFF);
}

.auth-modal__subtitle {
    font-size: .8125rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, .75);
    margin-top: .35rem;
    max-width: 28rem;
}

.auth-modal__trial-note {
    font-size: .9rem;
    line-height: 1.5;
    color: var(--ink, #24242A);
    background: #E3F4E8;
    border: 1px solid rgba(27, 107, 58, 0.25);
    border-radius: 10px;
    padding: .85rem 1rem;
    margin: 0 0 1rem;
}

.auth-modal__header .btn-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    filter: invert(1) grayscale(1) brightness(2);
    opacity: .75;
}

.auth-modal__header .btn-close:hover {
    opacity: 1;
}

.auth-modal .modal-body {
    padding: 1.5rem 1.5rem 1.25rem;
    background: var(--paper, #FAF8F3);
}

.auth-modal .modal-footer {
    display: none;
}

.containerform {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: none;
    margin: 0;
}

.auth-modal__field,
.auth-modal .containerform input[type="email"],
.auth-modal .containerform input[type="password"],
.auth-modal .containerform input[type="text"],
.auth-modal .containerform input[type="tel"],
.auth-modal .containerform select {
    width: 100%;
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-size: .95rem;
    color: var(--ink, #24242A);
    background: var(--white, #FFFFFF);
    border: 1px solid var(--line, #E5DFD2);
    border-radius: var(--radius-sm, 10px);
    padding: .75rem .9rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-modal__field::placeholder,
.auth-modal .containerform input::placeholder {
    color: var(--muted-light, #A9A9B4);
}

.auth-modal__field:focus,
.auth-modal .containerform input:focus,
.auth-modal .containerform select:focus {
    outline: none;
    border-color: var(--amber, #F6B60C);
    box-shadow: 0 0 0 3px rgba(246, 182, 12, .22);
}

.auth-modal__password-field {
    position: relative;
    width: 100%;
}

.auth-modal__password-field .auth-modal__field {
    padding-right: 2.85rem;
}

.auth-modal__password-toggle {
    align-items: center;
    background: transparent;
    border: none;
    color: var(--muted, #6E6E77);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    padding: .25rem;
    position: absolute;
    right: .55rem;
    top: 50%;
    transform: translateY(-50%);
}

.auth-modal__password-toggle:hover {
    color: var(--ink, #24242A);
}

.auth-modal__password-toggle-icon--visible {
    color: var(--amber, #F6B60C);
}

.auth-modal__password-toggle:hover .auth-modal__password-toggle-icon--visible {
    color: var(--amber-deep, #D89C00);
}

.auth-modal__password-toggle:focus-visible {
    border-radius: 6px;
    outline: 2px solid var(--amber, #F6B60C);
    outline-offset: 2px;
}

.auth-modal__password-toggle .preview-icon {
    display: block;
    height: 24px;
    width: 24px;
}

.auth-modal .containerform select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236E6E77' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    padding-right: 2.2rem;
}

.auth-modal__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
    font-family: var(--f-display, "Archivo", system-ui, sans-serif);
    font-weight: 700;
    font-size: .98rem;
    letter-spacing: -.01em;
    padding: .85rem 1.4rem;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--amber, #F6B60C);
    color: var(--ink, #24242A);
    box-shadow: 0 8px 20px -10px rgba(246, 182, 12, .9);
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.auth-modal__submit:hover {
    background: var(--amber-deep, #D89C00);
}

.auth-modal__submit:active {
    transform: translateY(1px);
}

/* Register — account type cards */
.auth-modal .containerform .row.g-3 {
    align-items: stretch;
}

.auth-modal .containerform .row.g-3 > [class*="col-"] {
    min-width: 0;
}

.auth-modal .btn-check + .btn-outline-primary {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    white-space: normal;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: .85rem .65rem !important;
    gap: .5rem;
    color: var(--ink, #24242A) !important;
    border: 1px solid var(--line, #E5DFD2) !important;
    border-radius: var(--radius-sm, 10px) !important;
    background: var(--white, #FFFFFF) !important;
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-weight: 400;
    font-size: inherit;
    letter-spacing: normal;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.auth-modal .btn-check + .btn-outline-primary svg {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.auth-modal .btn-check + .btn-outline-primary .mt-2 {
    width: 100%;
    min-width: 0;
    margin-top: 0 !important;
}

.auth-modal .btn-check + .btn-outline-primary h5 {
    font-family: var(--f-display, "Archivo", system-ui, sans-serif);
    font-weight: 700;
    font-size: .92rem;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.auth-modal .btn-check + .btn-outline-primary small {
    display: block;
    font-size: .78rem;
    line-height: 1.35;
    color: var(--muted, #6E6E77);
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.auth-modal .btn-check:checked + .btn-outline-primary {
    background: var(--amber-soft, #FFF3D0) !important;
    border-color: var(--amber, #F6B60C) !important;
    box-shadow: 0 0 0 1px var(--amber, #F6B60C);
}

.auth-modal .btn-check + .btn-outline-primary:hover {
    border-color: var(--amber, #F6B60C) !important;
    background: var(--paper-2, #F1ECE1) !important;
}

.auth-modal .form-label {
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink, #24242A);
    margin-bottom: .35rem;
}

.auth-modal__phone-block .form-text {
    margin-top: .35rem;
}

.auth-modal__password-rules {
    margin-top: -.15rem;
    margin-bottom: .5rem;
}

.auth-modal__validation-error {
    font-size: .875rem;
    line-height: 1.45;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid rgba(234, 88, 12, 0.35);
    border-radius: 10px;
    padding: .75rem .9rem;
    margin-bottom: .85rem;
}

.auth-modal__field.auth-modal__field--invalid,
.auth-modal .form-control.auth-modal__field--invalid {
    border-color: #ea580c;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

.auth-modal__legal-consent.auth-modal__legal-consent--invalid {
    padding: .65rem .75rem;
    margin-bottom: .5rem;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid rgba(234, 88, 12, 0.35);
}

.auth-modal__field--readonly {
    color: var(--muted, #6E6E77);
    background: var(--paper-2, #F1ECE1);
    cursor: default;
    user-select: none;
}

.auth-modal__field--readonly:focus {
    border-color: var(--line, #E5DFD2);
    box-shadow: none;
}

.auth-modal .form-control[type="file"] {
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-size: .88rem;
    border: 1px solid var(--line, #E5DFD2);
    border-radius: var(--radius-sm, 10px);
    background: var(--white, #FFFFFF);
    padding: .55rem .75rem;
}

.auth-modal .form-text {
    font-size: .82rem;
    color: var(--muted, #6E6E77);
    line-height: 1.5;
}

.auth-modal .form-text hr {
    border: none;
    border-top: 1px solid var(--line, #E5DFD2);
    margin: .75rem 0;
}

.auth-modal__legal-consent {
    margin: .35rem 0 1rem;
    padding-left: 1.65rem;
}

.auth-modal__legal-consent .form-check-label {
    font-size: .86rem;
    color: var(--muted, #6E6E77);
    line-height: 1.45;
}

.auth-modal__legal-consent a {
    color: var(--ink, #24242A);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-modal__legal-consent a:hover {
    color: var(--amber-deep, #D89C00);
}

.auth-modal__body--register {
    position: relative;
}

.register-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(250, 248, 243, .92);
    border-radius: 0 0 var(--radius, 14px) var(--radius, 14px);
}

.register-loading__bus {
    color: var(--amber, #F6B60C);
    animation: register-bus-spin 1.1s linear infinite;
    transform-origin: center center;
}

.register-loading__text {
    margin: 0;
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink, #24242A);
    text-align: center;
}

@keyframes register-bus-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-modal__submit:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* Info modal */
.auth-modal .modal-body span#infoModalText {
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-size: .95rem;
    color: var(--ink, #24242A);
    line-height: 1.55;
}

.auth-modal .modal-body span#infoModalText a {
    color: var(--amber-deep, #D89C00);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-modal .modal-body span#infoModalText a:hover {
    color: var(--ink, #24242A);
}

.auth-modal__forgot-wrap {
    margin: -.35rem 0 0;
    text-align: right;
}

.auth-modal__forgot-link,
.auth-modal__secondary-link {
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-size: .875rem;
    font-weight: 600;
    color: var(--muted, #6E6E77);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-modal__forgot-link:hover,
.auth-modal__secondary-link:hover {
    color: var(--ink, #24242A);
}

.auth-modal__secondary-link {
    display: block;
    width: 100%;
    margin-top: .35rem;
    text-align: center;
    text-decoration: none;
}

.auth-modal__forgot-intro {
    font-size: .92rem;
    line-height: 1.5;
    color: var(--muted, #6E6E77);
    margin: 0 0 1rem;
}

.auth-modal__forgot-success {
    font-size: .92rem;
    line-height: 1.5;
    color: #1B6B3A;
    background: #E3F4E8;
    border: 1px solid rgba(27, 107, 58, 0.25);
    border-radius: 10px;
    padding: .75rem .9rem;
}

/* Searchable country + translated file input (same behavior as app pages) */
.auth-modal .country-combobox {
    position: relative;
    width: 100%;
}

.auth-modal .country-combobox__input {
    width: 100%;
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-size: .95rem;
    color: var(--ink, #24242A);
    background: var(--white, #FFFFFF);
    border: 1px solid var(--line, #E5DFD2);
    border-radius: var(--radius-sm, 10px);
    padding: .75rem .9rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-modal .country-combobox__input::placeholder {
    color: var(--muted-light, #A9A9B4);
}

.auth-modal .country-combobox__input:focus {
    outline: none;
    border-color: var(--amber, #F6B60C);
    box-shadow: 0 0 0 3px rgba(246, 182, 12, .22);
}

.auth-modal .country-combobox__menu {
    position: absolute;
    z-index: 1080;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line, #E5DFD2);
    border-radius: var(--radius-sm, 10px);
    box-shadow: 0 8px 24px rgba(36, 36, 42, 0.12);
}

.auth-modal .country-combobox__option {
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--ink, #24242A);
}

.auth-modal .country-combobox__option:hover,
.auth-modal .country-combobox__option--highlighted {
    background: rgba(246, 182, 12, 0.14);
}

.auth-modal .country-combobox__option--selected {
    font-weight: 600;
}

.auth-modal .country-combobox__empty {
    padding: 0.45rem 0.75rem;
    color: var(--muted, #6E6E77);
    font-size: 0.88rem;
}

.auth-modal .app-translated-file-input {
    display: flex;
    align-items: stretch;
    width: 100%;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    font-family: var(--f-body, "Inter", system-ui, sans-serif);
    font-size: .88rem;
    border: 1px solid var(--line, #E5DFD2);
    border-radius: var(--radius-sm, 10px);
    background: var(--white, #FFFFFF);
}

.auth-modal .app-translated-file-input__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-modal .app-translated-file-input__browse {
    flex-shrink: 0;
    align-self: stretch;
    padding: .55rem .75rem;
    margin: 0;
    color: var(--ink, #24242A);
    background-color: var(--paper-2, #F1ECE1);
    border: 0;
    border-inline-end: 1px solid var(--line, #E5DFD2);
    border-radius: 0;
    font: inherit;
    line-height: 1.5;
    cursor: pointer;
}

.auth-modal .app-translated-file-input:not(:has(.app-translated-file-input__native:disabled)):hover .app-translated-file-input__browse {
    background-color: #e8e2d6;
}

.auth-modal .app-translated-file-input__status {
    flex: 1;
    min-width: 0;
    align-self: center;
    padding: .55rem .75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted, #6E6E77);
}
