
.auth-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10000;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.auth-modal-overlay.active { display: flex; }


.auth-modal {
    background: #fff;
    width: 100%; max-width: 480px;
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.25), 0 8px 32px rgba(0,0,0,0.1);
    padding: 0;
    animation: authModalIn 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
@keyframes authModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}


.auth-modal-header {
    background: #111;
    padding: 72px 48px 44px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}


.auth-modal-header::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}


.auth-modal-header::after {
    content: 'SFTPMAC';
    position: absolute;
    bottom: -16px; right: -6px;
    font-size: 84px; font-weight: 900; font-style: italic;
    color: rgba(255,255,255,0.04);
    text-transform: uppercase; letter-spacing: -0.04em;
    line-height: 1; pointer-events: none; white-space: nowrap;
    z-index: 0;
}


.auth-modal-close, .auth-back-btn {
    position: absolute; top: 20px; cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
    width: 34px; height: 34px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s ease; z-index: 10;
}
.auth-modal-close { right: 20px; }
.auth-back-btn  { left: 20px; }
.auth-modal-close:hover, .auth-back-btn:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
    transform: scale(1.06);
}


.auth-modal-header { text-align: left; }

.auth-modal-title {
    font-size: 34px; font-weight: 900; font-style: italic;
    text-transform: uppercase; letter-spacing: -0.03em;
    color: #fff; margin-bottom: 10px; line-height: 0.9;
    position: relative; z-index: 1;
}
.auth-modal-subtitle {
    font-size: 9px; font-weight: 900;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase; letter-spacing: 0.35em;
    position: relative; z-index: 1;
}


.auth-modal-body {
    background: #fff;
    padding: 40px 48px 48px;
    position: relative;
}


.auth-form-group { margin-bottom: 20px; }

.auth-form-label {
    display: block; font-size: 9px; font-weight: 900;
    text-transform: uppercase; letter-spacing: 0.15em;
    margin-bottom: 10px; color: rgba(0,0,0,0.35);
}
.auth-form-input {
    width: 100%;
    background: #F5F5F7;
    border: 1.5px solid transparent;
    border-radius: 14px;
    padding: 15px 18px;
    font-size: 14px; font-weight: 600; color: #111;
    transition: all 0.2s ease;
}
.auth-form-input::placeholder { color: rgba(0,0,0,0.22); }
.auth-form-input:focus {
    outline: none; background: #fff;
    border-color: #111;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}


.auth-btn-primary {
    width: 100%; background: #111; color: #fff;
    padding: 17px 24px; border-radius: 999px; border: none; cursor: pointer;
    font-weight: 900; font-style: italic; text-transform: uppercase;
    letter-spacing: 0.12em; font-size: 12px; margin-top: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.45s cubic-bezier(0.19, 1, 0.22, 1);
}
.auth-btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}


.auth-error-message, .auth-success-message {
    padding: 12px 16px;
    font-size: 11px; font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px; display: none;
    border-radius: 12px; border-left: 3px solid;
}
.auth-error-message {
    background: #FEF2F2; color: #DC2626;
    border-color: #DC2626;
}
.auth-success-message {
    background: #EFF6FF; color: #2563eb;
    border-color: #2563eb;
}
.auth-error-message.active, .auth-success-message.active { display: block; }


.auth-code-inputs {
    display: flex; gap: 8px;
    justify-content: space-between; margin-bottom: 28px;
}
.auth-code-input {
    width: 100%; max-width: 58px; height: 66px;
    background: #F5F5F7; border: 1.5px solid transparent;
    border-radius: 14px;
    text-align: center; font-size: 24px; font-weight: 900; color: #111;
    transition: all 0.2s ease;
}
.auth-code-input:focus {
    outline: none; background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}


.auth-btn-text {
    background: none; border: none;
    font-size: 10px; font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.1em; color: rgba(0,0,0,0.3); cursor: pointer;
    transition: color 0.2s; padding: 4px 0;
}
.auth-btn-text:hover { color: #111; }


.auth-countdown-text {
    font-size: 9px; font-weight: 900;
    color: rgba(0,0,0,0.22);
    display: block; margin-top: 12px;
    text-transform: uppercase; letter-spacing: 0.12em;
}
.auth-helper-text {
    font-size: 13px; font-weight: 600; color: rgba(0,0,0,0.4);
    margin-bottom: 28px; line-height: 1.6; font-style: italic;
}


.auth-step-content { display: none; }
.auth-step-content.active { display: block; }
