/* password_recovery_style.css - редизайн страницы восстановления пароля */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background:
        radial-gradient(circle at left top, rgba(96, 165, 250, 0.35), transparent 18%),
        radial-gradient(circle at right bottom, rgba(168, 85, 247, 0.32), transparent 22%),
        linear-gradient(135deg, #0f172a 0%, #111827 44%, #1d4ed8 100%);
    transition: background 0.25s ease;
}

body[data-theme="light"] {
    background:
        radial-gradient(circle at left top, rgba(96, 165, 250, 0.20), transparent 18%),
        radial-gradient(circle at right bottom, rgba(168, 85, 247, 0.18), transparent 22%),
        linear-gradient(135deg, #f8fbff 0%, #eef4ff 42%, #e0ebff 100%);
}

body[data-theme="light"] .card {
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
}

body[data-theme="light"] .email-input {
    background: #f8fafc;
}

.theme-toggle {
    border: none;
    background: rgba(255,255,255,0.12);
    color: white;
    border-radius: 999px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

body[data-theme="light"] .theme-toggle {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.main-container {
    width: 100%;
    max-width: 560px;
}

.form-wrapper {
    width: 100%;
}

.card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

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

.flow-link-row.compact a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.subtitle {
    color: #64748b;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.file-input-group {
    margin-bottom: 18px;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #334155;
}

.icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #dbeafe;
}

.email-input {
    width: 100%;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    font: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.email-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.file-info {
    margin-top: 8px;
    font-size: 0.82rem;
    color: #64748b;
}

.submit-btn {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

.resend-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 18px;
    flex-wrap: wrap;
}

.resend-link,
.back-btn {
    border: none;
    background: transparent;
    font: inherit;
    cursor: pointer;
    color: #2563eb;
    font-weight: 700;
}

.timer {
    color: #64748b;
    font-size: 0.84rem;
}

.back-btn {
    margin-top: 12px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f8fafc;
}

.result-area {
    margin-top: 18px;
    background: #f8fafc;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.result-label {
    color: #334155;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
}

@media (max-width: 560px) {
    .card {
        padding: 22px 18px;
    }

    h1 {
        font-size: 1.65rem;
    }
}
    background: #a0aec0;
    border-radius: 10px;
}

/* адаптивность */
@media (max-width: 850px) {
    .main-container {
        flex-direction: column;
    }

    .history-wrapper {
        position: static;
    }

    .history-list {
        max-height: 350px;
    }

    .result-number {
        font-size: 2.2rem;
    }
}

/* минимальный интерактив для выбранных файлов */
.file-selected {
    border-color: #48bb78;
    background: #f0fff4;
}


/* Дополнительные стили для страницы восстановления пароля */

/* стили для полей ввода email/code */
.email-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 60px;
    transition: all 0.25s ease;
    font-family: inherit;
    background: white;
    margin-top: 10px;
}

.email-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.email-input.error {
    border-color: #f56565;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* стили для шагов */
.step {
    transition: all 0.3s ease;
}

.step.active {
    display: block;
    width: 600px;
}

/* информация о повторной отправке */
.resend-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 25px 0;
    padding: 0 10px;
}
div {
    width: 80%;
    align-items: center;
    margin: 0 auto;
}
.resend-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 5px 10px;
    border-radius: 20px;
}

.resend-link:hover:not(:disabled) {
    background: #edf2f7;
    transform: scale(1.02);
}

.resend-link:disabled {
    color: #cbd5e0;
    cursor: not-allowed;
}

.timer {
    font-family: monospace;
    font-size: 0.9rem;
    color: #718096;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
}

/* кнопка назад */
.back-btn {
    width: 100%;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 15px;
}

.back-btn:hover {
    background: #edf2f7;
    border-color: #667eea;
    transform: translateY(-2px);
}

/* статусные сообщения в result-area */
.result-area.success {
    background: #f0fff4;
    border-color: #48bb78;
}

.result-area.success .result-number {
    background: linear-gradient(135deg, #48bb78, #38a169);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.result-area.error {
    background: #fff5f5;
    border-color: #f56565;
}

.result-area.error .result-number {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* лоадер для кнопок */
.submit-btn.loading {
    opacity: 0.7;
    cursor: wait;
    transform: scale(0.98);
}

.submit-btn.loading span:first-child {
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* нотификации */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.notification.success {
    border-left-color: #48bb78;
}

.notification.error {
    border-left-color: #f56565;
}

.notification.info {
    border-left-color: #4299e1;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* адаптивность для форм */
@media (max-width: 850px) {
    .email-input {
        font-size: 16px; /* предотвращает зум на мобильных */
    }
    
    .resend-info {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .timer {
        text-align: center;
    }
}