/* Auth Modal - Premium watch brand styling (compacted) */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(12, 7, 20, 0.68);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease-out, visibility 180ms ease-out;
}

.auth-modal-overlay--open {
    opacity: 1;
    visibility: visible;
}

.auth-modal-card {
    position: relative;
    width: 500px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 40px);
    background: rgba(245, 245, 247, 0.92);
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.30);
    padding: 20px 26px 16px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.auth-modal-overlay--open .auth-modal-card {
    opacity: 1;
    transform: scale(1);
}

.auth-modal-watermark {
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    font-size: 100px;
    font-weight: 700;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: rgba(70, 70, 70, 0.06);
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.auth-modal-content {
    position: relative;
    z-index: 1;
}

.auth-modal-logo {
    display: block;
    width: 140px;
    max-height: 60px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 8px;
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #514940;
    margin-bottom: 12px;
    text-align: left;
}

.auth-modal-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    font-family: Georgia, 'Times New Roman', serif;
    color: #5c5148;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.auth-modal-input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 18px;
    font-size: 16px;
    color: #514940;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-modal-input::placeholder {
    color: #9e9288;
}

.auth-modal-input:focus {
    border-color: #1f6097;
    box-shadow: 0 0 0 3px rgba(31, 96, 151, 0.12), 0 8px 18px rgba(0, 0, 0, 0.13);
}

.auth-modal-input--error {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12), 0 8px 18px rgba(0, 0, 0, 0.13);
}

.auth-modal-input-group {
    margin-bottom: 12px;
}

.auth-modal-error {
    font-size: 12px;
    color: #b42318;
    margin-top: 5px;
    margin-left: 2px;
}

.auth-modal-reset-desc {
    text-align: center;
    font-size: 14px;
    color: #6b625c;
    margin: 0 0 16px;
    line-height: 1.5;
}

.auth-modal-reset-success-desc {
    text-align: center;
    font-size: 14px;
    color: #6b625c;
    margin: 0 0 20px;
    line-height: 1.5;
}

.auth-modal-forgot {
    display: block;
    text-align: right;
    font-size: 11px;
    color: #514940;
    text-decoration: none;
    margin: 6px 2px 0;
}

.auth-modal-forgot:hover {
    text-decoration: underline;
}

.auth-modal-switch {
    text-align: center;
    margin: 12px 0 10px;
}

.auth-modal-switch-text {
    font-size: 13px;
    color: #6b625c;
}

.auth-modal-switch-link {
    color: #514940;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.auth-modal-btn-primary {
    display: block;
    margin: 0 auto 12px;
    width: 210px;
    height: 40px;
    border-radius: 999px;
    background: #1e3a8a;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 7px 16px rgba(20, 80, 130, 0.30);
    cursor: pointer;
    transition: transform 150ms ease, filter 150ms ease;
}

.auth-modal-btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.auth-modal-btn-full {
    display: block;
    width: calc(100% - 8px);
    max-width: 482px;
    height: 42px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: #1e3a8a;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 7px 16px rgba(20, 80, 130, 0.30);
    cursor: pointer;
    transition: transform 150ms ease, filter 150ms ease;
}

.auth-modal-btn-full:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.auth-modal-divider-wrap {
    position: relative;
    height: 1px;
    background: rgba(80, 70, 65, 0.25);
    margin: 10px 0;
}

.auth-modal-divider-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #5a5048;
}

.auth-modal-provider-title {
    font-size: 18px;
    font-weight: 800;
    color: #514940;
    margin-bottom: 10px;
    text-align: left;
}

.auth-modal-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    margin: 0 auto 4px;
    transition: transform 150ms ease, box-shadow 150ms ease;
    border: none;
    cursor: pointer;
    padding: 0;
}

.auth-modal-google-form {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.auth-modal-google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.20);
}

.auth-modal-google-btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-modal-google-btn--disabled:hover {
    transform: none;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.auth-modal-google-notice {
    text-align: center;
    font-size: 10px;
    color: #6b625c;
    margin-bottom: 12px;
}

.auth-modal-legal {
    text-align: center;
    font-size: 9px;
    color: #6b625c;
    max-width: 90%;
    margin: 10px auto 4px;
    line-height: 1.25;
}

.auth-modal-legal a {
    color: #514940;
    text-decoration: none;
}

.auth-modal-legal a:hover {
    text-decoration: underline;
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #514940;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 150ms ease, background 150ms ease;
    z-index: 10;
}

.auth-modal-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.auth-modal-close svg {
    width: 16px;
    height: 16px;
}

.auth-modal-form {
    opacity: 1;
    transition: opacity 200ms ease-out;
}

.auth-modal-form--hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Internal scrollbar for small screens */
.auth-modal-card::-webkit-scrollbar {
    width: 6px;
}

.auth-modal-card::-webkit-scrollbar-track {
    background: transparent;
}

.auth-modal-card::-webkit-scrollbar-thumb {
    background: rgba(80, 70, 65, 0.20);
    border-radius: 3px;
}

/* Mobile */
@media (max-width: 640px) {
    .auth-modal-card {
        max-height: calc(100vh - 24px);
        height: auto;
        padding: 16px 16px;
        border-radius: 18px;
    }

    .auth-modal-logo {
        width: 130px;
        max-height: 50px;
        margin-bottom: 6px;
    }

    .auth-modal-title {
        font-size: 21px;
        margin-bottom: 10px;
    }

    .auth-modal-input {
        height: 44px;
        font-size: 15px;
    }

    .auth-modal-label {
        font-size: 13px;
    }

    .auth-modal-input-group {
        margin-bottom: 10px;
    }

    .auth-modal-btn-primary {
        width: 190px;
        height: 40px;
        font-size: 15px;
    }

    .auth-modal-btn-full {
        width: calc(100% - 8px);
        height: 40px;
    }

    .auth-modal-divider-wrap {
        margin: 8px 0;
    }

    .auth-modal-divider-circle {
        width: 32px;
        height: 32px;
    }

    .auth-modal-provider-title {
        font-size: 16px;
    }

    .auth-modal-google-btn {
        width: 58px;
        height: 58px;
    }

    .auth-modal-switch {
        margin: 10px 0 8px;
    }

    .auth-modal-legal {
        font-size: 8px;
        margin: 8px auto 4px;
    }
}

/* Validation feedback inside the authentication modal */
.auth-modal-error {
    min-height: 0;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.3;
    color: #b42318;
}
.auth-modal-error:empty { display: none; }
.auth-modal-error--general {
    margin: -2px 0 10px;
    padding: 8px 10px;
    border: 1px solid rgba(180, 35, 24, .22);
    border-radius: 10px;
    background: rgba(254, 242, 242, .88);
    text-align: center;
    font-size: 12px;
}
.auth-modal-input--error {
    border-color: rgba(180, 35, 24, .55) !important;
    box-shadow: 0 0 0 3px rgba(180,35,24,.08), 0 8px 18px rgba(0,0,0,.12) !important;
}


/* Ajustes finos de autenticación: separación, botones cortos y Google */
#auth-form-login .auth-modal-switch {
    margin: 14px 0 20px;
    line-height: 1.35;
}
#auth-form-login .auth-modal-divider-wrap {
    margin: 0 0 18px;
}
#auth-form-login .auth-modal-divider-circle {
    width: 34px;
    height: 34px;
}
#auth-form-login .auth-modal-provider-title {
    margin: 0 0 12px;
    text-align: center;
    font-size: 14px;
    letter-spacing: .03em;
}
.auth-modal-google-btn svg {
    display: block;
    width: 26px !important;
    height: 26px !important;
    flex: 0 0 26px;
}
.auth-modal-google-btn {
    width: 56px;
    height: 56px;
    border: 1px solid rgba(81,73,64,.08);
}
.auth-modal-google-form {
    margin: 0 0 8px;
}
#auth-form-reset .auth-modal-btn-primary,
#auth-form-reset-success .auth-modal-btn-primary {
    width: 170px;
    white-space: nowrap;
}
@media (max-width: 640px) {
    #auth-form-login .auth-modal-switch { margin-bottom: 18px; }
    #auth-form-login .auth-modal-divider-wrap { margin-bottom: 16px; }
    .auth-modal-google-btn { width: 54px; height: 54px; }
}

/* Mostrar contraseña sin romper la alineación de los campos de autenticación. */
.auth-password-wrap, .public-password-wrap { position: relative; width: 100%; }
.auth-password-wrap > input, .public-password-wrap > input { padding-right: 56px !important; }
.auth-password-toggle, .public-password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    display: inline-flex; justify-content: center; align-items: center; width: 37px; height: 37px;
    border: 0; border-radius: 50%; background: transparent; color: #5c5148; cursor: pointer;
    transition: color .15s, background .15s; }
.auth-password-toggle:hover, .public-password-toggle:hover { color: #1e3a8a; background: rgba(30,58,138,.08); }
.auth-password-toggle:focus-visible, .public-password-toggle:focus-visible { outline: 2px solid #1e3a8a; outline-offset: 1px; }
.auth-password-toggle .password-eye-icon, .public-password-toggle .password-eye-icon { width: 21px; height: 21px; }
.auth-password-toggle .password-eye-icon[hidden], .public-password-toggle .password-eye-icon[hidden] { display: none !important; }
