.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .11em;
    color: #5a5248;
    font-weight: 600;
    transition: color .25s ease;
}

.field-premium:focus-within label {
    color: var(--gold-dk);
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a8074;
    font-size: 15px;
    pointer-events: none;
    transition: color .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
    z-index: 2;
}

.input-wrap.is-focused .input-icon,
.input-wrap:focus-within .input-icon {
    color: var(--gold-dk);
    transform: translateY(-50%) scale(1.08);
}

.input-wrap input,
.input-wrap .auth-input {
    width: 100%;
    height: 50px;
    border: 1px solid #d4c8b4;
    border-radius: calc(var(--radius) + 2px);
    padding: 0 14px 0 42px;
    font-size: 14.5px;
    font-family: var(--font);
    background: rgba(255, 255, 255, .88);
    color: #1a1410;
    transition: border-color var(--t), box-shadow var(--t), background .25s ease;
    position: relative;
    z-index: 1;
}

.input-wrap--password .auth-input--password {
    padding-right: 46px;
}

.auth-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #8a8074;
    cursor: pointer;
    transition: color .22s ease, background .22s ease, transform .22s cubic-bezier(.34, 1.56, .64, 1);
}

.auth-password-toggle:hover {
    color: var(--gold-dk);
    background: rgba(214, 163, 79, .1);
}

.auth-password-toggle:focus-visible {
    outline: 2px solid rgba(214, 163, 79, .45);
    outline-offset: 2px;
}

.auth-password-toggle:active {
    transform: translateY(-50%) scale(.94);
}

.auth-password-toggle__icon {
    position: absolute;
    font-size: 15px;
    line-height: 1;
    transition: opacity .22s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1);
}

.auth-password-toggle__icon--show {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.auth-password-toggle__icon--hide {
    opacity: 0;
    transform: scale(.82) rotate(-12deg);
}

.auth-password-toggle.is-visible .auth-password-toggle__icon--show {
    opacity: 0;
    transform: scale(.82) rotate(12deg);
}

.auth-password-toggle.is-visible .auth-password-toggle__icon--hide {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.input-wrap.is-focused .auth-password-toggle,
.input-wrap:focus-within .auth-password-toggle {
    color: #6f6558;
}

.input-wrap.is-focused .auth-password-toggle:hover,
.input-wrap:focus-within .auth-password-toggle:hover {
    color: var(--gold-dk);
}

.input-wrap input:focus,
.input-wrap .auth-input:focus {
    outline: none;
    border-color: rgba(167, 116, 47, .55);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(214, 163, 79, .12), 0 8px 24px rgba(18, 11, 8, .06);
}

.input-line {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold-dk), var(--gold-lt), var(--gold-dk));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .4s cubic-bezier(.22, 1, .36, 1);
    z-index: 3;
    pointer-events: none;
}

.input-wrap.is-focused .input-line,
.input-wrap:focus-within .input-line {
    transform: scaleX(1);
}

.input-wrap input::selection,
.input-wrap input::-moz-selection,
.input-wrap .auth-input::selection,
.input-wrap .auth-input::-moz-selection {
    background-color: #8b5e24 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus,
.input-wrap input:-webkit-autofill:active,
.input-wrap .auth-input:-webkit-autofill,
.input-wrap .auth-input:-webkit-autofill:hover,
.input-wrap .auth-input:-webkit-autofill:focus,
.input-wrap .auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #1a1410 !important;
    caret-color: #1a1410;
    transition: background-color 99999s ease-out, color 99999s ease-out;
}

.input-wrap.is-invalid input,
.input-wrap.is-invalid .auth-input {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(192, 57, 43, .1);
}

.input-wrap.is-shaking {
    animation: authInputShake .55s cubic-bezier(.36, .07, .19, .97);
}

@keyframes authInputShake {
    0%, 100% { transform: translateX(0); }
    12% { transform: translateX(-7px); }
    24% { transform: translateX(7px); }
    36% { transform: translateX(-5px); }
    48% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    72% { transform: translateX(3px); }
    84% { transform: translateX(-1px); }
}

.err {
    margin-top: 7px;
    color: var(--danger);
    font-size: 12px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    animation: authFieldRise .4s ease both;
}

.auth-field-error[hidden] {
    display: none !important;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #4a433b;
    cursor: pointer;
    user-select: none;
}

.auth-experience .app-check__box {
    background: #fff;
    border-color: #c4b8a4;
}

.auth-experience .app-check:hover .app-check__box {
    border-color: var(--gold-dk);
    background: #fff;
}

.auth-experience .app-check input[type="checkbox"]:checked + .app-check__box {
    background: linear-gradient(135deg, var(--gold-dk), var(--gold));
    border-color: var(--gold-dk);
    box-shadow: 0 4px 12px rgba(167, 116, 47, .28);
}

.auth-experience .app-check__label {
    color: #4a433b;
}

.link {
    font-size: 13px;
    color: var(--gold-dk);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color .2s ease;
}

.link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

.link:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.btn-signin {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: calc(var(--radius) + 2px);
    cursor: pointer;
    background: linear-gradient(135deg, #8f6328 0%, var(--gold-dk) 35%, var(--gold) 100%);
    background-size: 200% 100%;
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    font-family: var(--font);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform var(--t), box-shadow var(--t), background-position .5s ease;
    box-shadow: 0 12px 28px rgba(143, 99, 40, .32), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.btn-signin__content {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-signin__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: btnShineSweep 3.5s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes btnShineSweep {
    0%, 65% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

.btn-signin:hover {
    transform: translateY(-2px);
    background-position: 100% 0;
    box-shadow: 0 18px 36px rgba(143, 99, 40, .38), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn-signin:active {
    transform: translateY(0);
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    transform: scale(0);
    animation: btnRipple .65s ease-out forwards;
    pointer-events: none;
    z-index: 1;
}

@keyframes btnRipple {
    to { transform: scale(1); opacity: 0; }
}

.notice {
    margin-bottom: 18px;
    border-radius: var(--radius);
    padding: 11px 12px;
    font-size: 12px;
    border: 1px solid;
    animation: authFieldRise .45s ease both;
}

.notice.success {
    border-color: rgba(45, 159, 107, .25);
    background: rgba(45, 159, 107, .12);
    color: #1f6e4b;
}

.notice.info {
    border-color: rgba(58, 123, 213, .25);
    background: rgba(58, 123, 213, .12);
    color: #1f4b86;
}

.auth-credit {
    text-align: center;
    font-size: 11px;
    line-height: 1.55;
    color: #6b6358;
    margin-top: 10px;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.auth-credit a {
    color: var(--gold-dk);
    font-weight: 600;
    text-decoration: none;
}

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

/* Password recovery */
.auth-recovery-header {
    text-align: center;
}

.auth-recovery-badge {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 14px;
    border: 1px solid rgba(167, 116, 47, .35);
    background: linear-gradient(145deg, rgba(214, 163, 79, .2) 0%, rgba(167, 116, 47, .1) 100%);
    color: var(--gold-dk);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 10px 28px rgba(18, 11, 8, .08), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.auth-recovery-steps {
    list-style: none;
    margin: 0 0 22px;
    padding: 14px 16px;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid rgba(212, 200, 180, .65);
    background: linear-gradient(180deg, rgba(255, 255, 255, .72) 0%, rgba(250, 246, 238, .92) 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-recovery-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #4a433b;
}

.auth-recovery-steps__num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dk), var(--gold));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    box-shadow: 0 4px 10px rgba(167, 116, 47, .22);
}

.auth-recovery-trust {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 20px;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(58, 123, 213, .18);
    background: rgba(58, 123, 213, .06);
    color: #3d4f63;
    font-size: 12px;
    line-height: 1.5;
}

.auth-recovery-trust i {
    flex-shrink: 0;
    margin-top: 1px;
    color: #3a7bd5;
    font-size: 13px;
}

.auth-recovery-success {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 12px;
    margin-bottom: 20px;
}

.auth-recovery-success__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(45, 159, 107, .16);
    color: #1f6e4b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.auth-recovery-success__body {
    flex: 1;
    min-width: 0;
}

.auth-recovery-success__body strong {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.auth-recovery-success__body p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.auth-recovery-success__hint {
    margin-top: 6px !important;
    color: #3d6b52;
    opacity: .9;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    padding: 11px 14px;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid #d4c8b4;
    background: rgba(255, 255, 255, .55);
    color: #4a433b;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.auth-back-link:hover {
    border-color: rgba(167, 116, 47, .45);
    background: #fff;
    color: var(--gold-dk);
    box-shadow: 0 6px 18px rgba(18, 11, 8, .06);
    transform: translateY(-1px);
}

.auth-back-link i {
    font-size: 14px;
    transition: transform .25s ease;
}

.auth-back-link:hover i {
    transform: translateX(-3px);
}
