/* auth.css — стили welcome/login/register экранов, mobile-first */

.auth-body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-container {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.auth-stage { position: relative; }

.auth-back {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
}

.auth-logo {
    font-size: 56px;
    text-align: center;
    margin-bottom: 6px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin: 0 0 6px;
}

.auth-sub {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin: 0 0 24px;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    transition: transform .1s, box-shadow .2s;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.auth-btn.primary:active { transform: scale(.98); }
.auth-btn.primary:disabled { opacity: .5; cursor: not-allowed; }

.auth-btn.secondary {
    background: #f0f2f8;
    color: #555;
}

.auth-hint {
    text-align: center;
    color: #aaa;
    font-size: 12px;
    margin-top: 22px;
}
.auth-hint code {
    background: #f0f2f8;
    padding: 2px 6px;
    border-radius: 4px;
    color: #555;
}

.auth-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin: 14px 0 6px;
    font-weight: 500;
}

.auth-input {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid #e0e4f0;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color .15s;
}
.auth-input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-error {
    color: #e74c3c;
    font-size: 13px;
    margin: 10px 0;
    min-height: 18px;
}

.auth-otp-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 20px 0 8px;
}

.auth-otp-cell {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    padding: 12px 0;
    border: 1.5px solid #e0e4f0;
    border-radius: 10px;
    background: #fafbff;
    min-height: 48px;
}
.auth-otp-cell:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
}

.auth-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .auth-container { padding: 24px 18px; border-radius: 16px; }
    .auth-title { font-size: 22px; }
    .auth-otp-cell { font-size: 18px; padding: 10px 0; }
}

/* SMS-виджет для показа OTP во время авторизации */
.sms-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: #1f2937;
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
    overflow: hidden;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.sms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #111827;
    font-size: 13px;
    font-weight: 600;
}
.sms-close {
    background: transparent; color: #9ca3af; border: none;
    font-size: 16px; cursor: pointer; padding: 0 4px;
}
.sms-list { max-height: 220px; overflow-y: auto; }
.sms-item {
    padding: 10px 14px;
    border-bottom: 1px solid #374151;
    font-size: 13px;
    line-height: 1.4;
}
.sms-item:last-child { border-bottom: none; }
.sms-item .sms-code {
    display: inline-block;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 18px;
    font-weight: 700;
    color: #60a5fa;
    letter-spacing: 3px;
    margin-top: 4px;
    cursor: pointer;
}
.sms-item .sms-code:hover { color: #93c5fd; }
.sms-item .sms-time { color: #9ca3af; font-size: 11px; }
.sms-empty { padding: 16px; text-align: center; color: #9ca3af; font-size: 13px; }

@media (max-width: 480px) {
    .sms-widget { left: 12px; right: 12px; width: auto; bottom: 12px; }
}
